From 17928d0e906ba576950b38465286ea55da84752e Mon Sep 17 00:00:00 2001 From: ACC01ADE Date: Fri, 7 Jul 2023 03:37:51 +0200 Subject: [PATCH] deployments --- contracts/HolographFactory.sol | 11 + contracts/drops/token/HolographDropERC721.sol | 50 +- .../HolographFactory.json | 24 +- .../c71d96e115e745dd34ef9239c385494d.json | 465 ++++++++++++++++++ .../avalancheTestnet/HolographFactory.json | 24 +- .../c71d96e115e745dd34ef9239c385494d.json | 465 ++++++++++++++++++ .../HolographFactory.json | 26 +- .../c71d96e115e745dd34ef9239c385494d.json | 465 ++++++++++++++++++ .../HolographFactory.json | 24 +- .../c71d96e115e745dd34ef9239c385494d.json | 465 ++++++++++++++++++ .../polygonTestnet/HolographFactory.json | 42 +- .../c71d96e115e745dd34ef9239c385494d.json | 465 ++++++++++++++++++ hardhat.config.ts | 9 + src/HolographFactory.sol | 11 + 14 files changed, 2460 insertions(+), 86 deletions(-) create mode 100644 deployments/develop/arbitrumTestnetGoerli/solcInputs/c71d96e115e745dd34ef9239c385494d.json create mode 100644 deployments/develop/avalancheTestnet/solcInputs/c71d96e115e745dd34ef9239c385494d.json create mode 100644 deployments/develop/ethereumTestnetGoerli/solcInputs/c71d96e115e745dd34ef9239c385494d.json create mode 100644 deployments/develop/optimismTestnetGoerli/solcInputs/c71d96e115e745dd34ef9239c385494d.json create mode 100644 deployments/develop/polygonTestnet/solcInputs/c71d96e115e745dd34ef9239c385494d.json diff --git a/contracts/HolographFactory.sol b/contracts/HolographFactory.sol index 2cbd98d6f..429024995 100644 --- a/contracts/HolographFactory.sol +++ b/contracts/HolographFactory.sol @@ -117,6 +117,8 @@ import "./struct/BridgeSettings.sol"; import "./struct/DeploymentConfig.sol"; import "./struct/Verification.sol"; +import "./library/Strings.sol"; + /** * @title Holograph Factory * @author https://github.com/holographxyz @@ -372,6 +374,15 @@ contract HolographFactory is Admin, Initializable, Holographable, HolographFacto */ return (signer != address(0) && (ecrecover(keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)), v, r, s) == signer || + ( + ecrecover( + keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n66", Strings.toHexString(uint256(hash), 32))), + v, + r, + s + ) + ) == + signer || ecrecover(hash, v, r, s) == signer)); } diff --git a/contracts/drops/token/HolographDropERC721.sol b/contracts/drops/token/HolographDropERC721.sol index d58a33819..7acf05847 100644 --- a/contracts/drops/token/HolographDropERC721.sol +++ b/contracts/drops/token/HolographDropERC721.sol @@ -284,10 +284,20 @@ contract HolographDropERC721 is NonReentrant, ERC721H, IHolographDropERC721 { // this is a default filter that can be used for OS royalty filtering // marketFilterAddress = 0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6; // we just register to OS royalties and let OS handle it for us with their default filter contract - openseaOperatorFilterRegistry.register(address(this)); + HolographERC721Interface(holographer()).sourceExternalCall( + address(openseaOperatorFilterRegistry), + abi.encodeWithSelector(IOperatorFilterRegistry.register.selector, holographer()) + ); } else { // allow user to specify custom filtering contract address - openseaOperatorFilterRegistry.registerAndSubscribe(address(this), marketFilterAddress); + HolographERC721Interface(holographer()).sourceExternalCall( + address(openseaOperatorFilterRegistry), + abi.encodeWithSelector( + IOperatorFilterRegistry.registerAndSubscribe.selector, + holographer(), + marketFilterAddress + ) + ); } assembly { sstore(_osRegistryEnabledSlot, true) @@ -581,16 +591,12 @@ contract HolographDropERC721 is NonReentrant, ERC721H, IHolographDropERC721 { * @notice Requires admin permissions * @param args Calldata args to pass to the registry */ - function updateMarketFilterSettings(bytes calldata args) external onlyOwner returns (bytes memory) { - (bool success, bytes memory ret) = address(openseaOperatorFilterRegistry).call(args); - if (!success) { - revert RemoteOperatorFilterRegistryCallFailed(); - } - bool osRegistryEnabled = openseaOperatorFilterRegistry.isRegistered(address(this)); + function updateMarketFilterSettings(bytes calldata args) external onlyOwner { + HolographERC721Interface(holographer()).sourceExternalCall(address(openseaOperatorFilterRegistry), args); + bool osRegistryEnabled = openseaOperatorFilterRegistry.isRegistered(holographer()); assembly { sstore(_osRegistryEnabledSlot, osRegistryEnabled) } - return ret; } /** @@ -598,19 +604,31 @@ contract HolographDropERC721 is NonReentrant, ERC721H, IHolographDropERC721 { * @param enable Enable filtering to non-royalty payout marketplaces */ function manageMarketFilterSubscription(bool enable) external onlyOwner { - address self = address(this); + address self = holographer(); if (marketFilterAddress == address(0)) { revert MarketFilterAddressNotSupportedForChain(); } if (!openseaOperatorFilterRegistry.isRegistered(self) && enable) { - openseaOperatorFilterRegistry.registerAndSubscribe(self, marketFilterAddress); + HolographERC721Interface(self).sourceExternalCall( + address(openseaOperatorFilterRegistry), + abi.encodeWithSelector(IOperatorFilterRegistry.registerAndSubscribe.selector, self, marketFilterAddress) + ); } else if (enable) { - openseaOperatorFilterRegistry.subscribe(self, marketFilterAddress); + HolographERC721Interface(self).sourceExternalCall( + address(openseaOperatorFilterRegistry), + abi.encodeWithSelector(IOperatorFilterRegistry.subscribe.selector, self, marketFilterAddress) + ); } else { - openseaOperatorFilterRegistry.unsubscribe(self, false); - openseaOperatorFilterRegistry.unregister(self); - } - bool osRegistryEnabled = openseaOperatorFilterRegistry.isRegistered(address(this)); + HolographERC721Interface(self).sourceExternalCall( + address(openseaOperatorFilterRegistry), + abi.encodeWithSelector(IOperatorFilterRegistry.unsubscribe.selector, self, false) + ); + HolographERC721Interface(self).sourceExternalCall( + address(openseaOperatorFilterRegistry), + abi.encodeWithSelector(IOperatorFilterRegistry.unregister.selector, self) + ); + } + bool osRegistryEnabled = openseaOperatorFilterRegistry.isRegistered(self); assembly { sstore(_osRegistryEnabledSlot, osRegistryEnabled) } diff --git a/deployments/develop/arbitrumTestnetGoerli/HolographFactory.json b/deployments/develop/arbitrumTestnetGoerli/HolographFactory.json index be84ebdb9..77dddff2e 100644 --- a/deployments/develop/arbitrumTestnetGoerli/HolographFactory.json +++ b/deployments/develop/arbitrumTestnetGoerli/HolographFactory.json @@ -1,5 +1,5 @@ { - "address": "0xE70F94ED069Cca85c040Cd79FC7Ee0121690dE35", + "address": "0xaF27d972B6Ad681F72bB9acAe5382e829DAe61C5", "abi": [ { "inputs": [], @@ -386,28 +386,28 @@ "type": "receive" } ], - "transactionHash": "0xdd98ee3d21a4daa8c4cf2f82f339fc2873a9f881271334b19afd4ca4a6af25af", + "transactionHash": "0xf878d38ba67144d25b182fa42255175cb6da100d5636fd7c4f826d2589ea42ca", "receipt": { "to": "0x0C8aF56F7650a6E3685188d212044338c21d3F73", "from": "0xd078E391cBAEAa6C5785124a7207ff57d64604b7", "contractAddress": null, "transactionIndex": 1, - "gasUsed": "2506057", + "gasUsed": "2726256", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xd2e2896204f5c691fb92d19469086f06421ad009cd794cee86c0ac1ad9a29a46", - "transactionHash": "0xdd98ee3d21a4daa8c4cf2f82f339fc2873a9f881271334b19afd4ca4a6af25af", + "blockHash": "0x3cf6d40625d295fec67296e913e08bcebecf20e672bf4774e603f72eda128ad5", + "transactionHash": "0xf878d38ba67144d25b182fa42255175cb6da100d5636fd7c4f826d2589ea42ca", "logs": [], - "blockNumber": 23271897, - "cumulativeGasUsed": "2506057", + "blockNumber": 29617530, + "cumulativeGasUsed": "2726256", "status": 1, "byzantium": true }, "args": [], - "numDeployments": 1, - "solcInputHash": "4e4da9ecbae52632bf6e2156f395ff36", - "metadata": "{\"compiler\":{\"version\":\"0.8.13+commit.abaa5c0e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"BridgeableContractDeployed\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"adminCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"bridgeIn\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"bridgeOut\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"selector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"contractType\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"chainType\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"salt\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"byteCode\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"initCode\",\"type\":\"bytes\"}],\"internalType\":\"struct DeploymentConfig\",\"name\":\"config\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"}],\"internalType\":\"struct Verification\",\"name\":\"signature\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"}],\"name\":\"deployHolographableContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"contractType\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"chainType\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"salt\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"byteCode\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"initCode\",\"type\":\"bytes\"}],\"internalType\":\"struct DeploymentConfig\",\"name\":\"config\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"}],\"internalType\":\"struct Verification\",\"name\":\"signature\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"deployOnCurrentChain\",\"type\":\"bool\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"toChain\",\"type\":\"uint32\"}],\"internalType\":\"struct BridgeSettings[]\",\"name\":\"bridgeSettings\",\"type\":\"tuple[]\"}],\"name\":\"deployHolographableContractMultiChain\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"adminAddress\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getHolograph\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"holograph\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRegistry\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"registry\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"initPayload\",\"type\":\"bytes\"}],\"name\":\"init\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"adminAddress\",\"type\":\"address\"}],\"name\":\"setAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"holograph\",\"type\":\"address\"}],\"name\":\"setHolograph\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"registry\",\"type\":\"address\"}],\"name\":\"setRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"author\":\"https://github.com/holographxyz\",\"details\":\"The contract provides methods that allow for the creation of Holograph Protocol compliant smart contracts, that are capable of minting holographable assets\",\"kind\":\"dev\",\"methods\":{\"bridgeIn(uint32,bytes)\":{\"details\":\"This function directly forwards the calldata to the deployHolographableContract function It is used to allow for Holograph Bridge to make cross-chain deployments\"},\"bridgeOut(uint32,address,bytes)\":{\"details\":\"This function directly returns the calldata It is used to allow for Holograph Bridge to make cross-chain deployments\"},\"constructor\":{\"details\":\"Constructor is left empty and init is used instead\"},\"deployHolographableContract((bytes32,uint32,bytes32,bytes,bytes),(bytes32,bytes32,uint8),address)\":{\"details\":\"Using this function allows to deploy smart contracts that have the same address across all EVM chains\",\"params\":{\"config\":\"contract deployement configurations\",\"signature\":\"that was created by the wallet that created the original payload\",\"signer\":\"address of wallet that created the payload\"}},\"getHolograph()\":{\"details\":\"Used for storing a reference to all the primary modules and variables of the protocol\"},\"getRegistry()\":{\"details\":\"This module stores a reference for all deployed holographable smart contracts\"},\"init(bytes)\":{\"details\":\"This function is called by the deployer/factory when creating a contract\",\"params\":{\"initPayload\":\"abi encoded payload to use for contract initilaization\"}},\"setHolograph(address)\":{\"params\":{\"holograph\":\"address of the Holograph Protocol smart contract to use\"}},\"setRegistry(address)\":{\"params\":{\"registry\":\"address of the Holograph Registry smart contract to use\"}}},\"stateVariables\":{\"_holographSlot\":{\"details\":\"bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\"},\"_registrySlot\":{\"details\":\"bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\"}},\"title\":\"Holograph Factory\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"bridgeIn(uint32,bytes)\":{\"notice\":\"Deploy holographable contract via bridge request\"},\"bridgeOut(uint32,address,bytes)\":{\"notice\":\"Deploy holographable contract via bridge request\"},\"deployHolographableContract((bytes32,uint32,bytes32,bytes,bytes),(bytes32,bytes32,uint8),address)\":{\"notice\":\"Deploy a holographable smart contract\"},\"getHolograph()\":{\"notice\":\"Get the Holograph Protocol contract\"},\"getRegistry()\":{\"notice\":\"Get the Holograph Registry module\"},\"init(bytes)\":{\"notice\":\"Used internally to initialize the contract instead of through a constructor\"},\"setHolograph(address)\":{\"notice\":\"Update the Holograph Protocol contract address\"},\"setRegistry(address)\":{\"notice\":\"Update the Holograph Registry module address\"}},\"notice\":\"Deploy holographable contracts\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/HolographFactory.sol\":\"HolographFactory\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc721a-upgradeable/=erc721a-upgradeable/\",\":forge-std/=lib/forge-std/src/\"]},\"sources\":{\"contracts/HolographFactory.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nimport \\\"./abstract/Admin.sol\\\";\\nimport \\\"./abstract/Initializable.sol\\\";\\n\\nimport \\\"./enforcer/Holographer.sol\\\";\\n\\nimport \\\"./interface/Holographable.sol\\\";\\nimport \\\"./interface/HolographBridgeInterface.sol\\\";\\nimport \\\"./interface/HolographFactoryInterface.sol\\\";\\nimport \\\"./interface/HolographInterface.sol\\\";\\nimport \\\"./interface/HolographRegistryInterface.sol\\\";\\nimport \\\"./interface/InitializableInterface.sol\\\";\\n\\nimport \\\"./struct/BridgeSettings.sol\\\";\\nimport \\\"./struct/DeploymentConfig.sol\\\";\\nimport \\\"./struct/Verification.sol\\\";\\n\\n/**\\n * @title Holograph Factory\\n * @author https://github.com/holographxyz\\n * @notice Deploy holographable contracts\\n * @dev The contract provides methods that allow for the creation of Holograph Protocol compliant smart contracts, that are capable of minting holographable assets\\n */\\ncontract HolographFactory is Admin, Initializable, Holographable, HolographFactoryInterface {\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\\n */\\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\\n */\\n bytes32 constant _registrySlot = 0xce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7;\\n\\n /**\\n * @dev Constructor is left empty and init is used instead\\n */\\n constructor() {}\\n\\n /**\\n * @notice Used internally to initialize the contract instead of through a constructor\\n * @dev This function is called by the deployer/factory when creating a contract\\n * @param initPayload abi encoded payload to use for contract initilaization\\n */\\n function init(bytes memory initPayload) external override returns (bytes4) {\\n require(!_isInitialized(), \\\"HOLOGRAPH: already initialized\\\");\\n (address holograph, address registry) = abi.decode(initPayload, (address, address));\\n assembly {\\n sstore(_adminSlot, origin())\\n sstore(_holographSlot, holograph)\\n sstore(_registrySlot, registry)\\n }\\n _setInitialized();\\n return InitializableInterface.init.selector;\\n }\\n\\n /**\\n * @notice Deploy holographable contract via bridge request\\n * @dev This function directly forwards the calldata to the deployHolographableContract function\\n * It is used to allow for Holograph Bridge to make cross-chain deployments\\n */\\n function bridgeIn(uint32 /* fromChain*/, bytes calldata payload) external returns (bytes4) {\\n (DeploymentConfig memory config, Verification memory signature, address signer) = abi.decode(\\n payload,\\n (DeploymentConfig, Verification, address)\\n );\\n HolographFactoryInterface(address(this)).deployHolographableContract(config, signature, signer);\\n return Holographable.bridgeIn.selector;\\n }\\n\\n /**\\n * @notice Deploy holographable contract via bridge request\\n * @dev This function directly returns the calldata\\n * It is used to allow for Holograph Bridge to make cross-chain deployments\\n */\\n function bridgeOut(\\n uint32 /* toChain*/,\\n address /* sender*/,\\n bytes calldata payload\\n ) external pure returns (bytes4 selector, bytes memory data) {\\n return (Holographable.bridgeOut.selector, payload);\\n }\\n\\n function deployHolographableContractMultiChain(\\n DeploymentConfig memory config,\\n Verification memory signature,\\n address signer,\\n bool deployOnCurrentChain,\\n BridgeSettings[] memory bridgeSettings\\n ) external payable {\\n if (deployOnCurrentChain) {\\n deployHolographableContract(config, signature, signer);\\n }\\n bytes memory payload = abi.encode(config, signature, signer);\\n HolographInterface holograph;\\n assembly {\\n holograph := sload(_holographSlot)\\n }\\n HolographBridgeInterface bridge = HolographBridgeInterface(holograph.getBridge());\\n uint256 l = bridgeSettings.length;\\n for (uint256 i = 0; i < l; i++) {\\n bridge.bridgeOutRequest{value: bridgeSettings[i].value}(\\n bridgeSettings[i].toChain,\\n address(this),\\n bridgeSettings[i].gasLimit,\\n bridgeSettings[i].gasPrice,\\n payload\\n );\\n }\\n }\\n\\n /**\\n * @notice Deploy a holographable smart contract\\n * @dev Using this function allows to deploy smart contracts that have the same address across all EVM chains\\n * @param config contract deployement configurations\\n * @param signature that was created by the wallet that created the original payload\\n * @param signer address of wallet that created the payload\\n */\\n function deployHolographableContract(\\n DeploymentConfig memory config,\\n Verification memory signature,\\n address signer\\n ) public {\\n address registry;\\n address holograph;\\n assembly {\\n holograph := sload(_holographSlot)\\n registry := sload(_registrySlot)\\n }\\n /**\\n * @dev the configuration is encoded and hashed along with signer address\\n */\\n bytes32 hash = keccak256(\\n abi.encodePacked(\\n config.contractType,\\n config.chainType,\\n config.salt,\\n keccak256(config.byteCode),\\n keccak256(config.initCode),\\n signer\\n )\\n );\\n /**\\n * @dev the hash is validated against signature\\n * this is to guarantee that the original creator's configuration has not been altered\\n */\\n require(_verifySigner(signature.r, signature.s, signature.v, hash, signer), \\\"HOLOGRAPH: invalid signature\\\");\\n /**\\n * @dev check that this contract has not already been deployed on this chain\\n */\\n bytes memory holographerBytecode = type(Holographer).creationCode;\\n address holographerAddress = address(\\n uint160(uint256(keccak256(abi.encodePacked(bytes1(0xff), address(this), hash, keccak256(holographerBytecode)))))\\n );\\n require(!_isContract(holographerAddress), \\\"HOLOGRAPH: already deployed\\\");\\n /**\\n * @dev convert hash into uint256 which will be used as the salt for create2\\n */\\n uint256 saltInt = uint256(hash);\\n address sourceContractAddress;\\n bytes memory sourceByteCode = config.byteCode;\\n assembly {\\n /**\\n * @dev deploy the user created smart contract first\\n */\\n sourceContractAddress := create2(0, add(sourceByteCode, 0x20), mload(sourceByteCode), saltInt)\\n }\\n assembly {\\n /**\\n * @dev deploy the Holographer contract\\n */\\n holographerAddress := create2(0, add(holographerBytecode, 0x20), mload(holographerBytecode), saltInt)\\n }\\n /**\\n * @dev initialize the Holographer contract\\n */\\n require(\\n InitializableInterface(holographerAddress).init(\\n abi.encode(abi.encode(config.chainType, holograph, config.contractType, sourceContractAddress), config.initCode)\\n ) == InitializableInterface.init.selector,\\n \\\"initialization failed\\\"\\n );\\n /**\\n * @dev update the Holograph Registry with deployed contract address\\n */\\n HolographRegistryInterface(registry).setHolographedHashAddress(hash, holographerAddress);\\n /**\\n * @dev emit an event that on-chain indexers can easily read\\n */\\n emit BridgeableContractDeployed(holographerAddress, hash);\\n }\\n\\n /**\\n * @notice Get the Holograph Protocol contract\\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\\n */\\n function getHolograph() external view returns (address holograph) {\\n assembly {\\n holograph := sload(_holographSlot)\\n }\\n }\\n\\n /**\\n * @notice Update the Holograph Protocol contract address\\n * @param holograph address of the Holograph Protocol smart contract to use\\n */\\n function setHolograph(address holograph) external onlyAdmin {\\n assembly {\\n sstore(_holographSlot, holograph)\\n }\\n }\\n\\n /**\\n * @notice Get the Holograph Registry module\\n * @dev This module stores a reference for all deployed holographable smart contracts\\n */\\n function getRegistry() external view returns (address registry) {\\n assembly {\\n registry := sload(_registrySlot)\\n }\\n }\\n\\n /**\\n * @notice Update the Holograph Registry module address\\n * @param registry address of the Holograph Registry smart contract to use\\n */\\n function setRegistry(address registry) external onlyAdmin {\\n assembly {\\n sstore(_registrySlot, registry)\\n }\\n }\\n\\n /**\\n * @dev Internal function used for checking if a contract has been deployed at address\\n */\\n function _isContract(address contractAddress) private view returns (bool) {\\n bytes32 codehash;\\n assembly {\\n codehash := extcodehash(contractAddress)\\n }\\n return (codehash != 0x0 && codehash != 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470);\\n }\\n\\n /**\\n * @dev Internal function used for verifying a signature\\n */\\n function _verifySigner(bytes32 r, bytes32 s, uint8 v, bytes32 hash, address signer) private pure returns (bool) {\\n if (v < 27) {\\n v += 27;\\n }\\n if (v != 27 && v != 28) {\\n return false;\\n }\\n // prevent signature malleability by checking if s-value is in the upper range\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n // if s-value is in upper range, calculate a new s-value\\n s = bytes32(0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - uint256(s));\\n // flip the v-value\\n if (v == 27) {\\n v = 28;\\n } else {\\n v = 27;\\n }\\n // check if s-value is still in upper range\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return false;\\n }\\n }\\n /**\\n * @dev signature is checked against EIP-191 first, then directly, to support legacy wallets\\n */\\n return (signer != address(0) &&\\n (ecrecover(keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash)), v, r, s) == signer ||\\n ecrecover(hash, v, r, s) == signer));\\n }\\n\\n /**\\n * @dev Purposefully reverts to prevent having any type of ether transfered into the contract\\n */\\n receive() external payable {\\n revert();\\n }\\n\\n /**\\n * @dev Purposefully reverts to prevent any calls to undefined functions\\n */\\n fallback() external payable {\\n revert();\\n }\\n}\\n\",\"keccak256\":\"0xf3722e35c0ec695f0443bba7187248c265d0114d3a2276e95faf140129277fed\",\"license\":\"UNLICENSED\"},\"contracts/abstract/Admin.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nabstract contract Admin {\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.admin')) - 1)\\n */\\n bytes32 constant _adminSlot = 0x3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c9;\\n\\n modifier onlyAdmin() {\\n require(msg.sender == getAdmin(), \\\"HOLOGRAPH: admin only function\\\");\\n _;\\n }\\n\\n constructor() {}\\n\\n function admin() public view returns (address) {\\n return getAdmin();\\n }\\n\\n function getAdmin() public view returns (address adminAddress) {\\n assembly {\\n adminAddress := sload(_adminSlot)\\n }\\n }\\n\\n function setAdmin(address adminAddress) public onlyAdmin {\\n assembly {\\n sstore(_adminSlot, adminAddress)\\n }\\n }\\n\\n function adminCall(address target, bytes calldata data) external payable onlyAdmin {\\n assembly {\\n calldatacopy(0, data.offset, data.length)\\n let result := call(gas(), target, callvalue(), 0, data.length, 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n switch result\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x93552c9253b579c45113a150a6a3dfddb997afd939d09b49c34d040525734b1a\",\"license\":\"UNLICENSED\"},\"contracts/abstract/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nimport \\\"../interface/InitializableInterface.sol\\\";\\n\\n/**\\n * @title Initializable\\n * @author https://github.com/holographxyz\\n * @notice Use init instead of constructor\\n * @dev This allows for use of init function to make one time initializations without the need for a constructor\\n */\\nabstract contract Initializable is InitializableInterface {\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.initialized')) - 1)\\n */\\n bytes32 constant _initializedSlot = 0x4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a01;\\n\\n /**\\n * @dev Constructor is left empty and init is used instead\\n */\\n constructor() {}\\n\\n /**\\n * @notice Used internally to initialize the contract instead of through a constructor\\n * @dev This function is called by the deployer/factory when creating a contract\\n * @param initPayload abi encoded payload to use for contract initilaization\\n */\\n function init(bytes memory initPayload) external virtual returns (bytes4);\\n\\n function _isInitialized() internal view returns (bool initialized) {\\n assembly {\\n initialized := sload(_initializedSlot)\\n }\\n }\\n\\n function _setInitialized() internal {\\n assembly {\\n sstore(_initializedSlot, 0x0000000000000000000000000000000000000000000000000000000000000001)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa55dc367285f96952dec56adfbfb48b6a4be31aef9ba0d30ad8c91023a572462\",\"license\":\"UNLICENSED\"},\"contracts/enforcer/Holographer.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nimport \\\"../abstract/Admin.sol\\\";\\nimport \\\"../abstract/Initializable.sol\\\";\\n\\nimport \\\"../interface/HolographInterface.sol\\\";\\nimport \\\"../interface/HolographerInterface.sol\\\";\\nimport \\\"../interface/HolographRegistryInterface.sol\\\";\\nimport \\\"../interface/InitializableInterface.sol\\\";\\n\\n/**\\n * @dev This contract is a binder. It puts together all the variables to make the underlying contracts functional and be bridgeable.\\n */\\ncontract Holographer is Admin, Initializable, HolographerInterface {\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.originChain')) - 1)\\n */\\n bytes32 constant _originChainSlot = 0xd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d;\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\\n */\\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.contractType')) - 1)\\n */\\n bytes32 constant _contractTypeSlot = 0x0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c7;\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.sourceContract')) - 1)\\n */\\n bytes32 constant _sourceContractSlot = 0x27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b074;\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.blockHeight')) - 1)\\n */\\n bytes32 constant _blockHeightSlot = 0x9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de3;\\n\\n /**\\n * @dev Constructor is left empty and init is used instead\\n */\\n constructor() {}\\n\\n /**\\n * @notice Used internally to initialize the contract instead of through a constructor\\n * @dev This function is called by the deployer/factory when creating a contract\\n * @param initPayload abi encoded payload to use for contract initilaization\\n */\\n function init(bytes memory initPayload) external override returns (bytes4) {\\n require(!_isInitialized(), \\\"HOLOGRAPHER: already initialized\\\");\\n (bytes memory encoded, bytes memory initCode) = abi.decode(initPayload, (bytes, bytes));\\n (uint32 originChain, address holograph, bytes32 contractType, address sourceContract) = abi.decode(\\n encoded,\\n (uint32, address, bytes32, address)\\n );\\n assembly {\\n sstore(_adminSlot, caller())\\n sstore(_blockHeightSlot, number())\\n sstore(_contractTypeSlot, contractType)\\n sstore(_holographSlot, holograph)\\n sstore(_originChainSlot, originChain)\\n sstore(_sourceContractSlot, sourceContract)\\n }\\n (bool success, bytes memory returnData) = HolographRegistryInterface(HolographInterface(holograph).getRegistry())\\n .getReservedContractTypeAddress(contractType)\\n .delegatecall(abi.encodeWithSelector(InitializableInterface.init.selector, initCode));\\n bytes4 selector = abi.decode(returnData, (bytes4));\\n require(success && selector == InitializableInterface.init.selector, \\\"HOLOGRAPH: initialization failed\\\");\\n _setInitialized();\\n return InitializableInterface.init.selector;\\n }\\n\\n /**\\n * @dev Returns the contract type that is used for loading the Enforcer\\n */\\n function getContractType() external view returns (bytes32 contractType) {\\n assembly {\\n contractType := sload(_contractTypeSlot)\\n }\\n }\\n\\n /**\\n * @dev Returns the block height of when the smart contract was deployed. Useful for retrieving deployment config for re-deployment on other EVM-compatible chains.\\n */\\n function getDeploymentBlock() external view returns (uint256 deploymentBlock) {\\n assembly {\\n deploymentBlock := sload(_blockHeightSlot)\\n }\\n }\\n\\n /**\\n * @dev Returns a hardcoded address for the Holograph smart contract.\\n */\\n function getHolograph() external view returns (address holograph) {\\n assembly {\\n holograph := sload(_holographSlot)\\n }\\n }\\n\\n /**\\n * @dev Returns a hardcoded address for the Holograph smart contract that controls and enforces the ERC standards.\\n */\\n function getHolographEnforcer() public view returns (address) {\\n HolographInterface holograph;\\n bytes32 contractType;\\n assembly {\\n holograph := sload(_holographSlot)\\n contractType := sload(_contractTypeSlot)\\n }\\n return HolographRegistryInterface(holograph.getRegistry()).getReservedContractTypeAddress(contractType);\\n }\\n\\n /**\\n * @dev Returns the original chain that contract was deployed on.\\n */\\n function getOriginChain() external view returns (uint32 originChain) {\\n assembly {\\n originChain := sload(_originChainSlot)\\n }\\n }\\n\\n /**\\n * @dev Returns a hardcoded address for the custom secure storage contract deployed in parallel with this contract deployment.\\n */\\n function getSourceContract() external view returns (address sourceContract) {\\n assembly {\\n sourceContract := sload(_sourceContractSlot)\\n }\\n }\\n\\n /**\\n * @dev Purposefully left empty, to prevent running out of gas errors when receiving native token payments.\\n */\\n receive() external payable {}\\n\\n /**\\n * @dev This takes the Enforcer's source code, runs it, and uses current address for storage slots.\\n */\\n fallback() external payable {\\n address holographEnforcer = getHolographEnforcer();\\n assembly {\\n calldatacopy(0, 0, calldatasize())\\n let result := delegatecall(gas(), holographEnforcer, 0, calldatasize(), 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n switch result\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc31b575625e84743d9a14f282ef3894becece82a6f47ec945585ac5a0d1895f7\",\"license\":\"UNLICENSED\"},\"contracts/interface/HolographBridgeInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\n/**\\n * @title Holograph Bridge\\n * @author https://github.com/holographxyz\\n * @notice Beam any holographable contracts and assets across blockchains\\n * @dev The contract abstracts all the complexities of making bridge requests and uses a universal interface to bridge any type of holographable assets\\n */\\ninterface HolographBridgeInterface {\\n /**\\n * @notice Receive a beam from another chain\\n * @dev This function can only be called by the Holograph Operator module\\n * @param fromChain Holograph Chain ID where the brigeOutRequest was created\\n * @param holographableContract address of the destination contract that the bridgeInRequest is targeted for\\n * @param hToken address of the hToken contract that wrapped the origin chain native gas token\\n * @param hTokenRecipient address of recipient for the hToken reward\\n * @param hTokenValue exact amount of hToken reward in wei\\n * @param doNotRevert boolean used to specify if the call should revert\\n * @param bridgeInPayload actual abi encoded bytes of the data that the holographable contract bridgeIn function will receive\\n */\\n function bridgeInRequest(\\n uint256 nonce,\\n uint32 fromChain,\\n address holographableContract,\\n address hToken,\\n address hTokenRecipient,\\n uint256 hTokenValue,\\n bool doNotRevert,\\n bytes calldata bridgeInPayload\\n ) external payable;\\n\\n /**\\n * @notice Create a beam request for a destination chain\\n * @dev This function works for deploying contracts and beaming supported holographable assets across chains\\n * @param toChain Holograph Chain ID where the beam is being sent to\\n * @param holographableContract address of the contract for which the bridge request is being made\\n * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain\\n * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain\\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\\n */\\n function bridgeOutRequest(\\n uint32 toChain,\\n address holographableContract,\\n uint256 gasLimit,\\n uint256 gasPrice,\\n bytes calldata bridgeOutPayload\\n ) external payable;\\n\\n /**\\n * @notice Do not call this function, it will always revert\\n * @dev Used by getBridgeOutRequestPayload function\\n * It is purposefully inverted to always revert on a successful call\\n * Marked as external and not private to allow use inside try/catch of getBridgeOutRequestPayload function\\n * If this function does not revert and returns a string, it is the actual revert reason\\n * @param sender address of actual sender that is planning to make a bridgeOutRequest call\\n * @param toChain holograph chain id of destination chain\\n * @param holographableContract address of the contract for which the bridge request is being made\\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\\n */\\n function revertedBridgeOutRequest(\\n address sender,\\n uint32 toChain,\\n address holographableContract,\\n bytes calldata bridgeOutPayload\\n ) external returns (string memory revertReason);\\n\\n /**\\n * @notice Get the payload created by the bridgeOutRequest function\\n * @dev Use this function to get the payload that will be generated by a bridgeOutRequest\\n * Only use this with a static call\\n * @param toChain Holograph Chain ID where the beam is being sent to\\n * @param holographableContract address of the contract for which the bridge request is being made\\n * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain\\n * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain\\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\\n * @return samplePayload bytes made up of the bridgeOutRequest payload\\n */\\n function getBridgeOutRequestPayload(\\n uint32 toChain,\\n address holographableContract,\\n uint256 gasLimit,\\n uint256 gasPrice,\\n bytes calldata bridgeOutPayload\\n ) external returns (bytes memory samplePayload);\\n\\n /**\\n * @notice Get the fees associated with sending specific payload\\n * @dev Will provide exact costs on protocol and message side, combine the two to get total\\n * @param toChain holograph chain id of destination chain for payload\\n * @param gasLimit amount of gas to provide for executing payload on destination chain\\n * @param gasPrice maximum amount to pay for gas price, can be set to 0 and will be chose automatically\\n * @param crossChainPayload the entire packet being sent cross-chain\\n * @return hlgFee the amount (in wei) of native gas token that will cost for finalizing job on destiantion chain\\n * @return msgFee the amount (in wei) of native gas token that will cost for sending message to destiantion chain\\n * @return dstGasPrice the amount (in wei) that destination message maximum gas price will be\\n */\\n function getMessageFee(\\n uint32 toChain,\\n uint256 gasLimit,\\n uint256 gasPrice,\\n bytes calldata crossChainPayload\\n ) external view returns (uint256 hlgFee, uint256 msgFee, uint256 dstGasPrice);\\n\\n /**\\n * @notice Get the address of the Holograph Factory module\\n * @dev Used for deploying holographable smart contracts\\n */\\n function getFactory() external view returns (address factory);\\n\\n /**\\n * @notice Update the Holograph Factory module address\\n * @param factory address of the Holograph Factory smart contract to use\\n */\\n function setFactory(address factory) external;\\n\\n /**\\n * @notice Get the Holograph Protocol contract\\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\\n */\\n function getHolograph() external view returns (address holograph);\\n\\n /**\\n * @notice Update the Holograph Protocol contract address\\n * @param holograph address of the Holograph Protocol smart contract to use\\n */\\n function setHolograph(address holograph) external;\\n\\n /**\\n * @notice Get the latest job nonce\\n * @dev You can use the job nonce as a way to calculate total amount of bridge requests that have been made\\n */\\n function getJobNonce() external view returns (uint256 jobNonce);\\n\\n /**\\n * @notice Get the address of the Holograph Operator module\\n * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module\\n */\\n function getOperator() external view returns (address operator);\\n\\n /**\\n * @notice Update the Holograph Operator module address\\n * @param operator address of the Holograph Operator smart contract to use\\n */\\n function setOperator(address operator) external;\\n\\n /**\\n * @notice Get the Holograph Registry module\\n * @dev This module stores a reference for all deployed holographable smart contracts\\n */\\n function getRegistry() external view returns (address registry);\\n\\n /**\\n * @notice Update the Holograph Registry module address\\n * @param registry address of the Holograph Registry smart contract to use\\n */\\n function setRegistry(address registry) external;\\n}\\n\",\"keccak256\":\"0x6e49ef7e89b6271241da6df330eb5d5cf48da3be31408bb5d99c48d51c0ef176\",\"license\":\"UNLICENSED\"},\"contracts/interface/HolographFactoryInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nimport \\\"../struct/DeploymentConfig.sol\\\";\\nimport \\\"../struct/Verification.sol\\\";\\n\\n/**\\n * @title Holograph Factory\\n * @author https://github.com/holographxyz\\n * @notice Deploy holographable contracts\\n * @dev The contract provides methods that allow for the creation of Holograph Protocol compliant smart contracts, that are capable of minting holographable assets\\n */\\ninterface HolographFactoryInterface {\\n /**\\n * @dev This event is fired every time that a bridgeable contract is deployed.\\n */\\n event BridgeableContractDeployed(address indexed contractAddress, bytes32 indexed hash);\\n\\n /**\\n * @notice Deploy a holographable smart contract\\n * @dev Using this function allows to deploy smart contracts that have the same address across all EVM chains\\n * @param config contract deployement configurations\\n * @param signature that was created by the wallet that created the original payload\\n * @param signer address of wallet that created the payload\\n */\\n function deployHolographableContract(\\n DeploymentConfig memory config,\\n Verification memory signature,\\n address signer\\n ) external;\\n\\n /**\\n * @notice Get the Holograph Protocol contract\\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\\n */\\n function getHolograph() external view returns (address holograph);\\n\\n /**\\n * @notice Update the Holograph Protocol contract address\\n * @param holograph address of the Holograph Protocol smart contract to use\\n */\\n function setHolograph(address holograph) external;\\n\\n /**\\n * @notice Get the Holograph Registry module\\n * @dev This module stores a reference for all deployed holographable smart contracts\\n */\\n function getRegistry() external view returns (address registry);\\n\\n /**\\n * @notice Update the Holograph Registry module address\\n * @param registry address of the Holograph Registry smart contract to use\\n */\\n function setRegistry(address registry) external;\\n}\\n\",\"keccak256\":\"0x44cd1db20207337ef6abde2d0f42837778d13fb62fe353b0ee9b293a601a0d71\",\"license\":\"UNLICENSED\"},\"contracts/interface/HolographInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\n/**\\n * @title Holograph Protocol\\n * @author https://github.com/holographxyz\\n * @notice This is the primary Holograph Protocol smart contract\\n * @dev This contract stores a reference to all the primary modules and variables of the protocol\\n */\\ninterface HolographInterface {\\n /**\\n * @notice Get the address of the Holograph Bridge module\\n * @dev Used for beaming holographable assets cross-chain\\n */\\n function getBridge() external view returns (address bridge);\\n\\n /**\\n * @notice Update the Holograph Bridge module address\\n * @param bridge address of the Holograph Bridge smart contract to use\\n */\\n function setBridge(address bridge) external;\\n\\n /**\\n * @notice Get the chain ID that the Protocol was deployed on\\n * @dev Useful for checking if/when a hard fork occurs\\n */\\n function getChainId() external view returns (uint256 chainId);\\n\\n /**\\n * @notice Update the chain ID\\n * @dev Useful for updating once a hard fork has been mitigated\\n * @param chainId EVM chain ID to use\\n */\\n function setChainId(uint256 chainId) external;\\n\\n /**\\n * @notice Get the address of the Holograph Factory module\\n * @dev Used for deploying holographable smart contracts\\n */\\n function getFactory() external view returns (address factory);\\n\\n /**\\n * @notice Update the Holograph Factory module address\\n * @param factory address of the Holograph Factory smart contract to use\\n */\\n function setFactory(address factory) external;\\n\\n /**\\n * @notice Get the Holograph chain Id\\n * @dev Holograph uses an internal chain id mapping\\n */\\n function getHolographChainId() external view returns (uint32 holographChainId);\\n\\n /**\\n * @notice Update the Holograph chain ID\\n * @dev Useful for updating once a hard fork was mitigated\\n * @param holographChainId Holograph chain ID to use\\n */\\n function setHolographChainId(uint32 holographChainId) external;\\n\\n /**\\n * @notice Get the address of the Holograph Interfaces module\\n * @dev Holograph uses this contract to store data that needs to be accessed by a large portion of the modules\\n */\\n function getInterfaces() external view returns (address interfaces);\\n\\n /**\\n * @notice Update the Holograph Interfaces module address\\n * @param interfaces address of the Holograph Interfaces smart contract to use\\n */\\n function setInterfaces(address interfaces) external;\\n\\n /**\\n * @notice Get the address of the Holograph Operator module\\n * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module\\n */\\n function getOperator() external view returns (address operator);\\n\\n /**\\n * @notice Update the Holograph Operator module address\\n * @param operator address of the Holograph Operator smart contract to use\\n */\\n function setOperator(address operator) external;\\n\\n /**\\n * @notice Get the Holograph Registry module\\n * @dev This module stores a reference for all deployed holographable smart contracts\\n */\\n function getRegistry() external view returns (address registry);\\n\\n /**\\n * @notice Update the Holograph Registry module address\\n * @param registry address of the Holograph Registry smart contract to use\\n */\\n function setRegistry(address registry) external;\\n\\n /**\\n * @notice Get the Holograph Treasury module\\n * @dev All of the Holograph Protocol assets are stored and managed by this module\\n */\\n function getTreasury() external view returns (address treasury);\\n\\n /**\\n * @notice Update the Holograph Treasury module address\\n * @param treasury address of the Holograph Treasury smart contract to use\\n */\\n function setTreasury(address treasury) external;\\n\\n /**\\n * @notice Get the Holograph Utility Token address\\n * @dev This is the official utility token of the Holograph Protocol\\n */\\n function getUtilityToken() external view returns (address utilityToken);\\n\\n /**\\n * @notice Update the Holograph Utility Token address\\n * @param utilityToken address of the Holograph Utility Token smart contract to use\\n */\\n function setUtilityToken(address utilityToken) external;\\n}\\n\",\"keccak256\":\"0x90b5643e77e914393c508d59b80f5739debfd72455029c0db041f92374b3f586\",\"license\":\"UNLICENSED\"},\"contracts/interface/HolographRegistryInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\ninterface HolographRegistryInterface {\\n function isHolographedContract(address smartContract) external view returns (bool);\\n\\n function isHolographedHashDeployed(bytes32 hash) external view returns (bool);\\n\\n function referenceContractTypeAddress(address contractAddress) external returns (bytes32);\\n\\n function getContractTypeAddress(bytes32 contractType) external view returns (address);\\n\\n function setContractTypeAddress(bytes32 contractType, address contractAddress) external;\\n\\n function getHolograph() external view returns (address holograph);\\n\\n function setHolograph(address holograph) external;\\n\\n function getHolographableContracts(uint256 index, uint256 length) external view returns (address[] memory contracts);\\n\\n function getHolographableContractsLength() external view returns (uint256);\\n\\n function getHolographedHashAddress(bytes32 hash) external view returns (address);\\n\\n function setHolographedHashAddress(bytes32 hash, address contractAddress) external;\\n\\n function getHToken(uint32 chainId) external view returns (address);\\n\\n function setHToken(uint32 chainId, address hToken) external;\\n\\n function getReservedContractTypeAddress(bytes32 contractType) external view returns (address contractTypeAddress);\\n\\n function setReservedContractTypeAddress(bytes32 hash, bool reserved) external;\\n\\n function setReservedContractTypeAddresses(bytes32[] calldata hashes, bool[] calldata reserved) external;\\n\\n function getUtilityToken() external view returns (address utilityToken);\\n\\n function setUtilityToken(address utilityToken) external;\\n}\\n\",\"keccak256\":\"0xaf69834caeee449c3d3d7c7da9bbd27368b448526d9b147482a319311288ad18\",\"license\":\"UNLICENSED\"},\"contracts/interface/Holographable.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\ninterface Holographable {\\n function bridgeIn(uint32 fromChain, bytes calldata payload) external returns (bytes4);\\n\\n function bridgeOut(\\n uint32 toChain,\\n address sender,\\n bytes calldata payload\\n ) external returns (bytes4 selector, bytes memory data);\\n}\\n\",\"keccak256\":\"0x4dd2fc1af269273c46156df8af5cedeed0dfb83f0bfa5696a8d64c768449285b\",\"license\":\"UNLICENSED\"},\"contracts/interface/HolographerInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\ninterface HolographerInterface {\\n function getContractType() external view returns (bytes32 contractType);\\n\\n function getDeploymentBlock() external view returns (uint256 deploymentBlock);\\n\\n function getHolograph() external view returns (address holograph);\\n\\n function getHolographEnforcer() external view returns (address);\\n\\n function getOriginChain() external view returns (uint32 originChain);\\n\\n function getSourceContract() external view returns (address sourceContract);\\n}\\n\",\"keccak256\":\"0x4274b9180266275a8df16b8e1f0956cc795fb1ab87db1c01264c343be3bea937\",\"license\":\"UNLICENSED\"},\"contracts/interface/InitializableInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\n/**\\n * @title Initializable\\n * @author https://github.com/holographxyz\\n * @notice Use init instead of constructor\\n * @dev This allows for use of init function to make one time initializations without the need of a constructor\\n */\\ninterface InitializableInterface {\\n /**\\n * @notice Used internally to initialize the contract instead of through a constructor\\n * @dev This function is called by the deployer/factory when creating a contract\\n * @param initPayload abi encoded payload to use for contract initilaization\\n */\\n function init(bytes memory initPayload) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0x0a76fae986c5c18110ce2b1818c84ec28b7bf7f8fb00d20b39b8d7225fbd892d\",\"license\":\"UNLICENSED\"},\"contracts/struct/BridgeSettings.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nstruct BridgeSettings {\\n uint256 value;\\n uint256 gasLimit;\\n uint256 gasPrice;\\n uint32 toChain;\\n}\\n\",\"keccak256\":\"0x405f453cf620c5e882cf6d915fd7d14c895877408a7fd7e298d6e751bd4a0ce1\",\"license\":\"UNLICENSED\"},\"contracts/struct/DeploymentConfig.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nstruct DeploymentConfig {\\n bytes32 contractType;\\n uint32 chainType;\\n bytes32 salt;\\n bytes byteCode;\\n bytes initCode;\\n}\\n\",\"keccak256\":\"0x5eb9e83676eb65fa424aa9ca79961e1602a749f264ea4f496a9c359dad0da726\",\"license\":\"UNLICENSED\"},\"contracts/struct/Verification.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nstruct Verification {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n}\\n\",\"keccak256\":\"0xd351869472bcb2497e0a771c6e7f7a0b794d099133c67f5f378a8f7839f9db92\",\"license\":\"UNLICENSED\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50612b68806100206000396000f3fe6080604052600436106100d65760003560e01c8063704b6c021161007f578063b7e0366111610059578063b7e036611461028d578063bf64a82d146102bb578063df6516bd146102ce578063f851a440146102ee57600080fd5b8063704b6c021461023a578063a8935c671461025a578063a91ee0dc1461026d57600080fd5b80634ddf47d4116100b05780634ddf47d4146101b25780635ab1bd53146101d25780636e9960c31461020657600080fd5b806308a1eb20146100e557806325d5cac81461013b5780634827ae0c1461015d57600080fd5b366100e057600080fd5b600080fd5b3480156100f157600080fd5b50610105610100366004611375565b610303565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020015b60405180910390f35b34801561014757600080fd5b5061015b6101563660046113ed565b6103ba565b005b34801561016957600080fd5b507fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a545b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610132565b3480156101be57600080fd5b506101056101cd36600461153f565b610499565b3480156101de57600080fd5b507fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e75461018d565b34801561021257600080fd5b507f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95461018d565b34801561024657600080fd5b5061015b6102553660046113ed565b610600565b61015b610268366004611697565b6106da565b34801561027957600080fd5b5061015b6102883660046113ed565b6108c1565b34801561029957600080fd5b506102ad6102a83660046117de565b61099b565b6040516101329291906118ac565b61015b6102c93660046118e7565b6109ef565b3480156102da57600080fd5b5061015b6102e9366004611907565b610aca565b3480156102fa57600080fd5b5061018d611015565b600080808061031485870187611907565b6040517fdf6516bd0000000000000000000000000000000000000000000000000000000081529295509093509150309063df6516bd9061035c9086908690869060040161196a565b600060405180830381600087803b15801561037657600080fd5b505af115801561038a573d6000803e3d6000fd5b507f08a1eb20000000000000000000000000000000000000000000000000000000009a9950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610475576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064015b60405180910390fd5b7fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55565b60006104c37f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a015490565b1561052a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a20616c726561647920696e697469616c697a65640000604482015260640161046c565b600080838060200190518101906105419190611a2c565b91509150327f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955817fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55807fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7556105d760017f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a0155565b507f4ddf47d4000000000000000000000000000000000000000000000000000000009392505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955565b81156106eb576106eb858585610aca565b60008585856040516020016107029392919061196a565b604051602081830303815290604052905060007fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a54905060008173ffffffffffffffffffffffffffffffffffffffff16630fffbaf36040518163ffffffff1660e01b8152600401602060405180830381865afa158015610786573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107aa9190611a66565b845190915060005b818110156108b5578273ffffffffffffffffffffffffffffffffffffffff1663e55856668783815181106107e8576107e8611a83565b60200260200101516000015188848151811061080657610806611a83565b602002602001015160600151308a868151811061082557610825611a83565b6020026020010151602001518b878151811061084357610843611a83565b6020026020010151604001518b6040518763ffffffff1660e01b8152600401610870959493929190611ab2565b6000604051808303818588803b15801561088957600080fd5b505af115801561089d573d6000803e3d6000fd5b505050505080806108ad90611b33565b9150506107b2565b50505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610977576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b7fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e755565b6000606063b7e0366160e01b848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250959c929b50919950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aa5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b808260003760008082600034875af13d6000803e808015610ac5573d6000f35b3d6000fd5b7fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a547fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e754845160208087015160408089015160608a015180519085012060808b01518051908601209251969796600096610bb796909594918b910195865260e09490941b7fffffffff0000000000000000000000000000000000000000000000000000000016602086015260248501929092526044840152606483015260601b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016608482015260980190565b604051602081830303815290604052805190602001209050610be88560000151866020015187604001518488611044565b610c4e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f484f4c4f47524150483a20696e76616c6964207369676e617475726500000000604482015260640161046c565b600060405180602001610c6090611306565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820381018352601f90910116604081815282516020808501919091207fff00000000000000000000000000000000000000000000000000000000000000828501527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b166021850152603584018790526055808501919091528251808503909101815260759093019091528151910120909150610d21816112cc565b15610d88576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f484f4c4f47524150483a20616c7265616479206465706c6f7965640000000000604482015260640161046c565b60608801518051849160009183906020830184f59150828551602087016000f560208c8101518d516040805163ffffffff9093169383019390935273ffffffffffffffffffffffffffffffffffffffff8b811693830193909352606082015284821660808201529195507f4ddf47d4000000000000000000000000000000000000000000000000000000009190861690634ddf47d49060a0016040516020818303038152906040528e60800151604051602001610e46929190611b6b565b6040516020818303038152906040526040518263ffffffff1660e01b8152600401610e719190611b90565b6020604051808303816000875af1158015610e90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eb49190611ba3565b7fffffffff000000000000000000000000000000000000000000000000000000001614610f3d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f696e697469616c697a6174696f6e206661696c65640000000000000000000000604482015260640161046c565b6040517f725229f60000000000000000000000000000000000000000000000000000000081526004810187905273ffffffffffffffffffffffffffffffffffffffff858116602483015289169063725229f690604401600060405180830381600087803b158015610fad57600080fd5b505af1158015610fc1573d6000803e3d6000fd5b505060405188925073ffffffffffffffffffffffffffffffffffffffff871691507fa802207d4c618b40db3b25b7b90e6f483e16b2c1f8d3610b15b345a718c6b41b90600090a35050505050505050505050565b600061103f7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95490565b905090565b6000601b8460ff1610156110605761105d601b85611be5565b93505b8360ff16601b1415801561107857508360ff16601c14155b15611085575060006112c3565b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0851115611122576110d7857ffffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141611c0a565b945060ff8416601b036110ed57601c93506110f2565b601b93505b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0851115611122575060006112c3565b73ffffffffffffffffffffffffffffffffffffffff8216158015906112c057506040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c810184905273ffffffffffffffffffffffffffffffffffffffff831690600190605c01604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600084529083018083525260ff881690820152606081018990526080810188905260a0016020604051602081039080840390855afa15801561120c573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff1614806112c0575060408051600081526020810180835285905260ff861691810191909152606081018790526080810186905273ffffffffffffffffffffffffffffffffffffffff83169060019060a0016020604051602081039080840390855afa15801561129e573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff16145b90505b95945050505050565b6000813f80158015906112ff57507fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708114155b9392505050565b610f3a80611c2283390190565b803563ffffffff8116811461132757600080fd5b919050565b60008083601f84011261133e57600080fd5b50813567ffffffffffffffff81111561135657600080fd5b60208301915083602082850101111561136e57600080fd5b9250929050565b60008060006040848603121561138a57600080fd5b61139384611313565b9250602084013567ffffffffffffffff8111156113af57600080fd5b6113bb8682870161132c565b9497909650939450505050565b73ffffffffffffffffffffffffffffffffffffffff811681146113ea57600080fd5b50565b6000602082840312156113ff57600080fd5b81356112ff816113c8565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516080810167ffffffffffffffff8111828210171561145c5761145c61140a565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156114a9576114a961140a565b604052919050565b600082601f8301126114c257600080fd5b813567ffffffffffffffff8111156114dc576114dc61140a565b61150d60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601611462565b81815284602083860101111561152257600080fd5b816020850160208301376000918101602001919091529392505050565b60006020828403121561155157600080fd5b813567ffffffffffffffff81111561156857600080fd5b611574848285016114b1565b949350505050565b600060a0828403121561158e57600080fd5b60405160a0810167ffffffffffffffff82821081831117156115b2576115b261140a565b81604052829350843583526115c960208601611313565b60208401526040850135604084015260608501359150808211156115ec57600080fd5b6115f8868387016114b1565b6060840152608085013591508082111561161157600080fd5b5061161e858286016114b1565b6080830152505092915050565b60006060828403121561163d57600080fd5b6040516060810181811067ffffffffffffffff821117156116605761166061140a565b80604052508091508235815260208301356020820152604083013560ff8116811461168a57600080fd5b6040919091015292915050565b600080600080600060e086880312156116af57600080fd5b853567ffffffffffffffff808211156116c757600080fd5b6116d389838a0161157c565b9650602091506116e589838a0161162b565b95506080808901356116f6816113c8565b955060a0890135801515811461170b57600080fd5b945060c08901358281111561171f57600080fd5b8901601f81018b1361173057600080fd5b8035838111156117425761174261140a565b611750858260051b01611462565b818152858101945060079190911b82018501908c82111561177057600080fd5b918501915b818310156117cb5783838e03121561178d5760008081fd5b611795611439565b8335815286840135878201526040808501359082015260606117b8818601611313565b9082015285529385019391830191611775565b8096505050505050509295509295909350565b600080600080606085870312156117f457600080fd5b6117fd85611313565b9350602085013561180d816113c8565b9250604085013567ffffffffffffffff81111561182957600080fd5b6118358782880161132c565b95989497509550505050565b6000815180845260005b818110156118675760208185018101518683018201520161184b565b81811115611879576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b7fffffffff00000000000000000000000000000000000000000000000000000000831681526040602082015260006115746040830184611841565b6000806000604084860312156118fc57600080fd5b8335611393816113c8565b600080600060a0848603121561191c57600080fd5b833567ffffffffffffffff81111561193357600080fd5b61193f8682870161157c565b93505061194f856020860161162b565b9150608084013561195f816113c8565b809150509250925092565b60a08152835160a082015263ffffffff60208501511660c0820152604084015160e08201526000606085015160a06101008401526119ac610140840182611841565b905060808601517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60848303016101208501526119e88282611841565b92505050835160208301526020840151604083015260ff6040850151166060830152611574608083018473ffffffffffffffffffffffffffffffffffffffff169052565b60008060408385031215611a3f57600080fd5b8251611a4a816113c8565b6020840151909250611a5b816113c8565b809150509250929050565b600060208284031215611a7857600080fd5b81516112ff816113c8565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b63ffffffff8616815273ffffffffffffffffffffffffffffffffffffffff8516602082015283604082015282606082015260a060808201526000611af960a0830184611841565b979650505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611b6457611b64611b04565b5060010190565b604081526000611b7e6040830185611841565b82810360208401526112c38185611841565b6020815260006112ff6020830184611841565b600060208284031215611bb557600080fd5b81517fffffffff00000000000000000000000000000000000000000000000000000000811681146112ff57600080fd5b600060ff821660ff84168060ff03821115611c0257611c02611b04565b019392505050565b600082821015611c1c57611c1c611b04565b50039056fe608060405234801561001057600080fd5b50610f1a806100206000396000f3fe6080604052600436106100c05760003560e01c806380d1cb3511610074578063c51a29e01161004e578063c51a29e0146102c1578063c8a4c3d5146102f5578063f851a4401461030a576100c7565b806380d1cb351461022c578063913a0ef21461026a578063bf64a82d146102ae576100c7565b80636e9960c3116100a55780636e9960c3146101a45780636faf275b146101d8578063704b6c021461020c576100c7565b80634827ae0c146100f95780634ddf47d414610153576100c7565b366100c757005b60006100d161031f565b90503660008037600080366000845af43d6000803e8080156100f2573d6000f35b3d6000fd5b005b34801561010557600080fd5b507fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a545b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b34801561015f57600080fd5b5061017361016e366004610bb4565b61045d565b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200161014a565b3480156101b057600080fd5b507f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c954610129565b3480156101e457600080fd5b507f27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b07454610129565b34801561021857600080fd5b506100f7610227366004610c59565b610911565b34801561023857600080fd5b507f9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de3545b60405190815260200161014a565b34801561027657600080fd5b507fd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d5460405163ffffffff909116815260200161014a565b6100f76102bc366004610c7d565b6109eb565b3480156102cd57600080fd5b507f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c75461025c565b34801561030157600080fd5b5061012961031f565b34801561031657600080fd5b50610129610ac1565b60008060007fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a5491507f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c75490508173ffffffffffffffffffffffffffffffffffffffff16635ab1bd536040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103db9190610d02565b73ffffffffffffffffffffffffffffffffffffffff166374b7510c826040518263ffffffff1660e01b815260040161041591815260200190565b602060405180830381865afa158015610432573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104569190610d02565b9250505090565b60006104877f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a015490565b156104f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f484f4c4f475241504845523a20616c726561647920696e697469616c697a656460448201526064015b60405180910390fd5b6000808380602001905181019061050a9190610d9c565b91509150600080600080858060200190518101906105289190610e00565b9350935093509350337f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955437f9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de355817f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c755827fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55837fd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d55807f27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b074556000808473ffffffffffffffffffffffffffffffffffffffff16635ab1bd536040518163ffffffff1660e01b8152600401602060405180830381865afa158015610650573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106749190610d02565b73ffffffffffffffffffffffffffffffffffffffff166374b7510c856040518263ffffffff1660e01b81526004016106ae91815260200190565b602060405180830381865afa1580156106cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ef9190610d02565b73ffffffffffffffffffffffffffffffffffffffff16634ddf47d460e01b8860405160240161071e9190610e5e565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009094169390931790925290516107a79190610eaf565b600060405180830381855af49150503d80600081146107e2576040519150601f19603f3d011682016040523d82523d6000602084013e6107e7565b606091505b50915091506000818060200190518101906108029190610ecb565b905082801561085257507fffffffff0000000000000000000000000000000000000000000000000000000081167f4ddf47d400000000000000000000000000000000000000000000000000000000145b6108b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f484f4c4f47524150483a20696e697469616c697a6174696f6e206661696c656460448201526064016104ea565b6108e160017f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a0155565b507f4ddf47d4000000000000000000000000000000000000000000000000000000009a9950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016104ea565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aa1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016104ea565b808260003760008082600034875af13d6000803e8080156100f2573d6000f35b6000610aeb7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95490565b905090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715610b6657610b66610af0565b604052919050565b600067ffffffffffffffff821115610b8857610b88610af0565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600060208284031215610bc657600080fd5b813567ffffffffffffffff811115610bdd57600080fd5b8201601f81018413610bee57600080fd5b8035610c01610bfc82610b6e565b610b1f565b818152856020838501011115610c1657600080fd5b81602084016020830137600091810160200191909152949350505050565b73ffffffffffffffffffffffffffffffffffffffff81168114610c5657600080fd5b50565b600060208284031215610c6b57600080fd5b8135610c7681610c34565b9392505050565b600080600060408486031215610c9257600080fd5b8335610c9d81610c34565b9250602084013567ffffffffffffffff80821115610cba57600080fd5b818601915086601f830112610cce57600080fd5b813581811115610cdd57600080fd5b876020828501011115610cef57600080fd5b6020830194508093505050509250925092565b600060208284031215610d1457600080fd5b8151610c7681610c34565b60005b83811015610d3a578181015183820152602001610d22565b83811115610d49576000848401525b50505050565b600082601f830112610d6057600080fd5b8151610d6e610bfc82610b6e565b818152846020838601011115610d8357600080fd5b610d94826020830160208701610d1f565b949350505050565b60008060408385031215610daf57600080fd5b825167ffffffffffffffff80821115610dc757600080fd5b610dd386838701610d4f565b93506020850151915080821115610de957600080fd5b50610df685828601610d4f565b9150509250929050565b60008060008060808587031215610e1657600080fd5b845163ffffffff81168114610e2a57600080fd5b6020860151909450610e3b81610c34565b604086015160608701519194509250610e5381610c34565b939692955090935050565b6020815260008251806020840152610e7d816040850160208701610d1f565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60008251610ec1818460208701610d1f565b9190910192915050565b600060208284031215610edd57600080fd5b81517fffffffff0000000000000000000000000000000000000000000000000000000081168114610c7657600080fdfea164736f6c634300080d000aa164736f6c634300080d000a", - "deployedBytecode": "0x6080604052600436106100d65760003560e01c8063704b6c021161007f578063b7e0366111610059578063b7e036611461028d578063bf64a82d146102bb578063df6516bd146102ce578063f851a440146102ee57600080fd5b8063704b6c021461023a578063a8935c671461025a578063a91ee0dc1461026d57600080fd5b80634ddf47d4116100b05780634ddf47d4146101b25780635ab1bd53146101d25780636e9960c31461020657600080fd5b806308a1eb20146100e557806325d5cac81461013b5780634827ae0c1461015d57600080fd5b366100e057600080fd5b600080fd5b3480156100f157600080fd5b50610105610100366004611375565b610303565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020015b60405180910390f35b34801561014757600080fd5b5061015b6101563660046113ed565b6103ba565b005b34801561016957600080fd5b507fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a545b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610132565b3480156101be57600080fd5b506101056101cd36600461153f565b610499565b3480156101de57600080fd5b507fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e75461018d565b34801561021257600080fd5b507f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95461018d565b34801561024657600080fd5b5061015b6102553660046113ed565b610600565b61015b610268366004611697565b6106da565b34801561027957600080fd5b5061015b6102883660046113ed565b6108c1565b34801561029957600080fd5b506102ad6102a83660046117de565b61099b565b6040516101329291906118ac565b61015b6102c93660046118e7565b6109ef565b3480156102da57600080fd5b5061015b6102e9366004611907565b610aca565b3480156102fa57600080fd5b5061018d611015565b600080808061031485870187611907565b6040517fdf6516bd0000000000000000000000000000000000000000000000000000000081529295509093509150309063df6516bd9061035c9086908690869060040161196a565b600060405180830381600087803b15801561037657600080fd5b505af115801561038a573d6000803e3d6000fd5b507f08a1eb20000000000000000000000000000000000000000000000000000000009a9950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610475576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064015b60405180910390fd5b7fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55565b60006104c37f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a015490565b1561052a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a20616c726561647920696e697469616c697a65640000604482015260640161046c565b600080838060200190518101906105419190611a2c565b91509150327f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955817fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55807fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7556105d760017f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a0155565b507f4ddf47d4000000000000000000000000000000000000000000000000000000009392505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955565b81156106eb576106eb858585610aca565b60008585856040516020016107029392919061196a565b604051602081830303815290604052905060007fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a54905060008173ffffffffffffffffffffffffffffffffffffffff16630fffbaf36040518163ffffffff1660e01b8152600401602060405180830381865afa158015610786573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107aa9190611a66565b845190915060005b818110156108b5578273ffffffffffffffffffffffffffffffffffffffff1663e55856668783815181106107e8576107e8611a83565b60200260200101516000015188848151811061080657610806611a83565b602002602001015160600151308a868151811061082557610825611a83565b6020026020010151602001518b878151811061084357610843611a83565b6020026020010151604001518b6040518763ffffffff1660e01b8152600401610870959493929190611ab2565b6000604051808303818588803b15801561088957600080fd5b505af115801561089d573d6000803e3d6000fd5b505050505080806108ad90611b33565b9150506107b2565b50505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610977576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b7fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e755565b6000606063b7e0366160e01b848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250959c929b50919950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aa5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b808260003760008082600034875af13d6000803e808015610ac5573d6000f35b3d6000fd5b7fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a547fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e754845160208087015160408089015160608a015180519085012060808b01518051908601209251969796600096610bb796909594918b910195865260e09490941b7fffffffff0000000000000000000000000000000000000000000000000000000016602086015260248501929092526044840152606483015260601b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016608482015260980190565b604051602081830303815290604052805190602001209050610be88560000151866020015187604001518488611044565b610c4e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f484f4c4f47524150483a20696e76616c6964207369676e617475726500000000604482015260640161046c565b600060405180602001610c6090611306565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820381018352601f90910116604081815282516020808501919091207fff00000000000000000000000000000000000000000000000000000000000000828501527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b166021850152603584018790526055808501919091528251808503909101815260759093019091528151910120909150610d21816112cc565b15610d88576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f484f4c4f47524150483a20616c7265616479206465706c6f7965640000000000604482015260640161046c565b60608801518051849160009183906020830184f59150828551602087016000f560208c8101518d516040805163ffffffff9093169383019390935273ffffffffffffffffffffffffffffffffffffffff8b811693830193909352606082015284821660808201529195507f4ddf47d4000000000000000000000000000000000000000000000000000000009190861690634ddf47d49060a0016040516020818303038152906040528e60800151604051602001610e46929190611b6b565b6040516020818303038152906040526040518263ffffffff1660e01b8152600401610e719190611b90565b6020604051808303816000875af1158015610e90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eb49190611ba3565b7fffffffff000000000000000000000000000000000000000000000000000000001614610f3d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f696e697469616c697a6174696f6e206661696c65640000000000000000000000604482015260640161046c565b6040517f725229f60000000000000000000000000000000000000000000000000000000081526004810187905273ffffffffffffffffffffffffffffffffffffffff858116602483015289169063725229f690604401600060405180830381600087803b158015610fad57600080fd5b505af1158015610fc1573d6000803e3d6000fd5b505060405188925073ffffffffffffffffffffffffffffffffffffffff871691507fa802207d4c618b40db3b25b7b90e6f483e16b2c1f8d3610b15b345a718c6b41b90600090a35050505050505050505050565b600061103f7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95490565b905090565b6000601b8460ff1610156110605761105d601b85611be5565b93505b8360ff16601b1415801561107857508360ff16601c14155b15611085575060006112c3565b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0851115611122576110d7857ffffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141611c0a565b945060ff8416601b036110ed57601c93506110f2565b601b93505b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0851115611122575060006112c3565b73ffffffffffffffffffffffffffffffffffffffff8216158015906112c057506040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c810184905273ffffffffffffffffffffffffffffffffffffffff831690600190605c01604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600084529083018083525260ff881690820152606081018990526080810188905260a0016020604051602081039080840390855afa15801561120c573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff1614806112c0575060408051600081526020810180835285905260ff861691810191909152606081018790526080810186905273ffffffffffffffffffffffffffffffffffffffff83169060019060a0016020604051602081039080840390855afa15801561129e573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff16145b90505b95945050505050565b6000813f80158015906112ff57507fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708114155b9392505050565b610f3a80611c2283390190565b803563ffffffff8116811461132757600080fd5b919050565b60008083601f84011261133e57600080fd5b50813567ffffffffffffffff81111561135657600080fd5b60208301915083602082850101111561136e57600080fd5b9250929050565b60008060006040848603121561138a57600080fd5b61139384611313565b9250602084013567ffffffffffffffff8111156113af57600080fd5b6113bb8682870161132c565b9497909650939450505050565b73ffffffffffffffffffffffffffffffffffffffff811681146113ea57600080fd5b50565b6000602082840312156113ff57600080fd5b81356112ff816113c8565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516080810167ffffffffffffffff8111828210171561145c5761145c61140a565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156114a9576114a961140a565b604052919050565b600082601f8301126114c257600080fd5b813567ffffffffffffffff8111156114dc576114dc61140a565b61150d60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601611462565b81815284602083860101111561152257600080fd5b816020850160208301376000918101602001919091529392505050565b60006020828403121561155157600080fd5b813567ffffffffffffffff81111561156857600080fd5b611574848285016114b1565b949350505050565b600060a0828403121561158e57600080fd5b60405160a0810167ffffffffffffffff82821081831117156115b2576115b261140a565b81604052829350843583526115c960208601611313565b60208401526040850135604084015260608501359150808211156115ec57600080fd5b6115f8868387016114b1565b6060840152608085013591508082111561161157600080fd5b5061161e858286016114b1565b6080830152505092915050565b60006060828403121561163d57600080fd5b6040516060810181811067ffffffffffffffff821117156116605761166061140a565b80604052508091508235815260208301356020820152604083013560ff8116811461168a57600080fd5b6040919091015292915050565b600080600080600060e086880312156116af57600080fd5b853567ffffffffffffffff808211156116c757600080fd5b6116d389838a0161157c565b9650602091506116e589838a0161162b565b95506080808901356116f6816113c8565b955060a0890135801515811461170b57600080fd5b945060c08901358281111561171f57600080fd5b8901601f81018b1361173057600080fd5b8035838111156117425761174261140a565b611750858260051b01611462565b818152858101945060079190911b82018501908c82111561177057600080fd5b918501915b818310156117cb5783838e03121561178d5760008081fd5b611795611439565b8335815286840135878201526040808501359082015260606117b8818601611313565b9082015285529385019391830191611775565b8096505050505050509295509295909350565b600080600080606085870312156117f457600080fd5b6117fd85611313565b9350602085013561180d816113c8565b9250604085013567ffffffffffffffff81111561182957600080fd5b6118358782880161132c565b95989497509550505050565b6000815180845260005b818110156118675760208185018101518683018201520161184b565b81811115611879576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b7fffffffff00000000000000000000000000000000000000000000000000000000831681526040602082015260006115746040830184611841565b6000806000604084860312156118fc57600080fd5b8335611393816113c8565b600080600060a0848603121561191c57600080fd5b833567ffffffffffffffff81111561193357600080fd5b61193f8682870161157c565b93505061194f856020860161162b565b9150608084013561195f816113c8565b809150509250925092565b60a08152835160a082015263ffffffff60208501511660c0820152604084015160e08201526000606085015160a06101008401526119ac610140840182611841565b905060808601517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60848303016101208501526119e88282611841565b92505050835160208301526020840151604083015260ff6040850151166060830152611574608083018473ffffffffffffffffffffffffffffffffffffffff169052565b60008060408385031215611a3f57600080fd5b8251611a4a816113c8565b6020840151909250611a5b816113c8565b809150509250929050565b600060208284031215611a7857600080fd5b81516112ff816113c8565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b63ffffffff8616815273ffffffffffffffffffffffffffffffffffffffff8516602082015283604082015282606082015260a060808201526000611af960a0830184611841565b979650505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611b6457611b64611b04565b5060010190565b604081526000611b7e6040830185611841565b82810360208401526112c38185611841565b6020815260006112ff6020830184611841565b600060208284031215611bb557600080fd5b81517fffffffff00000000000000000000000000000000000000000000000000000000811681146112ff57600080fd5b600060ff821660ff84168060ff03821115611c0257611c02611b04565b019392505050565b600082821015611c1c57611c1c611b04565b50039056fe608060405234801561001057600080fd5b50610f1a806100206000396000f3fe6080604052600436106100c05760003560e01c806380d1cb3511610074578063c51a29e01161004e578063c51a29e0146102c1578063c8a4c3d5146102f5578063f851a4401461030a576100c7565b806380d1cb351461022c578063913a0ef21461026a578063bf64a82d146102ae576100c7565b80636e9960c3116100a55780636e9960c3146101a45780636faf275b146101d8578063704b6c021461020c576100c7565b80634827ae0c146100f95780634ddf47d414610153576100c7565b366100c757005b60006100d161031f565b90503660008037600080366000845af43d6000803e8080156100f2573d6000f35b3d6000fd5b005b34801561010557600080fd5b507fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a545b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b34801561015f57600080fd5b5061017361016e366004610bb4565b61045d565b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200161014a565b3480156101b057600080fd5b507f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c954610129565b3480156101e457600080fd5b507f27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b07454610129565b34801561021857600080fd5b506100f7610227366004610c59565b610911565b34801561023857600080fd5b507f9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de3545b60405190815260200161014a565b34801561027657600080fd5b507fd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d5460405163ffffffff909116815260200161014a565b6100f76102bc366004610c7d565b6109eb565b3480156102cd57600080fd5b507f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c75461025c565b34801561030157600080fd5b5061012961031f565b34801561031657600080fd5b50610129610ac1565b60008060007fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a5491507f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c75490508173ffffffffffffffffffffffffffffffffffffffff16635ab1bd536040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103db9190610d02565b73ffffffffffffffffffffffffffffffffffffffff166374b7510c826040518263ffffffff1660e01b815260040161041591815260200190565b602060405180830381865afa158015610432573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104569190610d02565b9250505090565b60006104877f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a015490565b156104f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f484f4c4f475241504845523a20616c726561647920696e697469616c697a656460448201526064015b60405180910390fd5b6000808380602001905181019061050a9190610d9c565b91509150600080600080858060200190518101906105289190610e00565b9350935093509350337f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955437f9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de355817f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c755827fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55837fd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d55807f27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b074556000808473ffffffffffffffffffffffffffffffffffffffff16635ab1bd536040518163ffffffff1660e01b8152600401602060405180830381865afa158015610650573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106749190610d02565b73ffffffffffffffffffffffffffffffffffffffff166374b7510c856040518263ffffffff1660e01b81526004016106ae91815260200190565b602060405180830381865afa1580156106cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ef9190610d02565b73ffffffffffffffffffffffffffffffffffffffff16634ddf47d460e01b8860405160240161071e9190610e5e565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009094169390931790925290516107a79190610eaf565b600060405180830381855af49150503d80600081146107e2576040519150601f19603f3d011682016040523d82523d6000602084013e6107e7565b606091505b50915091506000818060200190518101906108029190610ecb565b905082801561085257507fffffffff0000000000000000000000000000000000000000000000000000000081167f4ddf47d400000000000000000000000000000000000000000000000000000000145b6108b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f484f4c4f47524150483a20696e697469616c697a6174696f6e206661696c656460448201526064016104ea565b6108e160017f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a0155565b507f4ddf47d4000000000000000000000000000000000000000000000000000000009a9950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016104ea565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aa1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016104ea565b808260003760008082600034875af13d6000803e8080156100f2573d6000f35b6000610aeb7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95490565b905090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715610b6657610b66610af0565b604052919050565b600067ffffffffffffffff821115610b8857610b88610af0565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600060208284031215610bc657600080fd5b813567ffffffffffffffff811115610bdd57600080fd5b8201601f81018413610bee57600080fd5b8035610c01610bfc82610b6e565b610b1f565b818152856020838501011115610c1657600080fd5b81602084016020830137600091810160200191909152949350505050565b73ffffffffffffffffffffffffffffffffffffffff81168114610c5657600080fd5b50565b600060208284031215610c6b57600080fd5b8135610c7681610c34565b9392505050565b600080600060408486031215610c9257600080fd5b8335610c9d81610c34565b9250602084013567ffffffffffffffff80821115610cba57600080fd5b818601915086601f830112610cce57600080fd5b813581811115610cdd57600080fd5b876020828501011115610cef57600080fd5b6020830194508093505050509250925092565b600060208284031215610d1457600080fd5b8151610c7681610c34565b60005b83811015610d3a578181015183820152602001610d22565b83811115610d49576000848401525b50505050565b600082601f830112610d6057600080fd5b8151610d6e610bfc82610b6e565b818152846020838601011115610d8357600080fd5b610d94826020830160208701610d1f565b949350505050565b60008060408385031215610daf57600080fd5b825167ffffffffffffffff80821115610dc757600080fd5b610dd386838701610d4f565b93506020850151915080821115610de957600080fd5b50610df685828601610d4f565b9150509250929050565b60008060008060808587031215610e1657600080fd5b845163ffffffff81168114610e2a57600080fd5b6020860151909450610e3b81610c34565b604086015160608701519194509250610e5381610c34565b939692955090935050565b6020815260008251806020840152610e7d816040850160208701610d1f565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60008251610ec1818460208701610d1f565b9190910192915050565b600060208284031215610edd57600080fd5b81517fffffffff0000000000000000000000000000000000000000000000000000000081168114610c7657600080fdfea164736f6c634300080d000aa164736f6c634300080d000a", + "numDeployments": 2, + "solcInputHash": "c71d96e115e745dd34ef9239c385494d", + "metadata": "{\"compiler\":{\"version\":\"0.8.13+commit.abaa5c0e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"BridgeableContractDeployed\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"adminCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"bridgeIn\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"bridgeOut\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"selector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"contractType\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"chainType\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"salt\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"byteCode\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"initCode\",\"type\":\"bytes\"}],\"internalType\":\"struct DeploymentConfig\",\"name\":\"config\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"}],\"internalType\":\"struct Verification\",\"name\":\"signature\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"}],\"name\":\"deployHolographableContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"contractType\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"chainType\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"salt\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"byteCode\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"initCode\",\"type\":\"bytes\"}],\"internalType\":\"struct DeploymentConfig\",\"name\":\"config\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"}],\"internalType\":\"struct Verification\",\"name\":\"signature\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"deployOnCurrentChain\",\"type\":\"bool\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"toChain\",\"type\":\"uint32\"}],\"internalType\":\"struct BridgeSettings[]\",\"name\":\"bridgeSettings\",\"type\":\"tuple[]\"}],\"name\":\"deployHolographableContractMultiChain\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"adminAddress\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getHolograph\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"holograph\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRegistry\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"registry\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"initPayload\",\"type\":\"bytes\"}],\"name\":\"init\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"adminAddress\",\"type\":\"address\"}],\"name\":\"setAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"holograph\",\"type\":\"address\"}],\"name\":\"setHolograph\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"registry\",\"type\":\"address\"}],\"name\":\"setRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"author\":\"https://github.com/holographxyz\",\"details\":\"The contract provides methods that allow for the creation of Holograph Protocol compliant smart contracts, that are capable of minting holographable assets\",\"kind\":\"dev\",\"methods\":{\"bridgeIn(uint32,bytes)\":{\"details\":\"This function directly forwards the calldata to the deployHolographableContract function It is used to allow for Holograph Bridge to make cross-chain deployments\"},\"bridgeOut(uint32,address,bytes)\":{\"details\":\"This function directly returns the calldata It is used to allow for Holograph Bridge to make cross-chain deployments\"},\"constructor\":{\"details\":\"Constructor is left empty and init is used instead\"},\"deployHolographableContract((bytes32,uint32,bytes32,bytes,bytes),(bytes32,bytes32,uint8),address)\":{\"details\":\"Using this function allows to deploy smart contracts that have the same address across all EVM chains\",\"params\":{\"config\":\"contract deployement configurations\",\"signature\":\"that was created by the wallet that created the original payload\",\"signer\":\"address of wallet that created the payload\"}},\"getHolograph()\":{\"details\":\"Used for storing a reference to all the primary modules and variables of the protocol\"},\"getRegistry()\":{\"details\":\"This module stores a reference for all deployed holographable smart contracts\"},\"init(bytes)\":{\"details\":\"This function is called by the deployer/factory when creating a contract\",\"params\":{\"initPayload\":\"abi encoded payload to use for contract initilaization\"}},\"setHolograph(address)\":{\"params\":{\"holograph\":\"address of the Holograph Protocol smart contract to use\"}},\"setRegistry(address)\":{\"params\":{\"registry\":\"address of the Holograph Registry smart contract to use\"}}},\"stateVariables\":{\"_holographSlot\":{\"details\":\"bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\"},\"_registrySlot\":{\"details\":\"bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\"}},\"title\":\"Holograph Factory\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"bridgeIn(uint32,bytes)\":{\"notice\":\"Deploy holographable contract via bridge request\"},\"bridgeOut(uint32,address,bytes)\":{\"notice\":\"Deploy holographable contract via bridge request\"},\"deployHolographableContract((bytes32,uint32,bytes32,bytes,bytes),(bytes32,bytes32,uint8),address)\":{\"notice\":\"Deploy a holographable smart contract\"},\"getHolograph()\":{\"notice\":\"Get the Holograph Protocol contract\"},\"getRegistry()\":{\"notice\":\"Get the Holograph Registry module\"},\"init(bytes)\":{\"notice\":\"Used internally to initialize the contract instead of through a constructor\"},\"setHolograph(address)\":{\"notice\":\"Update the Holograph Protocol contract address\"},\"setRegistry(address)\":{\"notice\":\"Update the Holograph Registry module address\"}},\"notice\":\"Deploy holographable contracts\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/HolographFactory.sol\":\"HolographFactory\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc721a-upgradeable/=erc721a-upgradeable/\",\":forge-std/=lib/forge-std/src/\"]},\"sources\":{\"contracts/HolographFactory.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nimport \\\"./abstract/Admin.sol\\\";\\nimport \\\"./abstract/Initializable.sol\\\";\\n\\nimport \\\"./enforcer/Holographer.sol\\\";\\n\\nimport \\\"./interface/Holographable.sol\\\";\\nimport \\\"./interface/HolographBridgeInterface.sol\\\";\\nimport \\\"./interface/HolographFactoryInterface.sol\\\";\\nimport \\\"./interface/HolographInterface.sol\\\";\\nimport \\\"./interface/HolographRegistryInterface.sol\\\";\\nimport \\\"./interface/InitializableInterface.sol\\\";\\n\\nimport \\\"./struct/BridgeSettings.sol\\\";\\nimport \\\"./struct/DeploymentConfig.sol\\\";\\nimport \\\"./struct/Verification.sol\\\";\\n\\nimport \\\"./library/Strings.sol\\\";\\n\\n/**\\n * @title Holograph Factory\\n * @author https://github.com/holographxyz\\n * @notice Deploy holographable contracts\\n * @dev The contract provides methods that allow for the creation of Holograph Protocol compliant smart contracts, that are capable of minting holographable assets\\n */\\ncontract HolographFactory is Admin, Initializable, Holographable, HolographFactoryInterface {\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\\n */\\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\\n */\\n bytes32 constant _registrySlot = 0xce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7;\\n\\n /**\\n * @dev Constructor is left empty and init is used instead\\n */\\n constructor() {}\\n\\n /**\\n * @notice Used internally to initialize the contract instead of through a constructor\\n * @dev This function is called by the deployer/factory when creating a contract\\n * @param initPayload abi encoded payload to use for contract initilaization\\n */\\n function init(bytes memory initPayload) external override returns (bytes4) {\\n require(!_isInitialized(), \\\"HOLOGRAPH: already initialized\\\");\\n (address holograph, address registry) = abi.decode(initPayload, (address, address));\\n assembly {\\n sstore(_adminSlot, origin())\\n sstore(_holographSlot, holograph)\\n sstore(_registrySlot, registry)\\n }\\n _setInitialized();\\n return InitializableInterface.init.selector;\\n }\\n\\n /**\\n * @notice Deploy holographable contract via bridge request\\n * @dev This function directly forwards the calldata to the deployHolographableContract function\\n * It is used to allow for Holograph Bridge to make cross-chain deployments\\n */\\n function bridgeIn(uint32 /* fromChain*/, bytes calldata payload) external returns (bytes4) {\\n (DeploymentConfig memory config, Verification memory signature, address signer) = abi.decode(\\n payload,\\n (DeploymentConfig, Verification, address)\\n );\\n HolographFactoryInterface(address(this)).deployHolographableContract(config, signature, signer);\\n return Holographable.bridgeIn.selector;\\n }\\n\\n /**\\n * @notice Deploy holographable contract via bridge request\\n * @dev This function directly returns the calldata\\n * It is used to allow for Holograph Bridge to make cross-chain deployments\\n */\\n function bridgeOut(\\n uint32 /* toChain*/,\\n address /* sender*/,\\n bytes calldata payload\\n ) external pure returns (bytes4 selector, bytes memory data) {\\n return (Holographable.bridgeOut.selector, payload);\\n }\\n\\n function deployHolographableContractMultiChain(\\n DeploymentConfig memory config,\\n Verification memory signature,\\n address signer,\\n bool deployOnCurrentChain,\\n BridgeSettings[] memory bridgeSettings\\n ) external payable {\\n if (deployOnCurrentChain) {\\n deployHolographableContract(config, signature, signer);\\n }\\n bytes memory payload = abi.encode(config, signature, signer);\\n HolographInterface holograph;\\n assembly {\\n holograph := sload(_holographSlot)\\n }\\n HolographBridgeInterface bridge = HolographBridgeInterface(holograph.getBridge());\\n uint256 l = bridgeSettings.length;\\n for (uint256 i = 0; i < l; i++) {\\n bridge.bridgeOutRequest{value: bridgeSettings[i].value}(\\n bridgeSettings[i].toChain,\\n address(this),\\n bridgeSettings[i].gasLimit,\\n bridgeSettings[i].gasPrice,\\n payload\\n );\\n }\\n }\\n\\n /**\\n * @notice Deploy a holographable smart contract\\n * @dev Using this function allows to deploy smart contracts that have the same address across all EVM chains\\n * @param config contract deployement configurations\\n * @param signature that was created by the wallet that created the original payload\\n * @param signer address of wallet that created the payload\\n */\\n function deployHolographableContract(\\n DeploymentConfig memory config,\\n Verification memory signature,\\n address signer\\n ) public {\\n address registry;\\n address holograph;\\n assembly {\\n holograph := sload(_holographSlot)\\n registry := sload(_registrySlot)\\n }\\n /**\\n * @dev the configuration is encoded and hashed along with signer address\\n */\\n bytes32 hash = keccak256(\\n abi.encodePacked(\\n config.contractType,\\n config.chainType,\\n config.salt,\\n keccak256(config.byteCode),\\n keccak256(config.initCode),\\n signer\\n )\\n );\\n /**\\n * @dev the hash is validated against signature\\n * this is to guarantee that the original creator's configuration has not been altered\\n */\\n require(_verifySigner(signature.r, signature.s, signature.v, hash, signer), \\\"HOLOGRAPH: invalid signature\\\");\\n /**\\n * @dev check that this contract has not already been deployed on this chain\\n */\\n bytes memory holographerBytecode = type(Holographer).creationCode;\\n address holographerAddress = address(\\n uint160(uint256(keccak256(abi.encodePacked(bytes1(0xff), address(this), hash, keccak256(holographerBytecode)))))\\n );\\n require(!_isContract(holographerAddress), \\\"HOLOGRAPH: already deployed\\\");\\n /**\\n * @dev convert hash into uint256 which will be used as the salt for create2\\n */\\n uint256 saltInt = uint256(hash);\\n address sourceContractAddress;\\n bytes memory sourceByteCode = config.byteCode;\\n assembly {\\n /**\\n * @dev deploy the user created smart contract first\\n */\\n sourceContractAddress := create2(0, add(sourceByteCode, 0x20), mload(sourceByteCode), saltInt)\\n }\\n assembly {\\n /**\\n * @dev deploy the Holographer contract\\n */\\n holographerAddress := create2(0, add(holographerBytecode, 0x20), mload(holographerBytecode), saltInt)\\n }\\n /**\\n * @dev initialize the Holographer contract\\n */\\n require(\\n InitializableInterface(holographerAddress).init(\\n abi.encode(abi.encode(config.chainType, holograph, config.contractType, sourceContractAddress), config.initCode)\\n ) == InitializableInterface.init.selector,\\n \\\"initialization failed\\\"\\n );\\n /**\\n * @dev update the Holograph Registry with deployed contract address\\n */\\n HolographRegistryInterface(registry).setHolographedHashAddress(hash, holographerAddress);\\n /**\\n * @dev emit an event that on-chain indexers can easily read\\n */\\n emit BridgeableContractDeployed(holographerAddress, hash);\\n }\\n\\n /**\\n * @notice Get the Holograph Protocol contract\\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\\n */\\n function getHolograph() external view returns (address holograph) {\\n assembly {\\n holograph := sload(_holographSlot)\\n }\\n }\\n\\n /**\\n * @notice Update the Holograph Protocol contract address\\n * @param holograph address of the Holograph Protocol smart contract to use\\n */\\n function setHolograph(address holograph) external onlyAdmin {\\n assembly {\\n sstore(_holographSlot, holograph)\\n }\\n }\\n\\n /**\\n * @notice Get the Holograph Registry module\\n * @dev This module stores a reference for all deployed holographable smart contracts\\n */\\n function getRegistry() external view returns (address registry) {\\n assembly {\\n registry := sload(_registrySlot)\\n }\\n }\\n\\n /**\\n * @notice Update the Holograph Registry module address\\n * @param registry address of the Holograph Registry smart contract to use\\n */\\n function setRegistry(address registry) external onlyAdmin {\\n assembly {\\n sstore(_registrySlot, registry)\\n }\\n }\\n\\n /**\\n * @dev Internal function used for checking if a contract has been deployed at address\\n */\\n function _isContract(address contractAddress) private view returns (bool) {\\n bytes32 codehash;\\n assembly {\\n codehash := extcodehash(contractAddress)\\n }\\n return (codehash != 0x0 && codehash != 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470);\\n }\\n\\n /**\\n * @dev Internal function used for verifying a signature\\n */\\n function _verifySigner(bytes32 r, bytes32 s, uint8 v, bytes32 hash, address signer) private pure returns (bool) {\\n if (v < 27) {\\n v += 27;\\n }\\n if (v != 27 && v != 28) {\\n return false;\\n }\\n // prevent signature malleability by checking if s-value is in the upper range\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n // if s-value is in upper range, calculate a new s-value\\n s = bytes32(0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - uint256(s));\\n // flip the v-value\\n if (v == 27) {\\n v = 28;\\n } else {\\n v = 27;\\n }\\n // check if s-value is still in upper range\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return false;\\n }\\n }\\n /**\\n * @dev signature is checked against EIP-191 first, then directly, to support legacy wallets\\n */\\n return (signer != address(0) &&\\n (ecrecover(keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash)), v, r, s) == signer ||\\n (\\n ecrecover(\\n keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n66\\\", Strings.toHexString(uint256(hash), 32))),\\n v,\\n r,\\n s\\n )\\n ) ==\\n signer ||\\n ecrecover(hash, v, r, s) == signer));\\n }\\n\\n /**\\n * @dev Purposefully reverts to prevent having any type of ether transfered into the contract\\n */\\n receive() external payable {\\n revert();\\n }\\n\\n /**\\n * @dev Purposefully reverts to prevent any calls to undefined functions\\n */\\n fallback() external payable {\\n revert();\\n }\\n}\\n\",\"keccak256\":\"0xb18538929ca40465f6762c4a6204f631d4a9844e2af366d46d9c340a4c75757c\",\"license\":\"UNLICENSED\"},\"contracts/abstract/Admin.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nabstract contract Admin {\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.admin')) - 1)\\n */\\n bytes32 constant _adminSlot = 0x3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c9;\\n\\n modifier onlyAdmin() {\\n require(msg.sender == getAdmin(), \\\"HOLOGRAPH: admin only function\\\");\\n _;\\n }\\n\\n constructor() {}\\n\\n function admin() public view returns (address) {\\n return getAdmin();\\n }\\n\\n function getAdmin() public view returns (address adminAddress) {\\n assembly {\\n adminAddress := sload(_adminSlot)\\n }\\n }\\n\\n function setAdmin(address adminAddress) public onlyAdmin {\\n assembly {\\n sstore(_adminSlot, adminAddress)\\n }\\n }\\n\\n function adminCall(address target, bytes calldata data) external payable onlyAdmin {\\n assembly {\\n calldatacopy(0, data.offset, data.length)\\n let result := call(gas(), target, callvalue(), 0, data.length, 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n switch result\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x93552c9253b579c45113a150a6a3dfddb997afd939d09b49c34d040525734b1a\",\"license\":\"UNLICENSED\"},\"contracts/abstract/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nimport \\\"../interface/InitializableInterface.sol\\\";\\n\\n/**\\n * @title Initializable\\n * @author https://github.com/holographxyz\\n * @notice Use init instead of constructor\\n * @dev This allows for use of init function to make one time initializations without the need for a constructor\\n */\\nabstract contract Initializable is InitializableInterface {\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.initialized')) - 1)\\n */\\n bytes32 constant _initializedSlot = 0x4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a01;\\n\\n /**\\n * @dev Constructor is left empty and init is used instead\\n */\\n constructor() {}\\n\\n /**\\n * @notice Used internally to initialize the contract instead of through a constructor\\n * @dev This function is called by the deployer/factory when creating a contract\\n * @param initPayload abi encoded payload to use for contract initilaization\\n */\\n function init(bytes memory initPayload) external virtual returns (bytes4);\\n\\n function _isInitialized() internal view returns (bool initialized) {\\n assembly {\\n initialized := sload(_initializedSlot)\\n }\\n }\\n\\n function _setInitialized() internal {\\n assembly {\\n sstore(_initializedSlot, 0x0000000000000000000000000000000000000000000000000000000000000001)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa55dc367285f96952dec56adfbfb48b6a4be31aef9ba0d30ad8c91023a572462\",\"license\":\"UNLICENSED\"},\"contracts/enforcer/Holographer.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nimport \\\"../abstract/Admin.sol\\\";\\nimport \\\"../abstract/Initializable.sol\\\";\\n\\nimport \\\"../interface/HolographInterface.sol\\\";\\nimport \\\"../interface/HolographerInterface.sol\\\";\\nimport \\\"../interface/HolographRegistryInterface.sol\\\";\\nimport \\\"../interface/InitializableInterface.sol\\\";\\n\\n/**\\n * @dev This contract is a binder. It puts together all the variables to make the underlying contracts functional and be bridgeable.\\n */\\ncontract Holographer is Admin, Initializable, HolographerInterface {\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.originChain')) - 1)\\n */\\n bytes32 constant _originChainSlot = 0xd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d;\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\\n */\\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.contractType')) - 1)\\n */\\n bytes32 constant _contractTypeSlot = 0x0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c7;\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.sourceContract')) - 1)\\n */\\n bytes32 constant _sourceContractSlot = 0x27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b074;\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.blockHeight')) - 1)\\n */\\n bytes32 constant _blockHeightSlot = 0x9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de3;\\n\\n /**\\n * @dev Constructor is left empty and init is used instead\\n */\\n constructor() {}\\n\\n /**\\n * @notice Used internally to initialize the contract instead of through a constructor\\n * @dev This function is called by the deployer/factory when creating a contract\\n * @param initPayload abi encoded payload to use for contract initilaization\\n */\\n function init(bytes memory initPayload) external override returns (bytes4) {\\n require(!_isInitialized(), \\\"HOLOGRAPHER: already initialized\\\");\\n (bytes memory encoded, bytes memory initCode) = abi.decode(initPayload, (bytes, bytes));\\n (uint32 originChain, address holograph, bytes32 contractType, address sourceContract) = abi.decode(\\n encoded,\\n (uint32, address, bytes32, address)\\n );\\n assembly {\\n sstore(_adminSlot, caller())\\n sstore(_blockHeightSlot, number())\\n sstore(_contractTypeSlot, contractType)\\n sstore(_holographSlot, holograph)\\n sstore(_originChainSlot, originChain)\\n sstore(_sourceContractSlot, sourceContract)\\n }\\n (bool success, bytes memory returnData) = HolographRegistryInterface(HolographInterface(holograph).getRegistry())\\n .getReservedContractTypeAddress(contractType)\\n .delegatecall(abi.encodeWithSelector(InitializableInterface.init.selector, initCode));\\n bytes4 selector = abi.decode(returnData, (bytes4));\\n require(success && selector == InitializableInterface.init.selector, \\\"HOLOGRAPH: initialization failed\\\");\\n _setInitialized();\\n return InitializableInterface.init.selector;\\n }\\n\\n /**\\n * @dev Returns the contract type that is used for loading the Enforcer\\n */\\n function getContractType() external view returns (bytes32 contractType) {\\n assembly {\\n contractType := sload(_contractTypeSlot)\\n }\\n }\\n\\n /**\\n * @dev Returns the block height of when the smart contract was deployed. Useful for retrieving deployment config for re-deployment on other EVM-compatible chains.\\n */\\n function getDeploymentBlock() external view returns (uint256 deploymentBlock) {\\n assembly {\\n deploymentBlock := sload(_blockHeightSlot)\\n }\\n }\\n\\n /**\\n * @dev Returns a hardcoded address for the Holograph smart contract.\\n */\\n function getHolograph() external view returns (address holograph) {\\n assembly {\\n holograph := sload(_holographSlot)\\n }\\n }\\n\\n /**\\n * @dev Returns a hardcoded address for the Holograph smart contract that controls and enforces the ERC standards.\\n */\\n function getHolographEnforcer() public view returns (address) {\\n HolographInterface holograph;\\n bytes32 contractType;\\n assembly {\\n holograph := sload(_holographSlot)\\n contractType := sload(_contractTypeSlot)\\n }\\n return HolographRegistryInterface(holograph.getRegistry()).getReservedContractTypeAddress(contractType);\\n }\\n\\n /**\\n * @dev Returns the original chain that contract was deployed on.\\n */\\n function getOriginChain() external view returns (uint32 originChain) {\\n assembly {\\n originChain := sload(_originChainSlot)\\n }\\n }\\n\\n /**\\n * @dev Returns a hardcoded address for the custom secure storage contract deployed in parallel with this contract deployment.\\n */\\n function getSourceContract() external view returns (address sourceContract) {\\n assembly {\\n sourceContract := sload(_sourceContractSlot)\\n }\\n }\\n\\n /**\\n * @dev Purposefully left empty, to prevent running out of gas errors when receiving native token payments.\\n */\\n receive() external payable {}\\n\\n /**\\n * @dev This takes the Enforcer's source code, runs it, and uses current address for storage slots.\\n */\\n fallback() external payable {\\n address holographEnforcer = getHolographEnforcer();\\n assembly {\\n calldatacopy(0, 0, calldatasize())\\n let result := delegatecall(gas(), holographEnforcer, 0, calldatasize(), 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n switch result\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc31b575625e84743d9a14f282ef3894becece82a6f47ec945585ac5a0d1895f7\",\"license\":\"UNLICENSED\"},\"contracts/interface/HolographBridgeInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\n/**\\n * @title Holograph Bridge\\n * @author https://github.com/holographxyz\\n * @notice Beam any holographable contracts and assets across blockchains\\n * @dev The contract abstracts all the complexities of making bridge requests and uses a universal interface to bridge any type of holographable assets\\n */\\ninterface HolographBridgeInterface {\\n /**\\n * @notice Receive a beam from another chain\\n * @dev This function can only be called by the Holograph Operator module\\n * @param fromChain Holograph Chain ID where the brigeOutRequest was created\\n * @param holographableContract address of the destination contract that the bridgeInRequest is targeted for\\n * @param hToken address of the hToken contract that wrapped the origin chain native gas token\\n * @param hTokenRecipient address of recipient for the hToken reward\\n * @param hTokenValue exact amount of hToken reward in wei\\n * @param doNotRevert boolean used to specify if the call should revert\\n * @param bridgeInPayload actual abi encoded bytes of the data that the holographable contract bridgeIn function will receive\\n */\\n function bridgeInRequest(\\n uint256 nonce,\\n uint32 fromChain,\\n address holographableContract,\\n address hToken,\\n address hTokenRecipient,\\n uint256 hTokenValue,\\n bool doNotRevert,\\n bytes calldata bridgeInPayload\\n ) external payable;\\n\\n /**\\n * @notice Create a beam request for a destination chain\\n * @dev This function works for deploying contracts and beaming supported holographable assets across chains\\n * @param toChain Holograph Chain ID where the beam is being sent to\\n * @param holographableContract address of the contract for which the bridge request is being made\\n * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain\\n * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain\\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\\n */\\n function bridgeOutRequest(\\n uint32 toChain,\\n address holographableContract,\\n uint256 gasLimit,\\n uint256 gasPrice,\\n bytes calldata bridgeOutPayload\\n ) external payable;\\n\\n /**\\n * @notice Do not call this function, it will always revert\\n * @dev Used by getBridgeOutRequestPayload function\\n * It is purposefully inverted to always revert on a successful call\\n * Marked as external and not private to allow use inside try/catch of getBridgeOutRequestPayload function\\n * If this function does not revert and returns a string, it is the actual revert reason\\n * @param sender address of actual sender that is planning to make a bridgeOutRequest call\\n * @param toChain holograph chain id of destination chain\\n * @param holographableContract address of the contract for which the bridge request is being made\\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\\n */\\n function revertedBridgeOutRequest(\\n address sender,\\n uint32 toChain,\\n address holographableContract,\\n bytes calldata bridgeOutPayload\\n ) external returns (string memory revertReason);\\n\\n /**\\n * @notice Get the payload created by the bridgeOutRequest function\\n * @dev Use this function to get the payload that will be generated by a bridgeOutRequest\\n * Only use this with a static call\\n * @param toChain Holograph Chain ID where the beam is being sent to\\n * @param holographableContract address of the contract for which the bridge request is being made\\n * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain\\n * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain\\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\\n * @return samplePayload bytes made up of the bridgeOutRequest payload\\n */\\n function getBridgeOutRequestPayload(\\n uint32 toChain,\\n address holographableContract,\\n uint256 gasLimit,\\n uint256 gasPrice,\\n bytes calldata bridgeOutPayload\\n ) external returns (bytes memory samplePayload);\\n\\n /**\\n * @notice Get the fees associated with sending specific payload\\n * @dev Will provide exact costs on protocol and message side, combine the two to get total\\n * @param toChain holograph chain id of destination chain for payload\\n * @param gasLimit amount of gas to provide for executing payload on destination chain\\n * @param gasPrice maximum amount to pay for gas price, can be set to 0 and will be chose automatically\\n * @param crossChainPayload the entire packet being sent cross-chain\\n * @return hlgFee the amount (in wei) of native gas token that will cost for finalizing job on destiantion chain\\n * @return msgFee the amount (in wei) of native gas token that will cost for sending message to destiantion chain\\n * @return dstGasPrice the amount (in wei) that destination message maximum gas price will be\\n */\\n function getMessageFee(\\n uint32 toChain,\\n uint256 gasLimit,\\n uint256 gasPrice,\\n bytes calldata crossChainPayload\\n ) external view returns (uint256 hlgFee, uint256 msgFee, uint256 dstGasPrice);\\n\\n /**\\n * @notice Get the address of the Holograph Factory module\\n * @dev Used for deploying holographable smart contracts\\n */\\n function getFactory() external view returns (address factory);\\n\\n /**\\n * @notice Update the Holograph Factory module address\\n * @param factory address of the Holograph Factory smart contract to use\\n */\\n function setFactory(address factory) external;\\n\\n /**\\n * @notice Get the Holograph Protocol contract\\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\\n */\\n function getHolograph() external view returns (address holograph);\\n\\n /**\\n * @notice Update the Holograph Protocol contract address\\n * @param holograph address of the Holograph Protocol smart contract to use\\n */\\n function setHolograph(address holograph) external;\\n\\n /**\\n * @notice Get the latest job nonce\\n * @dev You can use the job nonce as a way to calculate total amount of bridge requests that have been made\\n */\\n function getJobNonce() external view returns (uint256 jobNonce);\\n\\n /**\\n * @notice Get the address of the Holograph Operator module\\n * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module\\n */\\n function getOperator() external view returns (address operator);\\n\\n /**\\n * @notice Update the Holograph Operator module address\\n * @param operator address of the Holograph Operator smart contract to use\\n */\\n function setOperator(address operator) external;\\n\\n /**\\n * @notice Get the Holograph Registry module\\n * @dev This module stores a reference for all deployed holographable smart contracts\\n */\\n function getRegistry() external view returns (address registry);\\n\\n /**\\n * @notice Update the Holograph Registry module address\\n * @param registry address of the Holograph Registry smart contract to use\\n */\\n function setRegistry(address registry) external;\\n}\\n\",\"keccak256\":\"0x6e49ef7e89b6271241da6df330eb5d5cf48da3be31408bb5d99c48d51c0ef176\",\"license\":\"UNLICENSED\"},\"contracts/interface/HolographFactoryInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nimport \\\"../struct/DeploymentConfig.sol\\\";\\nimport \\\"../struct/Verification.sol\\\";\\n\\n/**\\n * @title Holograph Factory\\n * @author https://github.com/holographxyz\\n * @notice Deploy holographable contracts\\n * @dev The contract provides methods that allow for the creation of Holograph Protocol compliant smart contracts, that are capable of minting holographable assets\\n */\\ninterface HolographFactoryInterface {\\n /**\\n * @dev This event is fired every time that a bridgeable contract is deployed.\\n */\\n event BridgeableContractDeployed(address indexed contractAddress, bytes32 indexed hash);\\n\\n /**\\n * @notice Deploy a holographable smart contract\\n * @dev Using this function allows to deploy smart contracts that have the same address across all EVM chains\\n * @param config contract deployement configurations\\n * @param signature that was created by the wallet that created the original payload\\n * @param signer address of wallet that created the payload\\n */\\n function deployHolographableContract(\\n DeploymentConfig memory config,\\n Verification memory signature,\\n address signer\\n ) external;\\n\\n /**\\n * @notice Get the Holograph Protocol contract\\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\\n */\\n function getHolograph() external view returns (address holograph);\\n\\n /**\\n * @notice Update the Holograph Protocol contract address\\n * @param holograph address of the Holograph Protocol smart contract to use\\n */\\n function setHolograph(address holograph) external;\\n\\n /**\\n * @notice Get the Holograph Registry module\\n * @dev This module stores a reference for all deployed holographable smart contracts\\n */\\n function getRegistry() external view returns (address registry);\\n\\n /**\\n * @notice Update the Holograph Registry module address\\n * @param registry address of the Holograph Registry smart contract to use\\n */\\n function setRegistry(address registry) external;\\n}\\n\",\"keccak256\":\"0x44cd1db20207337ef6abde2d0f42837778d13fb62fe353b0ee9b293a601a0d71\",\"license\":\"UNLICENSED\"},\"contracts/interface/HolographInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\n/**\\n * @title Holograph Protocol\\n * @author https://github.com/holographxyz\\n * @notice This is the primary Holograph Protocol smart contract\\n * @dev This contract stores a reference to all the primary modules and variables of the protocol\\n */\\ninterface HolographInterface {\\n /**\\n * @notice Get the address of the Holograph Bridge module\\n * @dev Used for beaming holographable assets cross-chain\\n */\\n function getBridge() external view returns (address bridge);\\n\\n /**\\n * @notice Update the Holograph Bridge module address\\n * @param bridge address of the Holograph Bridge smart contract to use\\n */\\n function setBridge(address bridge) external;\\n\\n /**\\n * @notice Get the chain ID that the Protocol was deployed on\\n * @dev Useful for checking if/when a hard fork occurs\\n */\\n function getChainId() external view returns (uint256 chainId);\\n\\n /**\\n * @notice Update the chain ID\\n * @dev Useful for updating once a hard fork has been mitigated\\n * @param chainId EVM chain ID to use\\n */\\n function setChainId(uint256 chainId) external;\\n\\n /**\\n * @notice Get the address of the Holograph Factory module\\n * @dev Used for deploying holographable smart contracts\\n */\\n function getFactory() external view returns (address factory);\\n\\n /**\\n * @notice Update the Holograph Factory module address\\n * @param factory address of the Holograph Factory smart contract to use\\n */\\n function setFactory(address factory) external;\\n\\n /**\\n * @notice Get the Holograph chain Id\\n * @dev Holograph uses an internal chain id mapping\\n */\\n function getHolographChainId() external view returns (uint32 holographChainId);\\n\\n /**\\n * @notice Update the Holograph chain ID\\n * @dev Useful for updating once a hard fork was mitigated\\n * @param holographChainId Holograph chain ID to use\\n */\\n function setHolographChainId(uint32 holographChainId) external;\\n\\n /**\\n * @notice Get the address of the Holograph Interfaces module\\n * @dev Holograph uses this contract to store data that needs to be accessed by a large portion of the modules\\n */\\n function getInterfaces() external view returns (address interfaces);\\n\\n /**\\n * @notice Update the Holograph Interfaces module address\\n * @param interfaces address of the Holograph Interfaces smart contract to use\\n */\\n function setInterfaces(address interfaces) external;\\n\\n /**\\n * @notice Get the address of the Holograph Operator module\\n * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module\\n */\\n function getOperator() external view returns (address operator);\\n\\n /**\\n * @notice Update the Holograph Operator module address\\n * @param operator address of the Holograph Operator smart contract to use\\n */\\n function setOperator(address operator) external;\\n\\n /**\\n * @notice Get the Holograph Registry module\\n * @dev This module stores a reference for all deployed holographable smart contracts\\n */\\n function getRegistry() external view returns (address registry);\\n\\n /**\\n * @notice Update the Holograph Registry module address\\n * @param registry address of the Holograph Registry smart contract to use\\n */\\n function setRegistry(address registry) external;\\n\\n /**\\n * @notice Get the Holograph Treasury module\\n * @dev All of the Holograph Protocol assets are stored and managed by this module\\n */\\n function getTreasury() external view returns (address treasury);\\n\\n /**\\n * @notice Update the Holograph Treasury module address\\n * @param treasury address of the Holograph Treasury smart contract to use\\n */\\n function setTreasury(address treasury) external;\\n\\n /**\\n * @notice Get the Holograph Utility Token address\\n * @dev This is the official utility token of the Holograph Protocol\\n */\\n function getUtilityToken() external view returns (address utilityToken);\\n\\n /**\\n * @notice Update the Holograph Utility Token address\\n * @param utilityToken address of the Holograph Utility Token smart contract to use\\n */\\n function setUtilityToken(address utilityToken) external;\\n}\\n\",\"keccak256\":\"0x90b5643e77e914393c508d59b80f5739debfd72455029c0db041f92374b3f586\",\"license\":\"UNLICENSED\"},\"contracts/interface/HolographRegistryInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\ninterface HolographRegistryInterface {\\n event HolographableContractEvent(address indexed _holographableContract, bytes _payload);\\n\\n function isHolographedContract(address smartContract) external view returns (bool);\\n\\n function isHolographedHashDeployed(bytes32 hash) external view returns (bool);\\n\\n function referenceContractTypeAddress(address contractAddress) external returns (bytes32);\\n\\n function getContractTypeAddress(bytes32 contractType) external view returns (address);\\n\\n function setContractTypeAddress(bytes32 contractType, address contractAddress) external;\\n\\n function getHolograph() external view returns (address holograph);\\n\\n function setHolograph(address holograph) external;\\n\\n function getHolographableContracts(uint256 index, uint256 length) external view returns (address[] memory contracts);\\n\\n function getHolographableContractsLength() external view returns (uint256);\\n\\n function getHolographedHashAddress(bytes32 hash) external view returns (address);\\n\\n function setHolographedHashAddress(bytes32 hash, address contractAddress) external;\\n\\n function getHToken(uint32 chainId) external view returns (address);\\n\\n function setHToken(uint32 chainId, address hToken) external;\\n\\n function getReservedContractTypeAddress(bytes32 contractType) external view returns (address contractTypeAddress);\\n\\n function setReservedContractTypeAddress(bytes32 hash, bool reserved) external;\\n\\n function setReservedContractTypeAddresses(bytes32[] calldata hashes, bool[] calldata reserved) external;\\n\\n function getUtilityToken() external view returns (address utilityToken);\\n\\n function setUtilityToken(address utilityToken) external;\\n\\n function holographableEvent(bytes calldata payload) external;\\n}\\n\",\"keccak256\":\"0x5e270e2ec4413f7e49d7bc4dd4d935549d3f5234f786e5a7f435cf77850ba966\",\"license\":\"UNLICENSED\"},\"contracts/interface/Holographable.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\ninterface Holographable {\\n function bridgeIn(uint32 fromChain, bytes calldata payload) external returns (bytes4);\\n\\n function bridgeOut(\\n uint32 toChain,\\n address sender,\\n bytes calldata payload\\n ) external returns (bytes4 selector, bytes memory data);\\n}\\n\",\"keccak256\":\"0x4dd2fc1af269273c46156df8af5cedeed0dfb83f0bfa5696a8d64c768449285b\",\"license\":\"UNLICENSED\"},\"contracts/interface/HolographerInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\ninterface HolographerInterface {\\n function getContractType() external view returns (bytes32 contractType);\\n\\n function getDeploymentBlock() external view returns (uint256 deploymentBlock);\\n\\n function getHolograph() external view returns (address holograph);\\n\\n function getHolographEnforcer() external view returns (address);\\n\\n function getOriginChain() external view returns (uint32 originChain);\\n\\n function getSourceContract() external view returns (address sourceContract);\\n}\\n\",\"keccak256\":\"0x4274b9180266275a8df16b8e1f0956cc795fb1ab87db1c01264c343be3bea937\",\"license\":\"UNLICENSED\"},\"contracts/interface/InitializableInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\n/**\\n * @title Initializable\\n * @author https://github.com/holographxyz\\n * @notice Use init instead of constructor\\n * @dev This allows for use of init function to make one time initializations without the need of a constructor\\n */\\ninterface InitializableInterface {\\n /**\\n * @notice Used internally to initialize the contract instead of through a constructor\\n * @dev This function is called by the deployer/factory when creating a contract\\n * @param initPayload abi encoded payload to use for contract initilaization\\n */\\n function init(bytes memory initPayload) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0x0a76fae986c5c18110ce2b1818c84ec28b7bf7f8fb00d20b39b8d7225fbd892d\",\"license\":\"UNLICENSED\"},\"contracts/library/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nlibrary Strings {\\n function toHexString(address account) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(account)));\\n }\\n\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\n }\\n\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = bytes16(\\\"0123456789abcdef\\\")[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n function toAsciiString(address x) internal pure returns (string memory) {\\n bytes memory s = new bytes(40);\\n for (uint256 i = 0; i < 20; i++) {\\n bytes1 b = bytes1(uint8(uint256(uint160(x)) / (2 ** (8 * (19 - i)))));\\n bytes1 hi = bytes1(uint8(b) / 16);\\n bytes1 lo = bytes1(uint8(b) - 16 * uint8(hi));\\n s[2 * i] = char(hi);\\n s[2 * i + 1] = char(lo);\\n }\\n return string(s);\\n }\\n\\n function char(bytes1 b) internal pure returns (bytes1 c) {\\n if (uint8(b) < 10) {\\n return bytes1(uint8(b) + 0x30);\\n } else {\\n return bytes1(uint8(b) + 0x57);\\n }\\n }\\n\\n function uint2str(uint256 _i) internal pure returns (string memory _uint256AsString) {\\n if (_i == 0) {\\n return \\\"0\\\";\\n }\\n uint256 j = _i;\\n uint256 len;\\n while (j != 0) {\\n len++;\\n j /= 10;\\n }\\n bytes memory bstr = new bytes(len);\\n uint256 k = len;\\n while (_i != 0) {\\n k = k - 1;\\n uint8 temp = (48 + uint8(_i - (_i / 10) * 10));\\n bytes1 b1 = bytes1(temp);\\n bstr[k] = b1;\\n _i /= 10;\\n }\\n return string(bstr);\\n }\\n\\n function toString(uint256 value) internal pure returns (string memory) {\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0xbfc8f2c75b679aefa1c0c0ef095665b957ebaeabde39fb15ce17afcdd4110492\",\"license\":\"UNLICENSED\"},\"contracts/struct/BridgeSettings.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nstruct BridgeSettings {\\n uint256 value;\\n uint256 gasLimit;\\n uint256 gasPrice;\\n uint32 toChain;\\n}\\n\",\"keccak256\":\"0x405f453cf620c5e882cf6d915fd7d14c895877408a7fd7e298d6e751bd4a0ce1\",\"license\":\"UNLICENSED\"},\"contracts/struct/DeploymentConfig.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nstruct DeploymentConfig {\\n bytes32 contractType;\\n uint32 chainType;\\n bytes32 salt;\\n bytes byteCode;\\n bytes initCode;\\n}\\n\",\"keccak256\":\"0x5eb9e83676eb65fa424aa9ca79961e1602a749f264ea4f496a9c359dad0da726\",\"license\":\"UNLICENSED\"},\"contracts/struct/Verification.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nstruct Verification {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n}\\n\",\"keccak256\":\"0xd351869472bcb2497e0a771c6e7f7a0b794d099133c67f5f378a8f7839f9db92\",\"license\":\"UNLICENSED\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50612f61806100206000396000f3fe6080604052600436106100d65760003560e01c8063704b6c021161007f578063b7e0366111610059578063b7e036611461028d578063bf64a82d146102bb578063df6516bd146102ce578063f851a440146102ee57600080fd5b8063704b6c021461023a578063a8935c671461025a578063a91ee0dc1461026d57600080fd5b80634ddf47d4116100b05780634ddf47d4146101b25780635ab1bd53146101d25780636e9960c31461020657600080fd5b806308a1eb20146100e557806325d5cac81461013b5780634827ae0c1461015d57600080fd5b366100e057600080fd5b600080fd5b3480156100f157600080fd5b50610105610100366004611690565b610303565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020015b60405180910390f35b34801561014757600080fd5b5061015b610156366004611708565b6103ba565b005b34801561016957600080fd5b507fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a545b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610132565b3480156101be57600080fd5b506101056101cd36600461185a565b610499565b3480156101de57600080fd5b507fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e75461018d565b34801561021257600080fd5b507f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95461018d565b34801561024657600080fd5b5061015b610255366004611708565b610600565b61015b6102683660046119b2565b6106da565b34801561027957600080fd5b5061015b610288366004611708565b6108c1565b34801561029957600080fd5b506102ad6102a8366004611af9565b61099b565b604051610132929190611bd6565b61015b6102c9366004611c11565b6109ef565b3480156102da57600080fd5b5061015b6102e9366004611c31565b610aca565b3480156102fa57600080fd5b5061018d611015565b600080808061031485870187611c31565b6040517fdf6516bd0000000000000000000000000000000000000000000000000000000081529295509093509150309063df6516bd9061035c90869086908690600401611c94565b600060405180830381600087803b15801561037657600080fd5b505af115801561038a573d6000803e3d6000fd5b507f08a1eb20000000000000000000000000000000000000000000000000000000009a9950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610475576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064015b60405180910390fd5b7fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55565b60006104c37f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a015490565b1561052a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a20616c726561647920696e697469616c697a65640000604482015260640161046c565b600080838060200190518101906105419190611d56565b91509150327f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955817fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55807fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7556105d760017f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a0155565b507f4ddf47d4000000000000000000000000000000000000000000000000000000009392505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955565b81156106eb576106eb858585610aca565b600085858560405160200161070293929190611c94565b604051602081830303815290604052905060007fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a54905060008173ffffffffffffffffffffffffffffffffffffffff16630fffbaf36040518163ffffffff1660e01b8152600401602060405180830381865afa158015610786573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107aa9190611d90565b845190915060005b818110156108b5578273ffffffffffffffffffffffffffffffffffffffff1663e55856668783815181106107e8576107e8611dad565b60200260200101516000015188848151811061080657610806611dad565b602002602001015160600151308a868151811061082557610825611dad565b6020026020010151602001518b878151811061084357610843611dad565b6020026020010151604001518b6040518763ffffffff1660e01b8152600401610870959493929190611ddc565b6000604051808303818588803b15801561088957600080fd5b505af115801561089d573d6000803e3d6000fd5b505050505080806108ad90611e5d565b9150506107b2565b50505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610977576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b7fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e755565b6000606063b7e0366160e01b848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250959c929b50919950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aa5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b808260003760008082600034875af13d6000803e808015610ac5573d6000f35b3d6000fd5b7fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a547fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e754845160208087015160408089015160608a015180519085012060808b01518051908601209251969796600096610bb796909594918b910195865260e09490941b7fffffffff0000000000000000000000000000000000000000000000000000000016602086015260248501929092526044840152606483015260601b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016608482015260980190565b604051602081830303815290604052805190602001209050610be88560000151866020015187604001518488611044565b610c4e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f484f4c4f47524150483a20696e76616c6964207369676e617475726500000000604482015260640161046c565b600060405180602001610c6090611621565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820381018352601f90910116604081815282516020808501919091207fff00000000000000000000000000000000000000000000000000000000000000828501527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b166021850152603584018790526055808501919091528251808503909101815260759093019091528151910120909150610d21816113a4565b15610d88576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f484f4c4f47524150483a20616c7265616479206465706c6f7965640000000000604482015260640161046c565b60608801518051849160009183906020830184f59150828551602087016000f560208c8101518d516040805163ffffffff9093169383019390935273ffffffffffffffffffffffffffffffffffffffff8b811693830193909352606082015284821660808201529195507f4ddf47d4000000000000000000000000000000000000000000000000000000009190861690634ddf47d49060a0016040516020818303038152906040528e60800151604051602001610e46929190611e95565b6040516020818303038152906040526040518263ffffffff1660e01b8152600401610e719190611eba565b6020604051808303816000875af1158015610e90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eb49190611ecd565b7fffffffff000000000000000000000000000000000000000000000000000000001614610f3d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f696e697469616c697a6174696f6e206661696c65640000000000000000000000604482015260640161046c565b6040517f725229f60000000000000000000000000000000000000000000000000000000081526004810187905273ffffffffffffffffffffffffffffffffffffffff858116602483015289169063725229f690604401600060405180830381600087803b158015610fad57600080fd5b505af1158015610fc1573d6000803e3d6000fd5b505060405188925073ffffffffffffffffffffffffffffffffffffffff871691507fa802207d4c618b40db3b25b7b90e6f483e16b2c1f8d3610b15b345a718c6b41b90600090a35050505050505050505050565b600061103f7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95490565b905090565b6000601b8460ff1610156110605761105d601b85611f0f565b93505b8360ff16601b1415801561107857508360ff16601c14155b156110855750600061139b565b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0851115611122576110d7857ffffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141611f34565b945060ff8416601b036110ed57601c93506110f2565b601b93505b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08511156111225750600061139b565b73ffffffffffffffffffffffffffffffffffffffff82161580159061139857506040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c810184905273ffffffffffffffffffffffffffffffffffffffff831690600190605c01604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600084529083018083525260ff881690820152606081018990526080810188905260a0016020604051602081039080840390855afa15801561120c573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff161480611305575073ffffffffffffffffffffffffffffffffffffffff821660016112578560206113de565b6040516020016112679190611f4b565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600084529083018083525260ff881690820152606081018990526080810188905260a0016020604051602081039080840390855afa1580156112e3573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff16145b80611398575060408051600081526020810180835285905260ff861691810191909152606081018790526080810186905273ffffffffffffffffffffffffffffffffffffffff83169060019060a0016020604051602081039080840390855afa158015611376573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff16145b90505b95945050505050565b6000813f80158015906113d757507fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708114155b9392505050565b606060006113ed836002611f90565b6113f8906002611fcd565b67ffffffffffffffff81111561141057611410611725565b6040519080825280601f01601f19166020018201604052801561143a576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061147157611471611dad565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106114d4576114d4611dad565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000611510846002611f90565b61151b906001611fcd565b90505b60018111156115b8577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061155c5761155c611dad565b1a60f81b82828151811061157257611572611dad565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c936115b181611fe5565b905061151e565b5083156113d7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161046c565b610f3a8061201b83390190565b803563ffffffff8116811461164257600080fd5b919050565b60008083601f84011261165957600080fd5b50813567ffffffffffffffff81111561167157600080fd5b60208301915083602082850101111561168957600080fd5b9250929050565b6000806000604084860312156116a557600080fd5b6116ae8461162e565b9250602084013567ffffffffffffffff8111156116ca57600080fd5b6116d686828701611647565b9497909650939450505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461170557600080fd5b50565b60006020828403121561171a57600080fd5b81356113d7816116e3565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516080810167ffffffffffffffff8111828210171561177757611777611725565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156117c4576117c4611725565b604052919050565b600082601f8301126117dd57600080fd5b813567ffffffffffffffff8111156117f7576117f7611725565b61182860207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160161177d565b81815284602083860101111561183d57600080fd5b816020850160208301376000918101602001919091529392505050565b60006020828403121561186c57600080fd5b813567ffffffffffffffff81111561188357600080fd5b61188f848285016117cc565b949350505050565b600060a082840312156118a957600080fd5b60405160a0810167ffffffffffffffff82821081831117156118cd576118cd611725565b81604052829350843583526118e46020860161162e565b602084015260408501356040840152606085013591508082111561190757600080fd5b611913868387016117cc565b6060840152608085013591508082111561192c57600080fd5b50611939858286016117cc565b6080830152505092915050565b60006060828403121561195857600080fd5b6040516060810181811067ffffffffffffffff8211171561197b5761197b611725565b80604052508091508235815260208301356020820152604083013560ff811681146119a557600080fd5b6040919091015292915050565b600080600080600060e086880312156119ca57600080fd5b853567ffffffffffffffff808211156119e257600080fd5b6119ee89838a01611897565b965060209150611a0089838a01611946565b9550608080890135611a11816116e3565b955060a08901358015158114611a2657600080fd5b945060c089013582811115611a3a57600080fd5b8901601f81018b13611a4b57600080fd5b803583811115611a5d57611a5d611725565b611a6b858260051b0161177d565b818152858101945060079190911b82018501908c821115611a8b57600080fd5b918501915b81831015611ae65783838e031215611aa85760008081fd5b611ab0611754565b833581528684013587820152604080850135908201526060611ad381860161162e565b9082015285529385019391830191611a90565b8096505050505050509295509295909350565b60008060008060608587031215611b0f57600080fd5b611b188561162e565b93506020850135611b28816116e3565b9250604085013567ffffffffffffffff811115611b4457600080fd5b611b5087828801611647565b95989497509550505050565b60005b83811015611b77578181015183820152602001611b5f565b83811115611b86576000848401525b50505050565b60008151808452611ba4816020860160208601611b5c565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b7fffffffff000000000000000000000000000000000000000000000000000000008316815260406020820152600061188f6040830184611b8c565b600080600060408486031215611c2657600080fd5b83356116ae816116e3565b600080600060a08486031215611c4657600080fd5b833567ffffffffffffffff811115611c5d57600080fd5b611c6986828701611897565b935050611c798560208601611946565b91506080840135611c89816116e3565b809150509250925092565b60a08152835160a082015263ffffffff60208501511660c0820152604084015160e08201526000606085015160a0610100840152611cd6610140840182611b8c565b905060808601517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6084830301610120850152611d128282611b8c565b92505050835160208301526020840151604083015260ff604085015116606083015261188f608083018473ffffffffffffffffffffffffffffffffffffffff169052565b60008060408385031215611d6957600080fd5b8251611d74816116e3565b6020840151909250611d85816116e3565b809150509250929050565b600060208284031215611da257600080fd5b81516113d7816116e3565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b63ffffffff8616815273ffffffffffffffffffffffffffffffffffffffff8516602082015283604082015282606082015260a060808201526000611e2360a0830184611b8c565b979650505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611e8e57611e8e611e2e565b5060010190565b604081526000611ea86040830185611b8c565b828103602084015261139b8185611b8c565b6020815260006113d76020830184611b8c565b600060208284031215611edf57600080fd5b81517fffffffff00000000000000000000000000000000000000000000000000000000811681146113d757600080fd5b600060ff821660ff84168060ff03821115611f2c57611f2c611e2e565b019392505050565b600082821015611f4657611f46611e2e565b500390565b7f19457468657265756d205369676e6564204d6573736167653a0a363600000000815260008251611f8381601c850160208701611b5c565b91909101601c0192915050565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611fc857611fc8611e2e565b500290565b60008219821115611fe057611fe0611e2e565b500190565b600081611ff457611ff4611e2e565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019056fe608060405234801561001057600080fd5b50610f1a806100206000396000f3fe6080604052600436106100c05760003560e01c806380d1cb3511610074578063c51a29e01161004e578063c51a29e0146102c1578063c8a4c3d5146102f5578063f851a4401461030a576100c7565b806380d1cb351461022c578063913a0ef21461026a578063bf64a82d146102ae576100c7565b80636e9960c3116100a55780636e9960c3146101a45780636faf275b146101d8578063704b6c021461020c576100c7565b80634827ae0c146100f95780634ddf47d414610153576100c7565b366100c757005b60006100d161031f565b90503660008037600080366000845af43d6000803e8080156100f2573d6000f35b3d6000fd5b005b34801561010557600080fd5b507fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a545b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b34801561015f57600080fd5b5061017361016e366004610bb4565b61045d565b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200161014a565b3480156101b057600080fd5b507f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c954610129565b3480156101e457600080fd5b507f27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b07454610129565b34801561021857600080fd5b506100f7610227366004610c59565b610911565b34801561023857600080fd5b507f9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de3545b60405190815260200161014a565b34801561027657600080fd5b507fd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d5460405163ffffffff909116815260200161014a565b6100f76102bc366004610c7d565b6109eb565b3480156102cd57600080fd5b507f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c75461025c565b34801561030157600080fd5b5061012961031f565b34801561031657600080fd5b50610129610ac1565b60008060007fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a5491507f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c75490508173ffffffffffffffffffffffffffffffffffffffff16635ab1bd536040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103db9190610d02565b73ffffffffffffffffffffffffffffffffffffffff166374b7510c826040518263ffffffff1660e01b815260040161041591815260200190565b602060405180830381865afa158015610432573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104569190610d02565b9250505090565b60006104877f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a015490565b156104f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f484f4c4f475241504845523a20616c726561647920696e697469616c697a656460448201526064015b60405180910390fd5b6000808380602001905181019061050a9190610d9c565b91509150600080600080858060200190518101906105289190610e00565b9350935093509350337f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955437f9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de355817f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c755827fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55837fd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d55807f27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b074556000808473ffffffffffffffffffffffffffffffffffffffff16635ab1bd536040518163ffffffff1660e01b8152600401602060405180830381865afa158015610650573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106749190610d02565b73ffffffffffffffffffffffffffffffffffffffff166374b7510c856040518263ffffffff1660e01b81526004016106ae91815260200190565b602060405180830381865afa1580156106cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ef9190610d02565b73ffffffffffffffffffffffffffffffffffffffff16634ddf47d460e01b8860405160240161071e9190610e5e565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009094169390931790925290516107a79190610eaf565b600060405180830381855af49150503d80600081146107e2576040519150601f19603f3d011682016040523d82523d6000602084013e6107e7565b606091505b50915091506000818060200190518101906108029190610ecb565b905082801561085257507fffffffff0000000000000000000000000000000000000000000000000000000081167f4ddf47d400000000000000000000000000000000000000000000000000000000145b6108b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f484f4c4f47524150483a20696e697469616c697a6174696f6e206661696c656460448201526064016104ea565b6108e160017f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a0155565b507f4ddf47d4000000000000000000000000000000000000000000000000000000009a9950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016104ea565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aa1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016104ea565b808260003760008082600034875af13d6000803e8080156100f2573d6000f35b6000610aeb7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95490565b905090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715610b6657610b66610af0565b604052919050565b600067ffffffffffffffff821115610b8857610b88610af0565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600060208284031215610bc657600080fd5b813567ffffffffffffffff811115610bdd57600080fd5b8201601f81018413610bee57600080fd5b8035610c01610bfc82610b6e565b610b1f565b818152856020838501011115610c1657600080fd5b81602084016020830137600091810160200191909152949350505050565b73ffffffffffffffffffffffffffffffffffffffff81168114610c5657600080fd5b50565b600060208284031215610c6b57600080fd5b8135610c7681610c34565b9392505050565b600080600060408486031215610c9257600080fd5b8335610c9d81610c34565b9250602084013567ffffffffffffffff80821115610cba57600080fd5b818601915086601f830112610cce57600080fd5b813581811115610cdd57600080fd5b876020828501011115610cef57600080fd5b6020830194508093505050509250925092565b600060208284031215610d1457600080fd5b8151610c7681610c34565b60005b83811015610d3a578181015183820152602001610d22565b83811115610d49576000848401525b50505050565b600082601f830112610d6057600080fd5b8151610d6e610bfc82610b6e565b818152846020838601011115610d8357600080fd5b610d94826020830160208701610d1f565b949350505050565b60008060408385031215610daf57600080fd5b825167ffffffffffffffff80821115610dc757600080fd5b610dd386838701610d4f565b93506020850151915080821115610de957600080fd5b50610df685828601610d4f565b9150509250929050565b60008060008060808587031215610e1657600080fd5b845163ffffffff81168114610e2a57600080fd5b6020860151909450610e3b81610c34565b604086015160608701519194509250610e5381610c34565b939692955090935050565b6020815260008251806020840152610e7d816040850160208701610d1f565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60008251610ec1818460208701610d1f565b9190910192915050565b600060208284031215610edd57600080fd5b81517fffffffff0000000000000000000000000000000000000000000000000000000081168114610c7657600080fdfea164736f6c634300080d000aa164736f6c634300080d000a", + "deployedBytecode": "0x6080604052600436106100d65760003560e01c8063704b6c021161007f578063b7e0366111610059578063b7e036611461028d578063bf64a82d146102bb578063df6516bd146102ce578063f851a440146102ee57600080fd5b8063704b6c021461023a578063a8935c671461025a578063a91ee0dc1461026d57600080fd5b80634ddf47d4116100b05780634ddf47d4146101b25780635ab1bd53146101d25780636e9960c31461020657600080fd5b806308a1eb20146100e557806325d5cac81461013b5780634827ae0c1461015d57600080fd5b366100e057600080fd5b600080fd5b3480156100f157600080fd5b50610105610100366004611690565b610303565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020015b60405180910390f35b34801561014757600080fd5b5061015b610156366004611708565b6103ba565b005b34801561016957600080fd5b507fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a545b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610132565b3480156101be57600080fd5b506101056101cd36600461185a565b610499565b3480156101de57600080fd5b507fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e75461018d565b34801561021257600080fd5b507f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95461018d565b34801561024657600080fd5b5061015b610255366004611708565b610600565b61015b6102683660046119b2565b6106da565b34801561027957600080fd5b5061015b610288366004611708565b6108c1565b34801561029957600080fd5b506102ad6102a8366004611af9565b61099b565b604051610132929190611bd6565b61015b6102c9366004611c11565b6109ef565b3480156102da57600080fd5b5061015b6102e9366004611c31565b610aca565b3480156102fa57600080fd5b5061018d611015565b600080808061031485870187611c31565b6040517fdf6516bd0000000000000000000000000000000000000000000000000000000081529295509093509150309063df6516bd9061035c90869086908690600401611c94565b600060405180830381600087803b15801561037657600080fd5b505af115801561038a573d6000803e3d6000fd5b507f08a1eb20000000000000000000000000000000000000000000000000000000009a9950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610475576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064015b60405180910390fd5b7fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55565b60006104c37f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a015490565b1561052a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a20616c726561647920696e697469616c697a65640000604482015260640161046c565b600080838060200190518101906105419190611d56565b91509150327f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955817fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55807fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7556105d760017f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a0155565b507f4ddf47d4000000000000000000000000000000000000000000000000000000009392505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955565b81156106eb576106eb858585610aca565b600085858560405160200161070293929190611c94565b604051602081830303815290604052905060007fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a54905060008173ffffffffffffffffffffffffffffffffffffffff16630fffbaf36040518163ffffffff1660e01b8152600401602060405180830381865afa158015610786573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107aa9190611d90565b845190915060005b818110156108b5578273ffffffffffffffffffffffffffffffffffffffff1663e55856668783815181106107e8576107e8611dad565b60200260200101516000015188848151811061080657610806611dad565b602002602001015160600151308a868151811061082557610825611dad565b6020026020010151602001518b878151811061084357610843611dad565b6020026020010151604001518b6040518763ffffffff1660e01b8152600401610870959493929190611ddc565b6000604051808303818588803b15801561088957600080fd5b505af115801561089d573d6000803e3d6000fd5b505050505080806108ad90611e5d565b9150506107b2565b50505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610977576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b7fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e755565b6000606063b7e0366160e01b848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250959c929b50919950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aa5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b808260003760008082600034875af13d6000803e808015610ac5573d6000f35b3d6000fd5b7fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a547fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e754845160208087015160408089015160608a015180519085012060808b01518051908601209251969796600096610bb796909594918b910195865260e09490941b7fffffffff0000000000000000000000000000000000000000000000000000000016602086015260248501929092526044840152606483015260601b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016608482015260980190565b604051602081830303815290604052805190602001209050610be88560000151866020015187604001518488611044565b610c4e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f484f4c4f47524150483a20696e76616c6964207369676e617475726500000000604482015260640161046c565b600060405180602001610c6090611621565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820381018352601f90910116604081815282516020808501919091207fff00000000000000000000000000000000000000000000000000000000000000828501527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b166021850152603584018790526055808501919091528251808503909101815260759093019091528151910120909150610d21816113a4565b15610d88576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f484f4c4f47524150483a20616c7265616479206465706c6f7965640000000000604482015260640161046c565b60608801518051849160009183906020830184f59150828551602087016000f560208c8101518d516040805163ffffffff9093169383019390935273ffffffffffffffffffffffffffffffffffffffff8b811693830193909352606082015284821660808201529195507f4ddf47d4000000000000000000000000000000000000000000000000000000009190861690634ddf47d49060a0016040516020818303038152906040528e60800151604051602001610e46929190611e95565b6040516020818303038152906040526040518263ffffffff1660e01b8152600401610e719190611eba565b6020604051808303816000875af1158015610e90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eb49190611ecd565b7fffffffff000000000000000000000000000000000000000000000000000000001614610f3d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f696e697469616c697a6174696f6e206661696c65640000000000000000000000604482015260640161046c565b6040517f725229f60000000000000000000000000000000000000000000000000000000081526004810187905273ffffffffffffffffffffffffffffffffffffffff858116602483015289169063725229f690604401600060405180830381600087803b158015610fad57600080fd5b505af1158015610fc1573d6000803e3d6000fd5b505060405188925073ffffffffffffffffffffffffffffffffffffffff871691507fa802207d4c618b40db3b25b7b90e6f483e16b2c1f8d3610b15b345a718c6b41b90600090a35050505050505050505050565b600061103f7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95490565b905090565b6000601b8460ff1610156110605761105d601b85611f0f565b93505b8360ff16601b1415801561107857508360ff16601c14155b156110855750600061139b565b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0851115611122576110d7857ffffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141611f34565b945060ff8416601b036110ed57601c93506110f2565b601b93505b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08511156111225750600061139b565b73ffffffffffffffffffffffffffffffffffffffff82161580159061139857506040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c810184905273ffffffffffffffffffffffffffffffffffffffff831690600190605c01604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600084529083018083525260ff881690820152606081018990526080810188905260a0016020604051602081039080840390855afa15801561120c573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff161480611305575073ffffffffffffffffffffffffffffffffffffffff821660016112578560206113de565b6040516020016112679190611f4b565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600084529083018083525260ff881690820152606081018990526080810188905260a0016020604051602081039080840390855afa1580156112e3573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff16145b80611398575060408051600081526020810180835285905260ff861691810191909152606081018790526080810186905273ffffffffffffffffffffffffffffffffffffffff83169060019060a0016020604051602081039080840390855afa158015611376573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff16145b90505b95945050505050565b6000813f80158015906113d757507fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708114155b9392505050565b606060006113ed836002611f90565b6113f8906002611fcd565b67ffffffffffffffff81111561141057611410611725565b6040519080825280601f01601f19166020018201604052801561143a576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061147157611471611dad565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106114d4576114d4611dad565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000611510846002611f90565b61151b906001611fcd565b90505b60018111156115b8577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061155c5761155c611dad565b1a60f81b82828151811061157257611572611dad565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c936115b181611fe5565b905061151e565b5083156113d7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161046c565b610f3a8061201b83390190565b803563ffffffff8116811461164257600080fd5b919050565b60008083601f84011261165957600080fd5b50813567ffffffffffffffff81111561167157600080fd5b60208301915083602082850101111561168957600080fd5b9250929050565b6000806000604084860312156116a557600080fd5b6116ae8461162e565b9250602084013567ffffffffffffffff8111156116ca57600080fd5b6116d686828701611647565b9497909650939450505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461170557600080fd5b50565b60006020828403121561171a57600080fd5b81356113d7816116e3565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516080810167ffffffffffffffff8111828210171561177757611777611725565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156117c4576117c4611725565b604052919050565b600082601f8301126117dd57600080fd5b813567ffffffffffffffff8111156117f7576117f7611725565b61182860207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160161177d565b81815284602083860101111561183d57600080fd5b816020850160208301376000918101602001919091529392505050565b60006020828403121561186c57600080fd5b813567ffffffffffffffff81111561188357600080fd5b61188f848285016117cc565b949350505050565b600060a082840312156118a957600080fd5b60405160a0810167ffffffffffffffff82821081831117156118cd576118cd611725565b81604052829350843583526118e46020860161162e565b602084015260408501356040840152606085013591508082111561190757600080fd5b611913868387016117cc565b6060840152608085013591508082111561192c57600080fd5b50611939858286016117cc565b6080830152505092915050565b60006060828403121561195857600080fd5b6040516060810181811067ffffffffffffffff8211171561197b5761197b611725565b80604052508091508235815260208301356020820152604083013560ff811681146119a557600080fd5b6040919091015292915050565b600080600080600060e086880312156119ca57600080fd5b853567ffffffffffffffff808211156119e257600080fd5b6119ee89838a01611897565b965060209150611a0089838a01611946565b9550608080890135611a11816116e3565b955060a08901358015158114611a2657600080fd5b945060c089013582811115611a3a57600080fd5b8901601f81018b13611a4b57600080fd5b803583811115611a5d57611a5d611725565b611a6b858260051b0161177d565b818152858101945060079190911b82018501908c821115611a8b57600080fd5b918501915b81831015611ae65783838e031215611aa85760008081fd5b611ab0611754565b833581528684013587820152604080850135908201526060611ad381860161162e565b9082015285529385019391830191611a90565b8096505050505050509295509295909350565b60008060008060608587031215611b0f57600080fd5b611b188561162e565b93506020850135611b28816116e3565b9250604085013567ffffffffffffffff811115611b4457600080fd5b611b5087828801611647565b95989497509550505050565b60005b83811015611b77578181015183820152602001611b5f565b83811115611b86576000848401525b50505050565b60008151808452611ba4816020860160208601611b5c565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b7fffffffff000000000000000000000000000000000000000000000000000000008316815260406020820152600061188f6040830184611b8c565b600080600060408486031215611c2657600080fd5b83356116ae816116e3565b600080600060a08486031215611c4657600080fd5b833567ffffffffffffffff811115611c5d57600080fd5b611c6986828701611897565b935050611c798560208601611946565b91506080840135611c89816116e3565b809150509250925092565b60a08152835160a082015263ffffffff60208501511660c0820152604084015160e08201526000606085015160a0610100840152611cd6610140840182611b8c565b905060808601517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6084830301610120850152611d128282611b8c565b92505050835160208301526020840151604083015260ff604085015116606083015261188f608083018473ffffffffffffffffffffffffffffffffffffffff169052565b60008060408385031215611d6957600080fd5b8251611d74816116e3565b6020840151909250611d85816116e3565b809150509250929050565b600060208284031215611da257600080fd5b81516113d7816116e3565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b63ffffffff8616815273ffffffffffffffffffffffffffffffffffffffff8516602082015283604082015282606082015260a060808201526000611e2360a0830184611b8c565b979650505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611e8e57611e8e611e2e565b5060010190565b604081526000611ea86040830185611b8c565b828103602084015261139b8185611b8c565b6020815260006113d76020830184611b8c565b600060208284031215611edf57600080fd5b81517fffffffff00000000000000000000000000000000000000000000000000000000811681146113d757600080fd5b600060ff821660ff84168060ff03821115611f2c57611f2c611e2e565b019392505050565b600082821015611f4657611f46611e2e565b500390565b7f19457468657265756d205369676e6564204d6573736167653a0a363600000000815260008251611f8381601c850160208701611b5c565b91909101601c0192915050565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611fc857611fc8611e2e565b500290565b60008219821115611fe057611fe0611e2e565b500190565b600081611ff457611ff4611e2e565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019056fe608060405234801561001057600080fd5b50610f1a806100206000396000f3fe6080604052600436106100c05760003560e01c806380d1cb3511610074578063c51a29e01161004e578063c51a29e0146102c1578063c8a4c3d5146102f5578063f851a4401461030a576100c7565b806380d1cb351461022c578063913a0ef21461026a578063bf64a82d146102ae576100c7565b80636e9960c3116100a55780636e9960c3146101a45780636faf275b146101d8578063704b6c021461020c576100c7565b80634827ae0c146100f95780634ddf47d414610153576100c7565b366100c757005b60006100d161031f565b90503660008037600080366000845af43d6000803e8080156100f2573d6000f35b3d6000fd5b005b34801561010557600080fd5b507fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a545b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b34801561015f57600080fd5b5061017361016e366004610bb4565b61045d565b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200161014a565b3480156101b057600080fd5b507f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c954610129565b3480156101e457600080fd5b507f27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b07454610129565b34801561021857600080fd5b506100f7610227366004610c59565b610911565b34801561023857600080fd5b507f9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de3545b60405190815260200161014a565b34801561027657600080fd5b507fd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d5460405163ffffffff909116815260200161014a565b6100f76102bc366004610c7d565b6109eb565b3480156102cd57600080fd5b507f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c75461025c565b34801561030157600080fd5b5061012961031f565b34801561031657600080fd5b50610129610ac1565b60008060007fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a5491507f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c75490508173ffffffffffffffffffffffffffffffffffffffff16635ab1bd536040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103db9190610d02565b73ffffffffffffffffffffffffffffffffffffffff166374b7510c826040518263ffffffff1660e01b815260040161041591815260200190565b602060405180830381865afa158015610432573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104569190610d02565b9250505090565b60006104877f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a015490565b156104f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f484f4c4f475241504845523a20616c726561647920696e697469616c697a656460448201526064015b60405180910390fd5b6000808380602001905181019061050a9190610d9c565b91509150600080600080858060200190518101906105289190610e00565b9350935093509350337f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955437f9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de355817f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c755827fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55837fd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d55807f27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b074556000808473ffffffffffffffffffffffffffffffffffffffff16635ab1bd536040518163ffffffff1660e01b8152600401602060405180830381865afa158015610650573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106749190610d02565b73ffffffffffffffffffffffffffffffffffffffff166374b7510c856040518263ffffffff1660e01b81526004016106ae91815260200190565b602060405180830381865afa1580156106cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ef9190610d02565b73ffffffffffffffffffffffffffffffffffffffff16634ddf47d460e01b8860405160240161071e9190610e5e565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009094169390931790925290516107a79190610eaf565b600060405180830381855af49150503d80600081146107e2576040519150601f19603f3d011682016040523d82523d6000602084013e6107e7565b606091505b50915091506000818060200190518101906108029190610ecb565b905082801561085257507fffffffff0000000000000000000000000000000000000000000000000000000081167f4ddf47d400000000000000000000000000000000000000000000000000000000145b6108b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f484f4c4f47524150483a20696e697469616c697a6174696f6e206661696c656460448201526064016104ea565b6108e160017f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a0155565b507f4ddf47d4000000000000000000000000000000000000000000000000000000009a9950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016104ea565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aa1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016104ea565b808260003760008082600034875af13d6000803e8080156100f2573d6000f35b6000610aeb7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95490565b905090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715610b6657610b66610af0565b604052919050565b600067ffffffffffffffff821115610b8857610b88610af0565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600060208284031215610bc657600080fd5b813567ffffffffffffffff811115610bdd57600080fd5b8201601f81018413610bee57600080fd5b8035610c01610bfc82610b6e565b610b1f565b818152856020838501011115610c1657600080fd5b81602084016020830137600091810160200191909152949350505050565b73ffffffffffffffffffffffffffffffffffffffff81168114610c5657600080fd5b50565b600060208284031215610c6b57600080fd5b8135610c7681610c34565b9392505050565b600080600060408486031215610c9257600080fd5b8335610c9d81610c34565b9250602084013567ffffffffffffffff80821115610cba57600080fd5b818601915086601f830112610cce57600080fd5b813581811115610cdd57600080fd5b876020828501011115610cef57600080fd5b6020830194508093505050509250925092565b600060208284031215610d1457600080fd5b8151610c7681610c34565b60005b83811015610d3a578181015183820152602001610d22565b83811115610d49576000848401525b50505050565b600082601f830112610d6057600080fd5b8151610d6e610bfc82610b6e565b818152846020838601011115610d8357600080fd5b610d94826020830160208701610d1f565b949350505050565b60008060408385031215610daf57600080fd5b825167ffffffffffffffff80821115610dc757600080fd5b610dd386838701610d4f565b93506020850151915080821115610de957600080fd5b50610df685828601610d4f565b9150509250929050565b60008060008060808587031215610e1657600080fd5b845163ffffffff81168114610e2a57600080fd5b6020860151909450610e3b81610c34565b604086015160608701519194509250610e5381610c34565b939692955090935050565b6020815260008251806020840152610e7d816040850160208701610d1f565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60008251610ec1818460208701610d1f565b9190910192915050565b600060208284031215610edd57600080fd5b81517fffffffff0000000000000000000000000000000000000000000000000000000081168114610c7657600080fdfea164736f6c634300080d000aa164736f6c634300080d000a", "devdoc": { "author": "https://github.com/holographxyz", "details": "The contract provides methods that allow for the creation of Holograph Protocol compliant smart contracts, that are capable of minting holographable assets", diff --git a/deployments/develop/arbitrumTestnetGoerli/solcInputs/c71d96e115e745dd34ef9239c385494d.json b/deployments/develop/arbitrumTestnetGoerli/solcInputs/c71d96e115e745dd34ef9239c385494d.json new file mode 100644 index 000000000..2f9c65ed5 --- /dev/null +++ b/deployments/develop/arbitrumTestnetGoerli/solcInputs/c71d96e115e745dd34ef9239c385494d.json @@ -0,0 +1,465 @@ +{ + "language": "Solidity", + "sources": { + "contracts/abstract/Admin.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nabstract contract Admin {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.admin')) - 1)\n */\n bytes32 constant _adminSlot = 0x3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c9;\n\n modifier onlyAdmin() {\n require(msg.sender == getAdmin(), \"HOLOGRAPH: admin only function\");\n _;\n }\n\n constructor() {}\n\n function admin() public view returns (address) {\n return getAdmin();\n }\n\n function getAdmin() public view returns (address adminAddress) {\n assembly {\n adminAddress := sload(_adminSlot)\n }\n }\n\n function setAdmin(address adminAddress) public onlyAdmin {\n assembly {\n sstore(_adminSlot, adminAddress)\n }\n }\n\n function adminCall(address target, bytes calldata data) external payable onlyAdmin {\n assembly {\n calldatacopy(0, data.offset, data.length)\n let result := call(gas(), target, callvalue(), 0, data.length, 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/abstract/EIP712.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/cryptography/draft-EIP712.sol)\n\npragma solidity 0.8.13;\n\nimport \"../library/ECDSA.sol\";\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\n *\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\n *\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\n * ({_hashTypedDataV4}).\n *\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\n * the chain id to protect against replay attacks on an eventual fork of the chain.\n *\n * NOTE: This contract implements the version of the encoding known as \"v4\", as implemented by the JSON RPC method\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\n *\n * _Available since v3.4._\n */\nabstract contract EIP712 {\n /* solhint-disable var-name-mixedcase */\n // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to\n // invalidate the cached domain separator if the chain id changes.\n // WE CANNOT USE immutable VALUES SINCE IT BREAKS OUT CREATE2 COMPUTATIONS ON DEPLOYER SCRIPTS\n // AFTER MAKING NECESARRY CHANGES, WE CAN ADD IT BACK IN\n bytes32 private _CACHED_DOMAIN_SEPARATOR;\n uint256 private _CACHED_CHAIN_ID;\n address private _CACHED_THIS;\n\n bytes32 private _HASHED_NAME;\n bytes32 private _HASHED_VERSION;\n bytes32 private _TYPE_HASH;\n\n /* solhint-enable var-name-mixedcase */\n\n /**\n * @dev Initializes the domain separator and parameter caches.\n *\n * The meaning of `name` and `version` is specified in\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\n *\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\n * - `version`: the current major version of the signing domain.\n *\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\n * contract upgrade].\n */\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n function _eip712_init(string memory name, string memory version) internal {\n bytes32 hashedName = keccak256(bytes(name));\n bytes32 hashedVersion = keccak256(bytes(version));\n bytes32 typeHash = keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\");\n _HASHED_NAME = hashedName;\n _HASHED_VERSION = hashedVersion;\n _CACHED_CHAIN_ID = block.chainid;\n _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion);\n _CACHED_THIS = address(this);\n _TYPE_HASH = typeHash;\n }\n\n /**\n * @dev Returns the domain separator for the current chain.\n */\n function _domainSeparatorV4() internal view returns (bytes32) {\n if (address(this) == _CACHED_THIS && block.chainid == _CACHED_CHAIN_ID) {\n return _CACHED_DOMAIN_SEPARATOR;\n } else {\n return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION);\n }\n }\n\n function _buildDomainSeparator(\n bytes32 typeHash,\n bytes32 nameHash,\n bytes32 versionHash\n ) private view returns (bytes32) {\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\n }\n\n /**\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\n * function returns the hash of the fully encoded EIP712 message for this domain.\n *\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\n *\n * ```solidity\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\n * keccak256(\"Mail(address to,string contents)\"),\n * mailTo,\n * keccak256(bytes(mailContents))\n * )));\n * address signer = ECDSA.recover(digest, signature);\n * ```\n */\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\n return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);\n }\n}\n" + }, + "contracts/abstract/ERC1155H.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Initializable.sol\";\n\nabstract contract ERC1155H is Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holographer')) - 1)\n */\n bytes32 constant _holographerSlot = 0xe9fcff60011c1a99f7b7244d1f2d9da93d79ea8ef3654ce590d775575255b2bd;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.owner')) - 1)\n */\n bytes32 constant _ownerSlot = 0xb56711ba6bd3ded7639fc335ee7524fe668a79d7558c85992e3f8494cf772777;\n\n modifier onlyHolographer() {\n require(msg.sender == holographer(), \"ERC1155: holographer only\");\n _;\n }\n\n modifier onlyOwner() {\n require(msgSender() == _getOwner(), \"ERC1155: owner only function\");\n _;\n }\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external virtual override returns (bytes4) {\n return _init(initPayload);\n }\n\n function _init(bytes memory /* initPayload*/) internal returns (bytes4) {\n require(!_isInitialized(), \"ERC1155: already initialized\");\n address _holographer = msg.sender;\n address currentOwner;\n assembly {\n sstore(_holographerSlot, _holographer)\n currentOwner := sload(_ownerSlot)\n }\n require(currentOwner != address(0), \"HOLOGRAPH: owner not set\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @dev The Holographer passes original msg.sender via calldata. This function extracts it.\n */\n function msgSender() internal view returns (address sender) {\n assembly {\n switch eq(caller(), sload(_holographerSlot))\n case 0 {\n sender := caller()\n }\n default {\n sender := calldataload(sub(calldatasize(), 0x20))\n }\n }\n }\n\n /**\n * @dev Address of Holograph ERC1155 standards enforcer smart contract.\n */\n function holographer() internal view returns (address _holographer) {\n assembly {\n _holographer := sload(_holographerSlot)\n }\n }\n\n function supportsInterface(bytes4) external pure virtual returns (bool) {\n return false;\n }\n\n /**\n * @dev Address of initial creator/owner of the collection.\n */\n function owner() external view virtual returns (address) {\n return _getOwner();\n }\n\n function isOwner() external view returns (bool) {\n return (msgSender() == _getOwner());\n }\n\n function isOwner(address wallet) external view returns (bool) {\n return wallet == _getOwner();\n }\n\n function _getOwner() internal view returns (address ownerAddress) {\n assembly {\n ownerAddress := sload(_ownerSlot)\n }\n }\n\n function _setOwner(address ownerAddress) internal {\n assembly {\n sstore(_ownerSlot, ownerAddress)\n }\n }\n\n function withdraw() external virtual onlyOwner {\n payable(_getOwner()).transfer(address(this).balance);\n }\n\n event FundsReceived(address indexed source, uint256 amount);\n\n /**\n * @dev This function emits an event to indicate native gas token receipt. Do not rely on this to work.\n * Please use custom payable functions for accepting native value.\n */\n receive() external payable virtual {\n emit FundsReceived(msgSender(), msg.value);\n }\n\n /**\n * @dev Return true for any un-implemented event hooks\n */\n fallback() external payable virtual {\n assembly {\n switch eq(sload(_holographerSlot), caller())\n case 1 {\n mstore(0x80, 0x0000000000000000000000000000000000000000000000000000000000000001)\n return(0x80, 0x20)\n }\n default {\n revert(0x00, 0x00)\n }\n }\n }\n}\n" + }, + "contracts/abstract/ERC20H.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Initializable.sol\";\n\nabstract contract ERC20H is Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holographer')) - 1)\n */\n bytes32 constant _holographerSlot = 0xe9fcff60011c1a99f7b7244d1f2d9da93d79ea8ef3654ce590d775575255b2bd;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.owner')) - 1)\n */\n bytes32 constant _ownerSlot = 0xb56711ba6bd3ded7639fc335ee7524fe668a79d7558c85992e3f8494cf772777;\n\n modifier onlyHolographer() {\n require(msg.sender == holographer(), \"ERC20: holographer only\");\n _;\n }\n\n modifier onlyOwner() {\n require(msgSender() == _getOwner(), \"ERC20: owner only function\");\n _;\n }\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external virtual override returns (bytes4) {\n return _init(initPayload);\n }\n\n function _init(bytes memory /* initPayload*/) internal returns (bytes4) {\n require(!_isInitialized(), \"ERC20: already initialized\");\n address _holographer = msg.sender;\n address currentOwner;\n assembly {\n sstore(_holographerSlot, _holographer)\n currentOwner := sload(_ownerSlot)\n }\n require(currentOwner != address(0), \"HOLOGRAPH: owner not set\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @dev The Holographer passes original msg.sender via calldata. This function extracts it.\n */\n function msgSender() internal view returns (address sender) {\n assembly {\n switch eq(caller(), sload(_holographerSlot))\n case 0 {\n sender := caller()\n }\n default {\n sender := calldataload(sub(calldatasize(), 0x20))\n }\n }\n }\n\n /**\n * @dev Address of Holograph ERC20 standards enforcer smart contract.\n */\n function holographer() internal view returns (address _holographer) {\n assembly {\n _holographer := sload(_holographerSlot)\n }\n }\n\n function supportsInterface(bytes4) external pure virtual returns (bool) {\n return false;\n }\n\n /**\n * @dev Address of initial creator/owner of the token contract.\n */\n function owner() external view virtual returns (address) {\n return _getOwner();\n }\n\n function isOwner() external view returns (bool) {\n return (msgSender() == _getOwner());\n }\n\n function isOwner(address wallet) external view returns (bool) {\n return wallet == _getOwner();\n }\n\n function _getOwner() internal view returns (address ownerAddress) {\n assembly {\n ownerAddress := sload(_ownerSlot)\n }\n }\n\n function _setOwner(address ownerAddress) internal {\n assembly {\n sstore(_ownerSlot, ownerAddress)\n }\n }\n\n function withdraw() external virtual onlyOwner {\n payable(_getOwner()).transfer(address(this).balance);\n }\n\n event FundsReceived(address indexed source, uint256 amount);\n\n /**\n * @dev This function emits an event to indicate native gas token receipt. Do not rely on this to work.\n * Please use custom payable functions for accepting native value.\n */\n receive() external payable virtual {\n emit FundsReceived(msgSender(), msg.value);\n }\n\n /**\n * @dev Return true for any un-implemented event hooks\n */\n fallback() external payable virtual {\n assembly {\n switch eq(sload(_holographerSlot), caller())\n case 1 {\n mstore(0x80, 0x0000000000000000000000000000000000000000000000000000000000000001)\n return(0x80, 0x20)\n }\n default {\n revert(0x00, 0x00)\n }\n }\n }\n}\n" + }, + "contracts/abstract/ERC721H.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Initializable.sol\";\n\nabstract contract ERC721H is Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holographer')) - 1)\n */\n bytes32 constant _holographerSlot = 0xe9fcff60011c1a99f7b7244d1f2d9da93d79ea8ef3654ce590d775575255b2bd;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.owner')) - 1)\n */\n bytes32 constant _ownerSlot = 0xb56711ba6bd3ded7639fc335ee7524fe668a79d7558c85992e3f8494cf772777;\n\n modifier onlyHolographer() {\n require(msg.sender == holographer(), \"ERC721: holographer only\");\n _;\n }\n\n modifier onlyOwner() {\n require(msgSender() == _getOwner(), \"ERC721: owner only function\");\n _;\n }\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external virtual override returns (bytes4) {\n return _init(initPayload);\n }\n\n function _init(bytes memory /* initPayload*/) internal returns (bytes4) {\n require(!_isInitialized(), \"ERC721: already initialized\");\n address _holographer = msg.sender;\n address currentOwner;\n assembly {\n sstore(_holographerSlot, _holographer)\n currentOwner := sload(_ownerSlot)\n }\n require(currentOwner != address(0), \"HOLOGRAPH: owner not set\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @dev The Holographer passes original msg.sender via calldata. This function extracts it.\n */\n function msgSender() internal view returns (address sender) {\n assembly {\n switch eq(caller(), sload(_holographerSlot))\n case 0 {\n sender := caller()\n }\n default {\n sender := calldataload(sub(calldatasize(), 0x20))\n }\n }\n }\n\n /**\n * @dev Address of Holograph ERC721 standards enforcer smart contract.\n */\n function holographer() internal view returns (address _holographer) {\n assembly {\n _holographer := sload(_holographerSlot)\n }\n }\n\n function supportsInterface(bytes4) external pure virtual returns (bool) {\n return false;\n }\n\n /**\n * @dev Address of initial creator/owner of the collection.\n */\n function owner() external view virtual returns (address) {\n return _getOwner();\n }\n\n function isOwner() external view returns (bool) {\n return (msgSender() == _getOwner());\n }\n\n function isOwner(address wallet) external view returns (bool) {\n return wallet == _getOwner();\n }\n\n function _getOwner() internal view returns (address ownerAddress) {\n assembly {\n ownerAddress := sload(_ownerSlot)\n }\n }\n\n function _setOwner(address ownerAddress) internal {\n assembly {\n sstore(_ownerSlot, ownerAddress)\n }\n }\n\n function withdraw() external virtual onlyOwner {\n payable(_getOwner()).transfer(address(this).balance);\n }\n\n event FundsReceived(address indexed source, uint256 amount);\n\n /**\n * @dev This function emits an event to indicate native gas token receipt. Do not rely on this to work.\n * Please use custom payable functions for accepting native value.\n */\n receive() external payable virtual {\n emit FundsReceived(msgSender(), msg.value);\n }\n\n /**\n * @dev Return true for any un-implemented event hooks\n */\n fallback() external payable virtual {\n assembly {\n switch eq(sload(_holographerSlot), caller())\n case 1 {\n mstore(0x80, 0x0000000000000000000000000000000000000000000000000000000000000001)\n return(0x80, 0x20)\n }\n default {\n revert(0x00, 0x00)\n }\n }\n }\n}\n" + }, + "contracts/abstract/GenericH.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Initializable.sol\";\n\nabstract contract GenericH is Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holographer')) - 1)\n */\n bytes32 constant _holographerSlot = 0xe9fcff60011c1a99f7b7244d1f2d9da93d79ea8ef3654ce590d775575255b2bd;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.owner')) - 1)\n */\n bytes32 constant _ownerSlot = 0xb56711ba6bd3ded7639fc335ee7524fe668a79d7558c85992e3f8494cf772777;\n\n modifier onlyHolographer() {\n require(msg.sender == holographer(), \"GENERIC: holographer only\");\n _;\n }\n\n modifier onlyOwner() {\n require(msgSender() == _getOwner(), \"GENERIC: owner only function\");\n _;\n }\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external virtual override returns (bytes4) {\n return _init(initPayload);\n }\n\n function _init(bytes memory /* initPayload*/) internal returns (bytes4) {\n require(!_isInitialized(), \"GENERIC: already initialized\");\n address _holographer = msg.sender;\n address currentOwner;\n assembly {\n sstore(_holographerSlot, _holographer)\n currentOwner := sload(_ownerSlot)\n }\n require(currentOwner != address(0), \"HOLOGRAPH: owner not set\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @dev The Holographer passes original msg.sender via calldata. This function extracts it.\n */\n function msgSender() internal view returns (address sender) {\n assembly {\n switch eq(caller(), sload(_holographerSlot))\n case 0 {\n sender := caller()\n }\n default {\n sender := calldataload(sub(calldatasize(), 0x20))\n }\n }\n }\n\n /**\n * @dev Address of Holograph GENERIC standards enforcer smart contract.\n */\n function holographer() internal view returns (address _holographer) {\n assembly {\n _holographer := sload(_holographerSlot)\n }\n }\n\n function supportsInterface(bytes4) external pure virtual returns (bool) {\n return false;\n }\n\n /**\n * @dev Address of initial creator/owner of the contract.\n */\n function owner() external view virtual returns (address) {\n return _getOwner();\n }\n\n function isOwner() external view returns (bool) {\n return (msgSender() == _getOwner());\n }\n\n function isOwner(address wallet) external view returns (bool) {\n return wallet == _getOwner();\n }\n\n function _getOwner() internal view returns (address ownerAddress) {\n assembly {\n ownerAddress := sload(_ownerSlot)\n }\n }\n\n function _setOwner(address ownerAddress) internal {\n assembly {\n sstore(_ownerSlot, ownerAddress)\n }\n }\n\n function withdraw() external virtual onlyOwner {\n payable(_getOwner()).transfer(address(this).balance);\n }\n\n event FundsReceived(address indexed source, uint256 amount);\n\n /**\n * @dev This function emits an event to indicate native gas token receipt. Do not rely on this to work.\n * Please use custom payable functions for accepting native value.\n */\n receive() external payable virtual {\n emit FundsReceived(msgSender(), msg.value);\n }\n\n /**\n * @dev Return true for any un-implemented event hooks\n */\n fallback() external payable virtual {\n assembly {\n switch eq(sload(_holographerSlot), caller())\n case 1 {\n mstore(0x80, 0x0000000000000000000000000000000000000000000000000000000000000001)\n return(0x80, 0x20)\n }\n default {\n revert(0x00, 0x00)\n }\n }\n }\n}\n" + }, + "contracts/abstract/HLGERC20H.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Initializable.sol\";\n\nabstract contract HLGERC20H is Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holographer')) - 1)\n */\n bytes32 constant _holographerSlot = 0xe9fcff60011c1a99f7b7244d1f2d9da93d79ea8ef3654ce590d775575255b2bd;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.owner')) - 1)\n */\n bytes32 constant _ownerSlot = 0xb56711ba6bd3ded7639fc335ee7524fe668a79d7558c85992e3f8494cf772777;\n\n modifier onlyHolographer() {\n require(msg.sender == holographer(), \"ERC20: holographer only\");\n _;\n }\n\n modifier onlyOwner() {\n if (msg.sender == holographer()) {\n require(msgSender() == _getOwner(), \"ERC20: owner only function\");\n } else {\n require(msg.sender == _getOwner(), \"ERC20: owner only function\");\n }\n _;\n }\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external virtual override returns (bytes4) {\n return _init(initPayload);\n }\n\n function _init(bytes memory /* initPayload*/) internal returns (bytes4) {\n require(!_isInitialized(), \"ERC20: already initialized\");\n address _holographer = msg.sender;\n address currentOwner;\n assembly {\n sstore(_holographerSlot, _holographer)\n currentOwner := sload(_ownerSlot)\n }\n require(currentOwner != address(0), \"HOLOGRAPH: owner not set\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @dev The Holographer passes original msg.sender via calldata. This function extracts it.\n */\n function msgSender() internal pure returns (address sender) {\n assembly {\n sender := calldataload(sub(calldatasize(), 0x20))\n }\n }\n\n /**\n * @dev Address of Holograph ERC20 standards enforcer smart contract.\n */\n function holographer() internal view returns (address _holographer) {\n assembly {\n _holographer := sload(_holographerSlot)\n }\n }\n\n function supportsInterface(bytes4) external pure returns (bool) {\n return false;\n }\n\n /**\n * @dev Address of initial creator/owner of the token contract.\n */\n function owner() external view returns (address) {\n return _getOwner();\n }\n\n function isOwner() external view returns (bool) {\n if (msg.sender == holographer()) {\n return msgSender() == _getOwner();\n } else {\n return msg.sender == _getOwner();\n }\n }\n\n function isOwner(address wallet) external view returns (bool) {\n return wallet == _getOwner();\n }\n\n function _getOwner() internal view returns (address ownerAddress) {\n assembly {\n ownerAddress := sload(_ownerSlot)\n }\n }\n\n function _setOwner(address ownerAddress) internal {\n assembly {\n sstore(_ownerSlot, ownerAddress)\n }\n }\n\n function withdraw() external virtual onlyOwner {\n payable(_getOwner()).transfer(address(this).balance);\n }\n\n /**\n * @dev This function is unreachable unless custom contract address is called directly.\n * Please use custom payable functions for accepting native value.\n */\n receive() external payable {\n revert(\"ERC20: unreachable code\");\n }\n\n /**\n * @dev Return true for any un-implemented event hooks\n */\n fallback() external payable {\n assembly {\n switch eq(sload(_holographerSlot), caller())\n case 1 {\n mstore(0x80, 0x0000000000000000000000000000000000000000000000000000000000000001)\n return(0x80, 0x20)\n }\n default {\n revert(0x00, 0x00)\n }\n }\n }\n}\n" + }, + "contracts/abstract/Initializable.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../interface/InitializableInterface.sol\";\n\n/**\n * @title Initializable\n * @author https://github.com/holographxyz\n * @notice Use init instead of constructor\n * @dev This allows for use of init function to make one time initializations without the need for a constructor\n */\nabstract contract Initializable is InitializableInterface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.initialized')) - 1)\n */\n bytes32 constant _initializedSlot = 0x4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a01;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external virtual returns (bytes4);\n\n function _isInitialized() internal view returns (bool initialized) {\n assembly {\n initialized := sload(_initializedSlot)\n }\n }\n\n function _setInitialized() internal {\n assembly {\n sstore(_initializedSlot, 0x0000000000000000000000000000000000000000000000000000000000000001)\n }\n }\n}\n" + }, + "contracts/abstract/NonReentrant.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nabstract contract NonReentrant {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.reentrant')) - 1)\n */\n bytes32 constant _reentrantSlot = 0x04b524dd539523930d3901481aa9455d7752b49add99e1647adb8b09a3137279;\n\n modifier nonReentrant() {\n require(getStatus() != 2, \"HOLOGRAPH: reentrant call\");\n setStatus(2);\n _;\n setStatus(1);\n }\n\n constructor() {}\n\n function getStatus() internal view returns (uint256 status) {\n assembly {\n status := sload(_reentrantSlot)\n }\n }\n\n function setStatus(uint256 status) internal {\n assembly {\n sstore(_reentrantSlot, status)\n }\n }\n}\n" + }, + "contracts/abstract/Owner.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nabstract contract Owner {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.owner')) - 1)\n */\n bytes32 constant _ownerSlot = 0xb56711ba6bd3ded7639fc335ee7524fe668a79d7558c85992e3f8494cf772777;\n\n /**\n * @dev Event emitted when contract owner is changed.\n */\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n modifier onlyOwner() virtual {\n require(msg.sender == getOwner(), \"HOLOGRAPH: owner only function\");\n _;\n }\n\n function owner() external view virtual returns (address) {\n return getOwner();\n }\n\n constructor() {}\n\n function getOwner() public view returns (address ownerAddress) {\n assembly {\n ownerAddress := sload(_ownerSlot)\n }\n }\n\n function setOwner(address ownerAddress) public virtual onlyOwner {\n address previousOwner = getOwner();\n assembly {\n sstore(_ownerSlot, ownerAddress)\n }\n emit OwnershipTransferred(previousOwner, ownerAddress);\n }\n\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0), \"HOLOGRAPH: zero address\");\n assembly {\n sstore(_ownerSlot, newOwner)\n }\n }\n\n function ownerCall(address target, bytes calldata data) external payable onlyOwner {\n assembly {\n calldatacopy(0, data.offset, data.length)\n let result := call(gas(), target, callvalue(), 0, data.length, 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/abstract/StrictERC1155H.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../interface/HolographedERC1155.sol\";\n\nimport \"./ERC1155H.sol\";\n\nabstract contract StrictERC1155H is ERC1155H, HolographedERC1155 {\n /**\n * @dev Dummy variable to prevent empty functions from making \"switch to pure\" warnings.\n */\n bool private _success;\n\n function bridgeIn(\n uint32 /* _chainId*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool) {\n _success = true;\n return true;\n }\n\n function bridgeOut(\n uint32 /* _chainId*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bytes memory _data) {\n _success = true;\n _data = abi.encode(holographer());\n }\n\n function afterApprove(\n address /* _owner*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeApprove(\n address /* _owner*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterApprovalAll(\n address /* _to*/,\n bool /* _approved*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeApprovalAll(\n address /* _to*/,\n bool /* _approved*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterBurn(\n address /* _owner*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeBurn(\n address /* _owner*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterMint(\n address /* _owner*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeMint(\n address /* _owner*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterSafeTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeSafeTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterOnERC1155Received(\n address /* _operator*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeOnERC1155Received(\n address /* _operator*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n}\n" + }, + "contracts/abstract/StrictERC20H.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../interface/HolographedERC20.sol\";\n\nimport \"./ERC20H.sol\";\n\nabstract contract StrictERC20H is ERC20H, HolographedERC20 {\n /**\n * @dev Dummy variable to prevent empty functions from making \"switch to pure\" warnings.\n */\n bool private _success;\n\n function bridgeIn(\n uint32 /* _chainId*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool) {\n _success = true;\n return true;\n }\n\n function bridgeOut(\n uint32 /* _chainId*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bytes memory _data) {\n /**\n * @dev This is just here to suppress unused parameter warning\n */\n _data = abi.encodePacked(holographer());\n _success = true;\n }\n\n function afterApprove(\n address /* _owner*/,\n address /* _to*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeApprove(\n address /* _owner*/,\n address /* _to*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterOnERC20Received(\n address /* _token*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeOnERC20Received(\n address /* _token*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterBurn(\n address /* _owner*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeBurn(\n address /* _owner*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterMint(\n address /* _owner*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeMint(\n address /* _owner*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterSafeTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeSafeTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function onAllowance(\n address /* _owner*/,\n address /* _to*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = false;\n return _success;\n }\n}\n" + }, + "contracts/abstract/StrictERC721H.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../interface/HolographedERC721.sol\";\n\nimport \"./ERC721H.sol\";\n\nabstract contract StrictERC721H is ERC721H, HolographedERC721 {\n /**\n * @dev Dummy variable to prevent empty functions from making \"switch to pure\" warnings.\n */\n bool private _success;\n\n function bridgeIn(\n uint32 /* _chainId*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool) {\n _success = true;\n return true;\n }\n\n function bridgeOut(\n uint32 /* _chainId*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/\n ) external virtual onlyHolographer returns (bytes memory _data) {\n _success = true;\n _data = abi.encode(holographer());\n }\n\n function afterApprove(\n address /* _owner*/,\n address /* _to*/,\n uint256 /* _tokenId*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeApprove(\n address /* _owner*/,\n address /* _to*/,\n uint256 /* _tokenId*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterApprovalAll(\n address /* _sender*/,\n address /* _to*/,\n bool /* _approved*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeApprovalAll(\n address /* _sender*/,\n address /* _to*/,\n bool /* _approved*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterBurn(\n address /* _owner*/,\n uint256 /* _tokenId*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeBurn(\n address /* _owner*/,\n uint256 /* _tokenId*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterMint(\n address /* _owner*/,\n uint256 /* _tokenId*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeMint(\n address /* _owner*/,\n uint256 /* _tokenId*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterSafeTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeSafeTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterOnERC721Received(\n address /* _operator*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeOnERC721Received(\n address /* _operator*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function onIsApprovedForAll(\n address /* _wallet*/,\n address /* _operator*/\n ) external view virtual onlyHolographer returns (bool approved) {\n approved = _success;\n return false;\n }\n\n function contractURI() external view virtual onlyHolographer returns (string memory contractJSON) {\n contractJSON = _success ? \"\" : \"\";\n }\n}\n" + }, + "contracts/drops/interface/IDropsPriceOracle.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\ninterface IDropsPriceOracle {\n function convertUsdToWei(uint256 usdAmount) external view returns (uint256 weiAmount);\n}\n" + }, + "contracts/drops/interface/IHolographDropERC721.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {IMetadataRenderer} from \"./IMetadataRenderer.sol\";\n\nimport {AddressMintDetails} from \"../struct/AddressMintDetails.sol\";\nimport {SaleDetails} from \"../struct/SaleDetails.sol\";\n\n/// @notice Interface for HOLOGRAPH Drops contract\ninterface IHolographDropERC721 {\n // Access errors\n\n /// @notice Only admin can access this function\n error Access_OnlyAdmin();\n /// @notice Missing the given role or admin access\n error Access_MissingRoleOrAdmin(bytes32 role);\n /// @notice Withdraw is not allowed by this user\n error Access_WithdrawNotAllowed();\n /// @notice Cannot withdraw funds due to ETH send failure.\n error Withdraw_FundsSendFailure();\n /// @notice Mint fee send failure\n error MintFee_FundsSendFailure();\n\n /// @notice Call to external metadata renderer failed.\n error ExternalMetadataRenderer_CallFailed();\n\n /// @notice Thrown when the operator for the contract is not allowed\n /// @dev Used when strict enforcement of marketplaces for creator royalties is desired.\n error OperatorNotAllowed(address operator);\n\n /// @notice Thrown when there is no active market filter DAO address supported for the current chain\n /// @dev Used for enabling and disabling filter for the given chain.\n error MarketFilterDAOAddressNotSupportedForChain();\n\n /// @notice Used when the operator filter registry external call fails\n /// @dev Used for bubbling error up to clients.\n error RemoteOperatorFilterRegistryCallFailed();\n\n // Sale/Purchase errors\n /// @notice Sale is inactive\n error Sale_Inactive();\n /// @notice Presale is inactive\n error Presale_Inactive();\n /// @notice Presale merkle root is invalid\n error Presale_MerkleNotApproved();\n /// @notice Wrong price for purchase\n error Purchase_WrongPrice(uint256 correctPrice);\n /// @notice NFT sold out\n error Mint_SoldOut();\n /// @notice Too many purchase for address\n error Purchase_TooManyForAddress();\n /// @notice Too many presale for address\n error Presale_TooManyForAddress();\n\n // Admin errors\n /// @notice Royalty percentage too high\n error Setup_RoyaltyPercentageTooHigh(uint16 maxRoyaltyBPS);\n /// @notice Invalid admin upgrade address\n error Admin_InvalidUpgradeAddress(address proposedAddress);\n /// @notice Unable to finalize an edition not marked as open (size set to uint64_max_value)\n error Admin_UnableToFinalizeNotOpenEdition();\n\n /// @notice Event emitted for mint fee payout\n /// @param mintFeeAmount amount of the mint fee\n /// @param mintFeeRecipient recipient of the mint fee\n /// @param success if the payout succeeded\n event MintFeePayout(uint256 mintFeeAmount, address mintFeeRecipient, bool success);\n\n /// @notice Event emitted for each sale\n /// @param to address sale was made to\n /// @param quantity quantity of the minted nfts\n /// @param pricePerToken price for each token\n /// @param firstPurchasedTokenId first purchased token ID (to get range add to quantity for max)\n event Sale(\n address indexed to,\n uint256 indexed quantity,\n uint256 indexed pricePerToken,\n uint256 firstPurchasedTokenId\n );\n\n /// @notice Sales configuration has been changed\n /// @dev To access new sales configuration, use getter function.\n /// @param changedBy Changed by user\n event SalesConfigChanged(address indexed changedBy);\n\n /// @notice Event emitted when the funds recipient is changed\n /// @param newAddress new address for the funds recipient\n /// @param changedBy address that the recipient is changed by\n event FundsRecipientChanged(address indexed newAddress, address indexed changedBy);\n\n /// @notice Event emitted when the funds are withdrawn from the minting contract\n /// @param withdrawnBy address that issued the withdraw\n /// @param withdrawnTo address that the funds were withdrawn to\n /// @param amount amount that was withdrawn\n /// @param feeRecipient user getting withdraw fee (if any)\n /// @param feeAmount amount of the fee getting sent (if any)\n event FundsWithdrawn(\n address indexed withdrawnBy,\n address indexed withdrawnTo,\n uint256 amount,\n address feeRecipient,\n uint256 feeAmount\n );\n\n /// @notice Event emitted when an open mint is finalized and further minting is closed forever on the contract.\n /// @param sender address sending close mint\n /// @param numberOfMints number of mints the contract is finalized at\n event OpenMintFinalized(address indexed sender, uint256 numberOfMints);\n\n /// @notice Event emitted when metadata renderer is updated.\n /// @param sender address of the updater\n /// @param renderer new metadata renderer address\n event UpdatedMetadataRenderer(address sender, IMetadataRenderer renderer);\n\n /// @notice Admin function to update the sales configuration settings\n /// @param publicSalePrice public sale price in ether\n /// @param maxSalePurchasePerAddress Max # of purchases (public) per address allowed\n /// @param publicSaleStart unix timestamp when the public sale starts\n /// @param publicSaleEnd unix timestamp when the public sale ends (set to 0 to disable)\n /// @param presaleStart unix timestamp when the presale starts\n /// @param presaleEnd unix timestamp when the presale ends\n /// @param presaleMerkleRoot merkle root for the presale information\n function setSaleConfiguration(\n uint104 publicSalePrice,\n uint32 maxSalePurchasePerAddress,\n uint64 publicSaleStart,\n uint64 publicSaleEnd,\n uint64 presaleStart,\n uint64 presaleEnd,\n bytes32 presaleMerkleRoot\n ) external;\n\n /// @notice External purchase function (payable in eth)\n /// @param quantity to purchase\n /// @return first minted token ID\n function purchase(uint256 quantity) external payable returns (uint256);\n\n /// @notice External purchase presale function (takes a merkle proof and matches to root) (payable in eth)\n /// @param quantity to purchase\n /// @param maxQuantity can purchase (verified by merkle root)\n /// @param pricePerToken price per token allowed (verified by merkle root)\n /// @param merkleProof input for merkle proof leaf verified by merkle root\n /// @return first minted token ID\n function purchasePresale(\n uint256 quantity,\n uint256 maxQuantity,\n uint256 pricePerToken,\n bytes32[] memory merkleProof\n ) external payable returns (uint256);\n\n /// @notice Function to return the global sales details for the given drop\n function saleDetails() external view returns (SaleDetails memory);\n\n /// @notice Function to return the specific sales details for a given address\n /// @param minter address for minter to return mint information for\n function mintedPerAddress(address minter) external view returns (AddressMintDetails memory);\n\n /// @notice This is the opensea/public owner setting that can be set by the contract admin\n function owner() external view returns (address);\n\n /// @notice Update the metadata renderer\n /// @param newRenderer new address for renderer\n /// @param setupRenderer data to call to bootstrap data for the new renderer (optional)\n function setMetadataRenderer(IMetadataRenderer newRenderer, bytes memory setupRenderer) external;\n\n /// @notice This is an admin mint function to mint a quantity to a specific address\n /// @param to address to mint to\n /// @param quantity quantity to mint\n /// @return the id of the first minted NFT\n function adminMint(address to, uint256 quantity) external returns (uint256);\n\n /// @notice This is an admin mint function to mint a single nft each to a list of addresses\n /// @param to list of addresses to mint an NFT each to\n /// @return the id of the first minted NFT\n function adminMintAirdrop(address[] memory to) external returns (uint256);\n\n /// @dev Getter for admin role associated with the contract to handle metadata\n /// @return boolean if address is admin\n function isAdmin(address user) external view returns (bool);\n}\n" + }, + "contracts/drops/interface/IMetadataRenderer.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\ninterface IMetadataRenderer {\n function tokenURI(uint256) external view returns (string memory);\n\n function contractURI() external view returns (string memory);\n\n function initializeWithData(bytes memory initData) external;\n}\n" + }, + "contracts/drops/interface/IOperatorFilterRegistry.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\ninterface IOperatorFilterRegistry {\n function isOperatorAllowed(address registrant, address operator) external view returns (bool);\n\n function register(address registrant) external;\n\n function registerAndSubscribe(address registrant, address subscription) external;\n\n function registerAndCopyEntries(address registrant, address registrantToCopy) external;\n\n function updateOperator(address registrant, address operator, bool filtered) external;\n\n function updateOperators(address registrant, address[] calldata operators, bool filtered) external;\n\n function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external;\n\n function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external;\n\n function subscribe(address registrant, address registrantToSubscribe) external;\n\n function unsubscribe(address registrant, bool copyExistingEntries) external;\n\n function subscriptionOf(address addr) external returns (address registrant);\n\n function subscribers(address registrant) external returns (address[] memory);\n\n function subscriberAt(address registrant, uint256 index) external returns (address);\n\n function copyEntriesOf(address registrant, address registrantToCopy) external;\n\n function isOperatorFiltered(address registrant, address operator) external returns (bool);\n\n function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool);\n\n function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool);\n\n function filteredOperators(address addr) external returns (address[] memory);\n\n function filteredCodeHashes(address addr) external returns (bytes32[] memory);\n\n function filteredOperatorAt(address registrant, uint256 index) external returns (address);\n\n function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32);\n\n function isRegistered(address addr) external returns (bool);\n\n function codeHashOf(address addr) external returns (bytes32);\n\n function unregister(address registrant) external;\n}\n" + }, + "contracts/drops/library/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nlibrary Address {\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "contracts/drops/library/MerkleProof.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nlibrary MerkleProof {\n /**\n * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree\n * defined by `root`. For this, a `proof` must be provided, containing\n * sibling hashes on the branch from the leaf to the root of the tree. Each\n * pair of leaves and each pair of pre-images are assumed to be sorted.\n */\n function verify(bytes32[] memory proof, bytes32 root, bytes32 leaf) internal pure returns (bool) {\n return processProof(proof, leaf) == root;\n }\n\n /**\n * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up\n * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt\n * hash matches the root of the tree. When processing the proof, the pairs\n * of leafs & pre-images are assumed to be sorted.\n *\n * _Available since v4.4._\n */\n function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {\n bytes32 computedHash = leaf;\n for (uint256 i = 0; i < proof.length; i++) {\n bytes32 proofElement = proof[i];\n if (computedHash <= proofElement) {\n // Hash(current computed hash + current element of the proof)\n computedHash = _efficientHash(computedHash, proofElement);\n } else {\n // Hash(current element of the proof + current computed hash)\n computedHash = _efficientHash(proofElement, computedHash);\n }\n }\n return computedHash;\n }\n\n function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {\n assembly {\n mstore(0x00, a)\n mstore(0x20, b)\n value := keccak256(0x00, 0x40)\n }\n }\n}\n" + }, + "contracts/drops/library/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nlibrary Strings {\n bytes16 private constant _HEX_SYMBOLS = \"0123456789abcdef\";\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n // Inspired by OraclizeAPI's implementation - MIT licence\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n if (value == 0) {\n return \"0\";\n }\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n bytes memory buffer = new bytes(digits);\n while (value != 0) {\n digits -= 1;\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n value /= 10;\n }\n return string(buffer);\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n if (value == 0) {\n return \"0x00\";\n }\n uint256 temp = value;\n uint256 length = 0;\n while (temp != 0) {\n length++;\n temp >>= 8;\n }\n return toHexString(value, length);\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n}\n" + }, + "contracts/drops/metadata/DropsMetadataRenderer.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IMetadataRenderer} from \"../interface/IMetadataRenderer.sol\";\n\nimport {Strings} from \"../library/Strings.sol\";\n\nimport {MetadataRenderAdminCheck} from \"./MetadataRenderAdminCheck.sol\";\n\n/// @notice Drops metadata system\ncontract DropsMetadataRenderer is Initializable, IMetadataRenderer, MetadataRenderAdminCheck {\n error MetadataFrozen();\n\n /// Event to mark updated metadata information\n event MetadataUpdated(\n address indexed target,\n string metadataBase,\n string metadataExtension,\n string contractURI,\n uint256 freezeAt\n );\n\n /// @notice Hash to mark updated provenance hash\n event ProvenanceHashUpdated(address indexed target, bytes32 provenanceHash);\n\n /// @notice Struct to store metadata info and update data\n struct MetadataURIInfo {\n string base;\n string extension;\n string contractURI;\n uint256 freezeAt;\n }\n\n /// @notice NFT metadata by contract\n mapping(address => MetadataURIInfo) public metadataBaseByContract;\n\n /// @notice Optional provenance hashes for NFT metadata by contract\n mapping(address => bytes32) public provenanceHashes;\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @dev A blank init function is required to be able to call genesisDeriveFutureAddress to get the deterministic address\n * @dev Since no data is required to be intialized the selector is just returned and _setInitialized() does not need to be called\n */\n function init(bytes memory /* initPayload */) external pure override returns (bytes4) {\n return Initializable.init.selector;\n }\n\n /// @notice Standard init for drop metadata from root drop contract\n /// @param data passed in for initialization\n function initializeWithData(bytes memory data) external {\n // data format: string baseURI, string newContractURI\n (string memory initialBaseURI, string memory initialContractURI) = abi.decode(data, (string, string));\n _updateMetadataDetails(msg.sender, initialBaseURI, \"\", initialContractURI, 0);\n }\n\n /// @notice Update the provenance hash (optional) for a given nft\n /// @param target target address to update\n /// @param provenanceHash provenance hash to set\n function updateProvenanceHash(address target, bytes32 provenanceHash) external requireSenderAdmin(target) {\n provenanceHashes[target] = provenanceHash;\n emit ProvenanceHashUpdated(target, provenanceHash);\n }\n\n /// @notice Update metadata base URI and contract URI\n /// @param baseUri new base URI\n /// @param newContractUri new contract URI (can be an empty string)\n function updateMetadataBase(\n address target,\n string memory baseUri,\n string memory newContractUri\n ) external requireSenderAdmin(target) {\n _updateMetadataDetails(target, baseUri, \"\", newContractUri, 0);\n }\n\n /// @notice Update metadata base URI, extension, contract URI and freezing detailsUpdate metadata base URI, extension, contract URI and freezing detailsUpdate metadata base URI, extension, contract URI and freezing detailsUpdate metadata base URI, extension, contract URI and freezing detailsUpdate metadata base URI, extension, contract URI and freezing detailsUpdate metadata base URI, extension, contract URI and freezing detailsUpdate metadata base URI, extension, contract URI and freezing detailsUpdate metadata base URI, extension, contract URI and freezing details\n /// @param target target contract to update metadata for\n /// @param metadataBase new base URI to update metadata with\n /// @param metadataExtension new extension to append to base metadata URI\n /// @param freezeAt time to freeze the contract metadata at (set to 0 to disable)\n function updateMetadataBaseWithDetails(\n address target,\n string memory metadataBase,\n string memory metadataExtension,\n string memory newContractURI,\n uint256 freezeAt\n ) external requireSenderAdmin(target) {\n _updateMetadataDetails(target, metadataBase, metadataExtension, newContractURI, freezeAt);\n }\n\n /// @notice Internal metadata update function\n /// @param metadataBase Base URI to update metadata for\n /// @param metadataExtension Extension URI to update metadata for\n /// @param freezeAt timestamp to freeze metadata (set to 0 to disable freezing)\n function _updateMetadataDetails(\n address target,\n string memory metadataBase,\n string memory metadataExtension,\n string memory newContractURI,\n uint256 freezeAt\n ) internal {\n if (freezeAt != 0 && freezeAt > block.timestamp) {\n revert MetadataFrozen();\n }\n\n metadataBaseByContract[target] = MetadataURIInfo({\n base: metadataBase,\n extension: metadataExtension,\n contractURI: newContractURI,\n freezeAt: freezeAt\n });\n emit MetadataUpdated({\n target: target,\n metadataBase: metadataBase,\n metadataExtension: metadataExtension,\n contractURI: newContractURI,\n freezeAt: freezeAt\n });\n }\n\n /// @notice A contract URI for the given drop contract\n /// @dev reverts if a contract uri is not provided\n /// @return contract uri for the contract metadata\n function contractURI() external view override returns (string memory) {\n string memory uri = metadataBaseByContract[msg.sender].contractURI;\n if (bytes(uri).length == 0) revert();\n return uri;\n }\n\n /// @notice A token URI for the given drops contract\n /// @dev reverts if a contract uri is not set\n /// @return token URI for the given token ID and contract (set by msg.sender)\n function tokenURI(uint256 tokenId) external view override returns (string memory) {\n MetadataURIInfo memory info = metadataBaseByContract[msg.sender];\n\n if (bytes(info.base).length == 0) revert();\n\n return string(abi.encodePacked(info.base, Strings.toString(tokenId), info.extension));\n }\n}\n" + }, + "contracts/drops/metadata/EditionsMetadataRenderer.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport \"../../abstract/Initializable.sol\";\n\nimport {IMetadataRenderer} from \"../interface/IMetadataRenderer.sol\";\nimport {IHolographDropERC721} from \"../interface/IHolographDropERC721.sol\";\nimport {ERC721Metadata} from \"../../interface/ERC721Metadata.sol\";\nimport {NFTMetadataRenderer} from \"../utils/NFTMetadataRenderer.sol\";\nimport {MetadataRenderAdminCheck} from \"./MetadataRenderAdminCheck.sol\";\n\nimport {Configuration} from \"../struct/Configuration.sol\";\n\ninterface DropConfigGetter {\n function config() external view returns (Configuration memory config);\n}\n\n/// @notice EditionsMetadataRenderer for editions support\ncontract EditionsMetadataRenderer is Initializable, IMetadataRenderer, MetadataRenderAdminCheck {\n /// @notice Storage for token edition information\n struct TokenEditionInfo {\n string description;\n string imageURI;\n string animationURI;\n }\n\n /// @notice Event for updated Media URIs\n event MediaURIsUpdated(address indexed target, address sender, string imageURI, string animationURI);\n\n /// @notice Event for a new edition initialized\n /// @dev admin function indexer feedback\n event EditionInitialized(address indexed target, string description, string imageURI, string animationURI);\n\n /// @notice Description updated for this edition\n /// @dev admin function indexer feedback\n event DescriptionUpdated(address indexed target, address sender, string newDescription);\n\n /// @notice Token information mapping storage\n mapping(address => TokenEditionInfo) public tokenInfos;\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @dev A blank init function is required to be able to call genesisDeriveFutureAddress to get the deterministic address\n * @dev Since no data is required to be intialized the selector is just returned and _setInitialized() does not need to be called\n */\n function init(bytes memory /* initPayload */) external pure override returns (bytes4) {\n return InitializableInterface.init.selector;\n }\n\n /// @notice Update media URIs\n /// @param target target for contract to update metadata for\n /// @param imageURI new image uri address\n /// @param animationURI new animation uri address\n function updateMediaURIs(\n address target,\n string memory imageURI,\n string memory animationURI\n ) external requireSenderAdmin(target) {\n tokenInfos[target].imageURI = imageURI;\n tokenInfos[target].animationURI = animationURI;\n emit MediaURIsUpdated({target: target, sender: msg.sender, imageURI: imageURI, animationURI: animationURI});\n }\n\n /// @notice Admin function to update description\n /// @param target target description\n /// @param newDescription new description\n function updateDescription(address target, string memory newDescription) external requireSenderAdmin(target) {\n tokenInfos[target].description = newDescription;\n\n emit DescriptionUpdated({target: target, sender: msg.sender, newDescription: newDescription});\n }\n\n /// @notice Default initializer for edition data from a specific contract\n /// @param data data to init with\n function initializeWithData(bytes memory data) external {\n // data format: description, imageURI, animationURI\n (string memory description, string memory imageURI, string memory animationURI) = abi.decode(\n data,\n (string, string, string)\n );\n\n tokenInfos[msg.sender] = TokenEditionInfo({\n description: description,\n imageURI: imageURI,\n animationURI: animationURI\n });\n emit EditionInitialized({\n target: msg.sender,\n description: description,\n imageURI: imageURI,\n animationURI: animationURI\n });\n }\n\n /// @notice Contract URI information getter\n /// @return contract uri (if set)\n function contractURI() external view override returns (string memory) {\n address target = msg.sender;\n TokenEditionInfo storage editionInfo = tokenInfos[target];\n Configuration memory config = DropConfigGetter(target).config();\n\n return\n NFTMetadataRenderer.encodeContractURIJSON({\n name: ERC721Metadata(target).name(),\n description: editionInfo.description,\n imageURI: editionInfo.imageURI,\n animationURI: editionInfo.animationURI,\n royaltyBPS: uint256(config.royaltyBPS),\n royaltyRecipient: config.fundsRecipient\n });\n }\n\n /// @notice Token URI information getter\n /// @param tokenId to get uri for\n /// @return contract uri (if set)\n function tokenURI(uint256 tokenId) external view override returns (string memory) {\n address target = msg.sender;\n\n TokenEditionInfo memory info = tokenInfos[target];\n IHolographDropERC721 media = IHolographDropERC721(target);\n\n uint256 maxSupply = media.saleDetails().maxSupply;\n\n // For open editions, set max supply to 0 for renderer to remove the edition max number\n // This will be added back on once the open edition is \"finalized\"\n if (maxSupply == type(uint64).max) {\n maxSupply = 0;\n }\n\n return\n NFTMetadataRenderer.createMetadataEdition({\n name: ERC721Metadata(target).name(),\n description: info.description,\n imageURI: info.imageURI,\n animationURI: info.animationURI,\n tokenOfEdition: tokenId,\n editionSize: maxSupply\n });\n }\n}\n" + }, + "contracts/drops/metadata/MetadataRenderAdminCheck.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {IHolographDropERC721} from \"../interface/IHolographDropERC721.sol\";\n\ncontract MetadataRenderAdminCheck {\n error Access_OnlyAdmin();\n\n /// @notice Modifier to require the sender to be an admin\n /// @param target address that the user wants to modify\n modifier requireSenderAdmin(address target) {\n if (target != msg.sender && !IHolographDropERC721(target).isAdmin(msg.sender)) {\n revert Access_OnlyAdmin();\n }\n\n _;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleArbitrumNova.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOracleArbitrumNova is Admin, Initializable, IDropsPriceOracle {\n address constant WETH = 0x0000000000000000000000000000000000000000; // 18 decimals\n address constant USDC = 0x0000000000000000000000000000000000000000; // 6 decimals\n address constant USDT = 0x0000000000000000000000000000000000000000; // 6 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n\n IUniswapV2Pair constant UniV2UsdcPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n IUniswapV2Pair constant UniV2UsdtPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external view returns (uint256 weiAmount) {\n weiAmount =\n (_getSushiUSDC(usdAmount) + _getSushiUSDT(usdAmount) + _getUniUSDC(usdAmount) + _getUniUSDT(usdAmount)) /\n 4;\n }\n\n function _getSushiUSDC(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdcPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getSushiUSDT(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdtPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUniUSDC(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = UniV2UsdcPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUniUSDT(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = UniV2UsdtPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleArbitrumOne.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOracleArbitrumOne is Admin, Initializable, IDropsPriceOracle {\n address constant WETH = 0x82aF49447D8a07e3bd95BD0d56f35241523fBab1; // 18 decimals\n address constant USDC = 0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8; // 6 decimals\n address constant USDT = 0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9; // 6 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0x905dfCD5649217c42684f23958568e533C711Aa3);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0xCB0E5bFa72bBb4d16AB5aA0c60601c438F04b4ad);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external view returns (uint256 weiAmount) {\n weiAmount = (_getSushiUSDC(usdAmount) + _getSushiUSDT(usdAmount)) / 2;\n }\n\n function _getSushiUSDC(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdcPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDC\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getSushiUSDT(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdtPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleArbitrumTestnetGoerli.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOracleArbitrumTestnetGoerli is Admin, Initializable, IDropsPriceOracle {\n address constant WETH = 0x0000000000000000000000000000000000000000; // 18 decimals\n address constant USDC = 0x0000000000000000000000000000000000000000; // 6 decimals\n address constant USDT = 0x0000000000000000000000000000000000000000; // 6 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n\n IUniswapV2Pair constant UniV2UsdcPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n IUniswapV2Pair constant UniV2UsdtPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external pure returns (uint256 weiAmount) {\n weiAmount = (_getSushiUSDC(usdAmount) + _getSushiUSDT(usdAmount)) / 2;\n }\n\n function _getSushiUSDC(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdcPool.getReserves();\n uint112 _reserve0 = 14248413024234;\n uint112 _reserve1 = 8237558200010903232972;\n // x is always native token / WETH\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getSushiUSDT(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdtPool.getReserves();\n uint112 _reserve0 = 7190540826553156156218;\n uint112 _reserve1 = 12394808861997;\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleAvalanche.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {ILBPair} from \"./interface/ILBPair.sol\";\nimport {ILBRouter} from \"./interface/ILBRouter.sol\";\n\ncontract DropsPriceOracleAvalanche is Admin, Initializable, IDropsPriceOracle {\n address constant WAVAX = 0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7; // 18 decimals\n address constant USDC = 0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E; // 6 decimals\n address constant USDT = 0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7; // 6 decimals\n\n ILBRouter constant TraderJoeRouter = ILBRouter(0xb4315e873dBcf96Ffd0acd8EA43f689D8c20fB30);\n ILBPair constant TraderJoeUsdcPool = ILBPair(0xD446eb1660F766d533BeCeEf890Df7A69d26f7d1);\n ILBPair constant TraderJoeUsdtPool = ILBPair(0x87EB2F90d7D0034571f343fb7429AE22C1Bd9F72);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external view returns (uint256 weiAmount) {\n if (usdAmount == 0) {\n weiAmount = 0;\n return weiAmount;\n }\n weiAmount = (_getTraderJoeUSDC(usdAmount) + _getTraderJoeUSDT(usdAmount)) / 2;\n }\n\n function _getTraderJoeUSDC(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint128 amountIn, uint128 amountOutLeft, uint128 fee) = TraderJoeRouter.getSwapIn(\n TraderJoeUsdcPool,\n uint128(usdAmount),\n true\n );\n weiAmount = amountIn + fee;\n }\n\n function _getTraderJoeUSDT(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint128 amountIn, uint128 amountOutLeft, uint128 fee) = TraderJoeRouter.getSwapIn(\n TraderJoeUsdtPool,\n uint128(usdAmount),\n true\n );\n weiAmount = amountIn + fee;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleAvalancheTestnet.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOracleAvalancheTestnet is Admin, Initializable, IDropsPriceOracle {\n address constant WAVAX = 0xd00ae08403B9bbb9124bB305C09058E32C39A48c;\n address constant USDC = 0x5425890298aed601595a70AB815c96711a31Bc65; // 6 decimals\n address constant USDT = 0x0000000000000000000000000000000000000000; // 6 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0x1B92bf7394d317A758d953F6428445A8977e195C);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external pure returns (uint256 weiAmount) {\n weiAmount = (_getSushiUSDC(usdAmount) + _getSushiUSDT(usdAmount)) / 2;\n }\n\n function _getSushiUSDC(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdcPool.getReserves();\n uint112 _reserve0 = 133224784402692878349;\n uint112 _reserve1 = 2205199060;\n // x is always native token / WAVAX\n uint256 x = _reserve0;\n // y is always USD token / USDC\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getSushiUSDT(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdtPool.getReserves();\n uint112 _reserve0 = 2205199060;\n uint112 _reserve1 = 133224784402692878349;\n // x is always native token / WAVAX\n uint256 x = _reserve1;\n // y is always USD token / USDT\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleBinanceSmartChain.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOracleBinanceSmartChain is Admin, Initializable, IDropsPriceOracle {\n address constant WBNB = 0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c;\n address constant USDC = 0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d; // 18 decimals\n address constant USDT = 0x55d398326f99059fF775485246999027B3197955; // 18 decimals\n address constant BUSD = 0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56; // 18 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0xc7632B7b2d768bbb30a404E13E1dE48d1439ec21);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0x2905817b020fD35D9d09672946362b62766f0d69);\n IUniswapV2Pair constant SushiV2BusdPool = IUniswapV2Pair(0xDc558D64c29721d74C4456CfB4363a6e6660A9Bb);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external view returns (uint256 weiAmount) {\n weiAmount = (_getUSDC(usdAmount) + _getUSDT(usdAmount) + _getBUSD(usdAmount)) / 3;\n }\n\n function _getUSDC(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n usdAmount = usdAmount * (10 ** (18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdcPool.getReserves();\n // x is always native token / WBNB\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUSDT(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n usdAmount = usdAmount * (10 ** (18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdtPool.getReserves();\n // x is always native token / WBNB\n uint256 x = _reserve1;\n // y is always USD token / USDT\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getBUSD(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n usdAmount = usdAmount * (10 ** (18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2BusdPool.getReserves();\n // x is always native token / WBNB\n uint256 x = _reserve0;\n // y is always USD token / BUSD\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleBinanceSmartChainTestnet.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOracleBinanceSmartChainTestnet is Admin, Initializable, IDropsPriceOracle {\n address constant WBNB = 0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd;\n address constant USDC = 0x0000000000000000000000000000000000000000; // 18 decimals\n address constant USDT = 0x337610d27c682E347C9cD60BD4b3b107C9d34dDd; // 18 decimals\n address constant BUSD = 0xeD24FC36d5Ee211Ea25A80239Fb8C4Cfd80f12Ee; // 18 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0x622A814A1c842D34F9828370d9015Dc9d4c5b6F1);\n IUniswapV2Pair constant SushiV2BusdPool = IUniswapV2Pair(0x9A0eeceDA5c0203924484F5467cEE4321cf6A189);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external pure returns (uint256 weiAmount) {\n weiAmount = (_getUSDC(usdAmount) + _getUSDT(usdAmount) + _getBUSD(usdAmount)) / 3;\n }\n\n function _getUSDC(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n usdAmount = usdAmount * (10 ** (18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdcPool.getReserves();\n uint112 _reserve0 = 13021882855694508203763;\n uint112 _reserve1 = 40694382259814793835;\n // x is always native token / WBNB\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUSDT(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n usdAmount = usdAmount * (10 ** (18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdtPool.getReserves();\n uint112 _reserve0 = 27194218672878436248359;\n uint112 _reserve1 = 85236077287017749564;\n // x is always native token / WBNB\n uint256 x = _reserve1;\n // y is always USD token / USDT\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getBUSD(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n usdAmount = usdAmount * (10 ** (18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2BusdPool.getReserves();\n uint112 _reserve0 = 18888866298338593382;\n uint112 _reserve1 = 6055244885106491861952;\n // x is always native token / WBNB\n uint256 x = _reserve0;\n // y is always USD token / BUSD\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleEthereum.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOracleEthereum is Admin, Initializable, IDropsPriceOracle {\n address constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; // 18 decimals\n address constant USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48; // 6 decimals\n address constant USDT = 0xdAC17F958D2ee523a2206206994597C13D831ec7; // 6 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0x397FF1542f962076d0BFE58eA045FfA2d347ACa0);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0x06da0fd433C1A5d7a4faa01111c044910A184553);\n\n IUniswapV2Pair constant UniV2UsdcPool = IUniswapV2Pair(0xB4e16d0168e52d35CaCD2c6185b44281Ec28C9Dc);\n IUniswapV2Pair constant UniV2UsdtPool = IUniswapV2Pair(0x0d4a11d5EEaaC28EC3F61d100daF4d40471f1852);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external view returns (uint256 weiAmount) {\n weiAmount =\n (_getSushiUSDC(usdAmount) + _getSushiUSDT(usdAmount) + _getUniUSDC(usdAmount) + _getUniUSDT(usdAmount)) /\n 4;\n }\n\n function _getSushiUSDC(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdcPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getSushiUSDT(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdtPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUniUSDC(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = UniV2UsdcPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUniUSDT(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = UniV2UsdtPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleEthereumTestnetGoerli.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOracleEthereumTestnetGoerli is Admin, Initializable, IDropsPriceOracle {\n address constant WETH = 0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6; // 18 decimals\n address constant USDC = 0x07865c6E87B9F70255377e024ace6630C1Eaa37F; // 6 decimals\n address constant USDT = 0x0000000000000000000000000000000000000000; // 6 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n\n IUniswapV2Pair constant UniV2UsdcPool = IUniswapV2Pair(0xB4e16d0168e52d35CaCD2c6185b44281Ec28C9Dc);\n IUniswapV2Pair constant UniV2UsdtPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external pure returns (uint256 weiAmount) {\n weiAmount =\n (_getSushiUSDC(usdAmount) + _getSushiUSDT(usdAmount) + _getUniUSDC(usdAmount) + _getUniUSDT(usdAmount)) /\n 4;\n }\n\n function _getSushiUSDC(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdcPool.getReserves();\n uint112 _reserve0 = 14248413024234;\n uint112 _reserve1 = 8237558200010903232972;\n // x is always native token / WETH\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getSushiUSDT(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdtPool.getReserves();\n uint112 _reserve0 = 7190540826553156156218;\n uint112 _reserve1 = 12394808861997;\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUniUSDC(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = UniV2UsdcPool.getReserves();\n uint112 _reserve0 = 27969935741431;\n uint112 _reserve1 = 16175569695347837629371;\n // x is always native token / WETH\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUniUSDT(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = UniV2UsdtPool.getReserves();\n uint112 _reserve0 = 16492332449237327237450;\n uint112 _reserve1 = 28443279643692;\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleOptimism.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOracleOptimism is Admin, Initializable, IDropsPriceOracle {\n address constant WETH = 0x4200000000000000000000000000000000000006; // 18 decimals\n address constant USDC = 0x7F5c764cBc14f9669B88837ca1490cCa17c31607; // 6 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0x7086622E6Db990385B102D79CB1218947fb549a9);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external view returns (uint256 weiAmount) {\n weiAmount = _getSushiUSDC(usdAmount);\n }\n\n function _getSushiUSDC(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdcPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDC\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleOptimismTestnetGoerli.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOracleOptimismTestnetGoerli is Admin, Initializable, IDropsPriceOracle {\n address constant WETH = 0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6; // 18 decimals\n address constant USDC = 0x07865c6E87B9F70255377e024ace6630C1Eaa37F; // 6 decimals\n address constant USDT = 0x0000000000000000000000000000000000000000; // 6 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n\n IUniswapV2Pair constant UniV2UsdcPool = IUniswapV2Pair(0xB4e16d0168e52d35CaCD2c6185b44281Ec28C9Dc);\n IUniswapV2Pair constant UniV2UsdtPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external pure returns (uint256 weiAmount) {\n weiAmount =\n (_getSushiUSDC(usdAmount) + _getSushiUSDT(usdAmount) + _getUniUSDC(usdAmount) + _getUniUSDT(usdAmount)) /\n 4;\n }\n\n function _getSushiUSDC(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdcPool.getReserves();\n uint112 _reserve0 = 14248413024234;\n uint112 _reserve1 = 8237558200010903232972;\n // x is always native token / WETH\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getSushiUSDT(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdtPool.getReserves();\n uint112 _reserve0 = 7190540826553156156218;\n uint112 _reserve1 = 12394808861997;\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUniUSDC(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = UniV2UsdcPool.getReserves();\n uint112 _reserve0 = 27969935741431;\n uint112 _reserve1 = 16175569695347837629371;\n // x is always native token / WETH\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUniUSDT(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = UniV2UsdtPool.getReserves();\n uint112 _reserve0 = 16492332449237327237450;\n uint112 _reserve1 = 28443279643692;\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOraclePolygon.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOraclePolygon is Admin, Initializable, IDropsPriceOracle {\n address constant WMATIC = 0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270; // 18 decimals\n address constant USDC = 0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174; // 6 decimals\n address constant USDT = 0xc2132D05D31c914a87C6611C10748AEb04B58e8F; // 6 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0xcd353F79d9FADe311fC3119B841e1f456b54e858);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0x55FF76BFFC3Cdd9D5FdbBC2ece4528ECcE45047e);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external view returns (uint256 weiAmount) {\n weiAmount = (_getUSDC(usdAmount) + _getUSDT(usdAmount)) / 2;\n }\n\n function _getUSDC(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdcPool.getReserves();\n // x is always native token / WMATIC\n uint256 x = _reserve0;\n // y is always USD token / USDC\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUSDT(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdtPool.getReserves();\n // x is always native token / WMATIC\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOraclePolygonTestnet.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOraclePolygonTestnet is Admin, Initializable, IDropsPriceOracle {\n address constant WMATIC = 0x5B67676a984807a212b1c59eBFc9B3568a474F0a; // 18 decimals\n address constant USDC = 0x742DfA5Aa70a8212857966D491D67B09Ce7D6ec7; // 6 decimals\n address constant USDT = 0x0000000000000000000000000000000000000000; // 6 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0x412D4b3C56836ff78F1C8197c6718A6DFf3702F5);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external pure returns (uint256 weiAmount) {\n weiAmount = (_getUSDC(usdAmount) + _getUSDT(usdAmount)) / 2;\n }\n\n function _getUSDC(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdcPool.getReserves();\n uint112 _reserve0 = 185186616552407552407159;\n uint112 _reserve1 = 207981749778;\n // x is always native token / WMATIC\n uint256 x = _reserve0;\n // y is always USD token / USDC\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUSDT(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdtPool.getReserves();\n uint112 _reserve0 = 13799757434002573084812;\n uint112 _reserve1 = 15484391886;\n // x is always native token / WMATIC\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DummyDropsPriceOracle.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DummyDropsPriceOracle is Admin, Initializable, IDropsPriceOracle {\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external pure returns (uint256 weiAmount) {\n uint112 _reserve0 = 8237558200010903232972;\n uint112 _reserve1 = 14248413024234;\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDC\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/interface/ILBPair.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\ninterface ILBPair {\n function tokenX() external view returns (address);\n\n function tokenY() external view returns (address);\n\n function getReservesAndId() external view returns (uint256 reserveX, uint256 reserveY, uint256 activeId);\n}\n" + }, + "contracts/drops/oracle/interface/ILBRouter.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {ILBPair} from \"./ILBPair.sol\";\n\ninterface ILBRouter {\n function getSwapIn(\n ILBPair LBPair,\n uint128 amountOut,\n bool swapForY\n ) external view returns (uint128 amountIn, uint128 amountOutLeft, uint128 fee);\n}\n" + }, + "contracts/drops/oracle/interface/IUniswapV2Pair.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\ninterface IUniswapV2Pair {\n event Approval(address indexed owner, address indexed spender, uint256 value);\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n function name() external pure returns (string memory);\n\n function symbol() external pure returns (string memory);\n\n function decimals() external pure returns (uint8);\n\n function totalSupply() external view returns (uint256);\n\n function balanceOf(address owner) external view returns (uint256);\n\n function allowance(address owner, address spender) external view returns (uint256);\n\n function approve(address spender, uint256 value) external returns (bool);\n\n function transfer(address to, uint256 value) external returns (bool);\n\n function transferFrom(address from, address to, uint256 value) external returns (bool);\n\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n\n function PERMIT_TYPEHASH() external pure returns (bytes32);\n\n function nonces(address owner) external view returns (uint256);\n\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n event Mint(address indexed sender, uint256 amount0, uint256 amount1);\n event Burn(address indexed sender, uint256 amount0, uint256 amount1, address indexed to);\n event Swap(\n address indexed sender,\n uint256 amount0In,\n uint256 amount1In,\n uint256 amount0Out,\n uint256 amount1Out,\n address indexed to\n );\n event Sync(uint112 reserve0, uint112 reserve1);\n\n function MINIMUM_LIQUIDITY() external pure returns (uint256);\n\n function factory() external view returns (address);\n\n function token0() external view returns (address);\n\n function token1() external view returns (address);\n\n function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);\n\n function price0CumulativeLast() external view returns (uint256);\n\n function price1CumulativeLast() external view returns (uint256);\n\n function kLast() external view returns (uint256);\n\n function mint(address to) external returns (uint256 liquidity);\n\n function burn(address to) external returns (uint256 amount0, uint256 amount1);\n\n function swap(uint256 amount0Out, uint256 amount1Out, address to, bytes calldata data) external;\n\n function skim(address to) external;\n\n function sync() external;\n\n function initialize(address, address) external;\n}\n" + }, + "contracts/drops/oracle/interface/IUniswapV3Pair.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\ninterface IUniswapV3PoolImmutables {\n /// @notice The contract that deployed the pool, which must adhere to the IUniswapV3Factory interface\n /// @return The contract address\n function factory() external view returns (address);\n\n /// @notice The first of the two tokens of the pool, sorted by address\n /// @return The token contract address\n function token0() external view returns (address);\n\n /// @notice The second of the two tokens of the pool, sorted by address\n /// @return The token contract address\n function token1() external view returns (address);\n\n /// @notice The pool's fee in hundredths of a bip, i.e. 1e-6\n /// @return The fee\n function fee() external view returns (uint24);\n\n /// @notice The pool tick spacing\n /// @dev Ticks can only be used at multiples of this value, minimum of 1 and always positive\n /// e.g.: a tickSpacing of 3 means ticks can be initialized every 3rd tick, i.e., ..., -6, -3, 0, 3, 6, ...\n /// This value is an int24 to avoid casting even though it is always positive.\n /// @return The tick spacing\n function tickSpacing() external view returns (int24);\n\n /// @notice The maximum amount of position liquidity that can use any tick in the range\n /// @dev This parameter is enforced per tick to prevent liquidity from overflowing a uint128 at any point, and\n /// also prevents out-of-range liquidity from being used to prevent adding in-range liquidity to a pool\n /// @return The max amount of liquidity per tick\n function maxLiquidityPerTick() external view returns (uint128);\n}\n\ninterface IUniswapV3PoolState {\n /// @notice The 0th storage slot in the pool stores many values, and is exposed as a single method to save gas\n /// when accessed externally.\n /// @return sqrtPriceX96 The current price of the pool as a sqrt(token1/token0) Q64.96 value\n /// tick The current tick of the pool, i.e. according to the last tick transition that was run.\n /// This value may not always be equal to SqrtTickMath.getTickAtSqrtRatio(sqrtPriceX96) if the price is on a tick\n /// boundary.\n /// observationIndex The index of the last oracle observation that was written,\n /// observationCardinality The current maximum number of observations stored in the pool,\n /// observationCardinalityNext The next maximum number of observations, to be updated when the observation.\n /// feeProtocol The protocol fee for both tokens of the pool.\n /// Encoded as two 4 bit values, where the protocol fee of token1 is shifted 4 bits and the protocol fee of token0\n /// is the lower 4 bits. Used as the denominator of a fraction of the swap fee, e.g. 4 means 1/4th of the swap fee.\n /// unlocked Whether the pool is currently locked to reentrancy\n function slot0()\n external\n view\n returns (\n uint160 sqrtPriceX96,\n int24 tick,\n uint16 observationIndex,\n uint16 observationCardinality,\n uint16 observationCardinalityNext,\n uint8 feeProtocol,\n bool unlocked\n );\n\n /// @notice The fee growth as a Q128.128 fees of token0 collected per unit of liquidity for the entire life of the pool\n /// @dev This value can overflow the uint256\n function feeGrowthGlobal0X128() external view returns (uint256);\n\n /// @notice The fee growth as a Q128.128 fees of token1 collected per unit of liquidity for the entire life of the pool\n /// @dev This value can overflow the uint256\n function feeGrowthGlobal1X128() external view returns (uint256);\n\n /// @notice The amounts of token0 and token1 that are owed to the protocol\n /// @dev Protocol fees will never exceed uint128 max in either token\n function protocolFees() external view returns (uint128 token0, uint128 token1);\n\n /// @notice The currently in range liquidity available to the pool\n /// @dev This value has no relationship to the total liquidity across all ticks\n function liquidity() external view returns (uint128);\n\n /// @notice Look up information about a specific tick in the pool\n /// @param tick The tick to look up\n /// @return liquidityGross the total amount of position liquidity that uses the pool either as tick lower or\n /// tick upper,\n /// liquidityNet how much liquidity changes when the pool price crosses the tick,\n /// feeGrowthOutside0X128 the fee growth on the other side of the tick from the current tick in token0,\n /// feeGrowthOutside1X128 the fee growth on the other side of the tick from the current tick in token1,\n /// tickCumulativeOutside the cumulative tick value on the other side of the tick from the current tick\n /// secondsPerLiquidityOutsideX128 the seconds spent per liquidity on the other side of the tick from the current tick,\n /// secondsOutside the seconds spent on the other side of the tick from the current tick,\n /// initialized Set to true if the tick is initialized, i.e. liquidityGross is greater than 0, otherwise equal to false.\n /// Outside values can only be used if the tick is initialized, i.e. if liquidityGross is greater than 0.\n /// In addition, these values are only relative and must be used only in comparison to previous snapshots for\n /// a specific position.\n function ticks(\n int24 tick\n )\n external\n view\n returns (\n uint128 liquidityGross,\n int128 liquidityNet,\n uint256 feeGrowthOutside0X128,\n uint256 feeGrowthOutside1X128,\n int56 tickCumulativeOutside,\n uint160 secondsPerLiquidityOutsideX128,\n uint32 secondsOutside,\n bool initialized\n );\n\n /// @notice Returns 256 packed tick initialized boolean values. See TickBitmap for more information\n function tickBitmap(int16 wordPosition) external view returns (uint256);\n\n /// @notice Returns the information about a position by the position's key\n /// @param key The position's key is a hash of a preimage composed by the owner, tickLower and tickUpper\n /// @return _liquidity The amount of liquidity in the position,\n /// Returns feeGrowthInside0LastX128 fee growth of token0 inside the tick range as of the last mint/burn/poke,\n /// Returns feeGrowthInside1LastX128 fee growth of token1 inside the tick range as of the last mint/burn/poke,\n /// Returns tokensOwed0 the computed amount of token0 owed to the position as of the last mint/burn/poke,\n /// Returns tokensOwed1 the computed amount of token1 owed to the position as of the last mint/burn/poke\n function positions(\n bytes32 key\n )\n external\n view\n returns (\n uint128 _liquidity,\n uint256 feeGrowthInside0LastX128,\n uint256 feeGrowthInside1LastX128,\n uint128 tokensOwed0,\n uint128 tokensOwed1\n );\n\n /// @notice Returns data about a specific observation index\n /// @param index The element of the observations array to fetch\n /// @dev You most likely want to use #observe() instead of this method to get an observation as of some amount of time\n /// ago, rather than at a specific index in the array.\n /// @return blockTimestamp The timestamp of the observation,\n /// Returns tickCumulative the tick multiplied by seconds elapsed for the life of the pool as of the observation timestamp,\n /// Returns secondsPerLiquidityCumulativeX128 the seconds per in range liquidity for the life of the pool as of the observation timestamp,\n /// Returns initialized whether the observation has been initialized and the values are safe to use\n function observations(\n uint256 index\n )\n external\n view\n returns (uint32 blockTimestamp, int56 tickCumulative, uint160 secondsPerLiquidityCumulativeX128, bool initialized);\n}\n\ninterface IUniswapV3PoolDerivedState {\n /// @notice Returns the cumulative tick and liquidity as of each timestamp `secondsAgo` from the current block timestamp\n /// @dev To get a time weighted average tick or liquidity-in-range, you must call this with two values, one representing\n /// the beginning of the period and another for the end of the period. E.g., to get the last hour time-weighted average tick,\n /// you must call it with secondsAgos = [3600, 0].\n /// @dev The time weighted average tick represents the geometric time weighted average price of the pool, in\n /// log base sqrt(1.0001) of token1 / token0. The TickMath library can be used to go from a tick value to a ratio.\n /// @param secondsAgos From how long ago each cumulative tick and liquidity value should be returned\n /// @return tickCumulatives Cumulative tick values as of each `secondsAgos` from the current block timestamp\n /// @return secondsPerLiquidityCumulativeX128s Cumulative seconds per liquidity-in-range value as of each `secondsAgos` from the current block\n /// timestamp\n function observe(\n uint32[] calldata secondsAgos\n ) external view returns (int56[] memory tickCumulatives, uint160[] memory secondsPerLiquidityCumulativeX128s);\n\n /// @notice Returns a snapshot of the tick cumulative, seconds per liquidity and seconds inside a tick range\n /// @dev Snapshots must only be compared to other snapshots, taken over a period for which a position existed.\n /// I.e., snapshots cannot be compared if a position is not held for the entire period between when the first\n /// snapshot is taken and the second snapshot is taken.\n /// @param tickLower The lower tick of the range\n /// @param tickUpper The upper tick of the range\n /// @return tickCumulativeInside The snapshot of the tick accumulator for the range\n /// @return secondsPerLiquidityInsideX128 The snapshot of seconds per liquidity for the range\n /// @return secondsInside The snapshot of seconds per liquidity for the range\n function snapshotCumulativesInside(\n int24 tickLower,\n int24 tickUpper\n ) external view returns (int56 tickCumulativeInside, uint160 secondsPerLiquidityInsideX128, uint32 secondsInside);\n}\n\ninterface IUniswapV3PoolActions {\n /// @notice Sets the initial price for the pool\n /// @dev Price is represented as a sqrt(amountToken1/amountToken0) Q64.96 value\n /// @param sqrtPriceX96 the initial sqrt price of the pool as a Q64.96\n function initialize(uint160 sqrtPriceX96) external;\n\n /// @notice Adds liquidity for the given recipient/tickLower/tickUpper position\n /// @dev The caller of this method receives a callback in the form of IUniswapV3MintCallback#uniswapV3MintCallback\n /// in which they must pay any token0 or token1 owed for the liquidity. The amount of token0/token1 due depends\n /// on tickLower, tickUpper, the amount of liquidity, and the current price.\n /// @param recipient The address for which the liquidity will be created\n /// @param tickLower The lower tick of the position in which to add liquidity\n /// @param tickUpper The upper tick of the position in which to add liquidity\n /// @param amount The amount of liquidity to mint\n /// @param data Any data that should be passed through to the callback\n /// @return amount0 The amount of token0 that was paid to mint the given amount of liquidity. Matches the value in the callback\n /// @return amount1 The amount of token1 that was paid to mint the given amount of liquidity. Matches the value in the callback\n function mint(\n address recipient,\n int24 tickLower,\n int24 tickUpper,\n uint128 amount,\n bytes calldata data\n ) external returns (uint256 amount0, uint256 amount1);\n\n /// @notice Collects tokens owed to a position\n /// @dev Does not recompute fees earned, which must be done either via mint or burn of any amount of liquidity.\n /// Collect must be called by the position owner. To withdraw only token0 or only token1, amount0Requested or\n /// amount1Requested may be set to zero. To withdraw all tokens owed, caller may pass any value greater than the\n /// actual tokens owed, e.g. type(uint128).max. Tokens owed may be from accumulated swap fees or burned liquidity.\n /// @param recipient The address which should receive the fees collected\n /// @param tickLower The lower tick of the position for which to collect fees\n /// @param tickUpper The upper tick of the position for which to collect fees\n /// @param amount0Requested How much token0 should be withdrawn from the fees owed\n /// @param amount1Requested How much token1 should be withdrawn from the fees owed\n /// @return amount0 The amount of fees collected in token0\n /// @return amount1 The amount of fees collected in token1\n function collect(\n address recipient,\n int24 tickLower,\n int24 tickUpper,\n uint128 amount0Requested,\n uint128 amount1Requested\n ) external returns (uint128 amount0, uint128 amount1);\n\n /// @notice Burn liquidity from the sender and account tokens owed for the liquidity to the position\n /// @dev Can be used to trigger a recalculation of fees owed to a position by calling with an amount of 0\n /// @dev Fees must be collected separately via a call to #collect\n /// @param tickLower The lower tick of the position for which to burn liquidity\n /// @param tickUpper The upper tick of the position for which to burn liquidity\n /// @param amount How much liquidity to burn\n /// @return amount0 The amount of token0 sent to the recipient\n /// @return amount1 The amount of token1 sent to the recipient\n function burn(int24 tickLower, int24 tickUpper, uint128 amount) external returns (uint256 amount0, uint256 amount1);\n\n /// @notice Swap token0 for token1, or token1 for token0\n /// @dev The caller of this method receives a callback in the form of IUniswapV3SwapCallback#uniswapV3SwapCallback\n /// @param recipient The address to receive the output of the swap\n /// @param zeroForOne The direction of the swap, true for token0 to token1, false for token1 to token0\n /// @param amountSpecified The amount of the swap, which implicitly configures the swap as exact input (positive), or exact output (negative)\n /// @param sqrtPriceLimitX96 The Q64.96 sqrt price limit. If zero for one, the price cannot be less than this\n /// value after the swap. If one for zero, the price cannot be greater than this value after the swap\n /// @param data Any data to be passed through to the callback\n /// @return amount0 The delta of the balance of token0 of the pool, exact when negative, minimum when positive\n /// @return amount1 The delta of the balance of token1 of the pool, exact when negative, minimum when positive\n function swap(\n address recipient,\n bool zeroForOne,\n int256 amountSpecified,\n uint160 sqrtPriceLimitX96,\n bytes calldata data\n ) external returns (int256 amount0, int256 amount1);\n\n /// @notice Receive token0 and/or token1 and pay it back, plus a fee, in the callback\n /// @dev The caller of this method receives a callback in the form of IUniswapV3FlashCallback#uniswapV3FlashCallback\n /// @dev Can be used to donate underlying tokens pro-rata to currently in-range liquidity providers by calling\n /// with 0 amount{0,1} and sending the donation amount(s) from the callback\n /// @param recipient The address which will receive the token0 and token1 amounts\n /// @param amount0 The amount of token0 to send\n /// @param amount1 The amount of token1 to send\n /// @param data Any data to be passed through to the callback\n function flash(address recipient, uint256 amount0, uint256 amount1, bytes calldata data) external;\n\n /// @notice Increase the maximum number of price and liquidity observations that this pool will store\n /// @dev This method is no-op if the pool already has an observationCardinalityNext greater than or equal to\n /// the input observationCardinalityNext.\n /// @param observationCardinalityNext The desired minimum number of observations for the pool to store\n function increaseObservationCardinalityNext(uint16 observationCardinalityNext) external;\n}\n\ninterface IUniswapV3PoolOwnerActions {\n /// @notice Set the denominator of the protocol's % share of the fees\n /// @param feeProtocol0 new protocol fee for token0 of the pool\n /// @param feeProtocol1 new protocol fee for token1 of the pool\n function setFeeProtocol(uint8 feeProtocol0, uint8 feeProtocol1) external;\n\n /// @notice Collect the protocol fee accrued to the pool\n /// @param recipient The address to which collected protocol fees should be sent\n /// @param amount0Requested The maximum amount of token0 to send, can be 0 to collect fees in only token1\n /// @param amount1Requested The maximum amount of token1 to send, can be 0 to collect fees in only token0\n /// @return amount0 The protocol fee collected in token0\n /// @return amount1 The protocol fee collected in token1\n function collectProtocol(\n address recipient,\n uint128 amount0Requested,\n uint128 amount1Requested\n ) external returns (uint128 amount0, uint128 amount1);\n}\n\ninterface IUniswapV3PoolEvents {\n /// @notice Emitted exactly once by a pool when #initialize is first called on the pool\n /// @dev Mint/Burn/Swap cannot be emitted by the pool before Initialize\n /// @param sqrtPriceX96 The initial sqrt price of the pool, as a Q64.96\n /// @param tick The initial tick of the pool, i.e. log base 1.0001 of the starting price of the pool\n event Initialize(uint160 sqrtPriceX96, int24 tick);\n\n /// @notice Emitted when liquidity is minted for a given position\n /// @param sender The address that minted the liquidity\n /// @param owner The owner of the position and recipient of any minted liquidity\n /// @param tickLower The lower tick of the position\n /// @param tickUpper The upper tick of the position\n /// @param amount The amount of liquidity minted to the position range\n /// @param amount0 How much token0 was required for the minted liquidity\n /// @param amount1 How much token1 was required for the minted liquidity\n event Mint(\n address sender,\n address indexed owner,\n int24 indexed tickLower,\n int24 indexed tickUpper,\n uint128 amount,\n uint256 amount0,\n uint256 amount1\n );\n\n /// @notice Emitted when fees are collected by the owner of a position\n /// @dev Collect events may be emitted with zero amount0 and amount1 when the caller chooses not to collect fees\n /// @param owner The owner of the position for which fees are collected\n /// @param tickLower The lower tick of the position\n /// @param tickUpper The upper tick of the position\n /// @param amount0 The amount of token0 fees collected\n /// @param amount1 The amount of token1 fees collected\n event Collect(\n address indexed owner,\n address recipient,\n int24 indexed tickLower,\n int24 indexed tickUpper,\n uint128 amount0,\n uint128 amount1\n );\n\n /// @notice Emitted when a position's liquidity is removed\n /// @dev Does not withdraw any fees earned by the liquidity position, which must be withdrawn via #collect\n /// @param owner The owner of the position for which liquidity is removed\n /// @param tickLower The lower tick of the position\n /// @param tickUpper The upper tick of the position\n /// @param amount The amount of liquidity to remove\n /// @param amount0 The amount of token0 withdrawn\n /// @param amount1 The amount of token1 withdrawn\n event Burn(\n address indexed owner,\n int24 indexed tickLower,\n int24 indexed tickUpper,\n uint128 amount,\n uint256 amount0,\n uint256 amount1\n );\n\n /// @notice Emitted by the pool for any swaps between token0 and token1\n /// @param sender The address that initiated the swap call, and that received the callback\n /// @param recipient The address that received the output of the swap\n /// @param amount0 The delta of the token0 balance of the pool\n /// @param amount1 The delta of the token1 balance of the pool\n /// @param sqrtPriceX96 The sqrt(price) of the pool after the swap, as a Q64.96\n /// @param liquidity The liquidity of the pool after the swap\n /// @param tick The log base 1.0001 of price of the pool after the swap\n event Swap(\n address indexed sender,\n address indexed recipient,\n int256 amount0,\n int256 amount1,\n uint160 sqrtPriceX96,\n uint128 liquidity,\n int24 tick\n );\n\n /// @notice Emitted by the pool for any flashes of token0/token1\n /// @param sender The address that initiated the swap call, and that received the callback\n /// @param recipient The address that received the tokens from flash\n /// @param amount0 The amount of token0 that was flashed\n /// @param amount1 The amount of token1 that was flashed\n /// @param paid0 The amount of token0 paid for the flash, which can exceed the amount0 plus the fee\n /// @param paid1 The amount of token1 paid for the flash, which can exceed the amount1 plus the fee\n event Flash(\n address indexed sender,\n address indexed recipient,\n uint256 amount0,\n uint256 amount1,\n uint256 paid0,\n uint256 paid1\n );\n\n /// @notice Emitted by the pool for increases to the number of observations that can be stored\n /// @dev observationCardinalityNext is not the observation cardinality until an observation is written at the index\n /// just before a mint/swap/burn.\n /// @param observationCardinalityNextOld The previous value of the next observation cardinality\n /// @param observationCardinalityNextNew The updated value of the next observation cardinality\n event IncreaseObservationCardinalityNext(uint16 observationCardinalityNextOld, uint16 observationCardinalityNextNew);\n\n /// @notice Emitted when the protocol fee is changed by the pool\n /// @param feeProtocol0Old The previous value of the token0 protocol fee\n /// @param feeProtocol1Old The previous value of the token1 protocol fee\n /// @param feeProtocol0New The updated value of the token0 protocol fee\n /// @param feeProtocol1New The updated value of the token1 protocol fee\n event SetFeeProtocol(uint8 feeProtocol0Old, uint8 feeProtocol1Old, uint8 feeProtocol0New, uint8 feeProtocol1New);\n\n /// @notice Emitted when the collected protocol fees are withdrawn by the factory owner\n /// @param sender The address that collects the protocol fees\n /// @param recipient The address that receives the collected protocol fees\n /// @param amount0 The amount of token0 protocol fees that is withdrawn\n /// @param amount0 The amount of token1 protocol fees that is withdrawn\n event CollectProtocol(address indexed sender, address indexed recipient, uint128 amount0, uint128 amount1);\n}\n\ninterface IUniswapV3Pool is\n IUniswapV3PoolImmutables,\n IUniswapV3PoolState,\n IUniswapV3PoolDerivedState,\n IUniswapV3PoolActions,\n IUniswapV3PoolOwnerActions,\n IUniswapV3PoolEvents\n{}\n\ninterface IUniswapV3Pair is IUniswapV3Pool {}\n" + }, + "contracts/drops/oracle/interface/IUniswapV3Quoter.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\ninterface IUniswapV3Quoter {\n /// @notice Returns the amount out received for a given exact input swap without executing the swap\n /// @param path The path of the swap, i.e. each token pair and the pool fee\n /// @param amountIn The amount of the first token to swap\n /// @return amountOut The amount of the last token that would be received\n function quoteExactInput(bytes memory path, uint256 amountIn) external returns (uint256 amountOut);\n\n /// @notice Returns the amount out received for a given exact input but for a swap of a single pool\n /// @param tokenIn The token being swapped in\n /// @param tokenOut The token being swapped out\n /// @param fee The fee of the token pool to consider for the pair\n /// @param amountIn The desired input amount\n /// @param sqrtPriceLimitX96 The price limit of the pool that cannot be exceeded by the swap\n /// @return amountOut The amount of `tokenOut` that would be received\n function quoteExactInputSingle(\n address tokenIn,\n address tokenOut,\n uint24 fee,\n uint256 amountIn,\n uint160 sqrtPriceLimitX96\n ) external returns (uint256 amountOut);\n\n /// @notice Returns the amount in required for a given exact output swap without executing the swap\n /// @param path The path of the swap, i.e. each token pair and the pool fee\n /// @param amountOut The amount of the last token to receive\n /// @return amountIn The amount of first token required to be paid\n function quoteExactOutput(bytes memory path, uint256 amountOut) external returns (uint256 amountIn);\n\n /// @notice Returns the amount in required to receive the given exact output amount but for a swap of a single pool\n /// @param tokenIn The token being swapped in\n /// @param tokenOut The token being swapped out\n /// @param fee The fee of the token pool to consider for the pair\n /// @param amountOut The desired output amount\n /// @param sqrtPriceLimitX96 The price limit of the pool that cannot be exceeded by the swap\n /// @return amountIn The amount required as the input for the swap in order to receive `amountOut`\n function quoteExactOutputSingle(\n address tokenIn,\n address tokenOut,\n uint24 fee,\n uint256 amountOut,\n uint160 sqrtPriceLimitX96\n ) external returns (uint256 amountIn);\n}\n" + }, + "contracts/drops/proxy/DropsMetadataRendererProxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../../abstract/Admin.sol\";\nimport \"../../abstract/Initializable.sol\";\n\ncontract DropsMetadataRendererProxy is Admin, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.dropsMetadataRenderer')) - 1)\n */\n bytes32 constant _dropsMetadataRendererSlot = 0xe1d18664c68b1eedd4e2fc65b2d42097f2cd8cd4c2f1a9a6418986c9f5da3817;\n\n constructor() {}\n\n function init(bytes memory data) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address dropsMetadataRenderer, bytes memory initCode) = abi.decode(data, (address, bytes));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_dropsMetadataRendererSlot, dropsMetadataRenderer)\n }\n (bool success, bytes memory returnData) = dropsMetadataRenderer.delegatecall(\n abi.encodeWithSignature(\"init(bytes)\", initCode)\n );\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == Initializable.init.selector, \"initialization failed\");\n _setInitialized();\n return Initializable.init.selector;\n }\n\n function getDropsMetadataRenderer() external view returns (address dropsMetadataRenderer) {\n assembly {\n dropsMetadataRenderer := sload(_dropsMetadataRendererSlot)\n }\n }\n\n function setDropsMetadataRenderer(address dropsMetadataRenderer) external onlyAdmin {\n assembly {\n sstore(_dropsMetadataRendererSlot, dropsMetadataRenderer)\n }\n }\n\n receive() external payable {}\n\n fallback() external payable {\n assembly {\n let dropsMetadataRenderer := sload(_dropsMetadataRendererSlot)\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), dropsMetadataRenderer, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/drops/proxy/DropsPriceOracleProxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../../abstract/Admin.sol\";\nimport \"../../abstract/Initializable.sol\";\n\ncontract DropsPriceOracleProxy is Admin, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.dropsPriceOracle')) - 1)\n */\n bytes32 constant _dropsPriceOracleSlot = 0x26600f0171e5a2b86874be26285c66444b2a6fa5f62114757214d5e732aded36;\n\n constructor() {}\n\n function init(bytes memory data) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address dropsPriceOracle, bytes memory initCode) = abi.decode(data, (address, bytes));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_dropsPriceOracleSlot, dropsPriceOracle)\n }\n (bool success, bytes memory returnData) = dropsPriceOracle.delegatecall(\n abi.encodeWithSignature(\"init(bytes)\", initCode)\n );\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == Initializable.init.selector, \"initialization failed\");\n _setInitialized();\n return Initializable.init.selector;\n }\n\n function getDropsPriceOracle() external view returns (address dropsPriceOracle) {\n assembly {\n dropsPriceOracle := sload(_dropsPriceOracleSlot)\n }\n }\n\n function setDropsPriceOracle(address dropsPriceOracle) external onlyAdmin {\n assembly {\n sstore(_dropsPriceOracleSlot, dropsPriceOracle)\n }\n }\n\n receive() external payable {}\n\n fallback() external payable {\n assembly {\n let dropsPriceOracle := sload(_dropsPriceOracleSlot)\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), dropsPriceOracle, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/drops/proxy/EditionsMetadataRendererProxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../../abstract/Admin.sol\";\nimport \"../../abstract/Initializable.sol\";\n\ncontract EditionsMetadataRendererProxy is Admin, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.editionsMetadataRenderer')) - 1)\n */\n bytes32 constant _editionsMetadataRendererSlot = 0x747f2428bc473d14fd9642872693b7bc7ad3f58057c4c084ce1f541a26e4bcb1;\n\n constructor() {}\n\n function init(bytes memory data) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address editionsMetadataRenderer, bytes memory initCode) = abi.decode(data, (address, bytes));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_editionsMetadataRendererSlot, editionsMetadataRenderer)\n }\n (bool success, bytes memory returnData) = editionsMetadataRenderer.delegatecall(\n abi.encodeWithSignature(\"init(bytes)\", initCode)\n );\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == Initializable.init.selector, \"initialization failed\");\n _setInitialized();\n return Initializable.init.selector;\n }\n\n function getEditionsMetadataRenderer() external view returns (address editionsMetadataRenderer) {\n assembly {\n editionsMetadataRenderer := sload(_editionsMetadataRendererSlot)\n }\n }\n\n function setEditionsMetadataRenderer(address editionsMetadataRenderer) external onlyAdmin {\n assembly {\n sstore(_editionsMetadataRendererSlot, editionsMetadataRenderer)\n }\n }\n\n receive() external payable {}\n\n fallback() external payable {\n assembly {\n let editionsMetadataRenderer := sload(_editionsMetadataRendererSlot)\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), editionsMetadataRenderer, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/drops/proxy/HolographDropERC721Proxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../../abstract/Admin.sol\";\nimport \"../../abstract/Initializable.sol\";\n\nimport \"../../interface/HolographRegistryInterface.sol\";\n\ncontract HolographDropERC721Proxy is Admin, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.contractType')) - 1)\n */\n bytes32 constant _contractTypeSlot = 0x0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c7;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\n */\n bytes32 constant _registrySlot = 0xce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7;\n\n constructor() {}\n\n function init(bytes memory data) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (bytes32 contractType, address registry, bytes memory initCode) = abi.decode(data, (bytes32, address, bytes));\n assembly {\n sstore(_contractTypeSlot, contractType)\n sstore(_registrySlot, registry)\n }\n (bool success, bytes memory returnData) = getHolographDropERC721Source().delegatecall(\n abi.encodeWithSignature(\"init(bytes)\", initCode)\n );\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == Initializable.init.selector, \"initialization failed\");\n\n _setInitialized();\n return Initializable.init.selector;\n }\n\n function getHolographDropERC721Source() public view returns (address) {\n HolographRegistryInterface registry;\n bytes32 contractType;\n assembly {\n registry := sload(_registrySlot)\n contractType := sload(_contractTypeSlot)\n }\n return registry.getContractTypeAddress(contractType);\n }\n\n receive() external payable {}\n\n fallback() external payable {\n address HolographDropERC721Source = getHolographDropERC721Source();\n assembly {\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), HolographDropERC721Source, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/drops/struct/AddressMintDetails.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\n/// @notice Return type of specific mint counts and details per address\nstruct AddressMintDetails {\n /// Number of total mints from the given address\n uint256 totalMints;\n /// Number of presale mints from the given address\n uint256 presaleMints;\n /// Number of public mints from the given address\n uint256 publicMints;\n}\n" + }, + "contracts/drops/struct/Configuration.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {IMetadataRenderer} from \"../interface/IMetadataRenderer.sol\";\n\n/// @notice General configuration for NFT Minting and bookkeeping\nstruct Configuration {\n /// @dev Metadata renderer (uint160)\n IMetadataRenderer metadataRenderer;\n /// @dev Total size of edition that can be minted (uint160+64 = 224)\n uint64 editionSize;\n /// @dev Royalty amount in bps (uint224+16 = 240)\n uint16 royaltyBPS;\n /// @dev Funds recipient for sale (new slot, uint160)\n address payable fundsRecipient;\n}\n" + }, + "contracts/drops/struct/DropsInitializer.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {SalesConfiguration} from \"./SalesConfiguration.sol\";\n\n/// @param erc721TransferHelper Transfer helper contract\n/// @param marketFilterAddress Market filter address - Manage subscription to the for marketplace filtering based off royalty payouts.\n/// @param initialOwner User that owns and can mint the edition, gets royalty and sales payouts and can update the base url if needed.\n/// @param fundsRecipient Wallet/user that receives funds from sale\n/// @param editionSize Number of editions that can be minted in total. If type(uint64).max, unlimited editions can be minted as an open edition.\n/// @param royaltyBPS BPS of the royalty set on the contract. Can be 0 for no royalty.\n/// @param salesConfiguration The initial SalesConfiguration\n/// @param metadataRenderer Renderer contract to use\n/// @param metadataRendererInit Renderer data initial contract\nstruct DropsInitializer {\n address erc721TransferHelper;\n address marketFilterAddress;\n address initialOwner;\n address payable fundsRecipient;\n uint64 editionSize;\n uint16 royaltyBPS;\n bool enableOpenSeaRoyaltyRegistry;\n SalesConfiguration salesConfiguration;\n address metadataRenderer;\n bytes metadataRendererInit;\n}\n" + }, + "contracts/drops/struct/SaleDetails.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\n/// @notice Return value for sales details to use with front-ends\nstruct SaleDetails {\n // Synthesized status variables for sale and presale\n bool publicSaleActive;\n bool presaleActive;\n // Price for public sale\n uint256 publicSalePrice;\n // Timed sale actions for public sale\n uint64 publicSaleStart;\n uint64 publicSaleEnd;\n // Timed sale actions for presale\n uint64 presaleStart;\n uint64 presaleEnd;\n // Merkle root (includes address, quantity, and price data for each entry)\n bytes32 presaleMerkleRoot;\n // Limit public sale to a specific number of mints per wallet\n uint256 maxSalePurchasePerAddress;\n // Information about the rest of the supply\n // Total that have been minted\n uint256 totalMinted;\n // The total supply available\n uint256 maxSupply;\n}\n" + }, + "contracts/drops/struct/SalesConfiguration.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\n/// @notice Sales states and configuration\n/// @dev Uses 3 storage slots\nstruct SalesConfiguration {\n /// @dev Public sale price (max ether value > 1000 ether with this value)\n uint104 publicSalePrice;\n /// @notice Purchase mint limit per address (if set to 0 === unlimited mints)\n /// @dev Max purchase number per txn (90+32 = 122)\n uint32 maxSalePurchasePerAddress;\n /// @dev uint64 type allows for dates into 292 billion years\n /// @notice Public sale start timestamp (136+64 = 186)\n uint64 publicSaleStart;\n /// @notice Public sale end timestamp (186+64 = 250)\n uint64 publicSaleEnd;\n /// @notice Presale start timestamp\n /// @dev new storage slot\n uint64 presaleStart;\n /// @notice Presale end timestamp\n uint64 presaleEnd;\n /// @notice Presale merkle root\n bytes32 presaleMerkleRoot;\n}\n" + }, + "contracts/drops/token/HolographDropERC721.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport {ERC721H} from \"../../abstract/ERC721H.sol\";\nimport {NonReentrant} from \"../../abstract/NonReentrant.sol\";\n\nimport {HolographERC721Interface} from \"../../interface/HolographERC721Interface.sol\";\nimport {HolographerInterface} from \"../../interface/HolographerInterface.sol\";\nimport {HolographInterface} from \"../../interface/HolographInterface.sol\";\n\nimport {AddressMintDetails} from \"../struct/AddressMintDetails.sol\";\nimport {Configuration} from \"../struct/Configuration.sol\";\nimport {DropsInitializer} from \"../struct/DropsInitializer.sol\";\nimport {SaleDetails} from \"../struct/SaleDetails.sol\";\nimport {SalesConfiguration} from \"../struct/SalesConfiguration.sol\";\n\nimport {Address} from \"../library/Address.sol\";\nimport {MerkleProof} from \"../library/MerkleProof.sol\";\n\nimport {IMetadataRenderer} from \"../interface/IMetadataRenderer.sol\";\nimport {IOperatorFilterRegistry} from \"../interface/IOperatorFilterRegistry.sol\";\nimport {IHolographDropERC721} from \"../interface/IHolographDropERC721.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\n\n/**\n * @dev This contract subscribes to the following HolographERC721 events:\n * - beforeSafeTransfer\n * - beforeTransfer\n * - onIsApprovedForAll\n * - customContractURI\n *\n * Do not enable or subscribe to any other events unless you modified your source code for them.\n */\ncontract HolographDropERC721 is NonReentrant, ERC721H, IHolographDropERC721 {\n /**\n * CONTRACT VARIABLES\n * all variables, without custom storage slots, are defined here\n */\n\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.osRegistryEnabled')) - 1)\n */\n bytes32 constant _osRegistryEnabledSlot = 0x5c835f3b6bd322d9a084ffdeac746df2b96cce308e7f0612f4ff4f9c490734cc;\n\n /**\n * @dev Address of the operator filter registry\n */\n IOperatorFilterRegistry public constant openseaOperatorFilterRegistry =\n IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E);\n\n /**\n * @dev Address of the price oracle proxy\n */\n IDropsPriceOracle public constant dropsPriceOracle = IDropsPriceOracle(0xA3Db09EEC42BAfF7A50fb8F9aF90A0e035Ef3302);\n\n /**\n * @dev Internal reference used for minting incremental token ids.\n */\n uint224 private _currentTokenId;\n\n /**\n * @dev HOLOGRAPH transfer helper address for auto-approval\n */\n address public erc721TransferHelper;\n\n /**\n * @dev Address of the market filter registry\n */\n address public marketFilterAddress;\n\n /**\n * @notice Configuration for NFT minting contract storage\n */\n Configuration public config;\n\n /**\n * @notice Sales configuration\n */\n SalesConfiguration public salesConfig;\n\n /**\n * @dev Mapping for presale mint counts by address to allow public mint limit\n */\n mapping(address => uint256) public presaleMintsByAddress;\n\n /**\n * @dev Mapping for presale mint counts by address to allow public mint limit\n */\n mapping(address => uint256) public totalMintsByAddress;\n\n /**\n * CUSTOM ERRORS\n */\n\n /**\n * @notice Thrown when there is no active market filter address supported for the current chain\n * @dev Used for enabling and disabling filter for the given chain.\n */\n error MarketFilterAddressNotSupportedForChain();\n\n /**\n * MODIFIERS\n */\n\n /**\n * @notice Allows user to mint tokens at a quantity\n */\n modifier canMintTokens(uint256 quantity) {\n if (config.editionSize != 0 && quantity + _currentTokenId > config.editionSize) {\n revert Mint_SoldOut();\n }\n\n _;\n }\n\n /**\n * @notice Presale active\n */\n modifier onlyPresaleActive() {\n if (!_presaleActive()) {\n revert Presale_Inactive();\n }\n\n _;\n }\n\n /**\n * @notice Public sale active\n */\n modifier onlyPublicSaleActive() {\n if (!_publicSaleActive()) {\n revert Sale_Inactive();\n }\n\n _;\n }\n\n /**\n * CONTRACT INITIALIZERS\n * init function is used instead of constructor\n */\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n\n DropsInitializer memory initializer = abi.decode(initPayload, (DropsInitializer));\n\n erc721TransferHelper = initializer.erc721TransferHelper;\n if (initializer.marketFilterAddress != address(0)) {\n marketFilterAddress = initializer.marketFilterAddress;\n }\n\n // Setup the owner role\n _setOwner(initializer.initialOwner);\n\n // Setup config variables\n config = Configuration({\n metadataRenderer: IMetadataRenderer(initializer.metadataRenderer),\n editionSize: initializer.editionSize,\n royaltyBPS: initializer.royaltyBPS,\n fundsRecipient: initializer.fundsRecipient\n });\n\n salesConfig = initializer.salesConfiguration;\n\n // TODO: Need to make sure to initialize the metadata renderer\n if (initializer.metadataRenderer != address(0)) {\n IMetadataRenderer(initializer.metadataRenderer).initializeWithData(initializer.metadataRendererInit);\n }\n\n if (initializer.enableOpenSeaRoyaltyRegistry && Address.isContract(address(openseaOperatorFilterRegistry))) {\n if (marketFilterAddress == address(0)) {\n // this is a default filter that can be used for OS royalty filtering\n // marketFilterAddress = 0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6;\n // we just register to OS royalties and let OS handle it for us with their default filter contract\n HolographERC721Interface(holographer()).sourceExternalCall(\n address(openseaOperatorFilterRegistry),\n abi.encodeWithSelector(IOperatorFilterRegistry.register.selector, holographer())\n );\n } else {\n // allow user to specify custom filtering contract address\n HolographERC721Interface(holographer()).sourceExternalCall(\n address(openseaOperatorFilterRegistry),\n abi.encodeWithSelector(\n IOperatorFilterRegistry.registerAndSubscribe.selector,\n holographer(),\n marketFilterAddress\n )\n );\n }\n assembly {\n sstore(_osRegistryEnabledSlot, true)\n }\n }\n\n setStatus(1);\n\n return _init(initPayload);\n }\n\n /**\n * PUBLIC NON STATE CHANGING FUNCTIONS\n * static\n */\n\n /**\n * @notice Returns the version of the contract\n * @dev Used for contract versioning and validation\n * @return version string representing the version of the contract\n */\n function version() external pure returns (string memory) {\n return \"1.0.0\";\n }\n\n function supportsInterface(bytes4 interfaceId) external pure override returns (bool) {\n return interfaceId == type(IHolographDropERC721).interfaceId;\n }\n\n /**\n * PUBLIC NON STATE CHANGING FUNCTIONS\n * dynamic\n */\n\n function owner() external view override(ERC721H, IHolographDropERC721) returns (address) {\n return _getOwner();\n }\n\n function isAdmin(address user) external view returns (bool) {\n return (_getOwner() == user);\n }\n\n function beforeSafeTransfer(\n address _from,\n address /* _to*/,\n uint256 /* _tokenId*/,\n bytes calldata /* _data*/\n ) external view returns (bool) {\n if (\n _from != address(0) && // skip on mints\n _from != msgSender() // skip on transfers from sender\n ) {\n bool osRegistryEnabled;\n assembly {\n osRegistryEnabled := sload(_osRegistryEnabledSlot)\n }\n if (osRegistryEnabled) {\n try openseaOperatorFilterRegistry.isOperatorAllowed(address(this), msgSender()) returns (bool allowed) {\n return allowed;\n } catch {\n revert OperatorNotAllowed(msgSender());\n }\n }\n }\n return true;\n }\n\n function beforeTransfer(\n address _from,\n address /* _to*/,\n uint256 /* _tokenId*/,\n bytes calldata /* _data*/\n ) external view returns (bool) {\n if (\n _from != address(0) && // skip on mints\n _from != msgSender() // skip on transfers from sender\n ) {\n bool osRegistryEnabled;\n assembly {\n osRegistryEnabled := sload(_osRegistryEnabledSlot)\n }\n if (osRegistryEnabled) {\n try openseaOperatorFilterRegistry.isOperatorAllowed(address(this), msgSender()) returns (bool allowed) {\n return allowed;\n } catch {\n revert OperatorNotAllowed(msgSender());\n }\n }\n }\n return true;\n }\n\n function onIsApprovedForAll(address /* _wallet*/, address _operator) external view returns (bool approved) {\n approved = (erc721TransferHelper != address(0) && _operator == erc721TransferHelper);\n }\n\n /**\n * @notice Sale details\n * @return SaleDetails sale information details\n */\n function saleDetails() external view returns (SaleDetails memory) {\n return\n SaleDetails({\n publicSaleActive: _publicSaleActive(),\n presaleActive: _presaleActive(),\n publicSalePrice: salesConfig.publicSalePrice,\n publicSaleStart: salesConfig.publicSaleStart,\n publicSaleEnd: salesConfig.publicSaleEnd,\n presaleStart: salesConfig.presaleStart,\n presaleEnd: salesConfig.presaleEnd,\n presaleMerkleRoot: salesConfig.presaleMerkleRoot,\n totalMinted: _currentTokenId,\n maxSupply: config.editionSize,\n maxSalePurchasePerAddress: salesConfig.maxSalePurchasePerAddress\n });\n }\n\n /**\n * @dev Number of NFTs the user has minted per address\n * @param minter to get counts for\n */\n function mintedPerAddress(address minter) external view returns (AddressMintDetails memory) {\n return\n AddressMintDetails({\n presaleMints: presaleMintsByAddress[minter],\n publicMints: totalMintsByAddress[minter] - presaleMintsByAddress[minter],\n totalMints: totalMintsByAddress[minter]\n });\n }\n\n /**\n * @notice Contract URI Getter, proxies to metadataRenderer\n * @return Contract URI\n */\n function contractURI() external view returns (string memory) {\n return config.metadataRenderer.contractURI();\n }\n\n /**\n * @notice Getter for metadataRenderer contract\n */\n function metadataRenderer() external view returns (IMetadataRenderer) {\n return IMetadataRenderer(config.metadataRenderer);\n }\n\n /**\n * @notice Convert USD price to current price in native Ether\n */\n function getNativePrice() external view returns (uint256) {\n return _usdToWei(salesConfig.publicSalePrice);\n }\n\n /**\n * @notice Returns the name of the token through the holographer entrypoint\n */\n function name() external view returns (string memory) {\n return HolographERC721Interface(holographer()).name();\n }\n\n /**\n * @notice Token URI Getter, proxies to metadataRenderer\n * @param tokenId id of token to get URI for\n * @return Token URI\n */\n function tokenURI(uint256 tokenId) external view returns (string memory) {\n HolographERC721Interface H721 = HolographERC721Interface(holographer());\n require(H721.exists(tokenId), \"ERC721: token does not exist\");\n\n return config.metadataRenderer.tokenURI(tokenId);\n }\n\n /**\n * PUBLIC STATE CHANGING FUNCTIONS\n * available to all\n */\n\n function multicall(bytes[] memory data) public returns (bytes[] memory results) {\n results = new bytes[](data.length);\n for (uint256 i = 0; i < data.length; i++) {\n results[i] = Address.functionDelegateCall(address(this), abi.encodePacked(data[i], msgSender()));\n }\n }\n\n /**\n * @dev This allows the user to purchase/mint a edition at the given price in the contract.\n */\n function purchase(\n uint256 quantity\n ) external payable nonReentrant canMintTokens(quantity) onlyPublicSaleActive returns (uint256) {\n uint256 salePrice = _usdToWei(salesConfig.publicSalePrice);\n\n if (msg.value < salePrice * quantity) {\n revert Purchase_WrongPrice(salesConfig.publicSalePrice * quantity);\n }\n uint256 remainder = msg.value - (salePrice * quantity);\n\n // If max purchase per address == 0 there is no limit.\n // Any other number, the per address mint limit is that.\n if (\n salesConfig.maxSalePurchasePerAddress != 0 &&\n totalMintsByAddress[msgSender()] + quantity - presaleMintsByAddress[msgSender()] >\n salesConfig.maxSalePurchasePerAddress\n ) {\n revert Purchase_TooManyForAddress();\n }\n\n _mintNFTs(msgSender(), quantity);\n\n HolographERC721Interface H721 = HolographERC721Interface(holographer());\n uint256 chainPrepend = H721.sourceGetChainPrepend();\n uint256 firstMintedTokenId = (chainPrepend + uint256(_currentTokenId - quantity)) + 1;\n\n emit Sale({\n to: msgSender(),\n quantity: quantity,\n pricePerToken: salePrice,\n firstPurchasedTokenId: firstMintedTokenId\n });\n\n if (remainder > 0) {\n msgSender().call{value: remainder, gas: gasleft() > 210_000 ? 210_000 : gasleft()}(\"\");\n }\n\n return firstMintedTokenId;\n }\n\n /**\n * @notice Merkle-tree based presale purchase function\n * @param quantity quantity to purchase\n * @param maxQuantity max quantity that can be purchased via merkle proof #\n * @param pricePerToken price that each token is purchased at\n * @param merkleProof proof for presale mint\n */\n function purchasePresale(\n uint256 quantity,\n uint256 maxQuantity,\n uint256 pricePerToken,\n bytes32[] calldata merkleProof\n ) external payable nonReentrant canMintTokens(quantity) onlyPresaleActive returns (uint256) {\n if (\n !MerkleProof.verify(\n merkleProof,\n salesConfig.presaleMerkleRoot,\n keccak256(\n // address, uint256, uint256\n abi.encode(msgSender(), maxQuantity, pricePerToken)\n )\n )\n ) {\n revert Presale_MerkleNotApproved();\n }\n\n uint256 weiPricePerToken = _usdToWei(pricePerToken);\n if (msg.value < weiPricePerToken * quantity) {\n revert Purchase_WrongPrice(pricePerToken * quantity);\n }\n uint256 remainder = msg.value - (weiPricePerToken * quantity);\n\n presaleMintsByAddress[msgSender()] += quantity;\n if (presaleMintsByAddress[msgSender()] > maxQuantity) {\n revert Presale_TooManyForAddress();\n }\n\n _mintNFTs(msgSender(), quantity);\n\n HolographERC721Interface H721 = HolographERC721Interface(holographer());\n uint256 chainPrepend = H721.sourceGetChainPrepend();\n uint256 firstMintedTokenId = (chainPrepend + uint256(_currentTokenId - quantity)) + 1;\n\n emit Sale({\n to: msgSender(),\n quantity: quantity,\n pricePerToken: weiPricePerToken,\n firstPurchasedTokenId: firstMintedTokenId\n });\n\n if (remainder > 0) {\n msgSender().call{value: remainder, gas: gasleft() > 210_000 ? 210_000 : gasleft()}(\"\");\n }\n\n return firstMintedTokenId;\n }\n\n /**\n * PUBLIC STATE CHANGING FUNCTIONS\n * admin only\n */\n\n /**\n * @notice Proxy to update market filter settings in the main registry contracts\n * @notice Requires admin permissions\n * @param args Calldata args to pass to the registry\n */\n function updateMarketFilterSettings(bytes calldata args) external onlyOwner {\n HolographERC721Interface(holographer()).sourceExternalCall(address(openseaOperatorFilterRegistry), args);\n bool osRegistryEnabled = openseaOperatorFilterRegistry.isRegistered(holographer());\n assembly {\n sstore(_osRegistryEnabledSlot, osRegistryEnabled)\n }\n }\n\n /**\n * @notice Manage subscription for marketplace filtering based off royalty payouts.\n * @param enable Enable filtering to non-royalty payout marketplaces\n */\n function manageMarketFilterSubscription(bool enable) external onlyOwner {\n address self = holographer();\n if (marketFilterAddress == address(0)) {\n revert MarketFilterAddressNotSupportedForChain();\n }\n if (!openseaOperatorFilterRegistry.isRegistered(self) && enable) {\n HolographERC721Interface(self).sourceExternalCall(\n address(openseaOperatorFilterRegistry),\n abi.encodeWithSelector(IOperatorFilterRegistry.registerAndSubscribe.selector, self, marketFilterAddress)\n );\n } else if (enable) {\n HolographERC721Interface(self).sourceExternalCall(\n address(openseaOperatorFilterRegistry),\n abi.encodeWithSelector(IOperatorFilterRegistry.subscribe.selector, self, marketFilterAddress)\n );\n } else {\n HolographERC721Interface(self).sourceExternalCall(\n address(openseaOperatorFilterRegistry),\n abi.encodeWithSelector(IOperatorFilterRegistry.unsubscribe.selector, self, false)\n );\n HolographERC721Interface(self).sourceExternalCall(\n address(openseaOperatorFilterRegistry),\n abi.encodeWithSelector(IOperatorFilterRegistry.unregister.selector, self)\n );\n }\n bool osRegistryEnabled = openseaOperatorFilterRegistry.isRegistered(self);\n assembly {\n sstore(_osRegistryEnabledSlot, osRegistryEnabled)\n }\n }\n\n function modifyMarketFilterAddress(address newMarketFilterAddress) external onlyOwner {\n marketFilterAddress = newMarketFilterAddress;\n }\n\n /**\n * @notice Admin mint tokens to a recipient for free\n * @param recipient recipient to mint to\n * @param quantity quantity to mint\n */\n function adminMint(address recipient, uint256 quantity) external onlyOwner canMintTokens(quantity) returns (uint256) {\n _mintNFTs(recipient, quantity);\n\n return _currentTokenId;\n }\n\n /**\n * @dev Mints multiple editions to the given list of addresses.\n * @param recipients list of addresses to send the newly minted editions to\n */\n function adminMintAirdrop(\n address[] calldata recipients\n ) external onlyOwner canMintTokens(recipients.length) returns (uint256) {\n unchecked {\n for (uint256 i = 0; i < recipients.length; i++) {\n _mintNFTs(recipients[i], 1);\n }\n }\n\n return _currentTokenId;\n }\n\n /**\n * @notice Set a new metadata renderer\n * @param newRenderer new renderer address to use\n * @param setupRenderer data to setup new renderer with\n */\n function setMetadataRenderer(IMetadataRenderer newRenderer, bytes memory setupRenderer) external onlyOwner {\n config.metadataRenderer = newRenderer;\n\n if (setupRenderer.length > 0) {\n newRenderer.initializeWithData(setupRenderer);\n }\n\n emit UpdatedMetadataRenderer({sender: msgSender(), renderer: newRenderer});\n }\n\n /**\n * @dev This sets the sales configuration\n * @param publicSalePrice New public sale price\n * @param maxSalePurchasePerAddress Max # of purchases (public) per address allowed\n * @param publicSaleStart unix timestamp when the public sale starts\n * @param publicSaleEnd unix timestamp when the public sale ends (set to 0 to disable)\n * @param presaleStart unix timestamp when the presale starts\n * @param presaleEnd unix timestamp when the presale ends\n * @param presaleMerkleRoot merkle root for the presale information\n */\n function setSaleConfiguration(\n uint104 publicSalePrice,\n uint32 maxSalePurchasePerAddress,\n uint64 publicSaleStart,\n uint64 publicSaleEnd,\n uint64 presaleStart,\n uint64 presaleEnd,\n bytes32 presaleMerkleRoot\n ) external onlyOwner {\n salesConfig.publicSalePrice = publicSalePrice;\n salesConfig.maxSalePurchasePerAddress = maxSalePurchasePerAddress;\n salesConfig.publicSaleStart = publicSaleStart;\n salesConfig.publicSaleEnd = publicSaleEnd;\n salesConfig.presaleStart = presaleStart;\n salesConfig.presaleEnd = presaleEnd;\n salesConfig.presaleMerkleRoot = presaleMerkleRoot;\n\n emit SalesConfigChanged(msgSender());\n }\n\n /**\n * @notice Set a different funds recipient\n * @param newRecipientAddress new funds recipient address\n */\n function setFundsRecipient(address payable newRecipientAddress) external onlyOwner {\n if (newRecipientAddress == address(0)) {\n revert(\"Funds Recipient cannot be 0 address\");\n }\n config.fundsRecipient = newRecipientAddress;\n emit FundsRecipientChanged(newRecipientAddress, msgSender());\n }\n\n /**\n * @notice This withdraws ETH from the contract to the contract owner.\n */\n function withdraw() external override nonReentrant {\n if (config.fundsRecipient == address(0)) {\n revert(\"Funds Recipient address not set\");\n }\n address sender = msgSender();\n\n // Get fee amount\n uint256 funds = address(this).balance;\n address payable feeRecipient = payable(\n HolographInterface(HolographerInterface(holographer()).getHolograph()).getTreasury()\n );\n // for now set it to 0 since there is no fee\n uint256 holographFee = 0;\n\n // Check if withdraw is allowed for sender\n if (sender != config.fundsRecipient && sender != _getOwner() && sender != feeRecipient) {\n revert Access_WithdrawNotAllowed();\n }\n\n // Payout HOLOGRAPH fee\n if (holographFee > 0) {\n (bool successFee, ) = feeRecipient.call{value: holographFee, gas: 210_000}(\"\");\n if (!successFee) {\n revert Withdraw_FundsSendFailure();\n }\n funds -= holographFee;\n }\n\n // Payout recipient\n (bool successFunds, ) = config.fundsRecipient.call{value: funds, gas: 210_000}(\"\");\n if (!successFunds) {\n revert Withdraw_FundsSendFailure();\n }\n\n // Emit event for indexing\n emit FundsWithdrawn(sender, config.fundsRecipient, funds, feeRecipient, holographFee);\n }\n\n /**\n * @notice Admin function to finalize and open edition sale\n */\n function finalizeOpenEdition() external onlyOwner {\n if (config.editionSize != type(uint64).max) {\n revert Admin_UnableToFinalizeNotOpenEdition();\n }\n\n config.editionSize = uint64(_currentTokenId);\n emit OpenMintFinalized(msgSender(), config.editionSize);\n }\n\n /**\n * INTERNAL FUNCTIONS\n * non state changing\n */\n\n function _presaleActive() internal view returns (bool) {\n return salesConfig.presaleStart <= block.timestamp && salesConfig.presaleEnd > block.timestamp;\n }\n\n function _publicSaleActive() internal view returns (bool) {\n return salesConfig.publicSaleStart <= block.timestamp && salesConfig.publicSaleEnd > block.timestamp;\n }\n\n function _usdToWei(uint256 amount) internal view returns (uint256 weiAmount) {\n if (amount == 0) {\n return 0;\n }\n weiAmount = dropsPriceOracle.convertUsdToWei(amount);\n }\n\n /**\n * INTERNAL FUNCTIONS\n * state changing\n */\n\n function _mintNFTs(address recipient, uint256 quantity) internal {\n HolographERC721Interface H721 = HolographERC721Interface(holographer());\n uint256 chainPrepend = H721.sourceGetChainPrepend();\n uint224 tokenId = 0;\n for (uint256 i = 0; i < quantity; i++) {\n _currentTokenId += 1;\n while (\n H721.exists(chainPrepend + uint256(_currentTokenId)) || H721.burned(chainPrepend + uint256(_currentTokenId))\n ) {\n _currentTokenId += 1;\n }\n tokenId = _currentTokenId;\n H721.sourceMint(recipient, tokenId);\n // uint256 id = chainPrepend + uint256(tokenId);\n }\n }\n\n fallback() external payable override {\n assembly {\n // Allocate memory for the error message\n let errorMsg := mload(0x40)\n\n // Error message: \"Function not found\", properly padded with zeroes\n mstore(errorMsg, 0x46756e6374696f6e206e6f7420666f756e640000000000000000000000000000)\n\n // Revert with the error message\n revert(errorMsg, 20) // 20 is the length of the error message in bytes\n }\n }\n}\n" + }, + "contracts/drops/utils/NFTMetadataRenderer.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nlibrary Math {\n enum Rounding {\n Down, // Toward negative infinity\n Up, // Toward infinity\n Zero // Toward zero\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds up instead\n * of rounding down.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b - 1) / b can overflow on addition, so we distribute.\n return a == 0 ? 0 : (a - 1) / b + 1;\n }\n\n /**\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\n * with further edits by Uniswap Labs also under MIT license.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\n unchecked {\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = prod1 * 2^256 + prod0.\n uint256 prod0; // Least significant 256 bits of the product\n uint256 prod1; // Most significant 256 bits of the product\n assembly {\n let mm := mulmod(x, y, not(0))\n prod0 := mul(x, y)\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n }\n\n // Handle non-overflow cases, 256 by 256 division.\n if (prod1 == 0) {\n return prod0 / denominator;\n }\n\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\n require(denominator > prod1);\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [prod1 prod0].\n uint256 remainder;\n assembly {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n prod1 := sub(prod1, gt(remainder, prod0))\n prod0 := sub(prod0, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\n // See https://cs.stackexchange.com/q/138556/92363.\n\n // Does not overflow because the denominator cannot be zero at this stage in the function.\n uint256 twos = denominator & (~denominator + 1);\n assembly {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [prod1 prod0] by twos.\n prod0 := div(prod0, twos)\n\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from prod1 into prod0.\n prod0 |= prod1 * twos;\n\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv = 1 mod 2^4.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\n // in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\n // is no longer required.\n result = prod0 * inverse;\n return result;\n }\n }\n\n /**\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\n uint256 result = mulDiv(x, y, denominator);\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\n result += 1;\n }\n return result;\n }\n\n /**\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 128;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 64;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 32;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 16;\n }\n if (value >> 8 > 0) {\n value >>= 8;\n result += 8;\n }\n if (value >> 4 > 0) {\n value >>= 4;\n result += 4;\n }\n if (value >> 2 > 0) {\n value >>= 2;\n result += 2;\n }\n if (value >> 1 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log2(value);\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10 ** 64) {\n value /= 10 ** 64;\n result += 64;\n }\n if (value >= 10 ** 32) {\n value /= 10 ** 32;\n result += 32;\n }\n if (value >= 10 ** 16) {\n value /= 10 ** 16;\n result += 16;\n }\n if (value >= 10 ** 8) {\n value /= 10 ** 8;\n result += 8;\n }\n if (value >= 10 ** 4) {\n value /= 10 ** 4;\n result += 4;\n }\n if (value >= 10 ** 2) {\n value /= 10 ** 2;\n result += 2;\n }\n if (value >= 10 ** 1) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log10(value);\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256, rounded down, of a positive value.\n * Returns 0 if given 0.\n *\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n */\n function log256(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 16;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 8;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 4;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 2;\n }\n if (value >> 8 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log256(value);\n return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);\n }\n }\n}\n\nlibrary Strings {\n bytes16 private constant _SYMBOLS = \"0123456789abcdef\";\n uint8 private constant _ADDRESS_LENGTH = 20;\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n unchecked {\n uint256 length = Math.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n /// @solidity memory-safe-assembly\n assembly {\n ptr := add(buffer, add(32, length))\n }\n while (true) {\n ptr--;\n /// @solidity memory-safe-assembly\n assembly {\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n unchecked {\n return toHexString(value, Math.log256(value) + 1);\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\n }\n}\n\nlibrary Base64 {\n /**\n * @dev Base64 Encoding/Decoding Table\n */\n string internal constant _TABLE = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\n\n /**\n * @dev Converts a `bytes` to its Bytes64 `string` representation.\n */\n function encode(bytes memory data) internal pure returns (string memory) {\n /**\n * Inspired by Brecht Devos (Brechtpd) implementation - MIT licence\n * https://github.com/Brechtpd/base64/blob/e78d9fd951e7b0977ddca77d92dc85183770daf4/base64.sol\n */\n if (data.length == 0) return \"\";\n\n // Loads the table into memory\n string memory table = _TABLE;\n\n // Encoding takes 3 bytes chunks of binary data from `bytes` data parameter\n // and split into 4 numbers of 6 bits.\n // The final Base64 length should be `bytes` data length multiplied by 4/3 rounded up\n // - `data.length + 2` -> Round up\n // - `/ 3` -> Number of 3-bytes chunks\n // - `4 *` -> 4 characters for each chunk\n string memory result = new string(4 * ((data.length + 2) / 3));\n\n /// @solidity memory-safe-assembly\n assembly {\n // Prepare the lookup table (skip the first \"length\" byte)\n let tablePtr := add(table, 1)\n\n // Prepare result pointer, jump over length\n let resultPtr := add(result, 32)\n\n // Run over the input, 3 bytes at a time\n for {\n let dataPtr := data\n let endPtr := add(data, mload(data))\n } lt(dataPtr, endPtr) {\n\n } {\n // Advance 3 bytes\n dataPtr := add(dataPtr, 3)\n let input := mload(dataPtr)\n\n // To write each character, shift the 3 bytes (18 bits) chunk\n // 4 times in blocks of 6 bits for each character (18, 12, 6, 0)\n // and apply logical AND with 0x3F which is the number of\n // the previous character in the ASCII table prior to the Base64 Table\n // The result is then added to the table to get the character to write,\n // and finally write it in the result pointer but with a left shift\n // of 256 (1 byte) - 8 (1 ASCII char) = 248 bits\n\n mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F))))\n resultPtr := add(resultPtr, 1) // Advance\n\n mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F))))\n resultPtr := add(resultPtr, 1) // Advance\n\n mstore8(resultPtr, mload(add(tablePtr, and(shr(6, input), 0x3F))))\n resultPtr := add(resultPtr, 1) // Advance\n\n mstore8(resultPtr, mload(add(tablePtr, and(input, 0x3F))))\n resultPtr := add(resultPtr, 1) // Advance\n }\n\n // When data `bytes` is not exactly 3 bytes long\n // it is padded with `=` characters at the end\n switch mod(mload(data), 3)\n case 1 {\n mstore8(sub(resultPtr, 1), 0x3d)\n mstore8(sub(resultPtr, 2), 0x3d)\n }\n case 2 {\n mstore8(sub(resultPtr, 1), 0x3d)\n }\n }\n\n return result;\n }\n}\n\n/// NFT metadata library for rendering metadata associated with editions\nlibrary NFTMetadataRenderer {\n /// Generate edition metadata from storage information as base64-json blob\n /// Combines the media data and metadata\n /// @param name Name of NFT in metadata\n /// @param description Description of NFT in metadata\n /// @param imageURI URI of image to render for edition\n /// @param animationURI URI of animation to render for edition\n /// @param tokenOfEdition Token ID for specific token\n /// @param editionSize Size of entire edition to show\n function createMetadataEdition(\n string memory name,\n string memory description,\n string memory imageURI,\n string memory animationURI,\n uint256 tokenOfEdition,\n uint256 editionSize\n ) internal pure returns (string memory) {\n string memory _tokenMediaData = tokenMediaData(imageURI, animationURI);\n bytes memory json = createMetadataJSON(name, description, _tokenMediaData, tokenOfEdition, editionSize);\n return encodeMetadataJSON(json);\n }\n\n function encodeContractURIJSON(\n string memory name,\n string memory description,\n string memory imageURI,\n string memory animationURI,\n uint256 royaltyBPS,\n address royaltyRecipient\n ) internal pure returns (string memory) {\n bytes memory imageSpace = bytes(\"\");\n if (bytes(imageURI).length > 0) {\n imageSpace = abi.encodePacked('\", \"image\": \"', imageURI);\n }\n bytes memory animationSpace = bytes(\"\");\n if (bytes(animationURI).length > 0) {\n animationSpace = abi.encodePacked('\", \"animation_url\": \"', animationURI);\n }\n\n return\n string(\n encodeMetadataJSON(\n abi.encodePacked(\n '{\"name\": \"',\n name,\n '\", \"description\": \"',\n description,\n // this is for opensea since they don't respect ERC2981 right now\n '\", \"seller_fee_basis_points\": ',\n Strings.toString(royaltyBPS),\n ', \"fee_recipient\": \"',\n Strings.toHexString(uint256(uint160(royaltyRecipient)), 20),\n imageSpace,\n animationSpace,\n '\"}'\n )\n )\n );\n }\n\n /// Function to create the metadata json string for the nft edition\n /// @param name Name of NFT in metadata\n /// @param description Description of NFT in metadata\n /// @param mediaData Data for media to include in json object\n /// @param tokenOfEdition Token ID for specific token\n /// @param editionSize Size of entire edition to show\n function createMetadataJSON(\n string memory name,\n string memory description,\n string memory mediaData,\n uint256 tokenOfEdition,\n uint256 editionSize\n ) internal pure returns (bytes memory) {\n bytes memory editionSizeText;\n if (editionSize > 0) {\n editionSizeText = abi.encodePacked(\"/\", Strings.toString(editionSize));\n }\n return\n abi.encodePacked(\n '{\"name\": \"',\n name,\n \" \",\n Strings.toString(tokenOfEdition),\n editionSizeText,\n '\", \"',\n 'description\": \"',\n description,\n '\", \"',\n mediaData,\n 'properties\": {\"number\": ',\n Strings.toString(tokenOfEdition),\n ', \"name\": \"',\n name,\n '\"}}'\n );\n }\n\n /// Encodes the argument json bytes into base64-data uri format\n /// @param json Raw json to base64 and turn into a data-uri\n function encodeMetadataJSON(bytes memory json) internal pure returns (string memory) {\n return string(abi.encodePacked(\"data:application/json;base64,\", Base64.encode(json)));\n }\n\n /// Generates edition metadata from storage information as base64-json blob\n /// Combines the media data and metadata\n /// @param imageUrl URL of image to render for edition\n /// @param animationUrl URL of animation to render for edition\n function tokenMediaData(string memory imageUrl, string memory animationUrl) internal pure returns (string memory) {\n bool hasImage = bytes(imageUrl).length > 0;\n bool hasAnimation = bytes(animationUrl).length > 0;\n if (hasImage && hasAnimation) {\n return string(abi.encodePacked('image\": \"', imageUrl, '\", \"animation_url\": \"', animationUrl, '\", \"'));\n }\n if (hasImage) {\n return string(abi.encodePacked('image\": \"', imageUrl, '\", \"'));\n }\n if (hasAnimation) {\n return string(abi.encodePacked('animation_url\": \"', animationUrl, '\", \"'));\n }\n\n return \"\";\n }\n}\n" + }, + "contracts/enforcer/Holographer.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\n\nimport \"../interface/HolographInterface.sol\";\nimport \"../interface/HolographerInterface.sol\";\nimport \"../interface/HolographRegistryInterface.sol\";\nimport \"../interface/InitializableInterface.sol\";\n\n/**\n * @dev This contract is a binder. It puts together all the variables to make the underlying contracts functional and be bridgeable.\n */\ncontract Holographer is Admin, Initializable, HolographerInterface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.originChain')) - 1)\n */\n bytes32 constant _originChainSlot = 0xd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\n */\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.contractType')) - 1)\n */\n bytes32 constant _contractTypeSlot = 0x0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c7;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.sourceContract')) - 1)\n */\n bytes32 constant _sourceContractSlot = 0x27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b074;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.blockHeight')) - 1)\n */\n bytes32 constant _blockHeightSlot = 0x9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de3;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPHER: already initialized\");\n (bytes memory encoded, bytes memory initCode) = abi.decode(initPayload, (bytes, bytes));\n (uint32 originChain, address holograph, bytes32 contractType, address sourceContract) = abi.decode(\n encoded,\n (uint32, address, bytes32, address)\n );\n assembly {\n sstore(_adminSlot, caller())\n sstore(_blockHeightSlot, number())\n sstore(_contractTypeSlot, contractType)\n sstore(_holographSlot, holograph)\n sstore(_originChainSlot, originChain)\n sstore(_sourceContractSlot, sourceContract)\n }\n (bool success, bytes memory returnData) = HolographRegistryInterface(HolographInterface(holograph).getRegistry())\n .getReservedContractTypeAddress(contractType)\n .delegatecall(abi.encodeWithSelector(InitializableInterface.init.selector, initCode));\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == InitializableInterface.init.selector, \"HOLOGRAPH: initialization failed\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @dev Returns the contract type that is used for loading the Enforcer\n */\n function getContractType() external view returns (bytes32 contractType) {\n assembly {\n contractType := sload(_contractTypeSlot)\n }\n }\n\n /**\n * @dev Returns the block height of when the smart contract was deployed. Useful for retrieving deployment config for re-deployment on other EVM-compatible chains.\n */\n function getDeploymentBlock() external view returns (uint256 deploymentBlock) {\n assembly {\n deploymentBlock := sload(_blockHeightSlot)\n }\n }\n\n /**\n * @dev Returns a hardcoded address for the Holograph smart contract.\n */\n function getHolograph() external view returns (address holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n /**\n * @dev Returns a hardcoded address for the Holograph smart contract that controls and enforces the ERC standards.\n */\n function getHolographEnforcer() public view returns (address) {\n HolographInterface holograph;\n bytes32 contractType;\n assembly {\n holograph := sload(_holographSlot)\n contractType := sload(_contractTypeSlot)\n }\n return HolographRegistryInterface(holograph.getRegistry()).getReservedContractTypeAddress(contractType);\n }\n\n /**\n * @dev Returns the original chain that contract was deployed on.\n */\n function getOriginChain() external view returns (uint32 originChain) {\n assembly {\n originChain := sload(_originChainSlot)\n }\n }\n\n /**\n * @dev Returns a hardcoded address for the custom secure storage contract deployed in parallel with this contract deployment.\n */\n function getSourceContract() external view returns (address sourceContract) {\n assembly {\n sourceContract := sload(_sourceContractSlot)\n }\n }\n\n /**\n * @dev Purposefully left empty, to prevent running out of gas errors when receiving native token payments.\n */\n receive() external payable {}\n\n /**\n * @dev This takes the Enforcer's source code, runs it, and uses current address for storage slots.\n */\n fallback() external payable {\n address holographEnforcer = getHolographEnforcer();\n assembly {\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), holographEnforcer, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/enforcer/HolographERC20.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/EIP712.sol\";\nimport \"../abstract/Initializable.sol\";\nimport \"../abstract/NonReentrant.sol\";\nimport \"../abstract/Owner.sol\";\n\nimport \"../enum/HolographERC20Event.sol\";\nimport \"../enum/InterfaceType.sol\";\n\nimport \"../interface/ERC20.sol\";\nimport \"../interface/ERC20Burnable.sol\";\nimport \"../interface/HolographERC20Interface.sol\";\nimport \"../interface/ERC20Metadata.sol\";\nimport \"../interface/ERC20Permit.sol\";\nimport \"../interface/ERC20Receiver.sol\";\nimport \"../interface/ERC20Safer.sol\";\nimport \"../interface/ERC165.sol\";\nimport \"../interface/Holographable.sol\";\nimport \"../interface/HolographedERC20.sol\";\nimport \"../interface/HolographInterface.sol\";\nimport \"../interface/HolographerInterface.sol\";\nimport \"../interface/HolographRegistryInterface.sol\";\nimport \"../interface/InitializableInterface.sol\";\nimport \"../interface/HolographInterfacesInterface.sol\";\nimport \"../interface/Ownable.sol\";\n\n/**\n * @title Holograph Bridgeable ERC-20 Token\n * @author Holograph Foundation\n * @notice A smart contract for minting and managing Holograph Bridgeable ERC20 Tokens.\n * @dev The entire logic and functionality of the smart contract is self-contained.\n */\ncontract HolographERC20 is Admin, Owner, Initializable, NonReentrant, EIP712, HolographERC20Interface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\n */\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.sourceContract')) - 1)\n */\n bytes32 constant _sourceContractSlot = 0x27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b074;\n\n /**\n * @dev Configuration for events to trigger for source smart contract.\n */\n uint256 private _eventConfig;\n\n /**\n * @dev Mapping of all the addresse's balances.\n */\n mapping(address => uint256) private _balances;\n\n /**\n * @dev Mapping of all authorized operators, and capped amounts.\n */\n mapping(address => mapping(address => uint256)) private _allowances;\n\n /**\n * @dev Total number of token in circulation.\n */\n uint256 private _totalSupply;\n\n /**\n * @dev Token name.\n */\n string private _name;\n\n /**\n * @dev Token ticker symbol.\n */\n string private _symbol;\n\n /**\n * @dev Token number of decimal places.\n */\n uint8 private _decimals;\n\n /**\n * @dev List of used up nonces. Used in the ERC20Permit interface functionality.\n */\n mapping(address => uint256) private _nonces;\n\n /**\n * @notice Only allow calls from bridge smart contract.\n */\n modifier onlyBridge() {\n require(msg.sender == _holograph().getBridge(), \"ERC20: bridge only call\");\n _;\n }\n\n /**\n * @notice Only allow calls from source smart contract.\n */\n modifier onlySource() {\n address sourceContract;\n assembly {\n sourceContract := sload(_sourceContractSlot)\n }\n require(msg.sender == sourceContract, \"ERC20: source only call\");\n _;\n }\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"ERC20: already initialized\");\n InitializableInterface sourceContract;\n assembly {\n sstore(_reentrantSlot, 0x0000000000000000000000000000000000000000000000000000000000000001)\n sstore(_ownerSlot, caller())\n sourceContract := sload(_sourceContractSlot)\n }\n (\n string memory contractName,\n string memory contractSymbol,\n uint8 contractDecimals,\n uint256 eventConfig,\n string memory domainSeperator,\n string memory domainVersion,\n bool skipInit,\n bytes memory initCode\n ) = abi.decode(initPayload, (string, string, uint8, uint256, string, string, bool, bytes));\n _name = contractName;\n _symbol = contractSymbol;\n _decimals = contractDecimals;\n _eventConfig = eventConfig;\n if (!skipInit) {\n require(sourceContract.init(initCode) == InitializableInterface.init.selector, \"ERC20: could not init source\");\n }\n _setInitialized();\n _eip712_init(domainSeperator, domainVersion);\n return InitializableInterface.init.selector;\n }\n\n /**\n * @dev Purposefully left empty, to prevent running out of gas errors when receiving native token payments.\n */\n receive() external payable {}\n\n /**\n * @notice Fallback to the source contract.\n * @dev Any function call that is not covered here, will automatically be sent over to the source contract.\n */\n fallback() external payable {\n assembly {\n calldatacopy(0, 0, calldatasize())\n mstore(calldatasize(), caller())\n let result := call(gas(), sload(_sourceContractSlot), callvalue(), 0, add(calldatasize(), 0x20), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /*\n * @dev all calls to source contract go through this function in order to inject original msg.sender in calldata\n */\n function _sourceCall(bytes memory payload) private returns (bool output) {\n assembly {\n mstore(add(payload, add(mload(payload), 0x20)), caller())\n // offset memory position by 32 bytes to skip the 32 bytes where bytes length is stored\n // add 32 bytes to bytes length to include the appended msg.sender to calldata\n let result := call(\n gas(),\n sload(_sourceContractSlot),\n callvalue(),\n add(payload, 0x20),\n add(mload(payload), 0x20),\n 0,\n 0\n )\n let pos := mload(0x40)\n // reserve memory space for return data\n mstore(0x40, add(pos, returndatasize()))\n returndatacopy(pos, 0, returndatasize())\n switch result\n case 0 {\n revert(pos, returndatasize())\n }\n output := mload(pos)\n }\n }\n\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n /**\n * @dev Although EIP-165 is not required for ERC20 contracts, we still decided to implement it.\n *\n * This makes it easier for external smart contracts to easily identify a valid ERC20 token contract.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool) {\n HolographInterfacesInterface interfaces = HolographInterfacesInterface(_interfaces());\n ERC165 erc165Contract;\n assembly {\n erc165Contract := sload(_sourceContractSlot)\n }\n if (\n interfaces.supportsInterface(InterfaceType.ERC20, interfaceId) || erc165Contract.supportsInterface(interfaceId) // check global interfaces // check if source supports interface\n ) {\n return true;\n } else {\n return false;\n }\n }\n\n function allowance(address account, address spender) public view returns (uint256) {\n return _allowances[account][spender];\n }\n\n function balanceOf(address account) public view returns (uint256) {\n return _balances[account];\n }\n\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() public view returns (bytes32) {\n return _domainSeparatorV4();\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function nonces(address account) public view returns (uint256) {\n return _nonces[account];\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function totalSupply() public view returns (uint256) {\n return _totalSupply;\n }\n\n function approve(address spender, uint256 amount) public returns (bool) {\n if (_isEventRegistered(HolographERC20Event.beforeApprove)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC20.beforeApprove.selector, msg.sender, spender, amount))\n );\n }\n _approve(msg.sender, spender, amount);\n if (_isEventRegistered(HolographERC20Event.afterApprove)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC20.afterApprove.selector, msg.sender, spender, amount)));\n }\n return true;\n }\n\n function burn(uint256 amount) public {\n if (_isEventRegistered(HolographERC20Event.beforeBurn)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC20.beforeBurn.selector, msg.sender, amount)));\n }\n _burn(msg.sender, amount);\n if (_isEventRegistered(HolographERC20Event.afterBurn)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC20.afterBurn.selector, msg.sender, amount)));\n }\n }\n\n function _allowance(address account, address to, uint256 amount) internal {\n uint256 currentAllowance = _allowances[account][to];\n if (currentAllowance >= amount) {\n unchecked {\n _allowances[account][to] = currentAllowance - amount;\n }\n } else {\n if (_isEventRegistered(HolographERC20Event.onAllowance)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC20.onAllowance.selector, account, to, amount)),\n \"ERC20: amount exceeds allowance\"\n );\n _allowances[account][to] = 0;\n } else {\n revert(\"ERC20: amount exceeds allowance\");\n }\n }\n }\n\n function burnFrom(address account, uint256 amount) public returns (bool) {\n _allowance(account, msg.sender, amount);\n if (_isEventRegistered(HolographERC20Event.beforeBurn)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC20.beforeBurn.selector, account, amount)));\n }\n _burn(account, amount);\n if (_isEventRegistered(HolographERC20Event.afterBurn)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC20.afterBurn.selector, account, amount)));\n }\n return true;\n }\n\n function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {\n uint256 currentAllowance = _allowances[msg.sender][spender];\n require(currentAllowance >= subtractedValue, \"ERC20: decreased below zero\");\n uint256 newAllowance;\n unchecked {\n newAllowance = currentAllowance - subtractedValue;\n }\n if (_isEventRegistered(HolographERC20Event.beforeApprove)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC20.beforeApprove.selector, msg.sender, spender, newAllowance))\n );\n }\n _approve(msg.sender, spender, newAllowance);\n if (_isEventRegistered(HolographERC20Event.afterApprove)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC20.afterApprove.selector, msg.sender, spender, newAllowance))\n );\n }\n return true;\n }\n\n function bridgeIn(uint32 fromChain, bytes calldata payload) external onlyBridge returns (bytes4) {\n (address from, address to, uint256 amount, bytes memory data) = abi.decode(\n payload,\n (address, address, uint256, bytes)\n );\n _mint(to, amount);\n if (_isEventRegistered(HolographERC20Event.bridgeIn)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC20.bridgeIn.selector, fromChain, from, to, amount, data)),\n \"HOLOGRAPH: bridge in failed\"\n );\n }\n return Holographable.bridgeIn.selector;\n }\n\n function bridgeOut(\n uint32 toChain,\n address sender,\n bytes calldata payload\n ) external onlyBridge returns (bytes4 selector, bytes memory data) {\n (address from, address to, uint256 amount) = abi.decode(payload, (address, address, uint256));\n if (sender != from) {\n _allowance(from, sender, amount);\n }\n if (_isEventRegistered(HolographERC20Event.bridgeOut)) {\n /*\n * @dev making a bridgeOut call to source contract\n * assembly is used so that msg.sender can be injected in the calldata\n */\n bytes memory sourcePayload = abi.encodeWithSelector(\n HolographedERC20.bridgeOut.selector,\n toChain,\n from,\n to,\n amount\n );\n assembly {\n // it is important to add 32 bytes in order to accommodate the first 32 bytes being used for storing length of bytes\n mstore(add(sourcePayload, add(mload(sourcePayload), 0x20)), caller())\n let result := call(\n gas(),\n sload(_sourceContractSlot),\n callvalue(),\n // start reading data from memory position, plus 32 bytes, to skip bytes length indicator\n add(sourcePayload, 0x20),\n // add an additional 32 bytes to bytes length to include the appended caller address\n add(mload(sourcePayload), 0x20),\n 0,\n 0\n )\n // when reading back data, skip the first 32 bytes which is used to indicate bytes position in calldata\n // also subtract 32 bytes from returndatasize to accomodate the skipped first 32 bytes\n returndatacopy(data, 0x20, sub(returndatasize(), 0x20))\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n }\n }\n _burn(from, amount);\n return (Holographable.bridgeOut.selector, abi.encode(from, to, amount, data));\n }\n\n /**\n * @dev Allows the bridge to mint tokens (used for hTokens only).\n */\n function holographBridgeMint(address to, uint256 amount) external onlyBridge returns (bytes4) {\n _mint(to, amount);\n return HolographERC20Interface.holographBridgeMint.selector;\n }\n\n function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {\n uint256 currentAllowance = _allowances[msg.sender][spender];\n uint256 newAllowance;\n unchecked {\n newAllowance = currentAllowance + addedValue;\n }\n unchecked {\n require(newAllowance >= currentAllowance, \"ERC20: increased above max value\");\n }\n if (_isEventRegistered(HolographERC20Event.beforeApprove)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC20.beforeApprove.selector, msg.sender, spender, newAllowance))\n );\n }\n _approve(msg.sender, spender, newAllowance);\n if (_isEventRegistered(HolographERC20Event.afterApprove)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC20.afterApprove.selector, msg.sender, spender, newAllowance))\n );\n }\n return true;\n }\n\n function onERC20Received(\n address account,\n address sender,\n uint256 amount,\n bytes calldata data\n ) public returns (bytes4) {\n require(_isContract(account), \"ERC20: operator not contract\");\n if (_isEventRegistered(HolographERC20Event.beforeOnERC20Received)) {\n require(\n _sourceCall(\n abi.encodeWithSelector(\n HolographedERC20.beforeOnERC20Received.selector,\n account,\n sender,\n address(this),\n amount,\n data\n )\n )\n );\n }\n try ERC20(account).balanceOf(address(this)) returns (uint256) {\n // do nothing, just want to see if this reverts due to invalid erc-20 contract\n } catch {\n revert(\"ERC20: failed getting balance\");\n }\n if (_isEventRegistered(HolographERC20Event.afterOnERC20Received)) {\n require(\n _sourceCall(\n abi.encodeWithSelector(\n HolographedERC20.afterOnERC20Received.selector,\n account,\n sender,\n address(this),\n amount,\n data\n )\n )\n );\n }\n return ERC20Receiver.onERC20Received.selector;\n }\n\n function permit(\n address account,\n address spender,\n uint256 amount,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) public {\n require(block.timestamp <= deadline, \"ERC20: expired deadline\");\n bytes32 structHash = keccak256(\n abi.encode(\n 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9,\n account,\n spender,\n amount,\n _useNonce(account),\n deadline\n )\n );\n bytes32 hash = _hashTypedDataV4(structHash);\n address signer = _recover(r, s, v, hash);\n require(signer == account, \"ERC20: invalid signature\");\n if (_isEventRegistered(HolographERC20Event.beforeApprove)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC20.beforeApprove.selector, account, spender, amount)));\n }\n _approve(account, spender, amount);\n if (_isEventRegistered(HolographERC20Event.afterApprove)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC20.afterApprove.selector, account, spender, amount)));\n }\n }\n\n function safeTransfer(address recipient, uint256 amount) public returns (bool) {\n return safeTransfer(recipient, amount, \"\");\n }\n\n function safeTransfer(address recipient, uint256 amount, bytes memory data) public returns (bool) {\n if (_isEventRegistered(HolographERC20Event.beforeSafeTransfer)) {\n require(\n _sourceCall(\n abi.encodeWithSelector(HolographedERC20.beforeSafeTransfer.selector, msg.sender, recipient, amount, data)\n )\n );\n }\n _transfer(msg.sender, recipient, amount);\n if (_isEventRegistered(HolographERC20Event.afterSafeTransfer)) {\n require(\n _sourceCall(\n abi.encodeWithSelector(HolographedERC20.afterSafeTransfer.selector, msg.sender, recipient, amount, data)\n )\n );\n }\n return true;\n }\n\n function safeTransferFrom(address account, address recipient, uint256 amount) public returns (bool) {\n return safeTransferFrom(account, recipient, amount, \"\");\n }\n\n function safeTransferFrom(\n address account,\n address recipient,\n uint256 amount,\n bytes memory data\n ) public returns (bool) {\n if (account != msg.sender) {\n /*\n * @dev This is intentionally enabled to remove friction when operator or bridge needs to move tokens\n */\n if (msg.sender != _holograph().getBridge() && msg.sender != _holograph().getOperator()) {\n _allowance(account, msg.sender, amount);\n }\n }\n if (_isEventRegistered(HolographERC20Event.beforeSafeTransfer)) {\n require(\n _sourceCall(\n abi.encodeWithSelector(HolographedERC20.beforeSafeTransfer.selector, account, recipient, amount, data)\n )\n );\n }\n _transfer(account, recipient, amount);\n if (_isEventRegistered(HolographERC20Event.afterSafeTransfer)) {\n require(\n _sourceCall(\n abi.encodeWithSelector(HolographedERC20.afterSafeTransfer.selector, account, recipient, amount, data)\n )\n );\n }\n return true;\n }\n\n /**\n * @dev Allows for source smart contract to burn tokens.\n */\n function sourceBurn(address from, uint256 amount) external onlySource {\n _burn(from, amount);\n }\n\n /**\n * @dev Allows for source smart contract to mint tokens.\n */\n function sourceMint(address to, uint256 amount) external onlySource {\n _mint(to, amount);\n }\n\n /**\n * @dev Allows for source smart contract to mint a batch of token amounts.\n */\n function sourceMintBatch(address[] calldata wallets, uint256[] calldata amounts) external onlySource {\n for (uint256 i = 0; i < wallets.length; i++) {\n _mint(wallets[i], amounts[i]);\n }\n }\n\n /**\n * @dev Allows for source smart contract to transfer tokens.\n */\n function sourceTransfer(address from, address to, uint256 amount) external onlySource {\n _transfer(from, to, amount);\n }\n\n /**\n * @dev Allows for source smart contract to withdraw contract balance.\n */\n function sourceTransfer(address payable destination, uint256 amount) external onlySource {\n destination.transfer(amount);\n }\n\n /**\n * @dev Allows for source smart contract to make calls to external contracts\n */\n function sourceExternalCall(address target, bytes calldata data) external onlySource {\n assembly {\n calldatacopy(0, data.offset, data.length)\n let result := call(gas(), target, callvalue(), 0, data.length, 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n function transfer(address recipient, uint256 amount) public returns (bool) {\n if (_isEventRegistered(HolographERC20Event.beforeTransfer)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC20.beforeTransfer.selector, msg.sender, recipient, amount))\n );\n }\n _transfer(msg.sender, recipient, amount);\n if (_isEventRegistered(HolographERC20Event.afterTransfer)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC20.afterTransfer.selector, msg.sender, recipient, amount))\n );\n }\n return true;\n }\n\n function transferFrom(address account, address recipient, uint256 amount) public returns (bool) {\n if (account != msg.sender) {\n /*\n * @dev This is intentionally enabled to remove friction when operator or bridge needs to move tokens\n */\n if (msg.sender != _holograph().getBridge() && msg.sender != _holograph().getOperator()) {\n _allowance(account, msg.sender, amount);\n }\n }\n if (_isEventRegistered(HolographERC20Event.beforeTransfer)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC20.beforeTransfer.selector, account, recipient, amount))\n );\n }\n _transfer(account, recipient, amount);\n if (_isEventRegistered(HolographERC20Event.afterTransfer)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC20.afterTransfer.selector, account, recipient, amount)));\n }\n return true;\n }\n\n function _approve(address account, address spender, uint256 amount) private {\n require(account != address(0), \"ERC20: account is zero address\");\n require(spender != address(0), \"ERC20: spender is zero address\");\n _allowances[account][spender] = amount;\n emit Approval(account, spender, amount);\n }\n\n function _burn(address account, uint256 amount) private {\n require(account != address(0), \"ERC20: account is zero address\");\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n }\n _totalSupply -= amount;\n _registryTransfer(account, address(0), amount);\n }\n\n /**\n * @notice Mints tokens.\n * @dev Mint a specific amount of tokens to a specific address.\n * @param to Address to mint to.\n * @param amount Amount of tokens to mint.\n */\n function _mint(address to, uint256 amount) private {\n require(to != address(0), \"ERC20: minting to burn address\");\n _totalSupply += amount;\n _balances[to] += amount;\n _registryTransfer(address(0), to, amount);\n }\n\n function _transfer(address account, address recipient, uint256 amount) private {\n require(account != address(0), \"ERC20: account is zero address\");\n require(recipient != address(0), \"ERC20: recipient is zero address\");\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n }\n _balances[recipient] += amount;\n _registryTransfer(account, recipient, amount);\n }\n\n function _registryTransfer(address _from, address _to, uint256 _amount) private {\n emit Transfer(_from, _to, _amount);\n HolographRegistryInterface(_holograph().getRegistry()).holographableEvent(\n abi.encode(\n // keccak256(\"TransferERC20(address,address,uint256)\")\n bytes32(0x9b035625e569d1d2bf54830a290aefba7ab11610ba8490871dc62b86b63a8956),\n _from,\n _to,\n _amount\n )\n );\n }\n\n /**\n * @dev \"Consume a nonce\": return the current value and increment.\n *\n * _Available since v4.1._\n */\n function _useNonce(address account) private returns (uint256 current) {\n current = _nonces[account];\n _nonces[account]++;\n }\n\n function _isContract(address contractAddress) private view returns (bool) {\n bytes32 codehash;\n assembly {\n codehash := extcodehash(contractAddress)\n }\n return (codehash != 0x0 && codehash != 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470);\n }\n\n /**\n * @dev Internal function used for identifying signer\n */\n function _recover(bytes32 r, bytes32 s, uint8 v, bytes32 hash) private pure returns (address signer) {\n if (v < 27) {\n v += 27;\n }\n require(v == 27 || v == 28, \"ERC20: invalid v-value\");\n // prevent signature malleability by checking if s-value is in the upper range\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n // if s-value is in upper range, calculate a new s-value\n s = bytes32(0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - uint256(s));\n // flip the v-value\n if (v == 27) {\n v = 28;\n } else {\n v = 27;\n }\n // check if s-value is still in upper range\n require(\n uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0,\n \"ERC20: invalid s-value\"\n );\n }\n signer = ecrecover(hash, v, r, s);\n require(signer != address(0), \"ERC20: zero address signer\");\n }\n\n /**\n * @dev Get the interfaces contract address.\n */\n function _interfaces() private view returns (address) {\n return _holograph().getInterfaces();\n }\n\n function owner() public view override returns (address) {\n Ownable ownableContract;\n assembly {\n ownableContract := sload(_sourceContractSlot)\n }\n return ownableContract.owner();\n }\n\n function _holograph() private view returns (HolographInterface holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n function _isEventRegistered(HolographERC20Event _eventName) private view returns (bool) {\n return ((_eventConfig >> uint256(_eventName)) & uint256(1) == 1 ? true : false);\n }\n}\n" + }, + "contracts/enforcer/HolographERC721.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\nimport \"../abstract/Owner.sol\";\n\nimport \"../enum/HolographERC721Event.sol\";\nimport \"../enum/InterfaceType.sol\";\n\nimport \"../interface/ERC165.sol\";\nimport \"../interface/ERC721.sol\";\nimport \"../interface/HolographERC721Interface.sol\";\nimport \"../interface/ERC721Metadata.sol\";\nimport \"../interface/ERC721TokenReceiver.sol\";\nimport \"../interface/Holographable.sol\";\nimport \"../interface/HolographedERC721.sol\";\nimport \"../interface/HolographInterface.sol\";\nimport \"../interface/HolographerInterface.sol\";\nimport \"../interface/HolographRegistryInterface.sol\";\nimport \"../interface/InitializableInterface.sol\";\nimport \"../interface/HolographInterfacesInterface.sol\";\nimport \"../interface/HolographRoyaltiesInterface.sol\";\nimport \"../interface/Ownable.sol\";\n\n/**\n * @title Holograph Bridgeable ERC-721 Collection\n * @author Holograph Foundation\n * @notice A smart contract for minting and managing Holograph Bridgeable ERC721 NFTs.\n * @dev The entire logic and functionality of the smart contract is self-contained.\n */\ncontract HolographERC721 is Admin, Owner, HolographERC721Interface, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\n */\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.sourceContract')) - 1)\n */\n bytes32 constant _sourceContractSlot = 0x27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b074;\n\n /**\n * @dev Configuration for events to trigger for source smart contract.\n */\n uint256 private _eventConfig;\n\n /**\n * @dev Collection name.\n */\n string private _name;\n\n /**\n * @dev Collection symbol.\n */\n string private _symbol;\n\n /**\n * @dev Collection royalty base points.\n */\n uint16 private _bps;\n\n /**\n * @dev Array of all token ids in collection.\n */\n uint256[] private _allTokens;\n\n /**\n * @dev Map of token id to array index of _ownedTokens.\n */\n mapping(uint256 => uint256) private _ownedTokensIndex;\n\n /**\n * @dev Token id to wallet (owner) address map.\n */\n mapping(uint256 => address) private _tokenOwner;\n\n /**\n * @dev 1-to-1 map of token id that was assigned an approved operator address.\n */\n mapping(uint256 => address) private _tokenApprovals;\n\n /**\n * @dev Map of total tokens owner by a specific address.\n */\n mapping(address => uint256) private _ownedTokensCount;\n\n /**\n * @dev Map of array of token ids owned by a specific address.\n */\n mapping(address => uint256[]) private _ownedTokens;\n\n /**\n * @notice Map of full operator approval for a particular address.\n * @dev Usually utilised for supporting marketplace proxy wallets.\n */\n mapping(address => mapping(address => bool)) private _operatorApprovals;\n\n /**\n * @dev Mapping from token id to position in the allTokens array.\n */\n mapping(uint256 => uint256) private _allTokensIndex;\n\n /**\n * @dev Mapping of all token ids that have been burned. This is to prevent re-minting of same token ids.\n */\n mapping(uint256 => bool) private _burnedTokens;\n\n /**\n * @notice Only allow calls from bridge smart contract.\n */\n modifier onlyBridge() {\n require(msg.sender == _holograph().getBridge(), \"ERC721: bridge only call\");\n _;\n }\n\n /**\n * @notice Only allow calls from source smart contract.\n */\n modifier onlySource() {\n address sourceContract;\n assembly {\n sourceContract := sload(_sourceContractSlot)\n }\n require(msg.sender == sourceContract, \"ERC721: source only call\");\n _;\n }\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"ERC721: already initialized\");\n InitializableInterface sourceContract;\n assembly {\n sstore(_ownerSlot, caller())\n sourceContract := sload(_sourceContractSlot)\n }\n (\n string memory contractName,\n string memory contractSymbol,\n uint16 contractBps,\n uint256 eventConfig,\n bool skipInit,\n bytes memory initCode\n ) = abi.decode(initPayload, (string, string, uint16, uint256, bool, bytes));\n _name = contractName;\n _symbol = contractSymbol;\n _bps = contractBps;\n _eventConfig = eventConfig;\n if (!skipInit) {\n require(sourceContract.init(initCode) == InitializableInterface.init.selector, \"ERC721: could not init source\");\n (bool success, bytes memory returnData) = _royalties().delegatecall(\n abi.encodeWithSelector(\n HolographRoyaltiesInterface.initHolographRoyalties.selector,\n abi.encode(uint256(contractBps), uint256(0))\n )\n );\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == InitializableInterface.init.selector, \"ERC721: could not init royalties\");\n }\n\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @notice Gets a base64 encoded contract JSON file.\n * @return string The URI.\n */\n function contractURI() external view returns (string memory) {\n if (_isEventRegistered(HolographERC721Event.customContractURI)) {\n assembly {\n calldatacopy(0, 0, calldatasize())\n mstore(calldatasize(), caller())\n let result := staticcall(gas(), sload(_sourceContractSlot), 0, add(calldatasize(), 0x20), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n return HolographInterfacesInterface(_interfaces()).contractURI(_name, \"\", \"\", _bps, address(this));\n }\n\n /**\n * @notice Gets the name of the collection.\n * @return string The collection name.\n */\n function name() external view returns (string memory) {\n return _name;\n }\n\n /**\n * @notice Shows the interfaces the contracts support\n * @dev Must add new 4 byte interface Ids here to acknowledge support\n * @param interfaceId ERC165 style 4 byte interfaceId.\n * @return bool True if supported.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool) {\n HolographInterfacesInterface interfaces = HolographInterfacesInterface(_interfaces());\n ERC165 erc165Contract;\n assembly {\n erc165Contract := sload(_sourceContractSlot)\n }\n if (\n interfaces.supportsInterface(InterfaceType.ERC721, interfaceId) || // check global interfaces\n interfaces.supportsInterface(InterfaceType.ROYALTIES, interfaceId) || // check if royalties supports interface\n erc165Contract.supportsInterface(interfaceId) // check if source supports interface\n ) {\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * @notice Gets the collection's symbol.\n * @return string The symbol.\n */\n function symbol() external view returns (string memory) {\n return _symbol;\n }\n\n /**\n * @notice Get's the URI of the token.\n * @dev Defaults the the Arweave URI\n * @return string The URI.\n */\n function tokenURI(uint256 tokenId) external view returns (string memory) {\n assembly {\n calldatacopy(0, 0, calldatasize())\n mstore(calldatasize(), caller())\n let result := staticcall(gas(), sload(_sourceContractSlot), 0, add(calldatasize(), 0x20), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @notice Get list of tokens owned by wallet.\n * @param wallet The wallet address to get tokens for.\n * @return uint256[] Returns an array of token ids owned by wallet.\n */\n function tokensOfOwner(address wallet) external view returns (uint256[] memory) {\n return _ownedTokens[wallet];\n }\n\n /**\n * @notice Get set length list, starting from index, for tokens owned by wallet.\n * @param wallet The wallet address to get tokens for.\n * @param index The index to start enumeration from.\n * @param length The length of returned results.\n * @return tokenIds uint256[] Returns a set length array of token ids owned by wallet.\n */\n function tokensOfOwner(\n address wallet,\n uint256 index,\n uint256 length\n ) external view returns (uint256[] memory tokenIds) {\n uint256 supply = _ownedTokensCount[wallet];\n if (index + length > supply) {\n length = supply - index;\n }\n tokenIds = new uint256[](length);\n for (uint256 i = 0; i < length; i++) {\n tokenIds[i] = _ownedTokens[wallet][index + i];\n }\n }\n\n /**\n * @notice Adds a new address to the token's approval list.\n * @dev Requires the sender to be in the approved addresses.\n * @param to The address to approve.\n * @param tokenId The affected token.\n */\n function approve(address to, uint256 tokenId) external payable {\n address tokenOwner = _tokenOwner[tokenId];\n require(to != tokenOwner, \"ERC721: cannot approve self\");\n require(_isApprovedStrict(msg.sender, tokenId), \"ERC721: not approved sender\");\n if (_isEventRegistered(HolographERC721Event.beforeApprove)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC721.beforeApprove.selector, tokenOwner, to, tokenId)));\n }\n _tokenApprovals[tokenId] = to;\n emit Approval(tokenOwner, to, tokenId);\n if (_isEventRegistered(HolographERC721Event.afterApprove)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC721.afterApprove.selector, tokenOwner, to, tokenId)));\n }\n }\n\n /**\n * @notice Burns the token.\n * @dev The sender must be the owner or approved.\n * @param tokenId The token to burn.\n */\n function burn(uint256 tokenId) external {\n require(_isApproved(msg.sender, tokenId), \"ERC721: not approved sender\");\n address wallet = _tokenOwner[tokenId];\n if (_isEventRegistered(HolographERC721Event.beforeBurn)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC721.beforeBurn.selector, wallet, tokenId)));\n }\n _burn(wallet, tokenId);\n if (_isEventRegistered(HolographERC721Event.afterBurn)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC721.afterBurn.selector, wallet, tokenId)));\n }\n }\n\n function bridgeIn(uint32 fromChain, bytes calldata payload) external onlyBridge returns (bytes4) {\n (address from, address to, uint256 tokenId, bytes memory data) = abi.decode(\n payload,\n (address, address, uint256, bytes)\n );\n require(!_exists(tokenId), \"ERC721: token already exists\");\n delete _burnedTokens[tokenId];\n _mint(to, tokenId);\n if (_isEventRegistered(HolographERC721Event.bridgeIn)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC721.bridgeIn.selector, fromChain, from, to, tokenId, data)),\n \"HOLOGRAPH: bridge in failed\"\n );\n }\n return Holographable.bridgeIn.selector;\n }\n\n function bridgeOut(\n uint32 toChain,\n address sender,\n bytes calldata payload\n ) external onlyBridge returns (bytes4 selector, bytes memory data) {\n (address from, address to, uint256 tokenId) = abi.decode(payload, (address, address, uint256));\n require(to != address(0), \"ERC721: zero address\");\n require(_isApproved(sender, tokenId), \"ERC721: sender not approved\");\n require(from == _tokenOwner[tokenId], \"ERC721: from is not owner\");\n if (_isEventRegistered(HolographERC721Event.bridgeOut)) {\n /*\n * @dev making a bridgeOut call to source contract\n * assembly is used so that msg.sender can be injected in the calldata\n */\n bytes memory sourcePayload = abi.encodeWithSelector(\n HolographedERC721.bridgeOut.selector,\n toChain,\n from,\n to,\n tokenId\n );\n assembly {\n // it is important to add 32 bytes in order to accommodate the first 32 bytes being used for storing length of bytes\n mstore(add(sourcePayload, add(mload(sourcePayload), 0x20)), caller())\n let result := call(\n gas(),\n sload(_sourceContractSlot),\n callvalue(),\n // start reading data from memory position, plus 32 bytes, to skip bytes length indicator\n add(sourcePayload, 0x20),\n // add an additional 32 bytes to bytes length to include the appended caller address\n add(mload(sourcePayload), 0x20),\n 0,\n 0\n )\n // when reading back data, skip the first 32 bytes which is used to indicate bytes position in calldata\n // also subtract 32 bytes from returndatasize to accomodate the skipped first 32 bytes\n returndatacopy(data, 0x20, sub(returndatasize(), 0x20))\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n }\n }\n _burn(from, tokenId);\n return (Holographable.bridgeOut.selector, abi.encode(from, to, tokenId, data));\n }\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n * @param from cannot be the zero address.\n * @param to cannot be the zero address.\n * @param tokenId token must exist and be owned by `from`.\n */\n function safeTransferFrom(address from, address to, uint256 tokenId) external payable {\n safeTransferFrom(from, to, tokenId, \"\");\n }\n\n /**\n * @notice Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n * @dev Since it's not being used, the _data variable is commented out to avoid compiler warnings.\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n * @param from cannot be the zero address.\n * @param to cannot be the zero address.\n * @param tokenId token must exist and be owned by `from`.\n */\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public payable {\n require(_isApproved(msg.sender, tokenId), \"ERC721: not approved sender\");\n if (_isEventRegistered(HolographERC721Event.beforeSafeTransfer)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC721.beforeSafeTransfer.selector, from, to, tokenId, data))\n );\n }\n _transferFrom(from, to, tokenId);\n if (_isContract(to)) {\n require(\n ERC721TokenReceiver(to).onERC721Received(msg.sender, from, tokenId, data) ==\n ERC721TokenReceiver.onERC721Received.selector,\n \"ERC721: onERC721Received fail\"\n );\n }\n if (_isEventRegistered(HolographERC721Event.afterSafeTransfer)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC721.afterSafeTransfer.selector, from, to, tokenId, data))\n );\n }\n }\n\n /**\n * @notice Adds a new approved operator.\n * @dev Allows platforms to sell/transfer all your NFTs. Used with proxy contracts like OpenSea/Rarible.\n * @param to The address to approve.\n * @param approved Turn on or off approval status.\n */\n function setApprovalForAll(address to, bool approved) external {\n require(to != msg.sender, \"ERC721: cannot approve self\");\n if (_isEventRegistered(HolographERC721Event.beforeApprovalAll)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC721.beforeApprovalAll.selector, msg.sender, to, approved))\n );\n }\n _operatorApprovals[msg.sender][to] = approved;\n emit ApprovalForAll(msg.sender, to, approved);\n if (_isEventRegistered(HolographERC721Event.afterApprovalAll)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC721.afterApprovalAll.selector, msg.sender, to, approved))\n );\n }\n }\n\n /**\n * @dev Allows for source smart contract to burn a token.\n * Note: this is put in place to make sure that custom logic could be implemented for merging, gamification, etc.\n * Note: token cannot be burned if it's locked by bridge.\n */\n function sourceBurn(uint256 tokenId) external onlySource {\n address wallet = _tokenOwner[tokenId];\n _burn(wallet, tokenId);\n }\n\n /**\n * @dev Allows for source smart contract to mint a token.\n */\n function sourceMint(address to, uint224 tokenId) external onlySource {\n // uint32 is reserved for chain id to be used\n // we need to get current chain id, and prepend it to tokenId\n // this will prevent possible tokenId overlap if minting simultaneously on multiple chains is possible\n uint256 token = uint256(bytes32(abi.encodePacked(_chain(), tokenId)));\n require(!_burnedTokens[token], \"ERC721: can't mint burned token\");\n _mint(to, token);\n }\n\n /**\n * @dev Allows source to get the prepend for their tokenIds.\n */\n function sourceGetChainPrepend() external view onlySource returns (uint256) {\n return uint256(bytes32(abi.encodePacked(_chain(), uint224(0))));\n }\n\n /**\n * @dev Allows for source smart contract to mint a batch of tokens.\n */\n function sourceMintBatch(address to, uint224[] calldata tokenIds) external onlySource {\n require(tokenIds.length < 1000, \"ERC721: max batch size is 1000\");\n uint32 chain = _chain();\n uint256 token;\n for (uint256 i = 0; i < tokenIds.length; i++) {\n require(!_burnedTokens[token], \"ERC721: can't mint burned token\");\n token = uint256(bytes32(abi.encodePacked(chain, tokenIds[i])));\n require(!_burnedTokens[token], \"ERC721: can't mint burned token\");\n _mint(to, token);\n }\n }\n\n /**\n * @dev Allows for source smart contract to mint a batch of tokens.\n */\n function sourceMintBatch(address[] calldata wallets, uint224[] calldata tokenIds) external onlySource {\n require(wallets.length == tokenIds.length, \"ERC721: array length missmatch\");\n require(tokenIds.length < 1000, \"ERC721: max batch size is 1000\");\n uint32 chain = _chain();\n uint256 token;\n for (uint256 i = 0; i < tokenIds.length; i++) {\n token = uint256(bytes32(abi.encodePacked(chain, tokenIds[i])));\n require(!_burnedTokens[token], \"ERC721: can't mint burned token\");\n _mint(wallets[i], token);\n }\n }\n\n /**\n * @dev Allows for source smart contract to mint a batch of tokens.\n */\n function sourceMintBatchIncremental(address to, uint224 startingTokenId, uint256 length) external onlySource {\n uint256 token = uint256(bytes32(abi.encodePacked(_chain(), startingTokenId)));\n for (uint256 i = 0; i < length; i++) {\n require(!_burnedTokens[token], \"ERC721: can't mint burned token\");\n _mint(to, token);\n token++;\n }\n }\n\n /**\n * @dev Allows for source smart contract to transfer a token.\n * Note: this is put in place to make sure that custom logic could be implemented for merging, gamification, etc.\n * Note: token cannot be transfered if it's locked by bridge.\n */\n function sourceTransfer(address to, uint256 tokenId) external onlySource {\n require(!_burnedTokens[tokenId], \"ERC721: token has been burned\");\n address wallet = _tokenOwner[tokenId];\n _transferFrom(wallet, to, tokenId);\n }\n\n /**\n * @dev Allows for source smart contract to make calls to external contracts\n */\n function sourceExternalCall(address target, bytes calldata data) external onlySource {\n assembly {\n calldatacopy(0, data.offset, data.length)\n let result := call(gas(), target, callvalue(), 0, data.length, 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @notice Transfers `tokenId` token from `msg.sender` to `to`.\n * @dev WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\n * @param to cannot be the zero address.\n * @param tokenId token must be owned by `from`.\n */\n function transfer(address to, uint256 tokenId) external payable {\n transferFrom(msg.sender, to, tokenId, \"\");\n }\n\n /**\n * @notice Transfers `tokenId` token from `from` to `to`.\n * @dev WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\n * @param from cannot be the zero address.\n * @param to cannot be the zero address.\n * @param tokenId token must be owned by `from`.\n */\n function transferFrom(address from, address to, uint256 tokenId) public payable {\n transferFrom(from, to, tokenId, \"\");\n }\n\n /**\n * @notice Transfers `tokenId` token from `from` to `to`.\n * @dev WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\n * @dev Since it's not being used, the _data variable is commented out to avoid compiler warnings.\n * @param from cannot be the zero address.\n * @param to cannot be the zero address.\n * @param tokenId token must be owned by `from`.\n * @param data additional data to pass.\n */\n function transferFrom(address from, address to, uint256 tokenId, bytes memory data) public payable {\n require(_isApproved(msg.sender, tokenId), \"ERC721: not approved sender\");\n if (_isEventRegistered(HolographERC721Event.beforeTransfer)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC721.beforeTransfer.selector, from, to, tokenId, data)));\n }\n _transferFrom(from, to, tokenId);\n if (_isEventRegistered(HolographERC721Event.afterTransfer)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC721.afterTransfer.selector, from, to, tokenId, data)));\n }\n }\n\n /**\n * @notice Get total number of tokens owned by wallet.\n * @dev Used to see total amount of tokens owned by a specific wallet.\n * @param wallet Address for which to get token balance.\n * @return uint256 Returns an integer, representing total amount of tokens held by address.\n */\n function balanceOf(address wallet) public view returns (uint256) {\n return _ownedTokensCount[wallet];\n }\n\n function burned(uint256 tokenId) public view returns (bool) {\n return _burnedTokens[tokenId];\n }\n\n /**\n * @notice Decimal places to have for totalSupply.\n * @dev Since ERC721s are single, we use 0 as the decimal places to make sure a round number for totalSupply.\n * @return uint256 Returns the number of decimal places to have for totalSupply.\n */\n function decimals() external pure returns (uint256) {\n return 0;\n }\n\n function exists(uint256 tokenId) public view returns (bool) {\n return _tokenOwner[tokenId] != address(0);\n }\n\n /**\n * @notice Gets the approved address for the token.\n * @dev Single operator set for a specific token. Usually used for one-time very specific authorisations.\n * @param tokenId Token id to get approved operator for.\n * @return address Approved address for token.\n */\n function getApproved(uint256 tokenId) external view returns (address) {\n return _tokenApprovals[tokenId];\n }\n\n /**\n * @notice Checks if the address is approved.\n * @dev Includes references to OpenSea and Rarible marketplace proxies.\n * @param wallet Address of the wallet.\n * @param operator Address of the marketplace operator.\n * @return bool True if approved.\n */\n function isApprovedForAll(address wallet, address operator) external view returns (bool) {\n return (_operatorApprovals[wallet][operator] || _sourceApproved(wallet, operator));\n }\n\n /**\n * @notice Checks who the owner of a token is.\n * @dev The token must exist.\n * @param tokenId The token to look up.\n * @return address Owner of the token.\n */\n function ownerOf(uint256 tokenId) external view returns (address) {\n address tokenOwner = _tokenOwner[tokenId];\n require(tokenOwner != address(0), \"ERC721: token does not exist\");\n return tokenOwner;\n }\n\n /**\n * @notice Get token by index.\n * @dev Used in conjunction with totalSupply function to iterate over all tokens in collection.\n * @param index Index of token in array.\n * @return uint256 Returns the token id of token located at that index.\n */\n function tokenByIndex(uint256 index) external view returns (uint256) {\n require(index < _allTokens.length, \"ERC721: index out of bounds\");\n return _allTokens[index];\n }\n\n /**\n * @notice Get set length list, starting from index, for all tokens.\n * @param index The index to start enumeration from.\n * @param length The length of returned results.\n * @return tokenIds uint256[] Returns a set length array of token ids minted.\n */\n function tokens(uint256 index, uint256 length) external view returns (uint256[] memory tokenIds) {\n uint256 supply = _allTokens.length;\n if (index + length > supply) {\n length = supply - index;\n }\n tokenIds = new uint256[](length);\n for (uint256 i = 0; i < length; i++) {\n tokenIds[i] = _allTokens[index + i];\n }\n }\n\n /**\n * @notice Get token from wallet by index instead of token id.\n * @dev Helpful for wallet token enumeration where token id info is not yet available. Use in conjunction with balanceOf function.\n * @param wallet Specific address for which to get token for.\n * @param index Index of token in array.\n * @return uint256 Returns the token id of token located at that index in specified wallet.\n */\n function tokenOfOwnerByIndex(address wallet, uint256 index) external view returns (uint256) {\n require(index < balanceOf(wallet), \"ERC721: index out of bounds\");\n return _ownedTokens[wallet][index];\n }\n\n /**\n * @notice Total amount of tokens in the collection.\n * @dev Ignores burned tokens.\n * @return uint256 Returns the total number of active (not burned) tokens.\n */\n function totalSupply() external view returns (uint256) {\n return _allTokens.length;\n }\n\n /**\n * @notice Empty function that is triggered by external contract on NFT transfer.\n * @dev We have this blank function in place to make sure that external contract sending in NFTs don't error out.\n * @dev Since it's not being used, the _operator variable is commented out to avoid compiler warnings.\n * @dev Since it's not being used, the _from variable is commented out to avoid compiler warnings.\n * @dev Since it's not being used, the _tokenId variable is commented out to avoid compiler warnings.\n * @dev Since it's not being used, the _data variable is commented out to avoid compiler warnings.\n * @return bytes4 Returns the interfaceId of onERC721Received.\n */\n function onERC721Received(\n address _operator,\n address _from,\n uint256 _tokenId,\n bytes calldata _data\n ) external returns (bytes4) {\n require(_isContract(_operator), \"ERC721: operator not contract\");\n if (_isEventRegistered(HolographERC721Event.beforeOnERC721Received)) {\n require(\n _sourceCall(\n abi.encodeWithSelector(\n HolographedERC721.beforeOnERC721Received.selector,\n _operator,\n _from,\n address(this),\n _tokenId,\n _data\n )\n )\n );\n }\n try HolographERC721Interface(_operator).ownerOf(_tokenId) returns (address tokenOwner) {\n require(tokenOwner == address(this), \"ERC721: contract not token owner\");\n } catch {\n revert(\"ERC721: token does not exist\");\n }\n if (_isEventRegistered(HolographERC721Event.afterOnERC721Received)) {\n require(\n _sourceCall(\n abi.encodeWithSelector(\n HolographedERC721.afterOnERC721Received.selector,\n _operator,\n _from,\n address(this),\n _tokenId,\n _data\n )\n )\n );\n }\n return ERC721TokenReceiver.onERC721Received.selector;\n }\n\n /**\n * @dev Add a newly minted token into managed list of tokens.\n * @param to Address of token owner for which to add the token.\n * @param tokenId Id of token to add.\n */\n function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {\n _ownedTokensIndex[tokenId] = _ownedTokensCount[to];\n _ownedTokensCount[to]++;\n _ownedTokens[to].push(tokenId);\n _allTokensIndex[tokenId] = _allTokens.length;\n _allTokens.push(tokenId);\n }\n\n /**\n * @notice Burns the token.\n * @dev All validation needs to be done before calling this function.\n * @param wallet Address of current token owner.\n * @param tokenId The token to burn.\n */\n function _burn(address wallet, uint256 tokenId) private {\n _clearApproval(tokenId);\n _tokenOwner[tokenId] = address(0);\n _registryTransfer(wallet, address(0), tokenId);\n _removeTokenFromOwnerEnumeration(wallet, tokenId);\n _burnedTokens[tokenId] = true;\n }\n\n /**\n * @notice Deletes a token from the approval list.\n * @dev Removes from count.\n * @param tokenId T.\n */\n function _clearApproval(uint256 tokenId) private {\n delete _tokenApprovals[tokenId];\n }\n\n /**\n * @notice Mints an NFT.\n * @dev Can to mint the token to the zero address and the token cannot already exist.\n * @param to Address to mint to.\n * @param tokenId The new token.\n */\n function _mint(address to, uint256 tokenId) private {\n require(tokenId > 0, \"ERC721: token id cannot be zero\");\n require(to != address(0), \"ERC721: minting to burn address\");\n require(!_exists(tokenId), \"ERC721: token already exists\");\n require(!_burnedTokens[tokenId], \"ERC721: token has been burned\");\n _tokenOwner[tokenId] = to;\n _registryTransfer(address(0), to, tokenId);\n _addTokenToOwnerEnumeration(to, tokenId);\n }\n\n function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {\n uint256 lastTokenIndex = _allTokens.length - 1;\n uint256 tokenIndex = _allTokensIndex[tokenId];\n uint256 lastTokenId = _allTokens[lastTokenIndex];\n _allTokens[tokenIndex] = lastTokenId;\n _allTokensIndex[lastTokenId] = tokenIndex;\n delete _allTokensIndex[tokenId];\n delete _allTokens[lastTokenIndex];\n _allTokens.pop();\n }\n\n /**\n * @dev Remove a token from managed list of tokens.\n * @param from Address of token owner for which to remove the token.\n * @param tokenId Id of token to remove.\n */\n function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {\n _removeTokenFromAllTokensEnumeration(tokenId);\n _ownedTokensCount[from]--;\n uint256 lastTokenIndex = _ownedTokensCount[from];\n uint256 tokenIndex = _ownedTokensIndex[tokenId];\n if (tokenIndex != lastTokenIndex) {\n uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];\n _ownedTokens[from][tokenIndex] = lastTokenId;\n _ownedTokensIndex[lastTokenId] = tokenIndex;\n }\n if (lastTokenIndex == 0) {\n delete _ownedTokens[from];\n } else {\n delete _ownedTokens[from][lastTokenIndex];\n _ownedTokens[from].pop();\n }\n }\n\n /**\n * @dev Primary private function that handles the transfer/mint/burn functionality.\n * @param from Address from where token is being transferred. Zero address means it is being minted.\n * @param to Address to whom the token is being transferred. Zero address means it is being burned.\n * @param tokenId Id of token that is being transferred/minted/burned.\n */\n function _transferFrom(address from, address to, uint256 tokenId) private {\n require(_tokenOwner[tokenId] == from, \"ERC721: token not owned\");\n require(to != address(0), \"ERC721: use burn instead\");\n _clearApproval(tokenId);\n _tokenOwner[tokenId] = to;\n _registryTransfer(from, to, tokenId);\n _removeTokenFromOwnerEnumeration(from, tokenId);\n _addTokenToOwnerEnumeration(to, tokenId);\n }\n\n function _chain() private view returns (uint32) {\n uint32 currentChain = HolographInterface(HolographerInterface(payable(address(this))).getHolograph())\n .getHolographChainId();\n if (currentChain != HolographerInterface(payable(address(this))).getOriginChain()) {\n return currentChain;\n }\n return uint32(0);\n }\n\n /**\n * @notice Checks if the token owner exists.\n * @dev If the address is the zero address no owner exists.\n * @param tokenId The affected token.\n * @return bool True if it exists.\n */\n function _exists(uint256 tokenId) private view returns (bool) {\n address tokenOwner = _tokenOwner[tokenId];\n return tokenOwner != address(0);\n }\n\n function _sourceApproved(address _tokenWallet, address _tokenSpender) internal view returns (bool approved) {\n if (_isEventRegistered(HolographERC721Event.onIsApprovedForAll)) {\n HolographedERC721 sourceContract;\n assembly {\n sourceContract := sload(_sourceContractSlot)\n }\n if (sourceContract.onIsApprovedForAll(_tokenWallet, _tokenSpender)) {\n approved = true;\n }\n }\n }\n\n /**\n * @notice Checks if the address is an approved one.\n * @dev Uses inlined checks for different usecases of approval.\n * @param spender Address of the spender.\n * @param tokenId The affected token.\n * @return bool True if approved.\n */\n function _isApproved(address spender, uint256 tokenId) private view returns (bool) {\n require(_exists(tokenId), \"ERC721: token does not exist\");\n address tokenOwner = _tokenOwner[tokenId];\n return (spender == tokenOwner ||\n _tokenApprovals[tokenId] == spender ||\n _operatorApprovals[tokenOwner][spender] ||\n _sourceApproved(tokenOwner, spender));\n }\n\n function _isApprovedStrict(address spender, uint256 tokenId) private view returns (bool) {\n require(_exists(tokenId), \"ERC721: token does not exist\");\n address tokenOwner = _tokenOwner[tokenId];\n return (spender == tokenOwner || _operatorApprovals[tokenOwner][spender] || _sourceApproved(tokenOwner, spender));\n }\n\n function _isContract(address contractAddress) private view returns (bool) {\n bytes32 codehash;\n assembly {\n codehash := extcodehash(contractAddress)\n }\n return (codehash != 0x0 && codehash != 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470);\n }\n\n /**\n * @dev Get the interfaces contract address.\n */\n function _interfaces() private view returns (address) {\n return _holograph().getInterfaces();\n }\n\n function owner() public view override returns (address) {\n assembly {\n calldatacopy(0, 0, calldatasize())\n mstore(calldatasize(), caller())\n let result := staticcall(gas(), sload(_sourceContractSlot), 0, add(calldatasize(), 0x20), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n function _holograph() private view returns (HolographInterface holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n /**\n * @dev Get the bridge contract address.\n */\n function _royalties() private view returns (address) {\n return\n HolographRegistryInterface(_holograph().getRegistry()).getContractTypeAddress(\n // \"HolographRoyalties\" front zero padded to be 32 bytes\n 0x0000000000000000000000000000486f6c6f6772617068526f79616c74696573\n );\n }\n\n function _registryTransfer(address _from, address _to, uint256 _tokenId) private {\n emit Transfer(_from, _to, _tokenId);\n HolographRegistryInterface(_holograph().getRegistry()).holographableEvent(\n abi.encode(\n // keccak256(\"TransferERC721(address,address,uint256)\")\n bytes32(0x351b8d13789e4d8d2717631559251955685881a31494dd0b8b19b4ef8530bb6d),\n _from,\n _to,\n _tokenId\n )\n );\n }\n\n /**\n * @dev Purposefully left empty, to prevent running out of gas errors when receiving native token payments.\n */\n event FundsReceived(address indexed source, uint256 amount);\n\n receive() external payable {\n emit FundsReceived(msg.sender, msg.value);\n }\n\n /**\n * @notice Fallback to the source contract.\n * @dev Any function call that is not covered here, will automatically be sent over to the source contract.\n */\n fallback() external payable {\n // Check if royalties support the function, send there, otherwise revert to source\n address _target;\n if (HolographInterfacesInterface(_interfaces()).supportsInterface(InterfaceType.ROYALTIES, msg.sig)) {\n _target = _royalties();\n assembly {\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), _target, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n } else {\n assembly {\n calldatacopy(0, 0, calldatasize())\n mstore(calldatasize(), caller())\n let result := call(gas(), sload(_sourceContractSlot), callvalue(), 0, add(calldatasize(), 0x20), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n }\n\n /*\n * @dev all calls to source contract go through this function in order to inject original msg.sender in calldata\n */\n function _sourceCall(bytes memory payload) private returns (bool output) {\n assembly {\n mstore(add(payload, add(mload(payload), 0x20)), caller())\n // offset memory position by 32 bytes to skip the 32 bytes where bytes length is stored\n // add 32 bytes to bytes length to include the appended msg.sender to calldata\n let result := call(\n gas(),\n sload(_sourceContractSlot),\n callvalue(),\n add(payload, 0x20),\n add(mload(payload), 0x20),\n 0,\n 0\n )\n let pos := mload(0x40)\n // reserve memory space for return data\n mstore(0x40, add(pos, returndatasize()))\n returndatacopy(pos, 0, returndatasize())\n switch result\n case 0 {\n revert(pos, returndatasize())\n }\n output := mload(pos)\n }\n }\n\n function _isEventRegistered(HolographERC721Event _eventName) private view returns (bool) {\n return ((_eventConfig >> uint256(_eventName)) & uint256(1) == 1 ? true : false);\n }\n}\n" + }, + "contracts/enforcer/HolographGeneric.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\nimport \"../abstract/Owner.sol\";\n\nimport \"../enum/HolographGenericEvent.sol\";\nimport \"../enum/InterfaceType.sol\";\n\nimport \"../interface/HolographGenericInterface.sol\";\nimport \"../interface/ERC165.sol\";\nimport \"../interface/Holographable.sol\";\nimport \"../interface/HolographedGeneric.sol\";\nimport \"../interface/HolographInterface.sol\";\nimport \"../interface/InitializableInterface.sol\";\nimport \"../interface/HolographInterfacesInterface.sol\";\nimport \"../interface/Ownable.sol\";\n\n/**\n * @title Holograph Bridgeable Generic Contract\n * @author Holograph Foundation\n * @notice A smart contract for creating custom bridgeable logic.\n * @dev The entire logic and functionality of the smart contract is self-contained.\n */\ncontract HolographGeneric is Admin, Owner, Initializable, HolographGenericInterface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\n */\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.sourceContract')) - 1)\n */\n bytes32 constant _sourceContractSlot = 0x27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b074;\n\n /**\n * @dev Configuration for events to trigger for source smart contract.\n */\n uint256 private _eventConfig;\n\n /**\n * @notice Only allow calls from bridge smart contract.\n */\n modifier onlyBridge() {\n require(msg.sender == _holograph().getBridge(), \"GENERIC: bridge only call\");\n _;\n }\n\n /**\n * @notice Only allow calls from source smart contract.\n */\n modifier onlySource() {\n address sourceContract;\n assembly {\n sourceContract := sload(_sourceContractSlot)\n }\n require(msg.sender == sourceContract, \"GENERIC: source only call\");\n _;\n }\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"GENERIC: already initialized\");\n InitializableInterface sourceContract;\n assembly {\n sstore(_ownerSlot, caller())\n sourceContract := sload(_sourceContractSlot)\n }\n (uint256 eventConfig, bool skipInit, bytes memory initCode) = abi.decode(initPayload, (uint256, bool, bytes));\n _eventConfig = eventConfig;\n if (!skipInit) {\n require(sourceContract.init(initCode) == InitializableInterface.init.selector, \"GENERIC: could not init source\");\n }\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @dev Allows for source smart contract to withdraw contract balance.\n */\n function sourceTransfer(address payable destination, uint256 amount) external onlySource {\n destination.transfer(amount);\n }\n\n /**\n * @dev Allows for source smart contract to make calls to external contracts\n */\n function sourceExternalCall(address target, bytes calldata data) external onlySource {\n assembly {\n calldatacopy(0, data.offset, data.length)\n let result := call(gas(), target, callvalue(), 0, data.length, 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @dev Purposefully left empty, to prevent running out of gas errors when receiving native token payments.\n */\n receive() external payable {}\n\n /**\n * @notice Fallback to the source contract.\n * @dev Any function call that is not covered here, will automatically be sent over to the source contract.\n */\n fallback() external payable {\n assembly {\n calldatacopy(0, 0, calldatasize())\n mstore(calldatasize(), caller())\n let result := call(gas(), sload(_sourceContractSlot), callvalue(), 0, add(calldatasize(), 0x20), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n function _sourceCall(bytes memory payload) private returns (bool output) {\n assembly {\n let pos := mload(0x40)\n mstore(0x40, add(pos, 0x20))\n mstore(add(payload, add(mload(payload), 0x20)), caller())\n // offset memory position by 32 bytes to skip the 32 bytes where bytes length is stored\n // add 32 bytes to bytes length to include the appended msg.sender to calldata\n let result := call(\n gas(),\n sload(_sourceContractSlot),\n callvalue(),\n add(payload, 0x20),\n add(mload(payload), 0x20),\n 0,\n 0\n )\n returndatacopy(pos, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n output := mload(pos)\n }\n }\n\n /**\n * @dev Although EIP-165 is not required for ERC20 contracts, we still decided to implement it.\n *\n * This makes it easier for external smart contracts to easily identify a valid ERC20 token contract.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool) {\n HolographInterfacesInterface interfaces = HolographInterfacesInterface(_interfaces());\n ERC165 erc165Contract;\n assembly {\n erc165Contract := sload(_sourceContractSlot)\n }\n if (\n interfaces.supportsInterface(InterfaceType.GENERIC, interfaceId) || erc165Contract.supportsInterface(interfaceId) // check global interfaces // check if source supports interface\n ) {\n return true;\n } else {\n return false;\n }\n }\n\n function bridgeIn(uint32 fromChain, bytes calldata payload) external onlyBridge returns (bytes4) {\n if (_isEventRegistered(HolographGenericEvent.bridgeIn)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedGeneric.bridgeIn.selector, fromChain, payload)),\n \"HOLOGRAPH: bridge in failed\"\n );\n }\n return Holographable.bridgeIn.selector;\n }\n\n function bridgeOut(\n uint32 toChain,\n address sender,\n bytes calldata payload\n ) external onlyBridge returns (bytes4 selector, bytes memory data) {\n if (_isEventRegistered(HolographGenericEvent.bridgeOut)) {\n bytes memory sourcePayload = abi.encodeWithSelector(\n HolographedGeneric.bridgeOut.selector,\n toChain,\n sender,\n payload\n );\n assembly {\n // it is important to add 32 bytes in order to accommodate the first 32 bytes being used for storing length of bytes\n mstore(add(sourcePayload, add(mload(sourcePayload), 0x20)), caller())\n let result := call(\n gas(),\n sload(_sourceContractSlot),\n callvalue(),\n // start reading data from memory position, plus 32 bytes, to skip bytes length indicator\n add(sourcePayload, 0x20),\n // add an additional 32 bytes to bytes length to include the appended caller address\n add(mload(sourcePayload), 0x20),\n 0,\n 0\n )\n // when reading back data, skip the first 32 bytes which is used to indicate bytes position in calldata\n // also subtract 32 bytes from returndatasize to accomodate the skipped first 32 bytes\n returndatacopy(data, 0x20, sub(returndatasize(), 0x20))\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n }\n }\n return (Holographable.bridgeOut.selector, data);\n }\n\n /**\n * @dev Allows for source smart contract to emit events.\n */\n function sourceEmit(bytes calldata eventData) external onlySource {\n assembly {\n calldatacopy(0, eventData.offset, eventData.length)\n log0(0, eventData.length)\n }\n }\n\n function sourceEmit(bytes32 eventId, bytes calldata eventData) external onlySource {\n assembly {\n calldatacopy(0, eventData.offset, eventData.length)\n log1(0, eventData.length, eventId)\n }\n }\n\n function sourceEmit(bytes32 eventId, bytes32 topic1, bytes calldata eventData) external onlySource {\n assembly {\n calldatacopy(0, eventData.offset, eventData.length)\n log2(0, eventData.length, eventId, topic1)\n }\n }\n\n function sourceEmit(bytes32 eventId, bytes32 topic1, bytes32 topic2, bytes calldata eventData) external onlySource {\n assembly {\n calldatacopy(0, eventData.offset, eventData.length)\n log3(0, eventData.length, eventId, topic1, topic2)\n }\n }\n\n function sourceEmit(\n bytes32 eventId,\n bytes32 topic1,\n bytes32 topic2,\n bytes32 topic3,\n bytes calldata eventData\n ) external onlySource {\n assembly {\n calldatacopy(0, eventData.offset, eventData.length)\n log4(0, eventData.length, eventId, topic1, topic2, topic3)\n }\n }\n\n /**\n * @dev Get the source smart contract as bridgeable interface.\n */\n function SourceGeneric() private view returns (HolographedGeneric sourceContract) {\n assembly {\n sourceContract := sload(_sourceContractSlot)\n }\n }\n\n /**\n * @dev Get the interfaces contract address.\n */\n function _interfaces() private view returns (address) {\n return _holograph().getInterfaces();\n }\n\n function owner() public view override returns (address) {\n Ownable ownableContract;\n assembly {\n ownableContract := sload(_sourceContractSlot)\n }\n return ownableContract.owner();\n }\n\n function _holograph() private view returns (HolographInterface holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n function _isEventRegistered(HolographGenericEvent _eventName) private view returns (bool) {\n return ((_eventConfig >> uint256(_eventName)) & uint256(1) == 1 ? true : false);\n }\n}\n" + }, + "contracts/enforcer/HolographRoyalties.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\nimport \"../abstract/Owner.sol\";\n\nimport \"../interface/ERC20.sol\";\nimport \"../interface/HolographerInterface.sol\";\nimport \"../interface/InitializableInterface.sol\";\nimport \"../interface/HolographRoyaltiesInterface.sol\";\n\nimport \"../struct/ZoraBidShares.sol\";\n\n/**\n * @title HolographRoyalties\n * @author Holograph Foundation\n * @notice A smart contract for providing royalty info, collecting royalties, and distributing it to configured payout wallets.\n * @dev This smart contract is not intended to be used directly. Apply it to any of your ERC721 or ERC1155 smart contracts through a delegatecall fallback.\n */\ncontract HolographRoyalties is Admin, Owner, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.ROYALTIES.defaultBp')) - 1)\n */\n bytes32 constant _defaultBpSlot = 0xff29fcf645501423fd56e0287670f6813a1e5db5cf706428bc8516381e7ffe81;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.ROYALTIES.defaultReceiver')) - 1)\n */\n bytes32 constant _defaultReceiverSlot = 0x00b381815b89a20a37ee91e8a0119be5e16f6d1668377e7ae457213a74a415bb;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.ROYALTIES.initialized')) - 1)\n */\n bytes32 constant _initializedPaidSlot = 0x91428d26cb4818e4e627ebb64c06b5a67b82f313516b5c903cf07a00681c95f6;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.ROYALTIES.payout.addresses')) - 1)\n */\n bytes32 constant _payoutAddressesSlot = 0xf31f2a3a453a7aa2f3054423a8c5474ac9817ea457b458152967bbcb12ed6a43;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.ROYALTIES.payout.bps')) - 1)\n */\n bytes32 constant _payoutBpsSlot = 0xa4023567d5b5f01c63e00d90785d7cd4ff057a237ad185c5ecade8f4059fb61a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.ROYALTIES.extendedCall')) - 1)\n * @dev extendedCall is an init config used to determine if payouts should be sent via a call or a transfer.\n */\n bytes32 constant _extendedCallSlot = 0x254926eafdecb56f669f96a3a752fbca17becd902481431df613768b1f903fa3;\n\n string constant _bpString = \"eip1967.Holograph.ROYALTIES.bp\";\n string constant _receiverString = \"eip1967.Holograph.ROYALTIES.receiver\";\n string constant _tokenAddressString = \"eip1967.Holograph.ROYALTIES.tokenAddress\";\n\n /**\n * @notice Event emitted when setting/updating royalty info/fees. This is used by Rarible V1.\n * @dev Emits event in order to comply with Rarible V1 royalty spec.\n * @param tokenId Specific token id for which royalty info is being set, set as 0 for all tokens inside of the smart contract.\n * @param recipients Address array of wallets that will receive tha royalties.\n * @param bps Uint256 array of base points(percentages) that each wallet(specified in recipients) will receive from the royalty payouts.\n * Make sure that all the base points add up to a total of 10000.\n */\n event SecondarySaleFees(uint256 tokenId, address[] recipients, uint256[] bps);\n\n /**\n * @dev Use this modifier to lock public functions that should not be accesible to non-owners.\n */\n modifier onlyOwner() override {\n require(isOwner(), \"ROYALTIES: caller not an owner\");\n _;\n }\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"ROYALTIES: already initialized\");\n assembly {\n sstore(_adminSlot, caller())\n sstore(_ownerSlot, caller())\n }\n uint256 bp = abi.decode(initPayload, (uint256));\n setRoyalties(0, payable(address(this)), bp);\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n function initHolographRoyalties(bytes memory initPayload) external returns (bytes4) {\n uint256 initialized;\n assembly {\n initialized := sload(_initializedPaidSlot)\n }\n require(initialized == 0, \"ROYALTIES: already initialized\");\n (uint256 bp, uint256 useExtenededCall) = abi.decode(initPayload, (uint256, uint256));\n if (useExtenededCall > 0) {\n useExtenededCall = 1;\n }\n assembly {\n sstore(_extendedCallSlot, useExtenededCall)\n }\n setRoyalties(0, payable(address(this)), bp);\n address payable[] memory addresses = new address payable[](1);\n addresses[0] = payable(Owner(HolographerInterface(address(this)).getSourceContract()).owner());\n uint256[] memory bps = new uint256[](1);\n bps[0] = 10000;\n _setPayoutAddresses(addresses);\n _setPayoutBps(bps);\n initialized = 1;\n assembly {\n sstore(_initializedPaidSlot, initialized)\n }\n return InitializableInterface.init.selector;\n }\n\n /**\n * @notice Check if message sender is a legitimate owner of the smart contract\n * @dev We check owner, admin, and identity for a more comprehensive coverage.\n * @return Returns true is message sender is an owner.\n */\n function isOwner() private view returns (bool) {\n return (msg.sender == getOwner() ||\n msg.sender == getAdmin() ||\n msg.sender == Owner(HolographerInterface(address(this)).getSourceContract()).owner());\n }\n\n /**\n * @dev This is here in place to prevent reverts in case contract is used outside of the protocol.\n */\n function getSourceContract() external view returns (address sourceContract) {\n sourceContract = address(this);\n }\n\n /**\n * @dev Gets the default royalty payment receiver address from storage slot.\n * @return receiver Wallet or smart contract that will receive the initial royalty payouts.\n */\n function _getDefaultReceiver() private view returns (address payable receiver) {\n assembly {\n receiver := sload(_defaultReceiverSlot)\n }\n }\n\n /**\n * @dev Sets the default royalty payment receiver address to storage slot.\n * @param receiver Wallet or smart contract that will receive the initial royalty payouts.\n */\n function _setDefaultReceiver(address receiver) private {\n assembly {\n sstore(_defaultReceiverSlot, receiver)\n }\n }\n\n /**\n * @dev Gets the default royalty base points(percentage) from storage slot.\n * @return bp Royalty base points(percentage) for royalty payouts.\n */\n function _getDefaultBp() private view returns (uint256 bp) {\n assembly {\n bp := sload(_defaultBpSlot)\n }\n }\n\n /**\n * @dev Sets the default royalty base points(percentage) to storage slot.\n * @param bp Uint256 of royalty percentage, provided in base points format.\n */\n function _setDefaultBp(uint256 bp) private {\n assembly {\n sstore(_defaultBpSlot, bp)\n }\n }\n\n /**\n * @dev Gets the royalty payment receiver address, for a particular token id, from storage slot.\n * @return receiver Wallet or smart contract that will receive the royalty payouts for a particular token id.\n */\n function _getReceiver(uint256 tokenId) private view returns (address payable receiver) {\n bytes32 slot = bytes32(uint256(keccak256(abi.encodePacked(_receiverString, tokenId))) - 1);\n assembly {\n receiver := sload(slot)\n }\n }\n\n /**\n * @dev Sets the royalty payment receiver address, for a particular token id, to storage slot.\n * @param tokenId Uint256 of the token id to set the receiver for.\n * @param receiver Wallet or smart contract that will receive the royalty payouts for a particular token id.\n */\n function _setReceiver(uint256 tokenId, address receiver) private {\n bytes32 slot = bytes32(uint256(keccak256(abi.encodePacked(_receiverString, tokenId))) - 1);\n assembly {\n sstore(slot, receiver)\n }\n }\n\n /**\n * @dev Gets the royalty base points(percentage), for a particular token id, from storage slot.\n * @return bp Royalty base points(percentage) for the royalty payouts of a specific token id.\n */\n function _getBp(uint256 tokenId) private view returns (uint256 bp) {\n bytes32 slot = bytes32(uint256(keccak256(abi.encodePacked(_bpString, tokenId))) - 1);\n assembly {\n bp := sload(slot)\n }\n }\n\n /**\n * @dev Sets the royalty base points(percentage), for a particular token id, to storage slot.\n * @param tokenId Uint256 of the token id to set the base points for.\n * @param bp Uint256 of royalty percentage, provided in base points format, for a particular token id.\n */\n function _setBp(uint256 tokenId, uint256 bp) private {\n bytes32 slot = bytes32(uint256(keccak256(abi.encodePacked(_bpString, tokenId))) - 1);\n assembly {\n sstore(slot, bp)\n }\n }\n\n function _getPayoutAddresses() private view returns (address payable[] memory addresses) {\n // The slot hash has been precomputed for gas optimizaion\n bytes32 slot = _payoutAddressesSlot;\n uint256 length;\n assembly {\n length := sload(slot)\n }\n addresses = new address payable[](length);\n address payable value;\n for (uint256 i = 0; i < length; i++) {\n slot = keccak256(abi.encodePacked(i, slot));\n assembly {\n value := sload(slot)\n }\n addresses[i] = value;\n }\n }\n\n function _setPayoutAddresses(address payable[] memory addresses) private {\n bytes32 slot = _payoutAddressesSlot;\n uint256 length = addresses.length;\n assembly {\n sstore(slot, length)\n }\n address payable value;\n for (uint256 i = 0; i < length; i++) {\n slot = keccak256(abi.encodePacked(i, slot));\n value = addresses[i];\n assembly {\n sstore(slot, value)\n }\n }\n }\n\n function _getPayoutBps() private view returns (uint256[] memory bps) {\n bytes32 slot = _payoutBpsSlot;\n uint256 length;\n assembly {\n length := sload(slot)\n }\n bps = new uint256[](length);\n uint256 value;\n for (uint256 i = 0; i < length; i++) {\n slot = keccak256(abi.encodePacked(i, slot));\n assembly {\n value := sload(slot)\n }\n bps[i] = value;\n }\n }\n\n function _setPayoutBps(uint256[] memory bps) private {\n bytes32 slot = _payoutBpsSlot;\n uint256 length = bps.length;\n assembly {\n sstore(slot, length)\n }\n uint256 value;\n for (uint256 i = 0; i < length; i++) {\n slot = keccak256(abi.encodePacked(i, slot));\n value = bps[i];\n assembly {\n sstore(slot, value)\n }\n }\n }\n\n function _getTokenAddress(string memory tokenName) private view returns (address tokenAddress) {\n bytes32 slot = bytes32(uint256(keccak256(abi.encodePacked(_tokenAddressString, tokenName))) - 1);\n assembly {\n tokenAddress := sload(slot)\n }\n }\n\n function _setTokenAddress(string memory tokenName, address tokenAddress) private {\n bytes32 slot = bytes32(uint256(keccak256(abi.encodePacked(_tokenAddressString, tokenName))) - 1);\n assembly {\n sstore(slot, tokenAddress)\n }\n }\n\n /**\n * @dev Private function that transfers ETH to all payout recipients.\n * @dev This contract is designed primarily to capture royalties, but is limited in payout logic.\n * @dev This function uses a push payment model, where the contract pushes the ETH to the recipients.\n * @dev The design is intended so that royalty distribution logic can be handled externally via payment distribution contracts.\n * @dev The recommended usage for royalty structures that require more complex payout logic to multiple recipients is to\n * set 100% ownership payout with the recipient being the payment distribution contract.\n */\n function _payoutEth() private {\n address payable[] memory addresses = _getPayoutAddresses();\n uint256[] memory bps = _getPayoutBps();\n uint256 length = addresses.length;\n uint256 balance = address(this).balance;\n uint256 sending;\n bool extendedCall;\n assembly {\n extendedCall := sload(_extendedCallSlot)\n }\n for (uint256 i = 0; i < length; i++) {\n sending = ((bps[i] * balance) / 10000);\n // only send value if it is greater than 0\n if (sending > 0) {\n // If the contract enabled extended call on init then use call to transfer, otherwise use transfer\n if (extendedCall == true) {\n (bool success, ) = addresses[i].call{value: sending}(\"\");\n require(success, \"ROYALTIES: Transfer failed\");\n } else {\n addresses[i].transfer(sending);\n }\n }\n }\n }\n\n /**\n * @dev Private function that transfers tokens to all payout recipients.\n * @dev ERC20 tokens that use fee on transfer are not supported.\n * @dev This contract is designed primarily to capture royalties, but is limited in payout logic.\n * @dev This function uses a push payment model, where the contract pushes the ETH to the recipients.\n * @dev The design is intended so that royalty distribution logic can be handled externally via payment distribution contracts.\n * @dev The recommended usage for royalty structures that require more complex payout logic to multiple recipients is to\n * set 100% ownership payout with the recipient being the payment distribution contract.\n *\n * @param tokenAddress Smart contract address of ERC20 token.\n */\n function _payoutToken(address tokenAddress) private {\n address payable[] memory addresses = _getPayoutAddresses();\n uint256[] memory bps = _getPayoutBps();\n uint256 length = addresses.length;\n ERC20 erc20 = ERC20(tokenAddress);\n uint256 balance = erc20.balanceOf(address(this));\n uint256 sending;\n for (uint256 i = 0; i < length; i++) {\n sending = ((bps[i] * balance) / 10000);\n // Some tokens revert when transferring a zero value amount this check ensures if one recipient's\n // amount is zero, the transfer will still succeed for the other recipients.\n if (sending > 0) {\n require(\n _callOptionalReturn(\n tokenAddress,\n erc20.transfer.selector,\n abi.encode(address(addresses[i]), uint256(sending))\n ),\n \"ROYALTIES: ERC20 transfer failed\"\n );\n }\n }\n }\n\n /**\n * @dev Private function that transfers multiple tokens to all payout recipients.\n * @dev Try to use _payoutToken and handle each token individually.\n * @dev ERC20 tokens that use fee on transfer are not supported.\n * @dev This contract is designed primarily to capture royalties, but is limited in payout logic.\n * @dev This function uses a push payment model, where the contract pushes the ETH to the recipients.\n * @dev The design is intended so that royalty distribution logic can be handled externally via payment distribution contracts.\n * @dev The recommended usage for royalty structures that require more complex payout logic to multiple recipients is to\n * set 100% ownership payout with the recipient being the payment distribution contract.\n *\n * @param tokenAddresses Array of smart contract addresses of ERC20 tokens.\n */\n function _payoutTokens(address[] memory tokenAddresses) private {\n address payable[] memory addresses = _getPayoutAddresses();\n uint256[] memory bps = _getPayoutBps();\n ERC20 erc20;\n uint256 balance;\n uint256 sending;\n for (uint256 t = 0; t < tokenAddresses.length; t++) {\n erc20 = ERC20(tokenAddresses[t]);\n balance = erc20.balanceOf(address(this));\n for (uint256 i = 0; i < addresses.length; i++) {\n sending = ((bps[i] * balance) / 10000);\n // Some tokens revert when transferring a zero value amount this check ensures if one recipient's\n // amount is zero, the transfer will still succeed for the other recipients.\n if (sending > 0) {\n require(\n _callOptionalReturn(\n tokenAddresses[t],\n erc20.transfer.selector,\n abi.encode(address(addresses[i]), uint256(sending))\n ),\n \"ROYALTIES: ERC20 transfer failed\"\n );\n }\n }\n }\n }\n\n /**\n * @dev This function validates that the call is being made by an authorised wallet.\n * @dev Will revert entire tranaction if it fails.\n */\n function _validatePayoutRequestor() private view {\n if (!isOwner()) {\n bool matched;\n address payable[] memory addresses = _getPayoutAddresses();\n address payable sender = payable(msg.sender);\n for (uint256 i = 0; i < addresses.length; i++) {\n if (addresses[i] == sender) {\n matched = true;\n break;\n }\n }\n require(matched, \"ROYALTIES: sender not authorized\");\n }\n }\n\n /**\n * @notice Set the wallets and percentages for royalty payouts.\n * Limited to 10 wallets to prevent out of gas errors.\n * For more complex royalty structures, set 100% ownership payout with the recipient being the payment distribution contract.\n * @dev Function can only we called by owner, admin, or identity wallet.\n * @dev Addresses and bps arrays must be equal length. Bps values added together must equal 10000 exactly.\n * @param addresses An array of all the addresses that will be receiving royalty payouts.\n * @param bps An array of the percentages that each address will receive from the royalty payouts.\n */\n function configurePayouts(address payable[] memory addresses, uint256[] memory bps) public onlyOwner {\n require(addresses.length == bps.length, \"ROYALTIES: missmatched lenghts\");\n require(addresses.length <= 10, \"ROYALTIES: max 10 addresses\");\n uint256 totalBp;\n for (uint256 i = 0; i < addresses.length; i++) {\n require(addresses[i] != address(0), \"ROYALTIES: payee is zero address\");\n require(bps[i] > 0, \"ROYALTIES: bp is zero\");\n totalBp = totalBp + bps[i];\n }\n require(totalBp == 10000, \"ROYALTIES: bps must equal 10000\");\n _setPayoutAddresses(addresses);\n _setPayoutBps(bps);\n }\n\n /**\n * @notice Show the wallets and percentages of payout recipients.\n * @dev These are the recipients that will be getting royalty payouts.\n * @return addresses An array of all the addresses that will be receiving royalty payouts.\n * @return bps An array of the percentages that each address will receive from the royalty payouts.\n */\n function getPayoutInfo() public view returns (address payable[] memory addresses, uint256[] memory bps) {\n addresses = _getPayoutAddresses();\n bps = _getPayoutBps();\n }\n\n /**\n * @notice Get payout of all ETH in smart contract.\n * @dev Distribute all the ETH(minus gas fees) to payout recipients.\n */\n function getEthPayout() public {\n _validatePayoutRequestor();\n _payoutEth();\n }\n\n /**\n * @notice Get payout for a specific token address. Token must have a positive balance!\n * @dev Contract owner, admin, identity wallet, and payout recipients can call this function.\n * @param tokenAddress An address of the token for which to issue payouts for.\n */\n function getTokenPayout(address tokenAddress) public {\n _validatePayoutRequestor();\n _payoutToken(tokenAddress);\n }\n\n /**\n * @notice Get payouts for tokens listed by address. Tokens must have a positive balance!\n * @dev Each token balance must be equal or greater than 10000. Otherwise calculating BP is difficult.\n * @param tokenAddresses An address array of tokens to issue payouts for.\n */\n function getTokensPayout(address[] memory tokenAddresses) public {\n _validatePayoutRequestor();\n _payoutTokens(tokenAddresses);\n }\n\n /**\n * @notice Set the royalty information for entire contract, or a specific token.\n * @dev Take great care to not make this function accessible by other public functions in your overlying smart contract.\n * @param tokenId Set a specific token id, or leave at 0 to set as default parameters.\n * @param receiver Wallet or smart contract that will receive the royalty payouts.\n * @param bp Uint256 of royalty percentage, provided in base points format.\n */\n function setRoyalties(uint256 tokenId, address payable receiver, uint256 bp) public onlyOwner {\n require(receiver != address(0), \"ROYALTIES: receiver is zero address\");\n require(bp <= 10000, \"ROYALTIES: base points over 100%\");\n if (tokenId == 0) {\n _setDefaultReceiver(receiver);\n _setDefaultBp(bp);\n } else {\n _setReceiver(tokenId, receiver);\n _setBp(tokenId, bp);\n }\n address[] memory receivers = new address[](1);\n receivers[0] = address(receiver);\n uint256[] memory bps = new uint256[](1);\n bps[0] = bp;\n emit SecondarySaleFees(tokenId, receivers, bps);\n }\n\n // IEIP2981\n function royaltyInfo(uint256 tokenId, uint256 value) public view returns (address, uint256) {\n if (_getReceiver(tokenId) == address(0)) {\n return (_getDefaultReceiver(), (_getDefaultBp() * value) / 10000);\n } else {\n return (_getReceiver(tokenId), (_getBp(tokenId) * value) / 10000);\n }\n }\n\n // Rarible V1\n function getFeeBps(uint256 tokenId) public view returns (uint256[] memory) {\n uint256[] memory bps = new uint256[](1);\n if (_getReceiver(tokenId) == address(0)) {\n bps[0] = _getDefaultBp();\n } else {\n bps[0] = _getBp(tokenId);\n }\n return bps;\n }\n\n // Rarible V1\n function getFeeRecipients(uint256 tokenId) public view returns (address payable[] memory) {\n address payable[] memory receivers = new address payable[](1);\n if (_getReceiver(tokenId) == address(0)) {\n receivers[0] = _getDefaultReceiver();\n } else {\n receivers[0] = _getReceiver(tokenId);\n }\n return receivers;\n }\n\n // Rarible V2(not being used since it creates a conflict with Manifold royalties)\n // struct Part {\n // address payable account;\n // uint96 value;\n // }\n\n // function getRoyalties(uint256 tokenId) public view returns (Part[] memory) {\n // return royalties[id];\n // }\n\n // Manifold\n function getRoyalties(uint256 tokenId) public view returns (address payable[] memory, uint256[] memory) {\n address payable[] memory receivers = new address payable[](1);\n uint256[] memory bps = new uint256[](1);\n if (_getReceiver(tokenId) == address(0)) {\n receivers[0] = _getDefaultReceiver();\n bps[0] = _getDefaultBp();\n } else {\n receivers[0] = _getReceiver(tokenId);\n bps[0] = _getBp(tokenId);\n }\n return (receivers, bps);\n }\n\n // Foundation\n function getFees(uint256 tokenId) public view returns (address payable[] memory, uint256[] memory) {\n address payable[] memory receivers = new address payable[](1);\n uint256[] memory bps = new uint256[](1);\n if (_getReceiver(tokenId) == address(0)) {\n receivers[0] = _getDefaultReceiver();\n bps[0] = _getDefaultBp();\n } else {\n receivers[0] = _getReceiver(tokenId);\n bps[0] = _getBp(tokenId);\n }\n return (receivers, bps);\n }\n\n // SuperRare\n // Hint taken from Manifold's RoyaltyEngine(https://github.com/manifoldxyz/royalty-registry-solidity/blob/main/contracts/RoyaltyEngineV1.sol)\n // To be quite honest, SuperRare is a closed marketplace. They're working on opening it up but looks like they want to use private smart contracts.\n // We'll just leave this here for just in case they open the flood gates.\n function tokenCreator(\n address,\n /* contractAddress*/\n uint256 tokenId\n ) public view returns (address) {\n address receiver = _getReceiver(tokenId);\n if (receiver == address(0)) {\n return _getDefaultReceiver();\n }\n return receiver;\n }\n\n // SuperRare\n function calculateRoyaltyFee(\n address,\n /* contractAddress */\n uint256 tokenId,\n uint256 amount\n ) public view returns (uint256) {\n if (_getReceiver(tokenId) == address(0)) {\n return (_getDefaultBp() * amount) / 10000;\n } else {\n return (_getBp(tokenId) * amount) / 10000;\n }\n }\n\n // Holograph\n // we indicate that this contract operates market functions\n function marketContract() public view returns (address) {\n return address(this);\n }\n\n // Holograph\n // we indicate that the receiver is the creator, to convince the smart contract to pay\n function tokenCreators(uint256 tokenId) public view returns (address) {\n address receiver = _getReceiver(tokenId);\n if (receiver == address(0)) {\n return _getDefaultReceiver();\n }\n return receiver;\n }\n\n // Holograph\n // we provide the percentage that needs to be paid out from the sale\n function bidSharesForToken(uint256 tokenId) public view returns (HolographBidShares memory bidShares) {\n // this information is outside of the scope of our\n bidShares.prevOwner.value = 0;\n bidShares.owner.value = 0;\n if (_getReceiver(tokenId) == address(0)) {\n bidShares.creator.value = _getDefaultBp() * (10 ** 16);\n } else {\n bidShares.creator.value = _getBp(tokenId) * (10 ** 16);\n }\n return bidShares;\n }\n\n /**\n * @notice Get the smart contract address of a token by common name.\n * @dev Used only to identify really major/common tokens. Avoid using due to gas usages.\n * @param tokenName The ticker symbol of the token. For example \"USDC\" or \"DAI\".\n * @return The smart contract address of the token ticker symbol. Or zero address if not found.\n */\n function getTokenAddress(string memory tokenName) public view returns (address) {\n return _getTokenAddress(tokenName);\n }\n\n /**\n * @notice Used to wrap function calls to check if they return without revert regardless of return type.\n * @dev Checks if wrapped function opcode is a revert, if it is then it reverts as well, if it's not then\n * it checks for return data, if return data exists, it is returned as a bool,\n * if return data does not exist (0 length) then success is expected and returns true\n * @return Returns true if the wrapped function call returns without a revert even if it doesn't return true.\n */\n function _callOptionalReturn(address target, bytes4 functionSignature, bytes memory payload) internal returns (bool) {\n bytes memory data = abi.encodePacked(functionSignature, payload);\n bool success = true;\n assembly {\n let result := call(gas(), target, callvalue(), add(data, 0x20), mload(data), 0, 0)\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n if gt(returndatasize(), 0) {\n returndatacopy(success, 0, 0x20)\n }\n }\n }\n return success;\n }\n}\n" + }, + "contracts/enum/ChainIdType.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nenum ChainIdType {\n UNDEFINED, // 0\n EVM, // 1\n HOLOGRAPH, // 2\n LAYERZERO, // 3\n HYPERLANE // 4\n}\n" + }, + "contracts/enum/HolographERC20Event.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nenum HolographERC20Event {\n UNDEFINED, // 0\n bridgeIn, // 1\n bridgeOut, // 2\n afterApprove, // 3\n beforeApprove, // 4\n afterOnERC20Received, // 5\n beforeOnERC20Received, // 6\n afterBurn, // 7\n beforeBurn, // 8\n afterMint, // 9\n beforeMint, // 10\n afterSafeTransfer, // 11\n beforeSafeTransfer, // 12\n afterTransfer, // 13\n beforeTransfer, // 14\n onAllowance // 15\n}\n" + }, + "contracts/enum/HolographERC721Event.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nenum HolographERC721Event {\n UNDEFINED, // 0\n bridgeIn, // 1\n bridgeOut, // 2\n afterApprove, // 3\n beforeApprove, // 4\n afterApprovalAll, // 5\n beforeApprovalAll, // 6\n afterBurn, // 7\n beforeBurn, // 8\n afterMint, // 9\n beforeMint, // 10\n afterSafeTransfer, // 11\n beforeSafeTransfer, // 12\n afterTransfer, // 13\n beforeTransfer, // 14\n beforeOnERC721Received, // 15\n afterOnERC721Received, // 16\n onIsApprovedForAll, // 17\n customContractURI // 18\n}\n" + }, + "contracts/enum/HolographGenericEvent.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nenum HolographGenericEvent {\n UNDEFINED, // 0\n bridgeIn, // 1\n bridgeOut // 2\n}\n" + }, + "contracts/enum/InterfaceType.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nenum InterfaceType {\n UNDEFINED, // 0\n ERC20, // 1\n ERC721, // 2\n ERC1155, // 3\n ROYALTIES, // 4\n GENERIC // 5\n}\n" + }, + "contracts/enum/TokenUriType.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nenum TokenUriType {\n UNDEFINED, // 0\n IPFS, // 1\n HTTPS, // 2\n ARWEAVE // 3\n}\n" + }, + "contracts/faucet/Faucet.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Initializable.sol\";\nimport \"../interface/HolographERC20Interface.sol\";\nimport \"../interface/InitializableInterface.sol\";\n\ncontract Faucet is Initializable {\n address public owner;\n HolographERC20Interface public token;\n\n uint256 public faucetDripAmount = 100 ether;\n uint256 public faucetCooldown = 24 hours;\n\n mapping(address => uint256) lastAccessTime;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"Faucet contract is already initialized\");\n (address _contractOwner, address _tokenInstance) = abi.decode(initPayload, (address, address));\n token = HolographERC20Interface(_tokenInstance);\n owner = _contractOwner;\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /// @notice Get tokens from faucet's own balance. Rate limited.\n function requestTokens() external {\n require(isAllowedToWithdraw(msg.sender), \"Come back later\");\n require(token.balanceOf(address(this)) >= faucetDripAmount, \"Faucet is empty\");\n lastAccessTime[msg.sender] = block.timestamp;\n token.transfer(msg.sender, faucetDripAmount);\n }\n\n /// @notice Update token address\n function setToken(address tokenAddress) external onlyOwner {\n token = HolographERC20Interface(tokenAddress);\n }\n\n /// @notice Grant tokens to receiver from faucet's own balance. Not rate limited.\n function grantTokens(address _address) external onlyOwner {\n require(token.balanceOf(address(this)) >= faucetDripAmount, \"Faucet is empty\");\n token.transfer(_address, faucetDripAmount);\n }\n\n function grantTokens(address _address, uint256 _amountWei) external onlyOwner {\n require(token.balanceOf(address(this)) >= _amountWei, \"Insufficient funds\");\n token.transfer(_address, _amountWei);\n }\n\n /// @notice Withdraw all funds from the faucet.\n function withdrawAllTokens(address _receiver) external onlyOwner {\n token.transfer(_receiver, token.balanceOf(address(this)));\n }\n\n /// @notice Withdraw amount of funds from the faucet. Amount is in wei.\n function withdrawTokens(address _receiver, uint256 _amountWei) external onlyOwner {\n require(token.balanceOf(address(this)) >= _amountWei, \"Insufficient funds\");\n token.transfer(_receiver, _amountWei);\n }\n\n /// @notice Configure the time between two drip requests. Time is in seconds.\n function setWithdrawCooldown(uint256 _waitTimeSeconds) external onlyOwner {\n faucetCooldown = _waitTimeSeconds;\n }\n\n /// @notice Configure the drip request amount. Amount is in wei.\n function setWithdrawAmount(uint256 _amountWei) external onlyOwner {\n faucetDripAmount = _amountWei;\n }\n\n /// @notice Check whether an address can request drip and is not on cooldown.\n function isAllowedToWithdraw(address _address) public view returns (bool) {\n if (lastAccessTime[_address] == 0) {\n return true;\n } else if (block.timestamp >= lastAccessTime[_address] + faucetCooldown) {\n return true;\n }\n return false;\n }\n\n /// @notice Get the last time the address withdrew tokens.\n function getLastAccessTime(address _address) public view returns (uint256) {\n return lastAccessTime[_address];\n }\n\n modifier onlyOwner() {\n require(msg.sender == owner, \"Caller is not the owner\");\n _;\n }\n}\n" + }, + "contracts/Holograph.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./abstract/Admin.sol\";\nimport \"./abstract/Initializable.sol\";\n\nimport \"./interface/InitializableInterface.sol\";\nimport \"./interface/HolographInterface.sol\";\n\n/**\n * @title Holograph Protocol\n * @author https://github.com/holographxyz\n * @notice This is the primary Holograph Protocol smart contract\n * @dev This contract stores a reference to all the primary modules and variables of the protocol\n */\ncontract Holograph is Admin, Initializable, HolographInterface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.bridge')) - 1)\n */\n bytes32 constant _bridgeSlot = 0xeb87cbb21687feb327e3d58c6c16d552231d12c7a0e8115042a4165fac8a77f9;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.chainId')) - 1)\n */\n bytes32 constant _chainIdSlot = 0x7651bfc11f7485d07ab2b41c1312e2007c8cb7efb0f7352a6dee4a1153eebab2;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.factory')) - 1)\n */\n bytes32 constant _factorySlot = 0xa49f20855ba576e09d13c8041c8039fa655356ea27f6c40f1ec46a4301cd5b23;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holographChainId')) - 1)\n */\n bytes32 constant _holographChainIdSlot = 0xd840a780c26e07edc6e1ee2eaa6f134ed5488dbd762614116653cee8542a3844;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.interfaces')) - 1)\n */\n bytes32 constant _interfacesSlot = 0xbd3084b8c09da87ad159c247a60e209784196be2530cecbbd8f337fdd1848827;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.operator')) - 1)\n */\n bytes32 constant _operatorSlot = 0x7caba557ad34138fa3b7e43fb574e0e6cc10481c3073e0dffbc560db81b5c60f;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\n */\n bytes32 constant _registrySlot = 0xce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.treasury')) - 1)\n */\n bytes32 constant _treasurySlot = 0x4215e7a38d75164ca078bbd61d0992cdeb1ba16f3b3ead5944966d3e4080e8b6;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.utilityToken')) - 1)\n */\n bytes32 constant _utilityTokenSlot = 0xbf76518d46db472b71aa7677a0908b8016f3dee568415ffa24055f9a670f9c37;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (\n uint32 holographChainId,\n address bridge,\n address factory,\n address interfaces,\n address operator,\n address registry,\n address treasury,\n address utilityToken\n ) = abi.decode(initPayload, (uint32, address, address, address, address, address, address, address));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_chainIdSlot, chainid())\n sstore(_holographChainIdSlot, holographChainId)\n sstore(_bridgeSlot, bridge)\n sstore(_factorySlot, factory)\n sstore(_interfacesSlot, interfaces)\n sstore(_operatorSlot, operator)\n sstore(_registrySlot, registry)\n sstore(_treasurySlot, treasury)\n sstore(_utilityTokenSlot, utilityToken)\n }\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @notice Get the address of the Holograph Bridge module\n * @dev Used for beaming holographable assets cross-chain\n */\n function getBridge() external view returns (address bridge) {\n assembly {\n bridge := sload(_bridgeSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Bridge module address\n * @param bridge address of the Holograph Bridge smart contract to use\n */\n function setBridge(address bridge) external onlyAdmin {\n assembly {\n sstore(_bridgeSlot, bridge)\n }\n }\n\n /**\n * @notice Get the chain ID that the Protocol was deployed on\n * @dev Useful for checking if/when a hard fork occurs\n */\n function getChainId() external view returns (uint256 chainId) {\n assembly {\n chainId := sload(_chainIdSlot)\n }\n }\n\n /**\n * @notice Update the chain ID\n * @dev Useful for updating once a hard fork has been mitigated\n * @param chainId EVM chain ID to use\n */\n function setChainId(uint256 chainId) external onlyAdmin {\n assembly {\n sstore(_chainIdSlot, chainId)\n }\n }\n\n /**\n * @notice Get the address of the Holograph Factory module\n * @dev Used for deploying holographable smart contracts\n */\n function getFactory() external view returns (address factory) {\n assembly {\n factory := sload(_factorySlot)\n }\n }\n\n /**\n * @notice Update the Holograph Factory module address\n * @param factory address of the Holograph Factory smart contract to use\n */\n function setFactory(address factory) external onlyAdmin {\n assembly {\n sstore(_factorySlot, factory)\n }\n }\n\n /**\n * @notice Get the Holograph chain Id\n * @dev Holograph uses an internal chain id mapping\n */\n function getHolographChainId() external view returns (uint32 holographChainId) {\n assembly {\n holographChainId := sload(_holographChainIdSlot)\n }\n }\n\n /**\n * @notice Update the Holograph chain ID\n * @dev Useful for updating once a hard fork was mitigated\n * @param holographChainId Holograph chain ID to use\n */\n function setHolographChainId(uint32 holographChainId) external onlyAdmin {\n assembly {\n sstore(_holographChainIdSlot, holographChainId)\n }\n }\n\n /**\n * @notice Get the address of the Holograph Interfaces module\n * @dev Holograph uses this contract to store data that needs to be accessed by a large portion of the modules\n */\n function getInterfaces() external view returns (address interfaces) {\n assembly {\n interfaces := sload(_interfacesSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Interfaces module address\n * @param interfaces address of the Holograph Interfaces smart contract to use\n */\n function setInterfaces(address interfaces) external onlyAdmin {\n assembly {\n sstore(_interfacesSlot, interfaces)\n }\n }\n\n /**\n * @notice Get the address of the Holograph Operator module\n * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module\n */\n function getOperator() external view returns (address operator) {\n assembly {\n operator := sload(_operatorSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Operator module address\n * @param operator address of the Holograph Operator smart contract to use\n */\n function setOperator(address operator) external onlyAdmin {\n assembly {\n sstore(_operatorSlot, operator)\n }\n }\n\n /**\n * @notice Get the Holograph Registry module\n * @dev This module stores a reference for all deployed holographable smart contracts\n */\n function getRegistry() external view returns (address registry) {\n assembly {\n registry := sload(_registrySlot)\n }\n }\n\n /**\n * @notice Update the Holograph Registry module address\n * @param registry address of the Holograph Registry smart contract to use\n */\n function setRegistry(address registry) external onlyAdmin {\n assembly {\n sstore(_registrySlot, registry)\n }\n }\n\n /**\n * @notice Get the Holograph Treasury module\n * @dev All of the Holograph Protocol assets are stored and managed by this module\n */\n function getTreasury() external view returns (address treasury) {\n assembly {\n treasury := sload(_treasurySlot)\n }\n }\n\n /**\n * @notice Update the Holograph Treasury module address\n * @param treasury address of the Holograph Treasury smart contract to use\n */\n function setTreasury(address treasury) external onlyAdmin {\n assembly {\n sstore(_treasurySlot, treasury)\n }\n }\n\n /**\n * @notice Get the Holograph Utility Token address\n * @dev This is the official utility token of the Holograph Protocol\n */\n function getUtilityToken() external view returns (address utilityToken) {\n assembly {\n utilityToken := sload(_utilityTokenSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Utility Token address\n * @param utilityToken address of the Holograph Utility Token smart contract to use\n */\n function setUtilityToken(address utilityToken) external onlyAdmin {\n assembly {\n sstore(_utilityTokenSlot, utilityToken)\n }\n }\n\n /**\n * @dev Purposefully reverts to prevent having any type of ether transfered into the contract\n */\n receive() external payable {\n revert();\n }\n\n /**\n * @dev Purposefully reverts to prevent any calls to undefined functions\n */\n fallback() external payable {\n revert();\n }\n}\n" + }, + "contracts/HolographBridge.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./abstract/Admin.sol\";\nimport \"./abstract/Initializable.sol\";\n\nimport \"./interface/HolographERC20Interface.sol\";\nimport \"./interface/Holographable.sol\";\nimport \"./interface/HolographInterface.sol\";\nimport \"./interface/HolographBridgeInterface.sol\";\nimport \"./interface/HolographFactoryInterface.sol\";\nimport \"./interface/HolographOperatorInterface.sol\";\nimport \"./interface/HolographRegistryInterface.sol\";\nimport \"./interface/InitializableInterface.sol\";\n\n/**\n * @title Holograph Bridge\n * @author https://github.com/holographxyz\n * @notice Beam any holographable contracts and assets across blockchains\n * @dev The contract abstracts all the complexities of making bridge requests and uses a universal interface to bridge any type of holographable assets\n */\ncontract HolographBridge is Admin, Initializable, HolographBridgeInterface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.factory')) - 1)\n */\n bytes32 constant _factorySlot = 0xa49f20855ba576e09d13c8041c8039fa655356ea27f6c40f1ec46a4301cd5b23;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\n */\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.jobNonce')) - 1)\n */\n bytes32 constant _jobNonceSlot = 0x1cda64803f3b43503042e00863791e8d996666552d5855a78d53ee1dd4b3286d;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.operator')) - 1)\n */\n bytes32 constant _operatorSlot = 0x7caba557ad34138fa3b7e43fb574e0e6cc10481c3073e0dffbc560db81b5c60f;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\n */\n bytes32 constant _registrySlot = 0xce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7;\n\n /**\n * @dev Allow calls only from Holograph Operator contract\n */\n modifier onlyOperator() {\n require(msg.sender == address(_operator()), \"HOLOGRAPH: operator only call\");\n _;\n }\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address factory, address holograph, address operator, address registry) = abi.decode(\n initPayload,\n (address, address, address, address)\n );\n assembly {\n sstore(_adminSlot, origin())\n sstore(_factorySlot, factory)\n sstore(_holographSlot, holograph)\n sstore(_operatorSlot, operator)\n sstore(_registrySlot, registry)\n }\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @notice Receive a beam from another chain\n * @dev This function can only be called by the Holograph Operator module\n * @param fromChain Holograph Chain ID where the brigeOutRequest was created\n * @param holographableContract address of the destination contract that the bridgeInRequest is targeted for\n * @param hToken address of the hToken contract that wrapped the origin chain native gas token\n * @param hTokenRecipient address of recipient for the hToken reward\n * @param hTokenValue exact amount of hToken reward in wei\n * @param doNotRevert boolean used to specify if the call should revert\n * @param bridgeInPayload actual abi encoded bytes of the data that the holographable contract bridgeIn function will receive\n */\n function bridgeInRequest(\n uint256 /* nonce*/,\n uint32 fromChain,\n address holographableContract,\n address hToken,\n address hTokenRecipient,\n uint256 hTokenValue,\n bool doNotRevert,\n bytes calldata bridgeInPayload\n ) external payable onlyOperator {\n /**\n * @dev check that the target contract is either Holograph Factory or a deployed holographable contract\n */\n require(\n _registry().isHolographedContract(holographableContract) || address(_factory()) == holographableContract,\n \"HOLOGRAPH: not holographed\"\n );\n /**\n * @dev make a bridgeIn function call to the holographable contract\n */\n bytes4 selector = Holographable(holographableContract).bridgeIn(fromChain, bridgeInPayload);\n /**\n * @dev ensure returned selector is bridgeIn function signature, to guarantee that the function was called and succeeded\n */\n require(selector == Holographable.bridgeIn.selector, \"HOLOGRAPH: bridge in failed\");\n /**\n * @dev check if a specific reward amount was assigned to this request\n */\n if (hTokenValue > 0 && hTokenRecipient != address(0)) {\n /**\n * @dev mint the specific hToken amount for hToken recipient\n * this value is equivalent to amount that is deposited on origin chain's hToken contract\n * recipient can beam the asset to origin chain and unwrap for native gas token at any time\n */\n require(\n HolographERC20Interface(hToken).holographBridgeMint(hTokenRecipient, hTokenValue) ==\n HolographERC20Interface.holographBridgeMint.selector,\n \"HOLOGRAPH: hToken mint failed\"\n );\n }\n /**\n * @dev allow the call to revert on demand, for example use case, look into the Holograph Operator's jobEstimator function\n */\n require(doNotRevert, \"HOLOGRAPH: reverted\");\n }\n\n /**\n * @notice Create a beam request for a destination chain\n * @dev This function works for deploying contracts and beaming supported holographable assets across chains\n * @param toChain Holograph Chain ID where the beam is being sent to\n * @param holographableContract address of the contract for which the bridge request is being made\n * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain\n * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\n */\n function bridgeOutRequest(\n uint32 toChain,\n address holographableContract,\n uint256 gasLimit,\n uint256 gasPrice,\n bytes calldata bridgeOutPayload\n ) external payable {\n /**\n * @dev check that the target contract is either Holograph Factory or a deployed holographable contract\n */\n require(\n _registry().isHolographedContract(holographableContract) || address(_factory()) == holographableContract,\n \"HOLOGRAPH: not holographed\"\n );\n /**\n * @dev make a bridgeOut function call to the holographable contract\n */\n (bytes4 selector, bytes memory returnedPayload) = Holographable(holographableContract).bridgeOut(\n toChain,\n msg.sender,\n bridgeOutPayload\n );\n /**\n * @dev ensure returned selector is bridgeOut function signature, to guarantee that the function was called and succeeded\n */\n require(selector == Holographable.bridgeOut.selector, \"HOLOGRAPH: bridge out failed\");\n /**\n * @dev pass the request, along with all data, to Holograph Operator, to handle the cross-chain messaging logic\n */\n _operator().send{value: msg.value}(\n gasLimit,\n gasPrice,\n toChain,\n msg.sender,\n _jobNonce(),\n holographableContract,\n returnedPayload\n );\n }\n\n /**\n * @notice Do not call this function, it will always revert\n * @dev Used by getBridgeOutRequestPayload function\n * It is purposefully inverted to always revert on a successful call\n * Marked as external and not private to allow use inside try/catch of getBridgeOutRequestPayload function\n * If this function does not revert and returns a string, it is the actual revert reason\n * @param sender address of actual sender that is planning to make a bridgeOutRequest call\n * @param toChain holograph chain id of destination chain\n * @param holographableContract address of the contract for which the bridge request is being made\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\n */\n function revertedBridgeOutRequest(\n address sender,\n uint32 toChain,\n address holographableContract,\n bytes calldata bridgeOutPayload\n ) external returns (string memory revertReason) {\n /**\n * @dev make a bridgeOut function call to the holographable contract inside of a try/catch\n */\n try Holographable(holographableContract).bridgeOut(toChain, sender, bridgeOutPayload) returns (\n bytes4 selector,\n bytes memory payload\n ) {\n /**\n * @dev ensure returned selector is bridgeOut function signature, to guarantee that the function was called and succeeded\n */\n if (selector != Holographable.bridgeOut.selector) {\n /**\n * @dev if selector does not match, then it means the request failed\n */\n return \"HOLOGRAPH: bridge out failed\";\n }\n assembly {\n /**\n * @dev the entire payload is sent back in a revert\n */\n revert(add(payload, 0x20), mload(payload))\n }\n } catch Error(string memory reason) {\n return reason;\n } catch {\n return \"HOLOGRAPH: unknown error\";\n }\n }\n\n /**\n * @notice Get the payload created by the bridgeOutRequest function\n * @dev Use this function to get the payload that will be generated by a bridgeOutRequest\n * Only use this with a static call\n * @param toChain Holograph Chain ID where the beam is being sent to\n * @param holographableContract address of the contract for which the bridge request is being made\n * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain\n * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\n * @return samplePayload bytes made up of the bridgeOutRequest payload\n */\n function getBridgeOutRequestPayload(\n uint32 toChain,\n address holographableContract,\n uint256 gasLimit,\n uint256 gasPrice,\n bytes calldata bridgeOutPayload\n ) external returns (bytes memory samplePayload) {\n /**\n * @dev check that the target contract is either Holograph Factory or a deployed holographable contract\n */\n require(\n _registry().isHolographedContract(holographableContract) || address(_factory()) == holographableContract,\n \"HOLOGRAPH: not holographed\"\n );\n bytes memory payload;\n /**\n * @dev the revertedBridgeOutRequest function is wrapped into a try/catch function\n */\n try this.revertedBridgeOutRequest(msg.sender, toChain, holographableContract, bridgeOutPayload) returns (\n string memory revertReason\n ) {\n /**\n * @dev a non reverted result is actually a revert\n */\n revert(revertReason);\n } catch (bytes memory realResponse) {\n /**\n * @dev a revert is actually success, so the return data is stored as payload\n */\n payload = realResponse;\n }\n uint256 jobNonce;\n assembly {\n jobNonce := sload(_jobNonceSlot)\n }\n /**\n * @dev extract hlgFee from operator\n */\n uint256 fee = 0;\n if (gasPrice < type(uint256).max && gasLimit < type(uint256).max) {\n (uint256 hlgFee, , uint256 dstGasPrice) = _operator().getMessageFee(\n toChain,\n gasLimit,\n gasPrice,\n bridgeOutPayload\n );\n if (gasPrice == 0) {\n gasPrice = dstGasPrice;\n }\n fee = hlgFee;\n }\n /**\n * @dev the data is abi encoded into actual bridgeOutRequest payload bytes\n */\n bytes memory encodedData = abi.encodeWithSelector(\n HolographBridgeInterface.bridgeInRequest.selector,\n /**\n * @dev the latest job nonce is incremented by one\n */\n jobNonce + 1,\n _holograph().getHolographChainId(),\n holographableContract,\n _registry().getHToken(_holograph().getHolographChainId()),\n address(0),\n fee,\n true,\n payload\n );\n /**\n * @dev this abi encodes the data just like in Holograph Operator\n */\n samplePayload = abi.encodePacked(encodedData, gasLimit, gasPrice);\n }\n\n /**\n * @notice Get the fees associated with sending specific payload\n * @dev Will provide exact costs on protocol and message side, combine the two to get total\n * @dev @param toChain holograph chain id of destination chain for payload\n * @dev @param gasLimit amount of gas to provide for executing payload on destination chain\n * @dev @param gasPrice maximum amount to pay for gas price, can be set to 0 and will be chose automatically\n * @dev @param crossChainPayload the entire packet being sent cross-chain\n * @return hlgFee the amount (in wei) of native gas token that will cost for finalizing job on destiantion chain\n * @return msgFee the amount (in wei) of native gas token that will cost for sending message to destiantion chain\n * @return dstGasPrice the amount (in wei) that destination message maximum gas price will be\n */\n function getMessageFee(uint32, uint256, uint256, bytes calldata) external view returns (uint256, uint256, uint256) {\n assembly {\n calldatacopy(0, 0, calldatasize())\n let result := staticcall(gas(), sload(_operatorSlot), 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @notice Get the address of the Holograph Factory module\n * @dev Used for deploying holographable smart contracts\n */\n function getFactory() external view returns (address factory) {\n assembly {\n factory := sload(_factorySlot)\n }\n }\n\n /**\n * @notice Update the Holograph Factory module address\n * @param factory address of the Holograph Factory smart contract to use\n */\n function setFactory(address factory) external onlyAdmin {\n assembly {\n sstore(_factorySlot, factory)\n }\n }\n\n /**\n * @notice Get the Holograph Protocol contract\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\n */\n function getHolograph() external view returns (address holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Protocol contract address\n * @param holograph address of the Holograph Protocol smart contract to use\n */\n function setHolograph(address holograph) external onlyAdmin {\n assembly {\n sstore(_holographSlot, holograph)\n }\n }\n\n /**\n * @notice Get the latest job nonce\n * @dev You can use the job nonce as a way to calculate total amount of bridge requests that have been made\n */\n function getJobNonce() external view returns (uint256 jobNonce) {\n assembly {\n jobNonce := sload(_jobNonceSlot)\n }\n }\n\n /**\n * @notice Get the address of the Holograph Operator module\n * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module\n */\n function getOperator() external view returns (address operator) {\n assembly {\n operator := sload(_operatorSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Operator module address\n * @param operator address of the Holograph Operator smart contract to use\n */\n function setOperator(address operator) external onlyAdmin {\n assembly {\n sstore(_operatorSlot, operator)\n }\n }\n\n /**\n * @notice Get the Holograph Registry module\n * @dev This module stores a reference for all deployed holographable smart contracts\n */\n function getRegistry() external view returns (address registry) {\n assembly {\n registry := sload(_registrySlot)\n }\n }\n\n /**\n * @notice Update the Holograph Registry module address\n * @param registry address of the Holograph Registry smart contract to use\n */\n function setRegistry(address registry) external onlyAdmin {\n assembly {\n sstore(_registrySlot, registry)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Factory Interface\n */\n function _factory() private view returns (HolographFactoryInterface factory) {\n assembly {\n factory := sload(_factorySlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Interface\n */\n function _holograph() private view returns (HolographInterface holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n /**\n * @dev Internal nonce, that increments on each call, used for randomness\n */\n function _jobNonce() private returns (uint256 jobNonce) {\n assembly {\n jobNonce := add(sload(_jobNonceSlot), 0x0000000000000000000000000000000000000000000000000000000000000001)\n sstore(_jobNonceSlot, jobNonce)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Operator Interface\n */\n function _operator() private view returns (HolographOperatorInterface operator) {\n assembly {\n operator := sload(_operatorSlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Registry Interface\n */\n function _registry() private view returns (HolographRegistryInterface registry) {\n assembly {\n registry := sload(_registrySlot)\n }\n }\n\n /**\n * @dev Purposefully reverts to prevent having any type of ether transfered into the contract\n */\n receive() external payable {\n revert();\n }\n\n /**\n * @dev Purposefully reverts to prevent any calls to undefined functions\n */\n fallback() external payable {\n revert();\n }\n}\n" + }, + "contracts/HolographFactory.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./abstract/Admin.sol\";\nimport \"./abstract/Initializable.sol\";\n\nimport \"./enforcer/Holographer.sol\";\n\nimport \"./interface/Holographable.sol\";\nimport \"./interface/HolographBridgeInterface.sol\";\nimport \"./interface/HolographFactoryInterface.sol\";\nimport \"./interface/HolographInterface.sol\";\nimport \"./interface/HolographRegistryInterface.sol\";\nimport \"./interface/InitializableInterface.sol\";\n\nimport \"./struct/BridgeSettings.sol\";\nimport \"./struct/DeploymentConfig.sol\";\nimport \"./struct/Verification.sol\";\n\nimport \"./library/Strings.sol\";\n\n/**\n * @title Holograph Factory\n * @author https://github.com/holographxyz\n * @notice Deploy holographable contracts\n * @dev The contract provides methods that allow for the creation of Holograph Protocol compliant smart contracts, that are capable of minting holographable assets\n */\ncontract HolographFactory is Admin, Initializable, Holographable, HolographFactoryInterface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\n */\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\n */\n bytes32 constant _registrySlot = 0xce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address holograph, address registry) = abi.decode(initPayload, (address, address));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_holographSlot, holograph)\n sstore(_registrySlot, registry)\n }\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @notice Deploy holographable contract via bridge request\n * @dev This function directly forwards the calldata to the deployHolographableContract function\n * It is used to allow for Holograph Bridge to make cross-chain deployments\n */\n function bridgeIn(uint32 /* fromChain*/, bytes calldata payload) external returns (bytes4) {\n (DeploymentConfig memory config, Verification memory signature, address signer) = abi.decode(\n payload,\n (DeploymentConfig, Verification, address)\n );\n HolographFactoryInterface(address(this)).deployHolographableContract(config, signature, signer);\n return Holographable.bridgeIn.selector;\n }\n\n /**\n * @notice Deploy holographable contract via bridge request\n * @dev This function directly returns the calldata\n * It is used to allow for Holograph Bridge to make cross-chain deployments\n */\n function bridgeOut(\n uint32 /* toChain*/,\n address /* sender*/,\n bytes calldata payload\n ) external pure returns (bytes4 selector, bytes memory data) {\n return (Holographable.bridgeOut.selector, payload);\n }\n\n function deployHolographableContractMultiChain(\n DeploymentConfig memory config,\n Verification memory signature,\n address signer,\n bool deployOnCurrentChain,\n BridgeSettings[] memory bridgeSettings\n ) external payable {\n if (deployOnCurrentChain) {\n deployHolographableContract(config, signature, signer);\n }\n bytes memory payload = abi.encode(config, signature, signer);\n HolographInterface holograph;\n assembly {\n holograph := sload(_holographSlot)\n }\n HolographBridgeInterface bridge = HolographBridgeInterface(holograph.getBridge());\n uint256 l = bridgeSettings.length;\n for (uint256 i = 0; i < l; i++) {\n bridge.bridgeOutRequest{value: bridgeSettings[i].value}(\n bridgeSettings[i].toChain,\n address(this),\n bridgeSettings[i].gasLimit,\n bridgeSettings[i].gasPrice,\n payload\n );\n }\n }\n\n /**\n * @notice Deploy a holographable smart contract\n * @dev Using this function allows to deploy smart contracts that have the same address across all EVM chains\n * @param config contract deployement configurations\n * @param signature that was created by the wallet that created the original payload\n * @param signer address of wallet that created the payload\n */\n function deployHolographableContract(\n DeploymentConfig memory config,\n Verification memory signature,\n address signer\n ) public {\n address registry;\n address holograph;\n assembly {\n holograph := sload(_holographSlot)\n registry := sload(_registrySlot)\n }\n /**\n * @dev the configuration is encoded and hashed along with signer address\n */\n bytes32 hash = keccak256(\n abi.encodePacked(\n config.contractType,\n config.chainType,\n config.salt,\n keccak256(config.byteCode),\n keccak256(config.initCode),\n signer\n )\n );\n /**\n * @dev the hash is validated against signature\n * this is to guarantee that the original creator's configuration has not been altered\n */\n require(_verifySigner(signature.r, signature.s, signature.v, hash, signer), \"HOLOGRAPH: invalid signature\");\n /**\n * @dev check that this contract has not already been deployed on this chain\n */\n bytes memory holographerBytecode = type(Holographer).creationCode;\n address holographerAddress = address(\n uint160(uint256(keccak256(abi.encodePacked(bytes1(0xff), address(this), hash, keccak256(holographerBytecode)))))\n );\n require(!_isContract(holographerAddress), \"HOLOGRAPH: already deployed\");\n /**\n * @dev convert hash into uint256 which will be used as the salt for create2\n */\n uint256 saltInt = uint256(hash);\n address sourceContractAddress;\n bytes memory sourceByteCode = config.byteCode;\n assembly {\n /**\n * @dev deploy the user created smart contract first\n */\n sourceContractAddress := create2(0, add(sourceByteCode, 0x20), mload(sourceByteCode), saltInt)\n }\n assembly {\n /**\n * @dev deploy the Holographer contract\n */\n holographerAddress := create2(0, add(holographerBytecode, 0x20), mload(holographerBytecode), saltInt)\n }\n /**\n * @dev initialize the Holographer contract\n */\n require(\n InitializableInterface(holographerAddress).init(\n abi.encode(abi.encode(config.chainType, holograph, config.contractType, sourceContractAddress), config.initCode)\n ) == InitializableInterface.init.selector,\n \"initialization failed\"\n );\n /**\n * @dev update the Holograph Registry with deployed contract address\n */\n HolographRegistryInterface(registry).setHolographedHashAddress(hash, holographerAddress);\n /**\n * @dev emit an event that on-chain indexers can easily read\n */\n emit BridgeableContractDeployed(holographerAddress, hash);\n }\n\n /**\n * @notice Get the Holograph Protocol contract\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\n */\n function getHolograph() external view returns (address holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Protocol contract address\n * @param holograph address of the Holograph Protocol smart contract to use\n */\n function setHolograph(address holograph) external onlyAdmin {\n assembly {\n sstore(_holographSlot, holograph)\n }\n }\n\n /**\n * @notice Get the Holograph Registry module\n * @dev This module stores a reference for all deployed holographable smart contracts\n */\n function getRegistry() external view returns (address registry) {\n assembly {\n registry := sload(_registrySlot)\n }\n }\n\n /**\n * @notice Update the Holograph Registry module address\n * @param registry address of the Holograph Registry smart contract to use\n */\n function setRegistry(address registry) external onlyAdmin {\n assembly {\n sstore(_registrySlot, registry)\n }\n }\n\n /**\n * @dev Internal function used for checking if a contract has been deployed at address\n */\n function _isContract(address contractAddress) private view returns (bool) {\n bytes32 codehash;\n assembly {\n codehash := extcodehash(contractAddress)\n }\n return (codehash != 0x0 && codehash != 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470);\n }\n\n /**\n * @dev Internal function used for verifying a signature\n */\n function _verifySigner(bytes32 r, bytes32 s, uint8 v, bytes32 hash, address signer) private pure returns (bool) {\n if (v < 27) {\n v += 27;\n }\n if (v != 27 && v != 28) {\n return false;\n }\n // prevent signature malleability by checking if s-value is in the upper range\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n // if s-value is in upper range, calculate a new s-value\n s = bytes32(0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - uint256(s));\n // flip the v-value\n if (v == 27) {\n v = 28;\n } else {\n v = 27;\n }\n // check if s-value is still in upper range\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return false;\n }\n }\n /**\n * @dev signature is checked against EIP-191 first, then directly, to support legacy wallets\n */\n return (signer != address(0) &&\n (ecrecover(keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", hash)), v, r, s) == signer ||\n (\n ecrecover(\n keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n66\", Strings.toHexString(uint256(hash), 32))),\n v,\n r,\n s\n )\n ) ==\n signer ||\n ecrecover(hash, v, r, s) == signer));\n }\n\n /**\n * @dev Purposefully reverts to prevent having any type of ether transfered into the contract\n */\n receive() external payable {\n revert();\n }\n\n /**\n * @dev Purposefully reverts to prevent any calls to undefined functions\n */\n fallback() external payable {\n revert();\n }\n}\n" + }, + "contracts/HolographGenesis.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./interface/InitializableInterface.sol\";\n\n/**\n * @dev In the beginning there was a smart contract...\n */\ncontract HolographGenesis {\n mapping(address => bool) private _approvedDeployers;\n\n event Message(string message);\n\n modifier onlyDeployer() {\n require(_approvedDeployers[msg.sender], \"HOLOGRAPH: deployer not approved\");\n _;\n }\n\n constructor() {\n _approvedDeployers[tx.origin] = true;\n emit Message(\"The future of NFTs is Holograph.\");\n }\n\n function deploy(\n uint256 chainId,\n bytes12 saltHash,\n bytes memory sourceCode,\n bytes memory initCode\n ) external onlyDeployer {\n require(chainId == block.chainid, \"HOLOGRAPH: incorrect chain id\");\n bytes32 salt = bytes32(abi.encodePacked(msg.sender, saltHash));\n address contractAddress = address(\n uint160(uint256(keccak256(abi.encodePacked(bytes1(0xff), address(this), salt, keccak256(sourceCode)))))\n );\n require(!_isContract(contractAddress), \"HOLOGRAPH: already deployed\");\n assembly {\n contractAddress := create2(0, add(sourceCode, 0x20), mload(sourceCode), salt)\n }\n require(_isContract(contractAddress), \"HOLOGRAPH: deployment failed\");\n require(\n InitializableInterface(contractAddress).init(initCode) == InitializableInterface.init.selector,\n \"HOLOGRAPH: initialization failed\"\n );\n }\n\n function approveDeployer(address newDeployer, bool approve) external onlyDeployer {\n _approvedDeployers[newDeployer] = approve;\n }\n\n function isApprovedDeployer(address deployer) external view returns (bool) {\n return _approvedDeployers[deployer];\n }\n\n function _isContract(address contractAddress) internal view returns (bool) {\n bytes32 codehash;\n assembly {\n codehash := extcodehash(contractAddress)\n }\n return (codehash != 0x0 && codehash != 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470);\n }\n}\n" + }, + "contracts/HolographInterfaces.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./abstract/Admin.sol\";\nimport \"./abstract/Initializable.sol\";\n\nimport \"./enum/ChainIdType.sol\";\nimport \"./enum/InterfaceType.sol\";\nimport \"./enum/TokenUriType.sol\";\n\nimport \"./interface/InitializableInterface.sol\";\n\nimport \"./library/Base64.sol\";\nimport \"./library/Strings.sol\";\n\n/**\n * @title Holograph Interfaces\n * @author https://github.com/holographxyz\n * @notice Get universal Holograph Protocol variables\n * @dev The contract stores a reference of all supported: chains, interfaces, functions, etc.\n */\ncontract HolographInterfaces is Admin, Initializable {\n /**\n * @dev Internal mapping of all InterfaceType interfaces\n */\n mapping(InterfaceType => mapping(bytes4 => bool)) private _supportedInterfaces;\n\n /**\n * @dev Internal mapping of all ChainIdType conversions\n */\n mapping(ChainIdType => mapping(uint256 => mapping(ChainIdType => uint256))) private _chainIdMap;\n\n /**\n * @dev Internal mapping of all TokenUriType prepends\n */\n mapping(TokenUriType => string) private _prependURI;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n address contractAdmin = abi.decode(initPayload, (address));\n assembly {\n sstore(_adminSlot, contractAdmin)\n }\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @notice Get a base64 encoded contract URI JSON string\n * @dev Used to dynamically generate contract JSON payload\n * @param name the name of the smart contract\n * @param imageURL string pointing to the primary contract image, can be: https, ipfs, or ar (arweave)\n * @param externalLink url to website/page related to smart contract\n * @param bps basis points used for specifying royalties percentage\n * @param contractAddress address of the smart contract\n * @return a base64 encoded json string representing the smart contract\n */\n function contractURI(\n string calldata name,\n string calldata imageURL,\n string calldata externalLink,\n uint16 bps,\n address contractAddress\n ) external pure returns (string memory) {\n return\n string(\n abi.encodePacked(\n \"data:application/json;base64,\",\n Base64.encode(\n abi.encodePacked(\n '{\"name\":\"',\n name,\n '\",\"description\":\"',\n name,\n '\",\"image\":\"',\n imageURL,\n '\",\"external_link\":\"',\n externalLink,\n '\",\"seller_fee_basis_points\":',\n Strings.uint2str(bps),\n ',\"fee_recipient\":\"0x',\n Strings.toAsciiString(contractAddress),\n '\"}'\n )\n )\n )\n );\n }\n\n /**\n * @notice Get the prepend to use for tokenURI\n * @dev Provides the prepend to use with TokenUriType URI\n */\n function getUriPrepend(TokenUriType uriType) external view returns (string memory prepend) {\n prepend = _prependURI[uriType];\n }\n\n /**\n * @notice Update the tokenURI prepend\n * @param uriType specify which TokenUriType to set for\n * @param prepend the string to use for the prepend\n */\n function updateUriPrepend(TokenUriType uriType, string calldata prepend) external onlyAdmin {\n _prependURI[uriType] = prepend;\n }\n\n /**\n * @notice Update the tokenURI prepends\n * @param uriTypes specify array of TokenUriTypes to set for\n * @param prepends array string to use for the prepends\n */\n function updateUriPrepends(TokenUriType[] calldata uriTypes, string[] calldata prepends) external onlyAdmin {\n for (uint256 i = 0; i < uriTypes.length; i++) {\n _prependURI[uriTypes[i]] = prepends[i];\n }\n }\n\n function getChainId(\n ChainIdType fromChainType,\n uint256 fromChainId,\n ChainIdType toChainType\n ) external view returns (uint256 toChainId) {\n return _chainIdMap[fromChainType][fromChainId][toChainType];\n }\n\n function updateChainIdMap(\n ChainIdType fromChainType,\n uint256 fromChainId,\n ChainIdType toChainType,\n uint256 toChainId\n ) external onlyAdmin {\n _chainIdMap[fromChainType][fromChainId][toChainType] = toChainId;\n }\n\n function updateChainIdMaps(\n ChainIdType[] calldata fromChainType,\n uint256[] calldata fromChainId,\n ChainIdType[] calldata toChainType,\n uint256[] calldata toChainId\n ) external onlyAdmin {\n uint256 length = fromChainType.length;\n for (uint256 i = 0; i < length; i++) {\n _chainIdMap[fromChainType[i]][fromChainId[i]][toChainType[i]] = toChainId[i];\n }\n }\n\n function supportsInterface(InterfaceType interfaceType, bytes4 interfaceId) external view returns (bool) {\n return _supportedInterfaces[interfaceType][interfaceId];\n }\n\n function updateInterface(InterfaceType interfaceType, bytes4 interfaceId, bool supported) external onlyAdmin {\n _supportedInterfaces[interfaceType][interfaceId] = supported;\n }\n\n function updateInterfaces(\n InterfaceType interfaceType,\n bytes4[] calldata interfaceIds,\n bool supported\n ) external onlyAdmin {\n for (uint256 i = 0; i < interfaceIds.length; i++) {\n _supportedInterfaces[interfaceType][interfaceIds[i]] = supported;\n }\n }\n\n /**\n * @dev Purposefully reverts to prevent having any type of ether transfered into the contract\n */\n receive() external payable {\n revert();\n }\n\n /**\n * @dev Purposefully reverts to prevent any calls to undefined functions\n */\n fallback() external payable {\n revert();\n }\n}\n" + }, + "contracts/HolographOperator.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./abstract/Admin.sol\";\nimport \"./abstract/Initializable.sol\";\n\nimport \"./interface/CrossChainMessageInterface.sol\";\nimport \"./interface/HolographBridgeInterface.sol\";\nimport \"./interface/HolographERC20Interface.sol\";\nimport \"./interface/HolographInterface.sol\";\nimport \"./interface/HolographOperatorInterface.sol\";\nimport \"./interface/HolographRegistryInterface.sol\";\nimport \"./interface/InitializableInterface.sol\";\nimport \"./interface/HolographInterfacesInterface.sol\";\nimport \"./interface/Ownable.sol\";\n\nimport \"./struct/OperatorJob.sol\";\n\n/**\n * @title Holograph Operator\n * @author https://github.com/holographxyz\n * @notice Participate in the Holograph Protocol by becoming an Operator\n * @dev This contract allows operators to bond utility tokens and help execute operator jobs\n */\ncontract HolographOperator is Admin, Initializable, HolographOperatorInterface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.bridge')) - 1)\n */\n bytes32 constant _bridgeSlot = 0xeb87cbb21687feb327e3d58c6c16d552231d12c7a0e8115042a4165fac8a77f9;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\n */\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.interfaces')) - 1)\n */\n bytes32 constant _interfacesSlot = 0xbd3084b8c09da87ad159c247a60e209784196be2530cecbbd8f337fdd1848827;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.jobNonce')) - 1)\n */\n bytes32 constant _jobNonceSlot = 0x1cda64803f3b43503042e00863791e8d996666552d5855a78d53ee1dd4b3286d;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.messagingModule')) - 1)\n */\n bytes32 constant _messagingModuleSlot = 0x54176250282e65985d205704ffce44a59efe61f7afd99e29fda50f55b48c061a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\n */\n bytes32 constant _registrySlot = 0xce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.utilityToken')) - 1)\n */\n bytes32 constant _utilityTokenSlot = 0xbf76518d46db472b71aa7677a0908b8016f3dee568415ffa24055f9a670f9c37;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.minGasPrice')) - 1)\n */\n bytes32 constant _minGasPriceSlot = 0x264d744422f7427cd080572c35c848b6cd3a36da6b47519af89ef13098b12fc0;\n\n /**\n * @dev Internal number (in seconds), used for defining a window for operator to execute the job\n */\n uint256 private _blockTime;\n\n /**\n * @dev Minimum amount of tokens needed for bonding\n */\n uint256 private _baseBondAmount;\n\n /**\n * @dev The multiplier used for calculating bonding amount for pods\n */\n uint256 private _podMultiplier;\n\n /**\n * @dev The threshold used for limiting number of operators in a pod\n */\n uint256 private _operatorThreshold;\n\n /**\n * @dev The threshold step used for increasing bond amount once threshold is reached\n */\n uint256 private _operatorThresholdStep;\n\n /**\n * @dev The threshold divisor used for increasing bond amount once threshold is reached\n */\n uint256 private _operatorThresholdDivisor;\n\n /**\n * @dev Internal counter of all cross-chain messages received\n */\n uint256 private _inboundMessageCounter;\n\n /**\n * @dev Internal mapping of operator job details for a specific job hash\n */\n mapping(bytes32 => uint256) private _operatorJobs;\n\n /**\n * @dev Internal mapping of operator job details for a specific job hash\n */\n mapping(bytes32 => bool) private _failedJobs;\n\n /**\n * @dev Internal mapping of operator addresses, used for temp storage when defining an operator job\n */\n mapping(uint256 => address) private _operatorTempStorage;\n\n /**\n * @dev Internal index used for storing/referencing operator temp storage\n */\n uint32 private _operatorTempStorageCounter;\n\n /**\n * @dev Multi-dimensional array of available operators\n */\n address[][] private _operatorPods;\n\n /**\n * @dev Internal mapping of bonded operators, to prevent double bonding\n */\n mapping(address => uint256) private _bondedOperators;\n\n /**\n * @dev Internal mapping of bonded operators, to prevent double bonding\n */\n mapping(address => uint256) private _operatorPodIndex;\n\n /**\n * @dev Internal mapping of bonded operator amounts\n */\n mapping(address => uint256) private _bondedAmounts;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (\n address bridge,\n address holograph,\n address interfaces,\n address registry,\n address utilityToken,\n uint256 minGasPrice\n ) = abi.decode(initPayload, (address, address, address, address, address, uint256));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_bridgeSlot, bridge)\n sstore(_holographSlot, holograph)\n sstore(_interfacesSlot, interfaces)\n sstore(_registrySlot, registry)\n sstore(_utilityTokenSlot, utilityToken)\n sstore(_minGasPriceSlot, minGasPrice)\n }\n _blockTime = 60; // 60 seconds allowed for execution\n unchecked {\n _baseBondAmount = 100 * (10 ** 18); // one single token unit * 100\n }\n // how much to increase bond amount per pod\n _podMultiplier = 2; // 1, 4, 16, 64\n // starting pod max amount\n _operatorThreshold = 1000;\n // how often to increase price per each operator\n _operatorThresholdStep = 10;\n // we want to multiply by decimals, but instead will have to divide\n _operatorThresholdDivisor = 100; // == * 0.01\n // set first operator for each pod as zero address\n _operatorPods = [[address(0)]];\n // mark zero address as bonded operator, to prevent abuse\n _bondedOperators[address(0)] = 1;\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @notice Recover failed job\n * @dev If a job fails, it can be manually recovered\n * @param bridgeInRequestPayload the entire cross chain message payload\n */\n function recoverJob(bytes calldata bridgeInRequestPayload) external payable {\n bytes32 hash = keccak256(bridgeInRequestPayload);\n require(_failedJobs[hash], \"HOLOGRAPH: invalid recovery job\");\n (bool success, ) = _bridge().call{value: msg.value}(bridgeInRequestPayload);\n require(success, \"HOLOGRAPH: recovery failed\");\n delete (_failedJobs[hash]);\n }\n\n /**\n * @notice Execute an available operator job\n * @dev When making this call, if operating criteria is not met, the call will revert\n * @param bridgeInRequestPayload the entire cross chain message payload\n */\n function executeJob(bytes calldata bridgeInRequestPayload) external payable {\n /**\n * @dev derive the payload hash for use in mappings\n */\n bytes32 hash = keccak256(bridgeInRequestPayload);\n /**\n * @dev check that job exists\n */\n require(_operatorJobs[hash] > 0, \"HOLOGRAPH: invalid job\");\n uint256 gasLimit = 0;\n uint256 gasPrice = 0;\n assembly {\n /**\n * @dev extract gasLimit\n */\n gasLimit := calldataload(sub(add(bridgeInRequestPayload.offset, bridgeInRequestPayload.length), 0x40))\n /**\n * @dev extract gasPrice\n */\n gasPrice := calldataload(sub(add(bridgeInRequestPayload.offset, bridgeInRequestPayload.length), 0x20))\n }\n /**\n * @dev unpack bitwise packed operator job details\n */\n OperatorJob memory job = getJobDetails(hash);\n /**\n * @dev to prevent replay attacks, remove job from mapping\n */\n delete _operatorJobs[hash];\n /**\n * @dev operators of last resort are allowed, but they will not receive HLG rewards of any sort\n */\n bool isBonded = _bondedAmounts[msg.sender] != 0;\n /**\n * @dev check that a specific operator was selected for the job\n */\n if (job.operator != address(0)) {\n /**\n * @dev switch pod to index based value\n */\n uint256 pod = job.pod - 1;\n /**\n * @dev check if sender is not the selected primary operator\n */\n if (job.operator != msg.sender) {\n /**\n * @dev sender is not selected operator, need to check if allowed to do job\n */\n uint256 elapsedTime = block.timestamp - uint256(job.startTimestamp);\n uint256 timeDifference = elapsedTime / job.blockTimes;\n /**\n * @dev validate that initial selected operator time slot is still active\n */\n require(timeDifference > 0, \"HOLOGRAPH: operator has time\");\n /**\n * @dev check that the selected missed the time slot due to a gas spike\n */\n require(gasPrice >= tx.gasprice, \"HOLOGRAPH: gas spike detected\");\n /**\n * @dev check if time is within fallback operator slots\n */\n if (timeDifference < 6) {\n uint256 podIndex = uint256(job.fallbackOperators[timeDifference - 1]);\n /**\n * @dev do a quick sanity check to make sure operator did not leave from index or is a zero address\n */\n if (podIndex > 0 && podIndex < _operatorPods[pod].length) {\n address fallbackOperator = _operatorPods[pod][podIndex];\n /**\n * @dev ensure that sender is currently valid backup operator\n */\n require(fallbackOperator == msg.sender, \"HOLOGRAPH: invalid fallback\");\n } else {\n require(_bondedOperators[msg.sender] == job.pod, \"HOLOGRAPH: pod only fallback\");\n }\n }\n /**\n * @dev time to reward the current operator\n */\n uint256 amount = _getBaseBondAmount(pod);\n /**\n * @dev select operator that failed to do the job, is slashed the pod base fee\n */\n _bondedAmounts[job.operator] -= amount;\n /**\n * @dev only allow HLG rewards to go to bonded operators\n * if operator is bonded, the slashed amount is sent to current operator\n * otherwise it's sent to HolographTreasury, can be burned or distributed from there\n */\n _utilityToken().transfer((isBonded ? msg.sender : address(_holograph().getTreasury())), amount);\n /**\n * @dev check if slashed operator has enough tokens bonded to stay\n */\n if (_bondedAmounts[job.operator] >= amount) {\n /**\n * @dev enough bond amount leftover, put operator back in\n */\n _operatorPods[pod].push(job.operator);\n _operatorPodIndex[job.operator] = _operatorPods[pod].length - 1;\n _bondedOperators[job.operator] = job.pod;\n } else {\n /**\n * @dev slashed operator does not have enough tokens bonded, return remaining tokens only\n */\n uint256 leftovers = _bondedAmounts[job.operator];\n if (leftovers > 0) {\n _bondedAmounts[job.operator] = 0;\n _utilityToken().transfer(job.operator, leftovers);\n }\n }\n } else {\n /**\n * @dev the selected operator is executing the job\n */\n _operatorPods[pod].push(msg.sender);\n _operatorPodIndex[job.operator] = _operatorPods[pod].length - 1;\n _bondedOperators[msg.sender] = job.pod;\n }\n }\n /**\n * @dev every executed job (even if failed) increments total message counter by one\n */\n ++_inboundMessageCounter;\n /**\n * @dev reward operator (with HLG) for executing the job\n * this is out of scope and is purposefully omitted from code\n * currently no rewards are issued\n */\n //_utilityToken().transfer((isBonded ? msg.sender : address(_utilityToken())), (10**18));\n /**\n * @dev always emit an event at end of job, this helps other operators keep track of job status\n */\n emit FinishedOperatorJob(hash, msg.sender);\n /**\n * @dev ensure that there is enough has left for the job\n */\n require(gasleft() > gasLimit, \"HOLOGRAPH: not enough gas left\");\n /**\n * @dev execute the job\n */\n try\n HolographOperatorInterface(address(this)).nonRevertingBridgeCall{value: msg.value}(\n msg.sender,\n bridgeInRequestPayload\n )\n {\n /// @dev do nothing\n } catch {\n /// @dev return any payed funds in case of revert\n payable(msg.sender).transfer(msg.value);\n _failedJobs[hash] = true;\n emit FailedOperatorJob(hash);\n }\n }\n\n /*\n * @dev Purposefully made to be external so that Operator can call it during executeJob function\n * Check the executeJob function to understand it's implementation\n */\n function nonRevertingBridgeCall(address msgSender, bytes calldata payload) external payable {\n require(msg.sender == address(this), \"HOLOGRAPH: operator only call\");\n assembly {\n /**\n * @dev remove gas price from end\n */\n calldatacopy(0, payload.offset, sub(payload.length, 0x20))\n /**\n * @dev hToken recipient is injected right before making the call\n */\n mstore(0x84, msgSender)\n /**\n * @dev make non-reverting call\n */\n let result := call(\n /// @dev gas limit is retrieved from last 32 bytes of payload in-memory value\n mload(sub(payload.length, 0x40)),\n /// @dev destination is bridge contract\n sload(_bridgeSlot),\n /// @dev any value is passed along\n callvalue(),\n /// @dev data is retrieved from 0 index memory position\n 0,\n /// @dev everything except for last 32 bytes (gas limit) is sent\n sub(payload.length, 0x40),\n 0,\n 0\n )\n if eq(result, 0) {\n revert(0, 0)\n }\n return(0, 0)\n }\n }\n\n /**\n * @notice Receive a cross-chain message\n * @dev This function is restricted for use by Holograph Messaging Module only\n */\n function crossChainMessage(bytes calldata bridgeInRequestPayload) external payable {\n require(\n msg.sender == address(_messagingModule()) || msg.sender == 0xE9e30A0aD0d8Af5cF2606ea720052E28D6fcbAAF,\n \"HOLOGRAPH: messaging only call\"\n ); // TODO: Schedule time to remove deprecated LayerZeroModule address after all in-flight LZ messages propagate\n uint256 gasPrice = 0;\n assembly {\n /**\n * @dev extract gasPrice\n */\n gasPrice := calldataload(sub(add(bridgeInRequestPayload.offset, bridgeInRequestPayload.length), 0x20))\n }\n bool underpriced = gasPrice < _minGasPrice();\n unchecked {\n bytes32 jobHash = keccak256(bridgeInRequestPayload);\n /**\n * @dev load and increment operator temp storage in one call\n */\n ++_operatorTempStorageCounter;\n /**\n * @dev use job hash, job nonce, block number, and block timestamp for generating a random number\n */\n uint256 random = uint256(keccak256(abi.encodePacked(jobHash, _jobNonce(), block.number, block.timestamp)));\n // use the left 128 bits of random number\n uint256 random1 = uint256(random >> 128);\n // use the right 128 bits of random number\n uint256 random2 = uint256(uint128(random));\n // combine the two new random numbers for use in additional pod operator selection logic\n random = uint256(keccak256(abi.encodePacked(random1 + random2)));\n /**\n * @dev divide by total number of pods, use modulus/remainder\n */\n uint256 pod = random1 % _operatorPods.length;\n /**\n * @dev identify the total number of available operators in pod\n */\n uint256 podSize = _operatorPods[pod].length;\n /**\n * @dev select a primary operator\n */\n uint256 operatorIndex = underpriced ? 0 : random2 % podSize;\n /**\n * @dev If operator index is 0, then it's open season! Anyone can execute this job. First come first serve\n * pop operator to ensure that they cannot be selected for any other job until this one completes\n * decrease pod size to accomodate popped operator\n */\n _operatorTempStorage[_operatorTempStorageCounter] = _operatorPods[pod][operatorIndex];\n _popOperator(pod, operatorIndex);\n if (podSize > 1) {\n podSize--;\n }\n _operatorJobs[jobHash] = uint256(\n ((pod + 1) << 248) |\n (uint256(_operatorTempStorageCounter) << 216) |\n (block.number << 176) |\n ((underpriced ? 0 : _randomBlockHash(random, podSize, 1)) << 160) |\n ((underpriced ? 0 : _randomBlockHash(random, podSize, 2)) << 144) |\n ((underpriced ? 0 : _randomBlockHash(random, podSize, 3)) << 128) |\n ((underpriced ? 0 : _randomBlockHash(random, podSize, 4)) << 112) |\n ((underpriced ? 0 : _randomBlockHash(random, podSize, 5)) << 96) |\n (block.timestamp << 16) |\n 0\n ); // 80 next available bit position && so far 176 bits used with only 128 left\n /**\n * @dev emit event to signal to operators that a job has become available\n */\n emit AvailableOperatorJob(jobHash, bridgeInRequestPayload);\n }\n }\n\n /**\n * @notice Calculate the amount of gas needed to execute a bridgeInRequest\n * @dev Use this function to estimate the amount of gas that will be used by the bridgeInRequest function\n * Set a specific gas limit when making this call, subtract return value, to get total gas used\n * Only use this with a static call\n * @param bridgeInRequestPayload abi encoded bytes making up the bridgeInRequest payload\n * @return the gas amount remaining after the static call is returned\n */\n function jobEstimator(bytes calldata bridgeInRequestPayload) external payable returns (uint256) {\n assembly {\n calldatacopy(0, bridgeInRequestPayload.offset, sub(bridgeInRequestPayload.length, 0x40))\n /**\n * @dev bridgeInRequest doNotRevert is purposefully set to false so a rever would happen\n */\n mstore8(0xE3, 0x00)\n let result := call(gas(), sload(_bridgeSlot), callvalue(), 0, sub(bridgeInRequestPayload.length, 0x40), 0, 0)\n /**\n * @dev if for some reason the call does not revert, it is force reverted\n */\n if eq(result, 1) {\n returndatacopy(0, 0, returndatasize())\n revert(0, returndatasize())\n }\n /**\n * @dev remaining gas is set as the return value\n */\n mstore(0x00, gas())\n return(0x00, 0x20)\n }\n }\n\n /**\n * @notice Send cross chain bridge request message\n * @dev This function is restricted to only be callable by Holograph Bridge\n * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain\n * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain\n * @param toChain Holograph Chain ID where the beam is being sent to\n * @param nonce incremented number used to ensure job hashes are unique\n * @param holographableContract address of the contract for which the bridge request is being made\n * @param bridgeOutPayload bytes made up of the bridgeOutRequest payload\n */\n function send(\n uint256 gasLimit,\n uint256 gasPrice,\n uint32 toChain,\n address msgSender,\n uint256 nonce,\n address holographableContract,\n bytes calldata bridgeOutPayload\n ) external payable {\n require(msg.sender == _bridge(), \"HOLOGRAPH: bridge only call\");\n CrossChainMessageInterface messagingModule = _messagingModule();\n uint256 hlgFee = messagingModule.getHlgFee(toChain, gasLimit, gasPrice, bridgeOutPayload);\n address hToken = _registry().getHToken(_holograph().getHolographChainId());\n require(hlgFee < msg.value, \"HOLOGRAPH: not enough value\");\n payable(hToken).transfer(hlgFee);\n bytes memory encodedData = abi.encodeWithSelector(\n HolographBridgeInterface.bridgeInRequest.selector,\n /**\n * @dev job nonce is an incremented value that is assigned to each bridge request to guarantee unique hashes\n */\n nonce,\n /**\n * @dev including the current holograph chain id (origin chain)\n */\n _holograph().getHolographChainId(),\n /**\n * @dev holographable contract have the same address across all chains, so our destination address will be the same\n */\n holographableContract,\n /**\n * @dev get the current chain's hToken for native gas token\n */\n hToken,\n /**\n * @dev recipient will be defined when operator picks up the job\n */\n address(0),\n /**\n * @dev value is set to zero for now\n */\n hlgFee,\n /**\n * @dev specify that function call should not revert\n */\n true,\n /**\n * @dev attach actual holographableContract function call\n */\n bridgeOutPayload\n );\n /**\n * @dev add gas variables to the back for later extraction\n */\n encodedData = abi.encodePacked(encodedData, gasLimit, gasPrice);\n /**\n * @dev Send the data to the current Holograph Messaging Module\n * This will be changed to dynamically select which messaging module to use based on destination network\n */\n messagingModule.send{value: msg.value - hlgFee}(\n gasLimit,\n gasPrice,\n toChain,\n msgSender,\n msg.value - hlgFee,\n encodedData\n );\n /**\n * @dev for easy indexing, an event is emitted with the payload hash for status tracking\n */\n emit CrossChainMessageSent(keccak256(encodedData));\n }\n\n /**\n * @notice Get the fees associated with sending specific payload\n * @dev Will provide exact costs on protocol and message side, combine the two to get total\n * @dev @param toChain holograph chain id of destination chain for payload\n * @dev @param gasLimit amount of gas to provide for executing payload on destination chain\n * @dev @param gasPrice maximum amount to pay for gas price, can be set to 0 and will be chose automatically\n * @dev @param crossChainPayload the entire packet being sent cross-chain\n * @return hlgFee the amount (in wei) of native gas token that will cost for finalizing job on destiantion chain\n * @return msgFee the amount (in wei) of native gas token that will cost for sending message to destiantion chain\n * @return dstGasPrice the amount (in wei) that destination message maximum gas price will be\n */\n function getMessageFee(uint32, uint256, uint256, bytes calldata) external view returns (uint256, uint256, uint256) {\n assembly {\n calldatacopy(0, 0, calldatasize())\n let result := staticcall(gas(), sload(_messagingModuleSlot), 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @notice Get the details for an available operator job\n * @dev The job hash is a keccak256 hash of the entire job payload\n * @param jobHash keccak256 hash of the job\n * @return an OperatorJob struct with details about a specific job\n */\n function getJobDetails(bytes32 jobHash) public view returns (OperatorJob memory) {\n uint256 packed = _operatorJobs[jobHash];\n /**\n * @dev The job is bitwise packed into a single 32 byte slot, this unpacks it before returning the struct\n */\n return\n OperatorJob(\n uint8(packed >> 248),\n uint16(_blockTime),\n _operatorTempStorage[uint32(packed >> 216)],\n uint40(packed >> 176),\n // TODO: move the bit-shifting around to have it be sequential\n uint64(packed >> 16),\n [\n uint16(packed >> 160),\n uint16(packed >> 144),\n uint16(packed >> 128),\n uint16(packed >> 112),\n uint16(packed >> 96)\n ]\n );\n }\n\n /**\n * @notice Get number of pods available\n * @dev This returns number of pods that have been opened via bonding\n */\n function getTotalPods() external view returns (uint256 totalPods) {\n return _operatorPods.length;\n }\n\n /**\n * @notice Get total number of operators in a pod\n * @dev Use in conjunction with paginated getPodOperators function\n * @param pod the pod to query\n * @return total operators in a pod\n */\n function getPodOperatorsLength(uint256 pod) external view returns (uint256) {\n require(_operatorPods.length >= pod, \"HOLOGRAPH: pod does not exist\");\n return _operatorPods[pod - 1].length;\n }\n\n /**\n * @notice Get list of operators in a pod\n * @dev Use paginated getPodOperators function instead if list gets too long\n * @param pod the pod to query\n * @return operators array list of operators in a pod\n */\n function getPodOperators(uint256 pod) external view returns (address[] memory operators) {\n require(_operatorPods.length >= pod, \"HOLOGRAPH: pod does not exist\");\n operators = _operatorPods[pod - 1];\n }\n\n /**\n * @notice Get paginated list of operators in a pod\n * @dev Use in conjunction with getPodOperatorsLength to know the total length of results\n * @param pod the pod to query\n * @param index the array index to start from\n * @param length the length of result set to be (will be shorter if reached end of array)\n * @return operators a paginated array of operators\n */\n function getPodOperators(\n uint256 pod,\n uint256 index,\n uint256 length\n ) external view returns (address[] memory operators) {\n require(_operatorPods.length >= pod, \"HOLOGRAPH: pod does not exist\");\n /**\n * @dev if pod 0 is selected, this will create a revert\n */\n pod--;\n /**\n * @dev get total length of pod operators\n */\n uint256 supply = _operatorPods[pod].length;\n /**\n * @dev check if length is out of bounds for this result set\n */\n if (index + length > supply) {\n /**\n * @dev adjust length to return remainder of the results\n */\n length = supply - index;\n }\n /**\n * @dev create in-memory array\n */\n operators = new address[](length);\n /**\n * @dev add operators to result set\n */\n for (uint256 i = 0; i < length; i++) {\n operators[i] = _operatorPods[pod][index + i];\n }\n }\n\n /**\n * @notice Check the base and current price for bonding to a particular pod\n * @dev Useful for understanding what is required for bonding to a pod\n * @param pod the pod to get bonding amounts for\n * @return base the base bond amount required for a pod\n * @return current the current bond amount required for a pod\n */\n function getPodBondAmounts(uint256 pod) external view returns (uint256 base, uint256 current) {\n base = _getBaseBondAmount(pod - 1);\n current = _getCurrentBondAmount(pod - 1);\n }\n\n /**\n * @notice Get an operator's currently bonded amount\n * @dev Useful for checking how much an operator has bonded\n * @param operator address of operator to check\n * @return amount total number of utility token bonded\n */\n function getBondedAmount(address operator) external view returns (uint256 amount) {\n return _bondedAmounts[operator];\n }\n\n /**\n * @notice Get an operator's currently bonded pod\n * @dev Useful for checking if an operator is currently bonded\n * @param operator address of operator to check\n * @return pod number that operator is bonded on, returns zero if not bonded or selected for job\n */\n function getBondedPod(address operator) external view returns (uint256 pod) {\n return _bondedOperators[operator];\n }\n\n /**\n * @notice Get an operator's currently bonded pod index\n * @dev Useful for checking if an operator is a fallback for active job\n * @param operator address of operator to check\n * @return index currently bonded pod's operator index, returns zero if not in pod or moved out for active job\n */\n function getBondedPodIndex(address operator) external view returns (uint256 index) {\n return _operatorPodIndex[operator];\n }\n\n /**\n * @notice Topup a bonded operator with more utility tokens\n * @dev Useful function if an operator got slashed and wants to add a safety buffer to not get unbonded\n * This function will not work if operator has currently been selected for a job\n * @param operator address of operator to topup\n * @param amount utility token amount to add\n */\n function topupUtilityToken(address operator, uint256 amount) external {\n /**\n * @dev check that an operator is currently bonded\n */\n require(_bondedOperators[operator] != 0, \"HOLOGRAPH: operator not bonded\");\n unchecked {\n /**\n * @dev add the additional amount to operator\n */\n _bondedAmounts[operator] += amount;\n }\n /**\n * @dev transfer tokens last, to prevent reentrancy attacks\n */\n require(_utilityToken().transferFrom(msg.sender, address(this), amount), \"HOLOGRAPH: token transfer failed\");\n }\n\n /**\n * @notice Bond utility tokens and become an operator\n * @dev An operator can only bond to one pod at a time, per network\n * @param operator address of operator to bond (can be an ownable smart contract)\n * @param amount utility token amount to bond (can be greater than minimum)\n * @param pod number of pod to bond to (can be for one that does not exist yet)\n */\n function bondUtilityToken(address operator, uint256 amount, uint256 pod) external {\n /**\n * @dev an operator can only bond to one pod at any give time per network\n */\n require(_bondedOperators[operator] == 0 && _bondedAmounts[operator] == 0, \"HOLOGRAPH: operator is bonded\");\n if (_isContract(operator)) {\n require(Ownable(operator).owner() != address(0), \"HOLOGRAPH: contract not ownable\");\n }\n unchecked {\n /**\n * @dev get the current bonding minimum for selected pod\n */\n uint256 current = _getCurrentBondAmount(pod - 1);\n require(current <= amount, \"HOLOGRAPH: bond amount too small\");\n /**\n * @dev check if selected pod is greater than currently existing pods\n */\n if (_operatorPods.length < pod) {\n /**\n * @dev activate pod(s) up until the selected pod\n */\n for (uint256 i = _operatorPods.length; i < pod; i++) {\n /**\n * @dev add zero address into pod to mitigate empty pod issues\n */\n _operatorPods.push([address(0)]);\n }\n }\n /**\n * @dev prevent bonding to a pod with more than uint16 max value\n */\n require(_operatorPods[pod - 1].length < type(uint16).max, \"HOLOGRAPH: too many operators\");\n _operatorPods[pod - 1].push(operator);\n _operatorPodIndex[operator] = _operatorPods[pod - 1].length - 1;\n _bondedOperators[operator] = pod;\n _bondedAmounts[operator] = amount;\n /**\n * @dev transfer tokens last, to prevent reentrancy attacks\n */\n require(_utilityToken().transferFrom(msg.sender, address(this), amount), \"HOLOGRAPH: token transfer failed\");\n }\n }\n\n /**\n * @notice Unbond HLG utility tokens and stop being an operator\n * @dev A bonded operator selected for a job cannot unbond until they complete the job, or are slashed\n * @param operator address of operator to unbond\n * @param recipient address where to send the bonded tokens\n */\n function unbondUtilityToken(address operator, address recipient) external {\n /**\n * @dev validate that operator is currently bonded\n */\n require(_bondedOperators[operator] != 0, \"HOLOGRAPH: operator not bonded\");\n /**\n * @dev check if sender is not actual operator\n */\n if (msg.sender != operator) {\n /**\n * @dev check if operator is a smart contract\n */\n require(_isContract(operator), \"HOLOGRAPH: operator not contract\");\n /**\n * @dev check if smart contract is owned by sender\n */\n require(Ownable(operator).owner() == msg.sender, \"HOLOGRAPH: sender not owner\");\n }\n /**\n * @dev get current bonded amount by operator\n */\n uint256 amount = _bondedAmounts[operator];\n /**\n * @dev unset operator bond amount before making a transfer\n */\n _bondedAmounts[operator] = 0;\n /**\n * @dev remove all operator references\n */\n _popOperator(_bondedOperators[operator] - 1, _operatorPodIndex[operator]);\n /**\n * @dev transfer tokens to recipient\n */\n require(_utilityToken().transfer(recipient, amount), \"HOLOGRAPH: token transfer failed\");\n }\n\n /**\n * @notice Get the address of the Holograph Bridge module\n * @dev Used for beaming holographable assets cross-chain\n */\n function getBridge() external view returns (address bridge) {\n assembly {\n bridge := sload(_bridgeSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Bridge module address\n * @param bridge address of the Holograph Bridge smart contract to use\n */\n function setBridge(address bridge) external onlyAdmin {\n assembly {\n sstore(_bridgeSlot, bridge)\n }\n }\n\n /**\n * @notice Get the Holograph Protocol contract\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\n */\n function getHolograph() external view returns (address holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Protocol contract address\n * @param holograph address of the Holograph Protocol smart contract to use\n */\n function setHolograph(address holograph) external onlyAdmin {\n assembly {\n sstore(_holographSlot, holograph)\n }\n }\n\n /**\n * @notice Get the address of the Holograph Interfaces module\n * @dev Holograph uses this contract to store data that needs to be accessed by a large portion of the modules\n */\n function getInterfaces() external view returns (address interfaces) {\n assembly {\n interfaces := sload(_interfacesSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Interfaces module address\n * @param interfaces address of the Holograph Interfaces smart contract to use\n */\n function setInterfaces(address interfaces) external onlyAdmin {\n assembly {\n sstore(_interfacesSlot, interfaces)\n }\n }\n\n /**\n * @notice Get the address of the Holograph Messaging Module\n * @dev All cross-chain message requests will get forwarded to this adress\n */\n function getMessagingModule() external view returns (address messagingModule) {\n assembly {\n messagingModule := sload(_messagingModuleSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Messaging Module address\n * @param messagingModule address of the LayerZero Endpoint to use\n */\n function setMessagingModule(address messagingModule) external onlyAdmin {\n assembly {\n sstore(_messagingModuleSlot, messagingModule)\n }\n }\n\n /**\n * @notice Get the Holograph Registry module\n * @dev This module stores a reference for all deployed holographable smart contracts\n */\n function getRegistry() external view returns (address registry) {\n assembly {\n registry := sload(_registrySlot)\n }\n }\n\n /**\n * @notice Update the Holograph Registry module address\n * @param registry address of the Holograph Registry smart contract to use\n */\n function setRegistry(address registry) external onlyAdmin {\n assembly {\n sstore(_registrySlot, registry)\n }\n }\n\n /**\n * @notice Get the Holograph Utility Token address\n * @dev This is the official utility token of the Holograph Protocol\n */\n function getUtilityToken() external view returns (address utilityToken) {\n assembly {\n utilityToken := sload(_utilityTokenSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Utility Token address\n * @param utilityToken address of the Holograph Utility Token smart contract to use\n */\n function setUtilityToken(address utilityToken) external onlyAdmin {\n assembly {\n sstore(_utilityTokenSlot, utilityToken)\n }\n }\n\n /**\n * @notice Get the Minimum Gas Price\n * @dev The minimum value required to execute a job without it being marked as under priced\n */\n function getMinGasPrice() external view returns (uint256 minGasPrice) {\n assembly {\n minGasPrice := sload(_minGasPriceSlot)\n }\n }\n\n /**\n * @notice Update the Minimum Gas Price\n * @param minGasPrice amount to set for minimum gas price\n */\n function setMinGasPrice(uint256 minGasPrice) external onlyAdmin {\n assembly {\n sstore(_minGasPriceSlot, minGasPrice)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Bridge Interface\n */\n function _bridge() private view returns (address bridge) {\n assembly {\n bridge := sload(_bridgeSlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Interface\n */\n function _holograph() private view returns (HolographInterface holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Interfaces Interface\n */\n function _interfaces() private view returns (HolographInterfacesInterface interfaces) {\n assembly {\n interfaces := sload(_interfacesSlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Messaging Module Interface\n */\n function _messagingModule() private view returns (CrossChainMessageInterface messagingModule) {\n assembly {\n messagingModule := sload(_messagingModuleSlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Registry Interface\n */\n function _registry() private view returns (HolographRegistryInterface registry) {\n assembly {\n registry := sload(_registrySlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Utility Token Interface\n */\n function _utilityToken() private view returns (HolographERC20Interface utilityToken) {\n assembly {\n utilityToken := sload(_utilityTokenSlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the minimum gas price allowed\n */\n function _minGasPrice() private view returns (uint256 minGasPrice) {\n assembly {\n minGasPrice := sload(_minGasPriceSlot)\n }\n }\n\n /**\n * @dev Internal nonce, that increments on each call, used for randomness\n */\n function _jobNonce() private returns (uint256 jobNonce) {\n assembly {\n jobNonce := add(sload(_jobNonceSlot), 0x0000000000000000000000000000000000000000000000000000000000000001)\n sstore(_jobNonceSlot, jobNonce)\n }\n }\n\n /**\n * @dev Internal function used to remove an operator from a particular pod\n */\n function _popOperator(uint256 pod, uint256 operatorIndex) private {\n /**\n * @dev only pop the operator if it's not a zero address\n */\n if (operatorIndex > 0) {\n unchecked {\n address operator = _operatorPods[pod][operatorIndex];\n /**\n * @dev mark operator as no longer bonded\n */\n _bondedOperators[operator] = 0;\n /**\n * @dev remove pod reference for operator\n */\n _operatorPodIndex[operator] = 0;\n uint256 lastIndex = _operatorPods[pod].length - 1;\n if (lastIndex != operatorIndex) {\n /**\n * @dev if operator is not last index, move last index to operator's current index\n */\n _operatorPods[pod][operatorIndex] = _operatorPods[pod][lastIndex];\n _operatorPodIndex[_operatorPods[pod][operatorIndex]] = operatorIndex;\n }\n /**\n * @dev delete last index\n */\n delete _operatorPods[pod][lastIndex];\n /**\n * @dev shorten array length\n */\n _operatorPods[pod].pop();\n }\n }\n }\n\n /**\n * @dev Internal function used for calculating the base bonding amount for a pod\n */\n function _getBaseBondAmount(uint256 pod) private view returns (uint256) {\n return (_podMultiplier ** pod) * _baseBondAmount;\n }\n\n /**\n * @dev Internal function used for calculating the current bonding amount for a pod\n */\n function _getCurrentBondAmount(uint256 pod) private view returns (uint256) {\n uint256 current = (_podMultiplier ** pod) * _baseBondAmount;\n if (pod >= _operatorPods.length) {\n return current;\n }\n uint256 threshold = _operatorThreshold / (2 ** pod);\n uint256 position = _operatorPods[pod].length;\n if (position > threshold) {\n position -= threshold;\n // current += (current / _operatorThresholdDivisor) * position;\n current += (current / _operatorThresholdDivisor) * (position / _operatorThresholdStep);\n }\n return current;\n }\n\n /**\n * @dev Internal function used for generating a random pod operator selection by using previously mined blocks\n */\n function _randomBlockHash(uint256 random, uint256 podSize, uint256 n) private view returns (uint256) {\n unchecked {\n return (random + uint256(blockhash(block.number - n))) % podSize;\n }\n }\n\n /**\n * @dev Internal function used for checking if a contract has been deployed at address\n */\n function _isContract(address contractAddress) private view returns (bool) {\n bytes32 codehash;\n assembly {\n codehash := extcodehash(contractAddress)\n }\n return (codehash != 0x0 && codehash != 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470);\n }\n\n /**\n * @dev Purposefully left empty to ensure ether transfers use least amount of gas possible\n */\n receive() external payable {}\n\n /**\n * @dev Purposefully reverts to prevent any calls to undefined functions\n */\n fallback() external payable {\n revert();\n }\n}\n" + }, + "contracts/HolographRegistry.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./abstract/Admin.sol\";\nimport \"./abstract/Initializable.sol\";\n\nimport \"./interface/HolographInterface.sol\";\nimport \"./interface/HolographRegistryInterface.sol\";\nimport \"./interface/InitializableInterface.sol\";\n\n/**\n * @title Holograph Registry\n * @author https://github.com/holographxyz\n * @notice View and validate all deployed holographable contracts\n * @dev Use this to: validate that contracts are Holograph Protocol compliant, get source code for supported standards, and interact with hTokens\n */\ncontract HolographRegistry is Admin, Initializable, HolographRegistryInterface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\n */\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.utilityToken')) - 1)\n */\n bytes32 constant _utilityTokenSlot = 0xbf76518d46db472b71aa7677a0908b8016f3dee568415ffa24055f9a670f9c37;\n\n /**\n * @dev Array of all Holographable contracts that were ever deployed on this chain\n */\n address[] private _holographableContracts;\n\n /**\n * @dev A mapping of hashes to contract addresses\n */\n mapping(bytes32 => address) private _holographedContractsHashMap;\n\n /**\n * @dev Storage slot for saving contract type to contract address references\n */\n mapping(bytes32 => address) private _contractTypeAddresses;\n\n /**\n * @dev Reserved type addresses for Admin\n * Note: this is used for defining default contracts\n */\n mapping(bytes32 => bool) private _reservedTypes;\n\n /**\n * @dev A list of smart contracts that are guaranteed secure and holographable\n */\n mapping(address => bool) private _holographedContracts;\n\n /**\n * @dev Mapping of all hTokens available for the different EVM chains\n */\n mapping(uint32 => address) private _hTokens;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address holograph, bytes32[] memory reservedTypes) = abi.decode(initPayload, (address, bytes32[]));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_holographSlot, holograph)\n }\n for (uint256 i = 0; i < reservedTypes.length; i++) {\n _reservedTypes[reservedTypes[i]] = true;\n }\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n function isHolographedContract(address smartContract) external view returns (bool) {\n return _holographedContracts[smartContract];\n }\n\n function isHolographedHashDeployed(bytes32 hash) external view returns (bool) {\n return _holographedContractsHashMap[hash] != address(0);\n }\n\n function holographableEvent(bytes calldata payload) external {\n if (_holographedContracts[msg.sender]) {\n emit HolographableContractEvent(msg.sender, payload);\n }\n }\n\n /**\n * @dev Allows to reference a deployed smart contract, and use it's code as reference inside of Holographers\n */\n function referenceContractTypeAddress(address contractAddress) external returns (bytes32) {\n bytes32 contractType;\n assembly {\n contractType := extcodehash(contractAddress)\n }\n require(\n (// check that bytecode is not empty\n contractType != 0x0 &&\n // check that hash is not for empty bytes\n contractType != 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470),\n \"HOLOGRAPH: empty contract\"\n );\n require(_contractTypeAddresses[contractType] == address(0), \"HOLOGRAPH: contract already set\");\n require(!_reservedTypes[contractType], \"HOLOGRAPH: reserved address type\");\n _contractTypeAddresses[contractType] = contractAddress;\n return contractType;\n }\n\n /**\n * @dev Returns the contract address for a contract type\n */\n function getContractTypeAddress(bytes32 contractType) external view returns (address) {\n return _contractTypeAddresses[contractType];\n }\n\n /**\n * @dev Sets the contract address for a contract type\n */\n function setContractTypeAddress(bytes32 contractType, address contractAddress) external onlyAdmin {\n require(_reservedTypes[contractType], \"HOLOGRAPH: not reserved type\");\n _contractTypeAddresses[contractType] = contractAddress;\n }\n\n /**\n * @notice Get the Holograph Protocol contract\n * @dev This contract stores a reference to all the primary modules and variables of the protocol\n */\n function getHolograph() external view returns (address holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Protocol contract address\n * @param holograph address of the Holograph Protocol smart contract to use\n */\n function setHolograph(address holograph) external onlyAdmin {\n assembly {\n sstore(_holographSlot, holograph)\n }\n }\n\n /**\n * @notice Get set length list, starting from index, for all holographable contracts\n * @param index The index to start enumeration from\n * @param length The length of returned results\n * @return contracts address[] Returns a set length array of holographable contracts deployed\n */\n function getHolographableContracts(uint256 index, uint256 length) external view returns (address[] memory contracts) {\n uint256 supply = _holographableContracts.length;\n if (index + length > supply) {\n length = supply - index;\n }\n contracts = new address[](length);\n for (uint256 i = 0; i < length; i++) {\n contracts[i] = _holographableContracts[index + i];\n }\n }\n\n /**\n * @notice Get total number of deployed holographable contracts\n */\n function getHolographableContractsLength() external view returns (uint256) {\n return _holographableContracts.length;\n }\n\n /**\n * @dev Returns the address for a holographed hash\n */\n function getHolographedHashAddress(bytes32 hash) external view returns (address) {\n return _holographedContractsHashMap[hash];\n }\n\n /**\n * @dev Allows Holograph Factory to register a deployed contract, referenced with deployment hash\n */\n function setHolographedHashAddress(bytes32 hash, address contractAddress) external {\n address holograph;\n assembly {\n holograph := sload(_holographSlot)\n }\n require(msg.sender == HolographInterface(holograph).getFactory(), \"HOLOGRAPH: factory only function\");\n _holographedContractsHashMap[hash] = contractAddress;\n _holographedContracts[contractAddress] = true;\n _holographableContracts.push(contractAddress);\n }\n\n /**\n * @dev Returns the hToken address for a given chain id\n */\n function getHToken(uint32 chainId) external view returns (address) {\n return _hTokens[chainId];\n }\n\n /**\n * @dev Sets the hToken address for a specific chain id\n */\n function setHToken(uint32 chainId, address hToken) external onlyAdmin {\n _hTokens[chainId] = hToken;\n }\n\n /**\n * @dev Returns the reserved contract address for a contract type\n */\n function getReservedContractTypeAddress(bytes32 contractType) external view returns (address contractTypeAddress) {\n if (_reservedTypes[contractType]) {\n contractTypeAddress = _contractTypeAddresses[contractType];\n }\n }\n\n /**\n * @dev Allows admin to update or toggle reserved type\n */\n function setReservedContractTypeAddress(bytes32 hash, bool reserved) external onlyAdmin {\n _reservedTypes[hash] = reserved;\n }\n\n /**\n * @dev Allows admin to update or toggle reserved types\n */\n function setReservedContractTypeAddresses(bytes32[] calldata hashes, bool[] calldata reserved) external onlyAdmin {\n for (uint256 i = 0; i < hashes.length; i++) {\n _reservedTypes[hashes[i]] = reserved[i];\n }\n }\n\n /**\n * @notice Get the Holograph Utility Token address\n * @dev This is the official utility token of the Holograph Protocol\n */\n function getUtilityToken() external view returns (address utilityToken) {\n assembly {\n utilityToken := sload(_utilityTokenSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Utility Token address\n * @param utilityToken address of the Holograph Utility Token smart contract to use\n */\n function setUtilityToken(address utilityToken) external onlyAdmin {\n assembly {\n sstore(_utilityTokenSlot, utilityToken)\n }\n }\n\n /**\n * @dev Purposefully reverts to prevent having any type of ether transfered into the contract\n */\n receive() external payable {\n revert();\n }\n\n /**\n * @dev Purposefully reverts to prevent any calls to undefined functions\n */\n fallback() external payable {\n revert();\n }\n}\n" + }, + "contracts/HolographTreasury.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./abstract/Admin.sol\";\nimport \"./abstract/Initializable.sol\";\n\nimport \"./interface/HolographERC20Interface.sol\";\nimport \"./interface/HolographERC721Interface.sol\";\nimport \"./interface/HolographInterface.sol\";\nimport \"./interface/HolographTreasuryInterface.sol\";\nimport \"./interface/HolographFactoryInterface.sol\";\nimport \"./interface/HolographOperatorInterface.sol\";\nimport \"./interface/HolographRegistryInterface.sol\";\nimport \"./interface/InitializableInterface.sol\";\n\nimport \"./struct/DeploymentConfig.sol\";\nimport \"./struct/Verification.sol\";\n\n/**\n * @title Holograph Treasury\n * @author https://github.com/holographxyz\n * @notice This contract holds and manages the protocol treasury\n * @dev As of now this is an empty zero logic contract and is still a work in progress\n */\ncontract HolographTreasury is Admin, Initializable, HolographTreasuryInterface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.bridge')) - 1)\n */\n bytes32 constant _bridgeSlot = 0xeb87cbb21687feb327e3d58c6c16d552231d12c7a0e8115042a4165fac8a77f9;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\n */\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.operator')) - 1)\n */\n bytes32 constant _operatorSlot = 0x7caba557ad34138fa3b7e43fb574e0e6cc10481c3073e0dffbc560db81b5c60f;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\n */\n bytes32 constant _registrySlot = 0xce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address bridge, address holograph, address operator, address registry) = abi.decode(\n initPayload,\n (address, address, address, address)\n );\n assembly {\n sstore(_adminSlot, origin())\n\n sstore(_bridgeSlot, bridge)\n sstore(_holographSlot, holograph)\n sstore(_operatorSlot, operator)\n sstore(_registrySlot, registry)\n }\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @notice Get the address of the Holograph Bridge module\n * @dev Used for beaming holographable assets cross-chain\n */\n function getBridge() external view returns (address bridge) {\n assembly {\n bridge := sload(_bridgeSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Bridge module address\n * @param bridge address of the Holograph Bridge smart contract to use\n */\n function setBridge(address bridge) external onlyAdmin {\n assembly {\n sstore(_bridgeSlot, bridge)\n }\n }\n\n /**\n * @notice Get the Holograph Protocol contract\n * @dev This contract stores a reference to all the primary modules and variables of the protocol\n */\n function getHolograph() external view returns (address holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Protocol contract address\n * @param holograph address of the Holograph Protocol smart contract to use\n */\n function setHolograph(address holograph) external onlyAdmin {\n assembly {\n sstore(_holographSlot, holograph)\n }\n }\n\n /**\n * @notice Get the address of the Holograph Operator module\n * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module\n */\n function getOperator() external view returns (address operator) {\n assembly {\n operator := sload(_operatorSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Operator module address\n * @param operator address of the Holograph Operator smart contract to use\n */\n function setOperator(address operator) external onlyAdmin {\n assembly {\n sstore(_operatorSlot, operator)\n }\n }\n\n /**\n * @notice Get the Holograph Registry module\n * @dev This module stores a reference for all deployed holographable smart contracts\n */\n function getRegistry() external view returns (address registry) {\n assembly {\n registry := sload(_registrySlot)\n }\n }\n\n /**\n * @notice Update the Holograph Registry module address\n * @param registry address of the Holograph Registry smart contract to use\n */\n function setRegistry(address registry) external onlyAdmin {\n assembly {\n sstore(_registrySlot, registry)\n }\n }\n\n function _bridge() private view returns (address bridge) {\n assembly {\n bridge := sload(_bridgeSlot)\n }\n }\n\n function _holograph() private view returns (address holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n function _operator() private view returns (address operator) {\n assembly {\n operator := sload(_operatorSlot)\n }\n }\n\n function _registry() private view returns (address registry) {\n assembly {\n registry := sload(_registrySlot)\n }\n }\n\n /**\n * @dev Purposefully left empty to ensure ether transfers use least amount of gas possible\n */\n receive() external payable {}\n\n /**\n * @dev Purposefully reverts to prevent any calls to undefined functions\n */\n fallback() external payable {\n revert();\n }\n}\n" + }, + "contracts/interface/CollectionURI.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\ninterface CollectionURI {\n function contractURI() external view returns (string memory);\n}\n" + }, + "contracts/interface/CrossChainMessageInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\ninterface CrossChainMessageInterface {\n function send(\n uint256 gasLimit,\n uint256 gasPrice,\n uint32 toChain,\n address msgSender,\n uint256 msgValue,\n bytes calldata crossChainPayload\n ) external payable;\n\n function getMessageFee(\n uint32 toChain,\n uint256 gasLimit,\n uint256 gasPrice,\n bytes calldata crossChainPayload\n ) external view returns (uint256 hlgFee, uint256 msgFee, uint256 dstGasPrice);\n\n function getHlgFee(\n uint32 toChain,\n uint256 gasLimit,\n uint256 gasPrice,\n bytes calldata crossChainPayload\n ) external view returns (uint256 hlgFee);\n}\n" + }, + "contracts/interface/ERC1271.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1271.sol)\n\npragma solidity 0.8.13;\n\n/**\n * @dev Interface of the ERC1271 standard signature validation method for\n * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271].\n *\n * _Available since v4.1._\n */\ninterface ERC1271 {\n /**\n * @dev Should return whether the signature provided is valid for the provided data\n * @param hash Hash of the data to be signed\n * @param signature Signature byte array associated with _data\n */\n function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue);\n}\n" + }, + "contracts/interface/ERC165.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity 0.8.13;\n\ninterface ERC165 {\n /// @notice Query if a contract implements an interface\n /// @param interfaceID The interface identifier, as specified in ERC-165\n /// @dev Interface identification is specified in ERC-165. This function\n /// uses less than 30,000 gas.\n /// @return `true` if the contract implements `interfaceID` and\n /// `interfaceID` is not 0xffffffff, `false` otherwise\n function supportsInterface(bytes4 interfaceID) external view returns (bool);\n}\n" + }, + "contracts/interface/ERC20.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity 0.8.13;\n\ninterface ERC20 {\n function totalSupply() external view returns (uint256);\n\n function balanceOf(address _owner) external view returns (uint256 balance);\n\n function transfer(address _to, uint256 _value) external returns (bool success);\n\n function transferFrom(address _from, address _to, uint256 _value) external returns (bool success);\n\n function approve(address _spender, uint256 _value) external returns (bool success);\n\n function allowance(address _owner, address _spender) external view returns (uint256 remaining);\n\n event Transfer(address indexed _from, address indexed _to, uint256 _value);\n\n event Approval(address indexed _owner, address indexed _spender, uint256 _value);\n}\n" + }, + "contracts/interface/ERC20Burnable.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity 0.8.13;\n\ninterface ERC20Burnable {\n function burn(uint256 amount) external;\n\n function burnFrom(address account, uint256 amount) external returns (bool);\n}\n" + }, + "contracts/interface/ERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity 0.8.13;\n\ninterface ERC20Metadata {\n function decimals() external view returns (uint8);\n\n function name() external view returns (string memory);\n\n function symbol() external view returns (string memory);\n}\n" + }, + "contracts/interface/ERC20Permit.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)\n\npragma solidity 0.8.13;\n\n/**\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n */\ninterface ERC20Permit {\n /**\n * @dev Sets `value` as the allowance of `spender` over ``account``'s tokens,\n * given ``account``'s signed approval.\n *\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n * ordering also apply here.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `deadline` must be a timestamp in the future.\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `account`\n * over the EIP712-formatted function arguments.\n * - the signature must use ``account``'s current nonce (see {nonces}).\n *\n * For more information on the signature format, see the\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n * section].\n */\n function permit(\n address account,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n /**\n * @dev Returns the current nonce for `account`. This value must be\n * included whenever a signature is generated for {permit}.\n *\n * Every successful call to {permit} increases ``account``'s nonce by one. This\n * prevents a signature from being used multiple times.\n */\n function nonces(address account) external view returns (uint256);\n\n /**\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n" + }, + "contracts/interface/ERC20Receiver.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity 0.8.13;\n\ninterface ERC20Receiver {\n function onERC20Received(\n address account,\n address recipient,\n uint256 amount,\n bytes memory data\n ) external returns (bytes4);\n}\n" + }, + "contracts/interface/ERC20Safer.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity 0.8.13;\n\ninterface ERC20Safer {\n function safeTransfer(address recipient, uint256 amount) external returns (bool);\n\n function safeTransfer(address recipient, uint256 amount, bytes memory data) external returns (bool);\n\n function safeTransferFrom(address account, address recipient, uint256 amount) external returns (bool);\n\n function safeTransferFrom(\n address account,\n address recipient,\n uint256 amount,\n bytes memory data\n ) external returns (bool);\n}\n" + }, + "contracts/interface/ERC721.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity 0.8.13;\n\n/// @title ERC-721 Non-Fungible Token Standard\n/// @dev See https://eips.ethereum.org/EIPS/eip-721\n/// Note: the ERC-165 identifier for this interface is 0x80ac58cd.\n/* is ERC165 */\ninterface ERC721 {\n /// @dev This emits when ownership of any NFT changes by any mechanism.\n /// This event emits when NFTs are created (`from` == 0) and destroyed\n /// (`to` == 0). Exception: during contract creation, any number of NFTs\n /// may be created and assigned without emitting Transfer. At the time of\n /// any transfer, the approved address for that NFT (if any) is reset to none.\n event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId);\n\n /// @dev This emits when the approved address for an NFT is changed or\n /// reaffirmed. The zero address indicates there is no approved address.\n /// When a Transfer event emits, this also indicates that the approved\n /// address for that NFT (if any) is reset to none.\n event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId);\n\n /// @dev This emits when an operator is enabled or disabled for an owner.\n /// The operator can manage all NFTs of the owner.\n event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved);\n\n /// @notice Count all NFTs assigned to an owner\n /// @dev NFTs assigned to the zero address are considered invalid, and this\n /// function throws for queries about the zero address.\n /// @param _owner An address for whom to query the balance\n /// @return The number of NFTs owned by `_owner`, possibly zero\n function balanceOf(address _owner) external view returns (uint256);\n\n /// @notice Find the owner of an NFT\n /// @dev NFTs assigned to zero address are considered invalid, and queries\n /// about them do throw.\n /// @param _tokenId The identifier for an NFT\n /// @return The address of the owner of the NFT\n function ownerOf(uint256 _tokenId) external view returns (address);\n\n /// @notice Transfers the ownership of an NFT from one address to another address\n /// @dev Throws unless `msg.sender` is the current owner, an authorized\n /// operator, or the approved address for this NFT. Throws if `_from` is\n /// not the current owner. Throws if `_to` is the zero address. Throws if\n /// `_tokenId` is not a valid NFT. When transfer is complete, this function\n /// checks if `_to` is a smart contract (code size > 0). If so, it calls\n /// `onERC721Received` on `_to` and throws if the return value is not\n /// `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`.\n /// @param _from The current owner of the NFT\n /// @param _to The new owner\n /// @param _tokenId The NFT to transfer\n /// @param data Additional data with no specified format, sent in call to `_to`\n function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes calldata data) external payable;\n\n /// @notice Transfers the ownership of an NFT from one address to another address\n /// @dev This works identically to the other function with an extra data parameter,\n /// except this function just sets data to \"\".\n /// @param _from The current owner of the NFT\n /// @param _to The new owner\n /// @param _tokenId The NFT to transfer\n function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable;\n\n /// @notice Transfer ownership of an NFT -- THE CALLER IS RESPONSIBLE\n /// TO CONFIRM THAT `_to` IS CAPABLE OF RECEIVING NFTS OR ELSE\n /// THEY MAY BE PERMANENTLY LOST\n /// @dev Throws unless `msg.sender` is the current owner, an authorized\n /// operator, or the approved address for this NFT. Throws if `_from` is\n /// not the current owner. Throws if `_to` is the zero address. Throws if\n /// `_tokenId` is not a valid NFT.\n /// @param _from The current owner of the NFT\n /// @param _to The new owner\n /// @param _tokenId The NFT to transfer\n function transferFrom(address _from, address _to, uint256 _tokenId) external payable;\n\n /// @notice Change or reaffirm the approved address for an NFT\n /// @dev The zero address indicates there is no approved address.\n /// Throws unless `msg.sender` is the current NFT owner, or an authorized\n /// operator of the current owner.\n /// @param _approved The new approved NFT controller\n /// @param _tokenId The NFT to approve\n function approve(address _approved, uint256 _tokenId) external payable;\n\n /// @notice Enable or disable approval for a third party (\"operator\") to manage\n /// all of `msg.sender`'s assets\n /// @dev Emits the ApprovalForAll event. The contract MUST allow\n /// multiple operators per owner.\n /// @param _operator Address to add to the set of authorized operators\n /// @param _approved True if the operator is approved, false to revoke approval\n function setApprovalForAll(address _operator, bool _approved) external;\n\n /// @notice Get the approved address for a single NFT\n /// @dev Throws if `_tokenId` is not a valid NFT.\n /// @param _tokenId The NFT to find the approved address for\n /// @return The approved address for this NFT, or the zero address if there is none\n function getApproved(uint256 _tokenId) external view returns (address);\n\n /// @notice Query if an address is an authorized operator for another address\n /// @param _owner The address that owns the NFTs\n /// @param _operator The address that acts on behalf of the owner\n /// @return True if `_operator` is an approved operator for `_owner`, false otherwise\n function isApprovedForAll(address _owner, address _operator) external view returns (bool);\n}\n" + }, + "contracts/interface/ERC721Enumerable.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity 0.8.13;\n\n/// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension\n/// @dev See https://eips.ethereum.org/EIPS/eip-721\n/// Note: the ERC-165 identifier for this interface is 0x780e9d63.\n/* is ERC721 */\ninterface ERC721Enumerable {\n /// @notice Count NFTs tracked by this contract\n /// @return A count of valid NFTs tracked by this contract, where each one of\n /// them has an assigned and queryable owner not equal to the zero address\n function totalSupply() external view returns (uint256);\n\n /// @notice Enumerate valid NFTs\n /// @dev Throws if `_index` >= `totalSupply()`.\n /// @param _index A counter less than `totalSupply()`\n /// @return The token identifier for the `_index`th NFT,\n /// (sort order not specified)\n function tokenByIndex(uint256 _index) external view returns (uint256);\n\n /// @notice Enumerate NFTs assigned to an owner\n /// @dev Throws if `_index` >= `balanceOf(_owner)` or if\n /// `_owner` is the zero address, representing invalid NFTs.\n /// @param _owner An address where we are interested in NFTs owned by them\n /// @param _index A counter less than `balanceOf(_owner)`\n /// @return The token identifier for the `_index`th NFT assigned to `_owner`,\n /// (sort order not specified)\n function tokenOfOwnerByIndex(address _owner, uint256 _index) external view returns (uint256);\n}\n" + }, + "contracts/interface/ERC721Metadata.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity 0.8.13;\n\n/// @title ERC-721 Non-Fungible Token Standard, optional metadata extension\n/// @dev See https://eips.ethereum.org/EIPS/eip-721\n/// Note: the ERC-165 identifier for this interface is 0x5b5e139f.\n/* is ERC721 */\ninterface ERC721Metadata {\n /// @notice A descriptive name for a collection of NFTs in this contract\n function name() external view returns (string memory _name);\n\n /// @notice An abbreviated name for NFTs in this contract\n function symbol() external view returns (string memory _symbol);\n\n /// @notice A distinct Uniform Resource Identifier (URI) for a given asset.\n /// @dev Throws if `_tokenId` is not a valid NFT. URIs are defined in RFC\n /// 3986. The URI may point to a JSON file that conforms to the \"ERC721\n /// Metadata JSON Schema\".\n function tokenURI(uint256 _tokenId) external view returns (string memory);\n}\n" + }, + "contracts/interface/ERC721TokenReceiver.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\n/// @dev Note: the ERC-165 identifier for this interface is 0x150b7a02.\ninterface ERC721TokenReceiver {\n /// @notice Handle the receipt of an NFT\n /// @dev The ERC721 smart contract calls this function on the recipient\n /// after a `transfer`. This function MAY throw to revert and reject the\n /// transfer. Return of other than the magic value MUST result in the\n /// transaction being reverted.\n /// Note: the contract address is always the message sender.\n /// @param _operator The address which called `safeTransferFrom` function\n /// @param _from The address which previously owned the token\n /// @param _tokenId The NFT identifier which is being transferred\n /// @param _data Additional data with no specified format\n /// @return `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`\n /// unless throwing\n function onERC721Received(\n address _operator,\n address _from,\n uint256 _tokenId,\n bytes calldata _data\n ) external returns (bytes4);\n}\n" + }, + "contracts/interface/Holographable.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\ninterface Holographable {\n function bridgeIn(uint32 fromChain, bytes calldata payload) external returns (bytes4);\n\n function bridgeOut(\n uint32 toChain,\n address sender,\n bytes calldata payload\n ) external returns (bytes4 selector, bytes memory data);\n}\n" + }, + "contracts/interface/HolographBridgeInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\n/**\n * @title Holograph Bridge\n * @author https://github.com/holographxyz\n * @notice Beam any holographable contracts and assets across blockchains\n * @dev The contract abstracts all the complexities of making bridge requests and uses a universal interface to bridge any type of holographable assets\n */\ninterface HolographBridgeInterface {\n /**\n * @notice Receive a beam from another chain\n * @dev This function can only be called by the Holograph Operator module\n * @param fromChain Holograph Chain ID where the brigeOutRequest was created\n * @param holographableContract address of the destination contract that the bridgeInRequest is targeted for\n * @param hToken address of the hToken contract that wrapped the origin chain native gas token\n * @param hTokenRecipient address of recipient for the hToken reward\n * @param hTokenValue exact amount of hToken reward in wei\n * @param doNotRevert boolean used to specify if the call should revert\n * @param bridgeInPayload actual abi encoded bytes of the data that the holographable contract bridgeIn function will receive\n */\n function bridgeInRequest(\n uint256 nonce,\n uint32 fromChain,\n address holographableContract,\n address hToken,\n address hTokenRecipient,\n uint256 hTokenValue,\n bool doNotRevert,\n bytes calldata bridgeInPayload\n ) external payable;\n\n /**\n * @notice Create a beam request for a destination chain\n * @dev This function works for deploying contracts and beaming supported holographable assets across chains\n * @param toChain Holograph Chain ID where the beam is being sent to\n * @param holographableContract address of the contract for which the bridge request is being made\n * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain\n * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\n */\n function bridgeOutRequest(\n uint32 toChain,\n address holographableContract,\n uint256 gasLimit,\n uint256 gasPrice,\n bytes calldata bridgeOutPayload\n ) external payable;\n\n /**\n * @notice Do not call this function, it will always revert\n * @dev Used by getBridgeOutRequestPayload function\n * It is purposefully inverted to always revert on a successful call\n * Marked as external and not private to allow use inside try/catch of getBridgeOutRequestPayload function\n * If this function does not revert and returns a string, it is the actual revert reason\n * @param sender address of actual sender that is planning to make a bridgeOutRequest call\n * @param toChain holograph chain id of destination chain\n * @param holographableContract address of the contract for which the bridge request is being made\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\n */\n function revertedBridgeOutRequest(\n address sender,\n uint32 toChain,\n address holographableContract,\n bytes calldata bridgeOutPayload\n ) external returns (string memory revertReason);\n\n /**\n * @notice Get the payload created by the bridgeOutRequest function\n * @dev Use this function to get the payload that will be generated by a bridgeOutRequest\n * Only use this with a static call\n * @param toChain Holograph Chain ID where the beam is being sent to\n * @param holographableContract address of the contract for which the bridge request is being made\n * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain\n * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\n * @return samplePayload bytes made up of the bridgeOutRequest payload\n */\n function getBridgeOutRequestPayload(\n uint32 toChain,\n address holographableContract,\n uint256 gasLimit,\n uint256 gasPrice,\n bytes calldata bridgeOutPayload\n ) external returns (bytes memory samplePayload);\n\n /**\n * @notice Get the fees associated with sending specific payload\n * @dev Will provide exact costs on protocol and message side, combine the two to get total\n * @param toChain holograph chain id of destination chain for payload\n * @param gasLimit amount of gas to provide for executing payload on destination chain\n * @param gasPrice maximum amount to pay for gas price, can be set to 0 and will be chose automatically\n * @param crossChainPayload the entire packet being sent cross-chain\n * @return hlgFee the amount (in wei) of native gas token that will cost for finalizing job on destiantion chain\n * @return msgFee the amount (in wei) of native gas token that will cost for sending message to destiantion chain\n * @return dstGasPrice the amount (in wei) that destination message maximum gas price will be\n */\n function getMessageFee(\n uint32 toChain,\n uint256 gasLimit,\n uint256 gasPrice,\n bytes calldata crossChainPayload\n ) external view returns (uint256 hlgFee, uint256 msgFee, uint256 dstGasPrice);\n\n /**\n * @notice Get the address of the Holograph Factory module\n * @dev Used for deploying holographable smart contracts\n */\n function getFactory() external view returns (address factory);\n\n /**\n * @notice Update the Holograph Factory module address\n * @param factory address of the Holograph Factory smart contract to use\n */\n function setFactory(address factory) external;\n\n /**\n * @notice Get the Holograph Protocol contract\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\n */\n function getHolograph() external view returns (address holograph);\n\n /**\n * @notice Update the Holograph Protocol contract address\n * @param holograph address of the Holograph Protocol smart contract to use\n */\n function setHolograph(address holograph) external;\n\n /**\n * @notice Get the latest job nonce\n * @dev You can use the job nonce as a way to calculate total amount of bridge requests that have been made\n */\n function getJobNonce() external view returns (uint256 jobNonce);\n\n /**\n * @notice Get the address of the Holograph Operator module\n * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module\n */\n function getOperator() external view returns (address operator);\n\n /**\n * @notice Update the Holograph Operator module address\n * @param operator address of the Holograph Operator smart contract to use\n */\n function setOperator(address operator) external;\n\n /**\n * @notice Get the Holograph Registry module\n * @dev This module stores a reference for all deployed holographable smart contracts\n */\n function getRegistry() external view returns (address registry);\n\n /**\n * @notice Update the Holograph Registry module address\n * @param registry address of the Holograph Registry smart contract to use\n */\n function setRegistry(address registry) external;\n}\n" + }, + "contracts/interface/HolographedERC1155.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\n/// @title Holograph ERC-1155 Non-Fungible Token Standard\n/// @dev See https://holograph.network/standard/ERC-1155\n/// Note: the ERC-165 identifier for this interface is 0xFFFFFFFF.\ninterface HolographedERC1155 {\n // event id = 1\n function bridgeIn(\n uint32 _chainId,\n address _from,\n address _to,\n uint256 _tokenId,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 2\n function bridgeOut(\n uint32 _chainId,\n address _from,\n address _to,\n uint256 _tokenId,\n uint256 _amount\n ) external returns (bytes memory _data);\n\n // event id = 3\n function afterApprove(address _owner, address _to, uint256 _tokenId, uint256 _amount) external returns (bool success);\n\n // event id = 4\n function beforeApprove(\n address _owner,\n address _to,\n uint256 _tokenId,\n uint256 _amount\n ) external returns (bool success);\n\n // event id = 5\n function afterApprovalAll(address _to, bool _approved) external returns (bool success);\n\n // event id = 6\n function beforeApprovalAll(address _to, bool _approved) external returns (bool success);\n\n // event id = 7\n function afterBurn(address _owner, uint256 _tokenId, uint256 _amount) external returns (bool success);\n\n // event id = 8\n function beforeBurn(address _owner, uint256 _tokenId, uint256 _amount) external returns (bool success);\n\n // event id = 9\n function afterMint(address _owner, uint256 _tokenId, uint256 _amount) external returns (bool success);\n\n // event id = 10\n function beforeMint(address _owner, uint256 _tokenId, uint256 _amount) external returns (bool success);\n\n // event id = 11\n function afterSafeTransfer(\n address _from,\n address _to,\n uint256 _tokenId,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 12\n function beforeSafeTransfer(\n address _from,\n address _to,\n uint256 _tokenId,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 13\n function afterTransfer(\n address _from,\n address _to,\n uint256 _tokenId,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 14\n function beforeTransfer(\n address _from,\n address _to,\n uint256 _tokenId,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 15\n function afterOnERC1155Received(\n address _operator,\n address _from,\n address _to,\n uint256 _tokenId,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 16\n function beforeOnERC1155Received(\n address _operator,\n address _from,\n address _to,\n uint256 _tokenId,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n}\n" + }, + "contracts/interface/HolographedERC20.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\n/// @title Holograph ERC-20 Fungible Token Standard\n/// @dev See https://holograph.network/standard/ERC-20\n/// Note: the ERC-165 identifier for this interface is 0xFFFFFFFF.\ninterface HolographedERC20 {\n // event id = 1\n function bridgeIn(\n uint32 _chainId,\n address _from,\n address _to,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 2\n function bridgeOut(\n uint32 _chainId,\n address _from,\n address _to,\n uint256 _amount\n ) external returns (bytes memory _data);\n\n // event id = 3\n function afterApprove(address _owner, address _to, uint256 _amount) external returns (bool success);\n\n // event id = 4\n function beforeApprove(address _owner, address _to, uint256 _amount) external returns (bool success);\n\n // event id = 5\n function afterOnERC20Received(\n address _token,\n address _from,\n address _to,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 6\n function beforeOnERC20Received(\n address _token,\n address _from,\n address _to,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 7\n function afterBurn(address _owner, uint256 _amount) external returns (bool success);\n\n // event id = 8\n function beforeBurn(address _owner, uint256 _amount) external returns (bool success);\n\n // event id = 9\n function afterMint(address _owner, uint256 _amount) external returns (bool success);\n\n // event id = 10\n function beforeMint(address _owner, uint256 _amount) external returns (bool success);\n\n // event id = 11\n function afterSafeTransfer(\n address _from,\n address _to,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 12\n function beforeSafeTransfer(\n address _from,\n address _to,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 13\n function afterTransfer(address _from, address _to, uint256 _amount) external returns (bool success);\n\n // event id = 14\n function beforeTransfer(address _from, address _to, uint256 _amount) external returns (bool success);\n\n // event id = 15\n function onAllowance(address _owner, address _to, uint256 _amount) external returns (bool success);\n}\n" + }, + "contracts/interface/HolographedERC721.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\n/// @title Holograph ERC-721 Non-Fungible Token Standard\n/// @dev See https://holograph.network/standard/ERC-721\n/// Note: the ERC-165 identifier for this interface is 0xFFFFFFFF.\ninterface HolographedERC721 {\n // event id = 1\n function bridgeIn(\n uint32 _chainId,\n address _from,\n address _to,\n uint256 _tokenId,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 2\n function bridgeOut(\n uint32 _chainId,\n address _from,\n address _to,\n uint256 _tokenId\n ) external returns (bytes memory _data);\n\n // event id = 3\n function afterApprove(address _owner, address _to, uint256 _tokenId) external returns (bool success);\n\n // event id = 4\n function beforeApprove(address _owner, address _to, uint256 _tokenId) external returns (bool success);\n\n // event id = 5\n function afterApprovalAll(address _sender, address _to, bool _approved) external returns (bool success);\n\n // event id = 6\n function beforeApprovalAll(address _sender, address _to, bool _approved) external returns (bool success);\n\n // event id = 7\n function afterBurn(address _owner, uint256 _tokenId) external returns (bool success);\n\n // event id = 8\n function beforeBurn(address _owner, uint256 _tokenId) external returns (bool success);\n\n // event id = 9\n function afterMint(address _owner, uint256 _tokenId) external returns (bool success);\n\n // event id = 10\n function beforeMint(address _owner, uint256 _tokenId) external returns (bool success);\n\n // event id = 11\n function afterSafeTransfer(\n address _from,\n address _to,\n uint256 _tokenId,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 12\n function beforeSafeTransfer(\n address _from,\n address _to,\n uint256 _tokenId,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 13\n function afterTransfer(\n address _from,\n address _to,\n uint256 _tokenId,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 14\n function beforeTransfer(\n address _from,\n address _to,\n uint256 _tokenId,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 15\n function afterOnERC721Received(\n address _operator,\n address _from,\n address _to,\n uint256 _tokenId,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 16\n function beforeOnERC721Received(\n address _operator,\n address _from,\n address _to,\n uint256 _tokenId,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 17\n function onIsApprovedForAll(address _wallet, address _operator) external view returns (bool approved);\n\n // event id = 18\n function contractURI() external view returns (string memory contractJSON);\n}\n" + }, + "contracts/interface/HolographedGeneric.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\n/// @title Holograph Generic Standard\ninterface HolographedGeneric {\n // event id = 1\n function bridgeIn(uint32 _chainId, bytes calldata _data) external returns (bool success);\n\n // event id = 2\n function bridgeOut(uint32 _chainId, address _sender, bytes calldata _payload) external returns (bytes memory _data);\n}\n" + }, + "contracts/interface/HolographERC20Interface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./ERC20.sol\";\nimport \"./ERC20Burnable.sol\";\nimport \"./ERC20Metadata.sol\";\nimport \"./ERC20Permit.sol\";\nimport \"./ERC20Receiver.sol\";\nimport \"./ERC20Safer.sol\";\nimport \"./ERC165.sol\";\nimport \"./Holographable.sol\";\n\ninterface HolographERC20Interface is\n ERC165,\n ERC20,\n ERC20Burnable,\n ERC20Metadata,\n ERC20Receiver,\n ERC20Safer,\n ERC20Permit,\n Holographable\n{\n function holographBridgeMint(address to, uint256 amount) external returns (bytes4);\n\n function sourceBurn(address from, uint256 amount) external;\n\n function sourceMint(address to, uint256 amount) external;\n\n function sourceMintBatch(address[] calldata wallets, uint256[] calldata amounts) external;\n\n function sourceTransfer(address from, address to, uint256 amount) external;\n\n function sourceTransfer(address payable destination, uint256 amount) external;\n\n function sourceExternalCall(address target, bytes calldata data) external;\n}\n" + }, + "contracts/interface/HolographERC721Interface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./CollectionURI.sol\";\nimport \"./ERC165.sol\";\nimport \"./ERC721.sol\";\nimport \"./ERC721Enumerable.sol\";\nimport \"./ERC721Metadata.sol\";\nimport \"./ERC721TokenReceiver.sol\";\nimport \"./Holographable.sol\";\n\ninterface HolographERC721Interface is\n ERC165,\n ERC721,\n ERC721Enumerable,\n ERC721Metadata,\n ERC721TokenReceiver,\n CollectionURI,\n Holographable\n{\n function approve(address to, uint256 tokenId) external payable;\n\n function burn(uint256 tokenId) external;\n\n function safeTransferFrom(address from, address to, uint256 tokenId) external payable;\n\n function setApprovalForAll(address to, bool approved) external;\n\n function sourceBurn(uint256 tokenId) external;\n\n function sourceMint(address to, uint224 tokenId) external;\n\n function sourceGetChainPrepend() external view returns (uint256);\n\n function sourceTransfer(address to, uint256 tokenId) external;\n\n function sourceExternalCall(address target, bytes calldata data) external;\n\n function transfer(address to, uint256 tokenId) external payable;\n\n function contractURI() external view returns (string memory);\n\n function getApproved(uint256 tokenId) external view returns (address);\n\n function isApprovedForAll(address wallet, address operator) external view returns (bool);\n\n function name() external view returns (string memory);\n\n function burned(uint256 tokenId) external view returns (bool);\n\n function decimals() external pure returns (uint256);\n\n function exists(uint256 tokenId) external view returns (bool);\n\n function ownerOf(uint256 tokenId) external view returns (address);\n\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n\n function symbol() external view returns (string memory);\n\n function tokenByIndex(uint256 index) external view returns (uint256);\n\n function tokenOfOwnerByIndex(address wallet, uint256 index) external view returns (uint256);\n\n function tokensOfOwner(address wallet) external view returns (uint256[] memory);\n\n function tokenURI(uint256 tokenId) external view returns (string memory);\n\n function totalSupply() external view returns (uint256);\n}\n" + }, + "contracts/interface/HolographerInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\ninterface HolographerInterface {\n function getContractType() external view returns (bytes32 contractType);\n\n function getDeploymentBlock() external view returns (uint256 deploymentBlock);\n\n function getHolograph() external view returns (address holograph);\n\n function getHolographEnforcer() external view returns (address);\n\n function getOriginChain() external view returns (uint32 originChain);\n\n function getSourceContract() external view returns (address sourceContract);\n}\n" + }, + "contracts/interface/HolographFactoryInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../struct/DeploymentConfig.sol\";\nimport \"../struct/Verification.sol\";\n\n/**\n * @title Holograph Factory\n * @author https://github.com/holographxyz\n * @notice Deploy holographable contracts\n * @dev The contract provides methods that allow for the creation of Holograph Protocol compliant smart contracts, that are capable of minting holographable assets\n */\ninterface HolographFactoryInterface {\n /**\n * @dev This event is fired every time that a bridgeable contract is deployed.\n */\n event BridgeableContractDeployed(address indexed contractAddress, bytes32 indexed hash);\n\n /**\n * @notice Deploy a holographable smart contract\n * @dev Using this function allows to deploy smart contracts that have the same address across all EVM chains\n * @param config contract deployement configurations\n * @param signature that was created by the wallet that created the original payload\n * @param signer address of wallet that created the payload\n */\n function deployHolographableContract(\n DeploymentConfig memory config,\n Verification memory signature,\n address signer\n ) external;\n\n /**\n * @notice Get the Holograph Protocol contract\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\n */\n function getHolograph() external view returns (address holograph);\n\n /**\n * @notice Update the Holograph Protocol contract address\n * @param holograph address of the Holograph Protocol smart contract to use\n */\n function setHolograph(address holograph) external;\n\n /**\n * @notice Get the Holograph Registry module\n * @dev This module stores a reference for all deployed holographable smart contracts\n */\n function getRegistry() external view returns (address registry);\n\n /**\n * @notice Update the Holograph Registry module address\n * @param registry address of the Holograph Registry smart contract to use\n */\n function setRegistry(address registry) external;\n}\n" + }, + "contracts/interface/HolographGenericInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./ERC165.sol\";\nimport \"./Holographable.sol\";\n\ninterface HolographGenericInterface is ERC165, Holographable {\n function sourceEmit(bytes calldata eventData) external;\n\n function sourceEmit(bytes32 eventId, bytes calldata eventData) external;\n\n function sourceEmit(bytes32 eventId, bytes32 topic1, bytes calldata eventData) external;\n\n function sourceEmit(bytes32 eventId, bytes32 topic1, bytes32 topic2, bytes calldata eventData) external;\n\n function sourceEmit(\n bytes32 eventId,\n bytes32 topic1,\n bytes32 topic2,\n bytes32 topic3,\n bytes calldata eventData\n ) external;\n}\n" + }, + "contracts/interface/HolographInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\n/**\n * @title Holograph Protocol\n * @author https://github.com/holographxyz\n * @notice This is the primary Holograph Protocol smart contract\n * @dev This contract stores a reference to all the primary modules and variables of the protocol\n */\ninterface HolographInterface {\n /**\n * @notice Get the address of the Holograph Bridge module\n * @dev Used for beaming holographable assets cross-chain\n */\n function getBridge() external view returns (address bridge);\n\n /**\n * @notice Update the Holograph Bridge module address\n * @param bridge address of the Holograph Bridge smart contract to use\n */\n function setBridge(address bridge) external;\n\n /**\n * @notice Get the chain ID that the Protocol was deployed on\n * @dev Useful for checking if/when a hard fork occurs\n */\n function getChainId() external view returns (uint256 chainId);\n\n /**\n * @notice Update the chain ID\n * @dev Useful for updating once a hard fork has been mitigated\n * @param chainId EVM chain ID to use\n */\n function setChainId(uint256 chainId) external;\n\n /**\n * @notice Get the address of the Holograph Factory module\n * @dev Used for deploying holographable smart contracts\n */\n function getFactory() external view returns (address factory);\n\n /**\n * @notice Update the Holograph Factory module address\n * @param factory address of the Holograph Factory smart contract to use\n */\n function setFactory(address factory) external;\n\n /**\n * @notice Get the Holograph chain Id\n * @dev Holograph uses an internal chain id mapping\n */\n function getHolographChainId() external view returns (uint32 holographChainId);\n\n /**\n * @notice Update the Holograph chain ID\n * @dev Useful for updating once a hard fork was mitigated\n * @param holographChainId Holograph chain ID to use\n */\n function setHolographChainId(uint32 holographChainId) external;\n\n /**\n * @notice Get the address of the Holograph Interfaces module\n * @dev Holograph uses this contract to store data that needs to be accessed by a large portion of the modules\n */\n function getInterfaces() external view returns (address interfaces);\n\n /**\n * @notice Update the Holograph Interfaces module address\n * @param interfaces address of the Holograph Interfaces smart contract to use\n */\n function setInterfaces(address interfaces) external;\n\n /**\n * @notice Get the address of the Holograph Operator module\n * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module\n */\n function getOperator() external view returns (address operator);\n\n /**\n * @notice Update the Holograph Operator module address\n * @param operator address of the Holograph Operator smart contract to use\n */\n function setOperator(address operator) external;\n\n /**\n * @notice Get the Holograph Registry module\n * @dev This module stores a reference for all deployed holographable smart contracts\n */\n function getRegistry() external view returns (address registry);\n\n /**\n * @notice Update the Holograph Registry module address\n * @param registry address of the Holograph Registry smart contract to use\n */\n function setRegistry(address registry) external;\n\n /**\n * @notice Get the Holograph Treasury module\n * @dev All of the Holograph Protocol assets are stored and managed by this module\n */\n function getTreasury() external view returns (address treasury);\n\n /**\n * @notice Update the Holograph Treasury module address\n * @param treasury address of the Holograph Treasury smart contract to use\n */\n function setTreasury(address treasury) external;\n\n /**\n * @notice Get the Holograph Utility Token address\n * @dev This is the official utility token of the Holograph Protocol\n */\n function getUtilityToken() external view returns (address utilityToken);\n\n /**\n * @notice Update the Holograph Utility Token address\n * @param utilityToken address of the Holograph Utility Token smart contract to use\n */\n function setUtilityToken(address utilityToken) external;\n}\n" + }, + "contracts/interface/HolographInterfacesInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../enum/ChainIdType.sol\";\nimport \"../enum/InterfaceType.sol\";\nimport \"../enum/TokenUriType.sol\";\n\ninterface HolographInterfacesInterface {\n function contractURI(\n string calldata name,\n string calldata imageURL,\n string calldata externalLink,\n uint16 bps,\n address contractAddress\n ) external pure returns (string memory);\n\n function getUriPrepend(TokenUriType uriType) external view returns (string memory prepend);\n\n function updateUriPrepend(TokenUriType uriType, string calldata prepend) external;\n\n function updateUriPrepends(TokenUriType[] calldata uriTypes, string[] calldata prepends) external;\n\n function getChainId(\n ChainIdType fromChainType,\n uint256 fromChainId,\n ChainIdType toChainType\n ) external view returns (uint256 toChainId);\n\n function updateChainIdMap(\n ChainIdType fromChainType,\n uint256 fromChainId,\n ChainIdType toChainType,\n uint256 toChainId\n ) external;\n\n function updateChainIdMaps(\n ChainIdType[] calldata fromChainType,\n uint256[] calldata fromChainId,\n ChainIdType[] calldata toChainType,\n uint256[] calldata toChainId\n ) external;\n\n function supportsInterface(InterfaceType interfaceType, bytes4 interfaceId) external view returns (bool);\n\n function updateInterface(InterfaceType interfaceType, bytes4 interfaceId, bool supported) external;\n\n function updateInterfaces(InterfaceType interfaceType, bytes4[] calldata interfaceIds, bool supported) external;\n}\n" + }, + "contracts/interface/HolographOperatorInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../struct/OperatorJob.sol\";\n\ninterface HolographOperatorInterface {\n /**\n * @dev Event is emitted for every time that a valid job is available.\n */\n event AvailableOperatorJob(bytes32 jobHash, bytes payload);\n\n /**\n * @dev Event is emitted for every time that a job is completed.\n */\n event FinishedOperatorJob(bytes32 jobHash, address operator);\n\n /**\n * @dev Event is emitted every time a cross-chain message is sent\n */\n event CrossChainMessageSent(bytes32 messageHash);\n\n /**\n * @dev Event is emitted if an operator job execution fails\n */\n event FailedOperatorJob(bytes32 jobHash);\n\n /**\n * @notice Execute an available operator job\n * @dev When making this call, if operating criteria is not met, the call will revert\n * @param bridgeInRequestPayload the entire cross chain message payload\n */\n function executeJob(bytes calldata bridgeInRequestPayload) external payable;\n\n function nonRevertingBridgeCall(address msgSender, bytes calldata payload) external payable;\n\n /**\n * @notice Receive a cross-chain message\n * @dev This function is restricted for use by Holograph Messaging Module only\n */\n function crossChainMessage(bytes calldata bridgeInRequestPayload) external payable;\n\n /**\n * @notice Calculate the amount of gas needed to execute a bridgeInRequest\n * @dev Use this function to estimate the amount of gas that will be used by the bridgeInRequest function\n * Set a specific gas limit when making this call, subtract return value, to get total gas used\n * Only use this with a static call\n * @param bridgeInRequestPayload abi encoded bytes making up the bridgeInRequest payload\n * @return the gas amount remaining after the static call is returned\n */\n function jobEstimator(bytes calldata bridgeInRequestPayload) external payable returns (uint256);\n\n /**\n * @notice Send cross chain bridge request message\n * @dev This function is restricted to only be callable by Holograph Bridge\n * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain\n * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain\n * @param toChain Holograph Chain ID where the beam is being sent to\n * @param nonce incremented number used to ensure job hashes are unique\n * @param holographableContract address of the contract for which the bridge request is being made\n * @param bridgeOutPayload bytes made up of the bridgeOutRequest payload\n */\n function send(\n uint256 gasLimit,\n uint256 gasPrice,\n uint32 toChain,\n address msgSender,\n uint256 nonce,\n address holographableContract,\n bytes calldata bridgeOutPayload\n ) external payable;\n\n /**\n * @notice Get the fees associated with sending specific payload\n * @dev Will provide exact costs on protocol and message side, combine the two to get total\n * @param toChain holograph chain id of destination chain for payload\n * @param gasLimit amount of gas to provide for executing payload on destination chain\n * @param gasPrice maximum amount to pay for gas price, can be set to 0 and will be chose automatically\n * @param crossChainPayload the entire packet being sent cross-chain\n * @return hlgFee the amount (in wei) of native gas token that will cost for finalizing job on destiantion chain\n * @return msgFee the amount (in wei) of native gas token that will cost for sending message to destiantion chain\n * @return dstGasPrice the amount (in wei) that destination message maximum gas price will be\n */\n function getMessageFee(\n uint32 toChain,\n uint256 gasLimit,\n uint256 gasPrice,\n bytes calldata crossChainPayload\n ) external view returns (uint256 hlgFee, uint256 msgFee, uint256 dstGasPrice);\n\n /**\n * @notice Get the details for an available operator job\n * @dev The job hash is a keccak256 hash of the entire job payload\n * @param jobHash keccak256 hash of the job\n * @return an OperatorJob struct with details about a specific job\n */\n function getJobDetails(bytes32 jobHash) external view returns (OperatorJob memory);\n\n /**\n * @notice Get number of pods available\n * @dev This returns number of pods that have been opened via bonding\n */\n function getTotalPods() external view returns (uint256 totalPods);\n\n /**\n * @notice Get total number of operators in a pod\n * @dev Use in conjunction with paginated getPodOperators function\n * @param pod the pod to query\n * @return total operators in a pod\n */\n function getPodOperatorsLength(uint256 pod) external view returns (uint256);\n\n /**\n * @notice Get list of operators in a pod\n * @dev Use paginated getPodOperators function instead if list gets too long\n * @param pod the pod to query\n * @return operators array list of operators in a pod\n */\n function getPodOperators(uint256 pod) external view returns (address[] memory operators);\n\n /**\n * @notice Get paginated list of operators in a pod\n * @dev Use in conjunction with getPodOperatorsLength to know the total length of results\n * @param pod the pod to query\n * @param index the array index to start from\n * @param length the length of result set to be (will be shorter if reached end of array)\n * @return operators a paginated array of operators\n */\n function getPodOperators(\n uint256 pod,\n uint256 index,\n uint256 length\n ) external view returns (address[] memory operators);\n\n /**\n * @notice Check the base and current price for bonding to a particular pod\n * @dev Useful for understanding what is required for bonding to a pod\n * @param pod the pod to get bonding amounts for\n * @return base the base bond amount required for a pod\n * @return current the current bond amount required for a pod\n */\n function getPodBondAmounts(uint256 pod) external view returns (uint256 base, uint256 current);\n\n /**\n * @notice Get an operator's currently bonded amount\n * @dev Useful for checking how much an operator has bonded\n * @param operator address of operator to check\n * @return amount total number of utility token bonded\n */\n function getBondedAmount(address operator) external view returns (uint256 amount);\n\n /**\n * @notice Get an operator's currently bonded pod\n * @dev Useful for checking if an operator is currently bonded\n * @param operator address of operator to check\n * @return pod number that operator is bonded on, returns zero if not bonded or selected for job\n */\n function getBondedPod(address operator) external view returns (uint256 pod);\n\n /**\n * @notice Get an operator's currently bonded pod index\n * @dev Useful for checking if an operator is a fallback for active job\n * @param operator address of operator to check\n * @return index currently bonded pod's operator index, returns zero if not in pod or moved out for active job\n */\n function getBondedPodIndex(address operator) external view returns (uint256 index);\n\n /**\n * @notice Topup a bonded operator with more utility tokens\n * @dev Useful function if an operator got slashed and wants to add a safety buffer to not get unbonded\n * @param operator address of operator to topup\n * @param amount utility token amount to add\n */\n function topupUtilityToken(address operator, uint256 amount) external;\n\n /**\n * @notice Bond utility tokens and become an operator\n * @dev An operator can only bond to one pod at a time, per network\n * @param operator address of operator to bond (can be an ownable smart contract)\n * @param amount utility token amount to bond (can be greater than minimum)\n * @param pod number of pod to bond to (can be for one that does not exist yet)\n */\n function bondUtilityToken(address operator, uint256 amount, uint256 pod) external;\n\n /**\n * @notice Unbond HLG utility tokens and stop being an operator\n * @dev A bonded operator selected for a job cannot unbond until they complete the job, or are slashed\n * @param operator address of operator to unbond\n * @param recipient address where to send the bonded tokens\n */\n function unbondUtilityToken(address operator, address recipient) external;\n\n /**\n * @notice Get the address of the Holograph Bridge module\n * @dev Used for beaming holographable assets cross-chain\n */\n function getBridge() external view returns (address bridge);\n\n /**\n * @notice Update the Holograph Bridge module address\n * @param bridge address of the Holograph Bridge smart contract to use\n */\n function setBridge(address bridge) external;\n\n /**\n * @notice Get the Holograph Protocol contract\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\n */\n function getHolograph() external view returns (address holograph);\n\n /**\n * @notice Update the Holograph Protocol contract address\n * @param holograph address of the Holograph Protocol smart contract to use\n */\n function setHolograph(address holograph) external;\n\n /**\n * @notice Get the address of the Holograph Interfaces module\n * @dev Holograph uses this contract to store data that needs to be accessed by a large portion of the modules\n */\n function getInterfaces() external view returns (address interfaces);\n\n /**\n * @notice Update the Holograph Interfaces module address\n * @param interfaces address of the Holograph Interfaces smart contract to use\n */\n function setInterfaces(address interfaces) external;\n\n /**\n * @notice Get the address of the Holograph Messaging Module\n * @dev All cross-chain message requests will get forwarded to this adress\n */\n function getMessagingModule() external view returns (address messagingModule);\n\n /**\n * @notice Update the Holograph Messaging Module address\n * @param messagingModule address of the LayerZero Endpoint to use\n */\n function setMessagingModule(address messagingModule) external;\n\n /**\n * @notice Get the Holograph Registry module\n * @dev This module stores a reference for all deployed holographable smart contracts\n */\n function getRegistry() external view returns (address registry);\n\n /**\n * @notice Update the Holograph Registry module address\n * @param registry address of the Holograph Registry smart contract to use\n */\n function setRegistry(address registry) external;\n\n /**\n * @notice Get the Holograph Utility Token address\n * @dev This is the official utility token of the Holograph Protocol\n */\n function getUtilityToken() external view returns (address utilityToken);\n\n /**\n * @notice Update the Holograph Utility Token address\n * @param utilityToken address of the Holograph Utility Token smart contract to use\n */\n function setUtilityToken(address utilityToken) external;\n\n /**\n * @notice Get the Minimum Gas Price\n * @dev This amount is used as the value that will define a job as underpriced is lower than\n */\n function getMinGasPrice() external view returns (uint256 minGasPrice);\n\n /**\n * @notice Update the Minimum Gas Price\n * @param minGasPrice amount to set for minimum gas price\n */\n function setMinGasPrice(uint256 minGasPrice) external;\n}\n" + }, + "contracts/interface/HolographRegistryInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\ninterface HolographRegistryInterface {\n event HolographableContractEvent(address indexed _holographableContract, bytes _payload);\n\n function isHolographedContract(address smartContract) external view returns (bool);\n\n function isHolographedHashDeployed(bytes32 hash) external view returns (bool);\n\n function referenceContractTypeAddress(address contractAddress) external returns (bytes32);\n\n function getContractTypeAddress(bytes32 contractType) external view returns (address);\n\n function setContractTypeAddress(bytes32 contractType, address contractAddress) external;\n\n function getHolograph() external view returns (address holograph);\n\n function setHolograph(address holograph) external;\n\n function getHolographableContracts(uint256 index, uint256 length) external view returns (address[] memory contracts);\n\n function getHolographableContractsLength() external view returns (uint256);\n\n function getHolographedHashAddress(bytes32 hash) external view returns (address);\n\n function setHolographedHashAddress(bytes32 hash, address contractAddress) external;\n\n function getHToken(uint32 chainId) external view returns (address);\n\n function setHToken(uint32 chainId, address hToken) external;\n\n function getReservedContractTypeAddress(bytes32 contractType) external view returns (address contractTypeAddress);\n\n function setReservedContractTypeAddress(bytes32 hash, bool reserved) external;\n\n function setReservedContractTypeAddresses(bytes32[] calldata hashes, bool[] calldata reserved) external;\n\n function getUtilityToken() external view returns (address utilityToken);\n\n function setUtilityToken(address utilityToken) external;\n\n function holographableEvent(bytes calldata payload) external;\n}\n" + }, + "contracts/interface/HolographRoyaltiesInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../struct/ZoraBidShares.sol\";\n\ninterface HolographRoyaltiesInterface {\n function initHolographRoyalties(bytes memory data) external returns (bytes4);\n\n function configurePayouts(address payable[] memory addresses, uint256[] memory bps) external;\n\n function getPayoutInfo() external view returns (address payable[] memory addresses, uint256[] memory bps);\n\n function getEthPayout() external;\n\n function getTokenPayout(address tokenAddress) external;\n\n function getTokensPayout(address[] memory tokenAddresses) external;\n\n function supportsInterface(bytes4 interfaceId) external pure returns (bool);\n\n function setRoyalties(uint256 tokenId, address payable receiver, uint256 bp) external;\n\n function royaltyInfo(uint256 tokenId, uint256 value) external view returns (address, uint256);\n\n function getFeeBps(uint256 tokenId) external view returns (uint256[] memory);\n\n function getFeeRecipients(uint256 tokenId) external view returns (address payable[] memory);\n\n function getRoyalties(uint256 tokenId) external view returns (address payable[] memory, uint256[] memory);\n\n function getFees(uint256 tokenId) external view returns (address payable[] memory, uint256[] memory);\n\n function tokenCreator(address /* contractAddress*/, uint256 tokenId) external view returns (address);\n\n function calculateRoyaltyFee(\n address /* contractAddress */,\n uint256 tokenId,\n uint256 amount\n ) external view returns (uint256);\n\n function marketContract() external view returns (address);\n\n function tokenCreators(uint256 tokenId) external view returns (address);\n\n function bidSharesForToken(uint256 tokenId) external view returns (HolographBidShares memory bidShares);\n\n function getStorageSlot(string calldata slot) external pure returns (bytes32);\n\n function getTokenAddress(string memory tokenName) external view returns (address);\n}\n" + }, + "contracts/interface/HolographTreasuryInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\ninterface HolographTreasuryInterface {\n // purposefully left blank\n}\n" + }, + "contracts/interface/InitializableInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\n/**\n * @title Initializable\n * @author https://github.com/holographxyz\n * @notice Use init instead of constructor\n * @dev This allows for use of init function to make one time initializations without the need of a constructor\n */\ninterface InitializableInterface {\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external returns (bytes4);\n}\n" + }, + "contracts/interface/LayerZeroEndpointInterface.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport \"./LayerZeroUserApplicationConfigInterface.sol\";\n\ninterface LayerZeroEndpointInterface is LayerZeroUserApplicationConfigInterface {\n // @notice send a LayerZero message to the specified address at a LayerZero endpoint.\n // @param _dstChainId - the destination chain identifier\n // @param _destination - the address on destination chain (in bytes). address length/format may vary by chains\n // @param _payload - a custom bytes payload to send to the destination contract\n // @param _refundAddress - if the source transaction is cheaper than the amount of value passed, refund the additional amount to this address\n // @param _zroPaymentAddress - the address of the ZRO token holder who would pay for the transaction\n // @param _adapterParams - parameters for custom functionality. e.g. receive airdropped native gas from the relayer on destination\n function send(\n uint16 _dstChainId,\n bytes calldata _destination,\n bytes calldata _payload,\n address payable _refundAddress,\n address _zroPaymentAddress,\n bytes calldata _adapterParams\n ) external payable;\n\n // @notice used by the messaging library to publish verified payload\n // @param _srcChainId - the source chain identifier\n // @param _srcAddress - the source contract (as bytes) at the source chain\n // @param _dstAddress - the address on destination chain\n // @param _nonce - the unbound message ordering nonce\n // @param _gasLimit - the gas limit for external contract execution\n // @param _payload - verified payload to send to the destination contract\n function receivePayload(\n uint16 _srcChainId,\n bytes calldata _srcAddress,\n address _dstAddress,\n uint64 _nonce,\n uint256 _gasLimit,\n bytes calldata _payload\n ) external;\n\n // @notice get the inboundNonce of a lzApp from a source chain which could be EVM or non-EVM chain\n // @param _srcChainId - the source chain identifier\n // @param _srcAddress - the source chain contract address\n function getInboundNonce(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (uint64);\n\n // @notice get the outboundNonce from this source chain which, consequently, is always an EVM\n // @param _srcAddress - the source chain contract address\n function getOutboundNonce(uint16 _dstChainId, address _srcAddress) external view returns (uint64);\n\n // @notice gets a quote in source native gas, for the amount that send() requires to pay for message delivery\n // @param _dstChainId - the destination chain identifier\n // @param _userApplication - the user app address on this EVM chain\n // @param _payload - the custom message to send over LayerZero\n // @param _payInZRO - if false, user app pays the protocol fee in native token\n // @param _adapterParam - parameters for the adapter service, e.g. send some dust native token to dstChain\n function estimateFees(\n uint16 _dstChainId,\n address _userApplication,\n bytes calldata _payload,\n bool _payInZRO,\n bytes calldata _adapterParam\n ) external view returns (uint256 nativeFee, uint256 zroFee);\n\n // @notice get this Endpoint's immutable source identifier\n function getChainId() external view returns (uint16);\n\n // @notice the interface to retry failed message on this Endpoint destination\n // @param _srcChainId - the source chain identifier\n // @param _srcAddress - the source chain contract address\n // @param _payload - the payload to be retried\n function retryPayload(uint16 _srcChainId, bytes calldata _srcAddress, bytes calldata _payload) external;\n\n // @notice query if any STORED payload (message blocking) at the endpoint.\n // @param _srcChainId - the source chain identifier\n // @param _srcAddress - the source chain contract address\n function hasStoredPayload(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool);\n\n // @notice query if the _libraryAddress is valid for sending msgs.\n // @param _userApplication - the user app address on this EVM chain\n function getSendLibraryAddress(address _userApplication) external view returns (address);\n\n // @notice query if the _libraryAddress is valid for receiving msgs.\n // @param _userApplication - the user app address on this EVM chain\n function getReceiveLibraryAddress(address _userApplication) external view returns (address);\n\n // @notice query if the non-reentrancy guard for send() is on\n // @return true if the guard is on. false otherwise\n function isSendingPayload() external view returns (bool);\n\n // @notice query if the non-reentrancy guard for receive() is on\n // @return true if the guard is on. false otherwise\n function isReceivingPayload() external view returns (bool);\n\n // @notice get the configuration of the LayerZero messaging library of the specified version\n // @param _version - messaging library version\n // @param _chainId - the chainId for the pending config change\n // @param _userApplication - the contract address of the user application\n // @param _configType - type of configuration. every messaging library has its own convention.\n function getConfig(\n uint16 _version,\n uint16 _chainId,\n address _userApplication,\n uint256 _configType\n ) external view returns (bytes memory);\n\n // @notice get the send() LayerZero messaging library version\n // @param _userApplication - the contract address of the user application\n function getSendVersion(address _userApplication) external view returns (uint16);\n\n // @notice get the lzReceive() LayerZero messaging library version\n // @param _userApplication - the contract address of the user application\n function getReceiveVersion(address _userApplication) external view returns (uint16);\n}\n" + }, + "contracts/interface/LayerZeroModuleInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\ninterface LayerZeroModuleInterface {\n function lzReceive(\n uint16 _srcChainId,\n bytes calldata _srcAddress,\n uint64 _nonce,\n bytes calldata _payload\n ) external payable;\n\n function getInterfaces() external view returns (address interfaces);\n\n function setInterfaces(address interfaces) external;\n\n function getLZEndpoint() external view returns (address lZEndpoint);\n\n function setLZEndpoint(address lZEndpoint) external;\n\n function getOperator() external view returns (address operator);\n\n function setOperator(address operator) external;\n}\n" + }, + "contracts/interface/LayerZeroOverrides.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\ninterface LayerZeroOverrides {\n // @dev defaultAppConfig struct\n struct ApplicationConfiguration {\n uint16 inboundProofLibraryVersion;\n uint64 inboundBlockConfirmations;\n address relayer;\n uint16 outboundProofType;\n uint64 outboundBlockConfirmations;\n address oracle;\n }\n\n struct DstPrice {\n uint128 dstPriceRatio; // 10^10\n uint128 dstGasPriceInWei;\n }\n\n struct DstConfig {\n uint128 dstNativeAmtCap;\n uint64 baseGas;\n uint64 gasPerByte;\n }\n\n // @dev using this to retrieve UltraLightNodeV2 address\n function defaultSendLibrary() external view returns (address);\n\n // @dev using this to extract defaultAppConfig\n function getAppConfig(\n uint16 destinationChainId,\n address userApplicationAddress\n ) external view returns (ApplicationConfiguration memory);\n\n // @dev using this to extract defaultAppConfig directly from storage slot\n function defaultAppConfig(\n uint16 destinationChainId\n )\n external\n view\n returns (\n uint16 inboundProofLibraryVersion,\n uint64 inboundBlockConfirmations,\n address relayer,\n uint16 outboundProofType,\n uint64 outboundBlockConfirmations,\n address oracle\n );\n\n // @dev access the mapping to get base price fee\n function dstPriceLookup(\n uint16 destinationChainId\n ) external view returns (uint128 dstPriceRatio, uint128 dstGasPriceInWei);\n\n // @dev access the mapping to get base gas and gas per byte\n function dstConfigLookup(\n uint16 destinationChainId,\n uint16 outboundProofType\n ) external view returns (uint128 dstNativeAmtCap, uint64 baseGas, uint64 gasPerByte);\n\n // @dev send message to LayerZero Endpoint\n function send(\n uint16 _dstChainId,\n bytes calldata _destination,\n bytes calldata _payload,\n address payable _refundAddress,\n address _zroPaymentAddress,\n bytes calldata _adapterParams\n ) external payable;\n\n // @dev estimate LayerZero message cost\n function estimateFees(\n uint16 _dstChainId,\n address _userApplication,\n bytes calldata _payload,\n bool _payInZRO,\n bytes calldata _adapterParam\n ) external view returns (uint256 nativeFee, uint256 zroFee);\n}\n" + }, + "contracts/interface/LayerZeroReceiverInterface.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\ninterface LayerZeroReceiverInterface {\n // @notice LayerZero endpoint will invoke this function to deliver the message on the destination\n // @param _srcChainId - the source endpoint identifier\n // @param _srcAddress - the source sending contract address from the source chain\n // @param _nonce - the ordered message nonce\n // @param _payload - the signed payload is the UA bytes has encoded to be sent\n function lzReceive(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes calldata _payload) external;\n}\n" + }, + "contracts/interface/LayerZeroUserApplicationConfigInterface.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\ninterface LayerZeroUserApplicationConfigInterface {\n // @notice set the configuration of the LayerZero messaging library of the specified version\n // @param _version - messaging library version\n // @param _chainId - the chainId for the pending config change\n // @param _configType - type of configuration. every messaging library has its own convention.\n // @param _config - configuration in the bytes. can encode arbitrary content.\n function setConfig(uint16 _version, uint16 _chainId, uint256 _configType, bytes calldata _config) external;\n\n // @notice set the send() LayerZero messaging library version to _version\n // @param _version - new messaging library version\n function setSendVersion(uint16 _version) external;\n\n // @notice set the lzReceive() LayerZero messaging library version to _version\n // @param _version - new messaging library version\n function setReceiveVersion(uint16 _version) external;\n\n // @notice Only when the UA needs to resume the message flow in blocking mode and clear the stored payload\n // @param _srcChainId - the chainId of the source chain\n // @param _srcAddress - the contract address of the source contract at the source chain\n function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external;\n}\n" + }, + "contracts/interface/Ownable.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\ninterface Ownable {\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n function owner() external view returns (address);\n\n function transferOwnership(address _newOwner) external;\n\n function isOwner() external view returns (bool);\n\n function isOwner(address wallet) external view returns (bool);\n}\n" + }, + "contracts/library/Base64.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nlibrary Base64 {\n bytes private constant base64stdchars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\n bytes private constant base64urlchars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_\";\n\n function encode(string memory _str) internal pure returns (string memory) {\n bytes memory _bs = bytes(_str);\n return encode(_bs);\n }\n\n function encode(bytes memory _bs) internal pure returns (string memory) {\n uint256 rem = _bs.length % 3;\n\n uint256 res_length = ((_bs.length + 2) / 3) * 4 - ((3 - rem) % 3);\n bytes memory res = new bytes(res_length);\n\n uint256 i = 0;\n uint256 j = 0;\n\n for (; i + 3 <= _bs.length; i += 3) {\n (res[j], res[j + 1], res[j + 2], res[j + 3]) = encode3(uint8(_bs[i]), uint8(_bs[i + 1]), uint8(_bs[i + 2]));\n\n j += 4;\n }\n\n if (rem != 0) {\n uint8 la0 = uint8(_bs[_bs.length - rem]);\n uint8 la1 = 0;\n\n if (rem == 2) {\n la1 = uint8(_bs[_bs.length - 1]);\n }\n\n (bytes1 b0, bytes1 b1, bytes1 b2 /* bytes1 b3*/, ) = encode3(la0, la1, 0);\n res[j] = b0;\n res[j + 1] = b1;\n if (rem == 2) {\n res[j + 2] = b2;\n }\n }\n\n return string(res);\n }\n\n function encode3(\n uint256 a0,\n uint256 a1,\n uint256 a2\n ) private pure returns (bytes1 b0, bytes1 b1, bytes1 b2, bytes1 b3) {\n uint256 n = (a0 << 16) | (a1 << 8) | a2;\n\n uint256 c0 = (n >> 18) & 63;\n uint256 c1 = (n >> 12) & 63;\n uint256 c2 = (n >> 6) & 63;\n uint256 c3 = (n) & 63;\n\n b0 = base64urlchars[c0];\n b1 = base64urlchars[c1];\n b2 = base64urlchars[c2];\n b3 = base64urlchars[c3];\n }\n}\n" + }, + "contracts/library/Bytes.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nlibrary Bytes {\n function getBoolean(uint192 _packedBools, uint192 _boolNumber) internal pure returns (bool) {\n uint192 flag = (_packedBools >> _boolNumber) & uint192(1);\n return (flag == 1 ? true : false);\n }\n\n function setBoolean(uint192 _packedBools, uint192 _boolNumber, bool _value) internal pure returns (uint192) {\n if (_value) {\n return _packedBools | (uint192(1) << _boolNumber);\n } else {\n return _packedBools & ~(uint192(1) << _boolNumber);\n }\n }\n\n function slice(bytes memory _bytes, uint256 _start, uint256 _length) internal pure returns (bytes memory) {\n require(_length + 31 >= _length, \"slice_overflow\");\n require(_bytes.length >= _start + _length, \"slice_outOfBounds\");\n bytes memory tempBytes;\n assembly {\n switch iszero(_length)\n case 0 {\n tempBytes := mload(0x40)\n let lengthmod := and(_length, 31)\n let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod)))\n let end := add(mc, _length)\n for {\n let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start)\n } lt(mc, end) {\n mc := add(mc, 0x20)\n cc := add(cc, 0x20)\n } {\n mstore(mc, mload(cc))\n }\n mstore(tempBytes, _length)\n mstore(0x40, and(add(mc, 31), not(31)))\n }\n default {\n tempBytes := mload(0x40)\n mstore(tempBytes, 0)\n mstore(0x40, add(tempBytes, 0x20))\n }\n }\n return tempBytes;\n }\n\n function trim(bytes32 source) internal pure returns (bytes memory) {\n uint256 temp = uint256(source);\n uint256 length = 0;\n while (temp != 0) {\n length++;\n temp >>= 8;\n }\n return slice(abi.encodePacked(source), 32 - length, length);\n }\n}\n" + }, + "contracts/library/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/cryptography/ECDSA.sol)\n\npragma solidity 0.8.13;\n\nimport \"./Strings.sol\";\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSA {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS,\n InvalidSignatureV\n }\n\n function _throwError(RecoverError error) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert(\"ECDSA: invalid signature\");\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert(\"ECDSA: invalid signature length\");\n } else if (error == RecoverError.InvalidSignatureS) {\n revert(\"ECDSA: invalid signature 's' value\");\n } else if (error == RecoverError.InvalidSignatureV) {\n revert(\"ECDSA: invalid signature 'v' value\");\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature` or error string. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\n // Check the signature length\n // - case 65: r,s,v signature (standard)\n // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._\n if (signature.length == 65) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n assembly {\n r := mload(add(signature, 0x20))\n s := mload(add(signature, 0x40))\n v := byte(0, mload(add(signature, 0x60)))\n }\n return tryRecover(hash, v, r, s);\n } else if (signature.length == 64) {\n bytes32 r;\n bytes32 vs;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n assembly {\n r := mload(add(signature, 0x20))\n vs := mload(add(signature, 0x40))\n }\n return tryRecover(hash, r, vs);\n } else {\n return (address(0), RecoverError.InvalidSignatureLength);\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, signature);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n *\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n *\n * _Available since v4.2._\n */\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n * `r` and `s` signature fields separately.\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS);\n }\n if (v != 27 && v != 28) {\n return (address(0), RecoverError.InvalidSignatureV);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature);\n }\n\n return (signer, RecoverError.NoError);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\n // 32 is the length in bytes of hash,\n // enforced by the type signature above\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", hash));\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from `s`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n\", Strings.toString(s.length), s));\n }\n\n /**\n * @dev Returns an Ethereum Signed Typed Data, created from a\n * `domainSeparator` and a `structHash`. This produces hash corresponding\n * to the one signed with the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\n * JSON-RPC method as part of EIP-712.\n *\n * See {recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n }\n}\n" + }, + "contracts/library/Strings.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nlibrary Strings {\n function toHexString(address account) internal pure returns (string memory) {\n return toHexString(uint256(uint160(account)));\n }\n\n function toHexString(uint256 value) internal pure returns (string memory) {\n if (value == 0) {\n return \"0x00\";\n }\n uint256 temp = value;\n uint256 length = 0;\n while (temp != 0) {\n length++;\n temp >>= 8;\n }\n return toHexString(value, length);\n }\n\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = bytes16(\"0123456789abcdef\")[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n\n function toAsciiString(address x) internal pure returns (string memory) {\n bytes memory s = new bytes(40);\n for (uint256 i = 0; i < 20; i++) {\n bytes1 b = bytes1(uint8(uint256(uint160(x)) / (2 ** (8 * (19 - i)))));\n bytes1 hi = bytes1(uint8(b) / 16);\n bytes1 lo = bytes1(uint8(b) - 16 * uint8(hi));\n s[2 * i] = char(hi);\n s[2 * i + 1] = char(lo);\n }\n return string(s);\n }\n\n function char(bytes1 b) internal pure returns (bytes1 c) {\n if (uint8(b) < 10) {\n return bytes1(uint8(b) + 0x30);\n } else {\n return bytes1(uint8(b) + 0x57);\n }\n }\n\n function uint2str(uint256 _i) internal pure returns (string memory _uint256AsString) {\n if (_i == 0) {\n return \"0\";\n }\n uint256 j = _i;\n uint256 len;\n while (j != 0) {\n len++;\n j /= 10;\n }\n bytes memory bstr = new bytes(len);\n uint256 k = len;\n while (_i != 0) {\n k = k - 1;\n uint8 temp = (48 + uint8(_i - (_i / 10) * 10));\n bytes1 b1 = bytes1(temp);\n bstr[k] = b1;\n _i /= 10;\n }\n return string(bstr);\n }\n\n function toString(uint256 value) internal pure returns (string memory) {\n if (value == 0) {\n return \"0\";\n }\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n bytes memory buffer = new bytes(digits);\n while (value != 0) {\n digits -= 1;\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n value /= 10;\n }\n return string(buffer);\n }\n}\n" + }, + "contracts/mock/ERC20Mock.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/EIP712.sol\";\nimport \"../abstract/NonReentrant.sol\";\n\nimport \"../interface/ERC20.sol\";\nimport \"../interface/ERC20Burnable.sol\";\nimport \"../interface/HolographERC20Interface.sol\";\nimport \"../interface/ERC20Metadata.sol\";\nimport \"../interface/ERC20Permit.sol\";\nimport \"../interface/ERC20Receiver.sol\";\nimport \"../interface/ERC20Safer.sol\";\nimport \"../interface/ERC165.sol\";\nimport \"../interface/ERC165.sol\";\n\nimport \"../library/ECDSA.sol\";\n\n/**\n * @title Mock ERC20 Token\n * @author Holograph Foundation\n * @notice Used for imitating the likes of WETH and WMATIC tokens.\n * @dev The entire logic and functionality of the smart contract is self-contained.\n */\ncontract ERC20Mock is\n ERC165,\n ERC20,\n ERC20Burnable,\n ERC20Metadata,\n ERC20Receiver,\n ERC20Safer,\n ERC20Permit,\n NonReentrant,\n EIP712\n{\n bool private _works;\n\n /**\n * @dev Mapping of all the addresse's balances.\n */\n mapping(address => uint256) private _balances;\n\n /**\n * @dev Mapping of all authorized operators, and capped amounts.\n */\n mapping(address => mapping(address => uint256)) private _allowances;\n\n /**\n * @dev Total number of token in circulation.\n */\n uint256 private _totalSupply;\n\n /**\n * @dev Token name.\n */\n string private _name;\n\n /**\n * @dev Token ticker symbol.\n */\n string private _symbol;\n\n /**\n * @dev Token number of decimal places.\n */\n uint8 private _decimals;\n\n /**\n * @dev List of all supported ERC165 interfaces.\n */\n mapping(bytes4 => bool) private _supportedInterfaces;\n\n /**\n * @dev List of used up nonces. Used in the ERC20Permit interface functionality.\n */\n mapping(address => uint256) private _nonces;\n\n /**\n * @dev Constructor does not accept any parameters.\n */\n constructor(\n string memory contractName,\n string memory contractSymbol,\n uint8 contractDecimals,\n string memory domainSeperator,\n string memory domainVersion\n ) {\n _works = true;\n _name = contractName;\n _symbol = contractSymbol;\n _decimals = contractDecimals;\n\n // ERC165\n _supportedInterfaces[ERC165.supportsInterface.selector] = true;\n\n // ERC20\n _supportedInterfaces[ERC20.allowance.selector] = true;\n _supportedInterfaces[ERC20.approve.selector] = true;\n _supportedInterfaces[ERC20.balanceOf.selector] = true;\n _supportedInterfaces[ERC20.totalSupply.selector] = true;\n _supportedInterfaces[ERC20.transfer.selector] = true;\n _supportedInterfaces[ERC20.transferFrom.selector] = true;\n _supportedInterfaces[\n ERC20.allowance.selector ^\n ERC20.approve.selector ^\n ERC20.balanceOf.selector ^\n ERC20.totalSupply.selector ^\n ERC20.transfer.selector ^\n ERC20.transferFrom.selector\n ] = true;\n\n // ERC20Metadata\n _supportedInterfaces[ERC20Metadata.name.selector] = true;\n _supportedInterfaces[ERC20Metadata.symbol.selector] = true;\n _supportedInterfaces[ERC20Metadata.decimals.selector] = true;\n _supportedInterfaces[\n ERC20Metadata.name.selector ^ ERC20Metadata.symbol.selector ^ ERC20Metadata.decimals.selector\n ] = true;\n\n // ERC20Burnable\n _supportedInterfaces[ERC20Burnable.burn.selector] = true;\n _supportedInterfaces[ERC20Burnable.burnFrom.selector] = true;\n _supportedInterfaces[ERC20Burnable.burn.selector ^ ERC20Burnable.burnFrom.selector] = true;\n\n // ERC20Safer\n // bytes4(keccak256(abi.encodePacked('safeTransfer(address,uint256)'))) == 0x423f6cef\n _supportedInterfaces[0x423f6cef] = true;\n // bytes4(keccak256(abi.encodePacked('safeTransfer(address,uint256,bytes)'))) == 0xeb795549\n _supportedInterfaces[0xeb795549] = true;\n // bytes4(keccak256(abi.encodePacked('safeTransferFrom(address,address,uint256)'))) == 0x42842e0e\n _supportedInterfaces[0x42842e0e] = true;\n // bytes4(keccak256(abi.encodePacked('safeTransferFrom(address,address,uint256,bytes)'))) == 0xb88d4fde\n _supportedInterfaces[0xb88d4fde] = true;\n _supportedInterfaces[bytes4(0x423f6cef) ^ bytes4(0xeb795549) ^ bytes4(0x42842e0e) ^ bytes4(0xb88d4fde)] = true;\n\n // ERC20Receiver\n _supportedInterfaces[ERC20Receiver.onERC20Received.selector] = true;\n\n // ERC20Permit\n _supportedInterfaces[ERC20Permit.permit.selector] = true;\n _supportedInterfaces[ERC20Permit.nonces.selector] = true;\n _supportedInterfaces[ERC20Permit.DOMAIN_SEPARATOR.selector] = true;\n _supportedInterfaces[\n ERC20Permit.permit.selector ^ ERC20Permit.nonces.selector ^ ERC20Permit.DOMAIN_SEPARATOR.selector\n ] = true;\n _eip712_init(domainSeperator, domainVersion);\n }\n\n function toggleWorks(bool active) external {\n _works = active;\n }\n\n function transferTokens(address payable token, address to, uint256 amount) external {\n ERC20(token).transfer(to, amount);\n }\n\n /**\n * @dev Purposefully left empty, to prevent running out of gas errors when receiving native token payments.\n */\n receive() external payable {}\n\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n /**\n * @dev Although EIP-165 is not required for ERC20 contracts, we still decided to implement it.\n *\n * This makes it easier for external smart contracts to easily identify a valid ERC20 token contract.\n */\n function supportsInterface(bytes4 interfaceId) public view returns (bool) {\n return _supportedInterfaces[interfaceId];\n }\n\n function allowance(address account, address spender) public view returns (uint256) {\n return _allowances[account][spender];\n }\n\n function balanceOf(address account) public view returns (uint256) {\n return _balances[account];\n }\n\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() public view returns (bytes32) {\n return _domainSeparatorV4();\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function nonces(address account) public view returns (uint256) {\n return _nonces[account];\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function totalSupply() public view returns (uint256) {\n return _totalSupply;\n }\n\n function approve(address spender, uint256 amount) public returns (bool) {\n _approve(msg.sender, spender, amount);\n return true;\n }\n\n function burn(uint256 amount) public {\n _burn(msg.sender, amount);\n }\n\n function burnFrom(address account, uint256 amount) public returns (bool) {\n uint256 currentAllowance = _allowances[account][msg.sender];\n require(currentAllowance >= amount, \"ERC20: amount exceeds allowance\");\n unchecked {\n _allowances[account][msg.sender] = currentAllowance - amount;\n }\n _burn(account, amount);\n return true;\n }\n\n function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {\n uint256 currentAllowance = _allowances[msg.sender][spender];\n require(currentAllowance >= subtractedValue, \"ERC20: decreased below zero\");\n uint256 newAllowance;\n unchecked {\n newAllowance = currentAllowance - subtractedValue;\n }\n _approve(msg.sender, spender, newAllowance);\n return true;\n }\n\n function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {\n uint256 currentAllowance = _allowances[msg.sender][spender];\n uint256 newAllowance;\n unchecked {\n newAllowance = currentAllowance + addedValue;\n }\n unchecked {\n require(newAllowance >= currentAllowance, \"ERC20: increased above max value\");\n }\n _approve(msg.sender, spender, newAllowance);\n return true;\n }\n\n function mint(address account, uint256 amount) external {\n _mint(account, amount);\n }\n\n function onERC20Received(\n address account,\n address /* sender*/,\n uint256 amount,\n bytes calldata /* data*/\n ) public returns (bytes4) {\n assembly {\n // used to drop \"change function to view\" compiler warning\n sstore(0x17fb676f92438402d8ef92193dd096c59ee1f4ba1bb57f67f3e6d2eef8aeed5e, amount)\n }\n if (_works) {\n require(_isContract(account), \"ERC20: operator not contract\");\n try ERC20(account).balanceOf(address(this)) returns (uint256 balance) {\n require(balance >= amount, \"ERC20: balance check failed\");\n } catch {\n revert(\"ERC20: failed getting balance\");\n }\n return ERC20Receiver.onERC20Received.selector;\n } else {\n return 0x00000000;\n }\n }\n\n function permit(\n address account,\n address spender,\n uint256 amount,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) public {\n require(block.timestamp <= deadline, \"ERC20: expired deadline\");\n // keccak256(\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\")\n // == 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9\n bytes32 structHash = keccak256(\n abi.encode(\n 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9,\n account,\n spender,\n amount,\n _useNonce(account),\n deadline\n )\n );\n bytes32 hash = _hashTypedDataV4(structHash);\n address signer = ECDSA.recover(hash, v, r, s);\n require(signer == account, \"ERC20: invalid signature\");\n _approve(account, spender, amount);\n }\n\n function safeTransfer(address recipient, uint256 amount) public returns (bool) {\n return safeTransfer(recipient, amount, \"\");\n }\n\n function safeTransfer(address recipient, uint256 amount, bytes memory data) public returns (bool) {\n _transfer(msg.sender, recipient, amount);\n require(_checkOnERC20Received(msg.sender, recipient, amount, data), \"ERC20: non ERC20Receiver\");\n return true;\n }\n\n function safeTransferFrom(address account, address recipient, uint256 amount) public returns (bool) {\n return safeTransferFrom(account, recipient, amount, \"\");\n }\n\n function safeTransferFrom(\n address account,\n address recipient,\n uint256 amount,\n bytes memory data\n ) public returns (bool) {\n if (account != msg.sender) {\n uint256 currentAllowance = _allowances[account][msg.sender];\n require(currentAllowance >= amount, \"ERC20: amount exceeds allowance\");\n unchecked {\n _allowances[account][msg.sender] = currentAllowance - amount;\n }\n }\n _transfer(account, recipient, amount);\n require(_checkOnERC20Received(account, recipient, amount, data), \"ERC20: non ERC20Receiver\");\n return true;\n }\n\n function transfer(address recipient, uint256 amount) public returns (bool) {\n _transfer(msg.sender, recipient, amount);\n return true;\n }\n\n function transferFrom(address account, address recipient, uint256 amount) public returns (bool) {\n if (account != msg.sender) {\n uint256 currentAllowance = _allowances[account][msg.sender];\n require(currentAllowance >= amount, \"ERC20: amount exceeds allowance\");\n unchecked {\n _allowances[account][msg.sender] = currentAllowance - amount;\n }\n }\n _transfer(account, recipient, amount);\n return true;\n }\n\n function _approve(address account, address spender, uint256 amount) internal {\n require(account != address(0), \"ERC20: account is zero address\");\n require(spender != address(0), \"ERC20: spender is zero address\");\n _allowances[account][spender] = amount;\n emit Approval(account, spender, amount);\n }\n\n function _burn(address account, uint256 amount) internal {\n require(account != address(0), \"ERC20: account is zero address\");\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n }\n _totalSupply -= amount;\n emit Transfer(account, address(0), amount);\n }\n\n function _checkOnERC20Received(\n address account,\n address recipient,\n uint256 amount,\n bytes memory data\n ) internal nonReentrant returns (bool) {\n if (_isContract(recipient)) {\n try ERC165(recipient).supportsInterface(0x01ffc9a7) returns (bool erc165support) {\n require(erc165support, \"ERC20: no ERC165 support\");\n // we have erc165 support\n if (ERC165(recipient).supportsInterface(0x534f5876)) {\n // we have eip-4524 support\n try ERC20Receiver(recipient).onERC20Received(msg.sender, account, amount, data) returns (bytes4 retval) {\n return retval == ERC20Receiver.onERC20Received.selector;\n } catch (bytes memory reason) {\n if (reason.length == 0) {\n revert(\"ERC20: non ERC20Receiver\");\n } else {\n assembly {\n revert(add(32, reason), mload(reason))\n }\n }\n }\n } else {\n revert(\"ERC20: eip-4524 not supported\");\n }\n } catch (bytes memory reason) {\n if (reason.length == 0) {\n revert(\"ERC20: no ERC165 support\");\n } else {\n assembly {\n revert(add(32, reason), mload(reason))\n }\n }\n }\n } else {\n return true;\n }\n }\n\n /**\n * @notice Mints tokens.\n * @dev Mint a specific amount of tokens to a specific address.\n * @param to Address to mint to.\n * @param amount Amount of tokens to mint.\n */\n function _mint(address to, uint256 amount) internal {\n require(to != address(0), \"ERC20: minting to burn address\");\n _totalSupply += amount;\n _balances[to] += amount;\n emit Transfer(address(0), to, amount);\n }\n\n function _transfer(address account, address recipient, uint256 amount) internal {\n require(account != address(0), \"ERC20: account is zero address\");\n require(recipient != address(0), \"ERC20: recipient is zero address\");\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n }\n _balances[recipient] += amount;\n emit Transfer(account, recipient, amount);\n }\n\n /**\n * @dev \"Consume a nonce\": return the current value and increment.\n *\n * _Available since v4.1._\n */\n function _useNonce(address account) internal returns (uint256 current) {\n current = _nonces[account];\n _nonces[account]++;\n }\n\n function _isContract(address contractAddress) private view returns (bool) {\n bytes32 codehash;\n assembly {\n codehash := extcodehash(contractAddress)\n }\n return (codehash != 0x0 && codehash != 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470);\n }\n}\n" + }, + "contracts/mock/LZEndpointMock.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../interface/LayerZeroReceiverInterface.sol\";\nimport \"../interface/LayerZeroEndpointInterface.sol\";\n\n/**\nmocking multi endpoint connection.\n- send() will short circuit to lzReceive() directly\n- no reentrancy guard. the real LayerZero endpoint on main net has a send and receive guard, respectively.\nif we run a ping-pong-like application, the recursive call might use all gas limit in the block.\n- not using any messaging library, hence all messaging library func, e.g. estimateFees, version, will not work\n*/\ncontract LZEndpointMock is LayerZeroEndpointInterface {\n mapping(address => address) public lzEndpointLookup;\n\n uint16 public mockChainId;\n address payable public mockOracle;\n address payable public mockRelayer;\n uint256 public mockBlockConfirmations;\n uint16 public mockLibraryVersion;\n uint256 public mockStaticNativeFee;\n uint16 public mockLayerZeroVersion;\n uint256 public nativeFee;\n uint256 public zroFee;\n bool nextMsgBLocked;\n\n struct StoredPayload {\n uint64 payloadLength;\n address dstAddress;\n bytes32 payloadHash;\n }\n\n struct QueuedPayload {\n address dstAddress;\n uint64 nonce;\n bytes payload;\n }\n\n // inboundNonce = [srcChainId][srcAddress].\n mapping(uint16 => mapping(bytes => uint64)) public inboundNonce;\n // outboundNonce = [dstChainId][srcAddress].\n mapping(uint16 => mapping(address => uint64)) public outboundNonce;\n // storedPayload = [srcChainId][srcAddress]\n mapping(uint16 => mapping(bytes => StoredPayload)) public storedPayload;\n // msgToDeliver = [srcChainId][srcAddress]\n mapping(uint16 => mapping(bytes => QueuedPayload[])) public msgsToDeliver;\n\n event UaForceResumeReceive(uint16 chainId, bytes srcAddress);\n event PayloadCleared(uint16 srcChainId, bytes srcAddress, uint64 nonce, address dstAddress);\n event PayloadStored(\n uint16 srcChainId,\n bytes srcAddress,\n address dstAddress,\n uint64 nonce,\n bytes payload,\n bytes reason\n );\n\n constructor(uint16 _chainId) {\n mockStaticNativeFee = 42;\n mockLayerZeroVersion = 1;\n mockChainId = _chainId;\n }\n\n // mock helper to set the value returned by `estimateNativeFees`\n function setEstimatedFees(uint256 _nativeFee, uint256 _zroFee) public {\n nativeFee = _nativeFee;\n zroFee = _zroFee;\n }\n\n function getChainId() external view override returns (uint16) {\n return mockChainId;\n }\n\n function setDestLzEndpoint(address destAddr, address lzEndpointAddr) external {\n lzEndpointLookup[destAddr] = lzEndpointAddr;\n }\n\n function send(\n uint16 _chainId,\n bytes calldata _destination,\n bytes calldata _payload,\n address payable, // _refundAddress\n address, // _zroPaymentAddress\n bytes memory _adapterParams\n ) external payable override {\n address destAddr = packedBytesToAddr(_destination);\n address lzEndpoint = lzEndpointLookup[destAddr];\n\n require(lzEndpoint != address(0), \"LayerZeroMock: destination LayerZero Endpoint not found\");\n\n uint64 nonce;\n {\n nonce = ++outboundNonce[_chainId][msg.sender];\n }\n\n // Mock the relayer paying the dstNativeAddr the amount of extra native token\n {\n uint256 extraGas;\n uint256 dstNative;\n address dstNativeAddr;\n assembly {\n extraGas := mload(add(_adapterParams, 34))\n dstNative := mload(add(_adapterParams, 66))\n dstNativeAddr := mload(add(_adapterParams, 86))\n }\n\n // to simulate actually sending the ether, add a transfer call and ensure the LZEndpointMock contract has an ether balance\n }\n\n bytes memory bytesSourceUserApplicationAddr = addrToPackedBytes(address(msg.sender)); // cast this address to bytes\n\n // not using the extra gas parameter because this is a single tx call, not split between different chains\n // LZEndpointMock(lzEndpoint).receivePayload(mockChainId, bytesSourceUserApplicationAddr, destAddr, nonce, extraGas, _payload);\n LZEndpointMock(lzEndpoint).receivePayload(\n mockChainId,\n bytesSourceUserApplicationAddr,\n destAddr,\n nonce,\n 0,\n _payload\n );\n }\n\n function receivePayload(\n uint16 _srcChainId,\n bytes calldata _srcAddress,\n address _dstAddress,\n uint64 _nonce,\n uint256 /*_gasLimit*/,\n bytes calldata _payload\n ) external override {\n StoredPayload storage sp = storedPayload[_srcChainId][_srcAddress];\n\n // assert and increment the nonce. no message shuffling\n require(_nonce == ++inboundNonce[_srcChainId][_srcAddress], \"LayerZero: wrong nonce\");\n\n // queue the following msgs inside of a stack to simulate a successful send on src, but not fully delivered on dst\n if (sp.payloadHash != bytes32(0)) {\n QueuedPayload[] storage msgs = msgsToDeliver[_srcChainId][_srcAddress];\n QueuedPayload memory newMsg = QueuedPayload(_dstAddress, _nonce, _payload);\n\n // warning, might run into gas issues trying to forward through a bunch of queued msgs\n // shift all the msgs over so we can treat this like a fifo via array.pop()\n if (msgs.length > 0) {\n // extend the array\n msgs.push(newMsg);\n\n // shift all the indexes up for pop()\n for (uint256 i = 0; i < msgs.length - 1; i++) {\n msgs[i + 1] = msgs[i];\n }\n\n // put the newMsg at the bottom of the stack\n msgs[0] = newMsg;\n } else {\n msgs.push(newMsg);\n }\n } else if (nextMsgBLocked) {\n storedPayload[_srcChainId][_srcAddress] = StoredPayload(\n uint64(_payload.length),\n _dstAddress,\n keccak256(_payload)\n );\n emit PayloadStored(_srcChainId, _srcAddress, _dstAddress, _nonce, _payload, bytes(\"\"));\n // ensure the next msgs that go through are no longer blocked\n nextMsgBLocked = false;\n } else {\n // we ignore the gas limit because this call is made in one tx due to being \"same chain\"\n // LayerZeroReceiverInterface(_dstAddress).lzReceive{gas: _gasLimit}(_srcChainId, _srcAddress, _nonce, _payload); // invoke lzReceive\n LayerZeroReceiverInterface(_dstAddress).lzReceive(_srcChainId, _srcAddress, _nonce, _payload); // invoke lzReceive\n }\n }\n\n // used to simulate messages received get stored as a payload\n function blockNextMsg() external {\n nextMsgBLocked = true;\n }\n\n function getLengthOfQueue(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (uint256) {\n return msgsToDeliver[_srcChainId][_srcAddress].length;\n }\n\n // @notice gets a quote in source native gas, for the amount that send() requires to pay for message delivery\n // @param _dstChainId - the destination chain identifier\n // @param _userApplication - the user app address on this EVM chain\n // @param _payload - the custom message to send over LayerZero\n // @param _payInZRO - if false, user app pays the protocol fee in native token\n // @param _adapterParam - parameters for the adapter service, e.g. send some dust native token to dstChain\n function estimateFees(\n uint16,\n address,\n bytes memory,\n bool,\n bytes memory\n ) external view override returns (uint256 _nativeFee, uint256 _zroFee) {\n _nativeFee = nativeFee;\n _zroFee = zroFee;\n }\n\n // give 20 bytes, return the decoded address\n function packedBytesToAddr(bytes calldata _b) public pure returns (address) {\n address addr;\n assembly {\n let ptr := mload(0x40)\n calldatacopy(ptr, sub(_b.offset, 2), add(_b.length, 2))\n addr := mload(sub(ptr, 10))\n }\n return addr;\n }\n\n // given an address, return the 20 bytes\n function addrToPackedBytes(address _a) public pure returns (bytes memory) {\n bytes memory data = abi.encodePacked(_a);\n return data;\n }\n\n function setConfig(\n uint16 /*_version*/,\n uint16 /*_chainId*/,\n uint256 /*_configType*/,\n bytes memory /*_config*/\n ) external override {}\n\n function getConfig(\n uint16 /*_version*/,\n uint16 /*_chainId*/,\n address /*_ua*/,\n uint256 /*_configType*/\n ) external pure override returns (bytes memory) {\n return \"\";\n }\n\n function setSendVersion(uint16 /*version*/) external override {}\n\n function setReceiveVersion(uint16 /*version*/) external override {}\n\n function getSendVersion(address /*_userApplication*/) external pure override returns (uint16) {\n return 1;\n }\n\n function getReceiveVersion(address /*_userApplication*/) external pure override returns (uint16) {\n return 1;\n }\n\n function getInboundNonce(uint16 _chainID, bytes calldata _srcAddress) external view override returns (uint64) {\n return inboundNonce[_chainID][_srcAddress];\n }\n\n function getOutboundNonce(uint16 _chainID, address _srcAddress) external view override returns (uint64) {\n return outboundNonce[_chainID][_srcAddress];\n }\n\n // simulates the relayer pushing through the rest of the msgs that got delayed due to the stored payload\n function _clearMsgQue(uint16 _srcChainId, bytes calldata _srcAddress) internal {\n QueuedPayload[] storage msgs = msgsToDeliver[_srcChainId][_srcAddress];\n\n // warning, might run into gas issues trying to forward through a bunch of queued msgs\n while (msgs.length > 0) {\n QueuedPayload memory payload = msgs[msgs.length - 1];\n LayerZeroReceiverInterface(payload.dstAddress).lzReceive(\n _srcChainId,\n _srcAddress,\n payload.nonce,\n payload.payload\n );\n msgs.pop();\n }\n }\n\n function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external override {\n StoredPayload storage sp = storedPayload[_srcChainId][_srcAddress];\n // revert if no messages are cached. safeguard malicious UA behaviour\n require(sp.payloadHash != bytes32(0), \"LayerZero: no stored payload\");\n require(sp.dstAddress == msg.sender, \"LayerZero: invalid caller\");\n\n // empty the storedPayload\n sp.payloadLength = 0;\n sp.dstAddress = address(0);\n sp.payloadHash = bytes32(0);\n\n emit UaForceResumeReceive(_srcChainId, _srcAddress);\n\n // resume the receiving of msgs after we force clear the \"stuck\" msg\n _clearMsgQue(_srcChainId, _srcAddress);\n }\n\n function retryPayload(uint16 _srcChainId, bytes calldata _srcAddress, bytes calldata _payload) external override {\n StoredPayload storage sp = storedPayload[_srcChainId][_srcAddress];\n require(sp.payloadHash != bytes32(0), \"LayerZero: no stored payload\");\n require(_payload.length == sp.payloadLength && keccak256(_payload) == sp.payloadHash, \"LayerZero: invalid payload\");\n\n address dstAddress = sp.dstAddress;\n // empty the storedPayload\n sp.payloadLength = 0;\n sp.dstAddress = address(0);\n sp.payloadHash = bytes32(0);\n\n uint64 nonce = inboundNonce[_srcChainId][_srcAddress];\n\n LayerZeroReceiverInterface(dstAddress).lzReceive(_srcChainId, _srcAddress, nonce, _payload);\n emit PayloadCleared(_srcChainId, _srcAddress, nonce, dstAddress);\n }\n\n function hasStoredPayload(uint16 _srcChainId, bytes calldata _srcAddress) external view override returns (bool) {\n StoredPayload storage sp = storedPayload[_srcChainId][_srcAddress];\n return sp.payloadHash != bytes32(0);\n }\n\n function isSendingPayload() external pure override returns (bool) {\n return false;\n }\n\n function isReceivingPayload() external pure override returns (bool) {\n return false;\n }\n\n function getSendLibraryAddress(address) external view override returns (address) {\n return address(this);\n }\n\n function getReceiveLibraryAddress(address) external view override returns (address) {\n return address(this);\n }\n}\n" + }, + "contracts/mock/Mock.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Initializable.sol\";\nimport \"../abstract/Owner.sol\";\n\nimport \"../interface/InitializableInterface.sol\";\n\ncontract Mock is Initializable, Owner {\n constructor() {}\n\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"MOCK: already initialized\");\n bytes32 arbitraryData = abi.decode(initPayload, (bytes32));\n bool shouldFail = false;\n assembly {\n // we leave slot 0 available for fallback calls\n sstore(0x01, arbitraryData)\n switch arbitraryData\n case 0 {\n shouldFail := 0x01\n }\n sstore(_ownerSlot, caller())\n }\n _setInitialized();\n if (shouldFail) {\n return bytes4(0x12345678);\n } else {\n return InitializableInterface.init.selector;\n }\n }\n\n function getStorage(uint256 slot) public view returns (bytes32 data) {\n assembly {\n data := sload(slot)\n }\n }\n\n function setStorage(uint256 slot, bytes32 data) public {\n assembly {\n sstore(slot, data)\n }\n }\n\n function mockCall(address target, bytes calldata data) public payable {\n assembly {\n calldatacopy(0, data.offset, data.length)\n let result := call(gas(), target, callvalue(), 0, data.length, 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n function mockStaticCall(address target, bytes calldata data) public view returns (bytes memory) {\n assembly {\n calldatacopy(0, data.offset, data.length)\n let result := staticcall(gas(), target, 0, data.length, 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n function mockDelegateCall(address target, bytes calldata data) public returns (bytes memory) {\n assembly {\n calldatacopy(0, data.offset, data.length)\n let result := delegatecall(gas(), target, 0, data.length, 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n receive() external payable {}\n\n fallback() external payable {\n assembly {\n calldatacopy(0, 0, calldatasize())\n let result := call(gas(), sload(0), callvalue(), 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/mock/MockERC721Receiver.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../interface/ERC721.sol\";\nimport \"../interface/ERC165.sol\";\nimport \"../interface/ERC721TokenReceiver.sol\";\n\ncontract MockERC721Receiver is ERC165, ERC721TokenReceiver {\n bool private _works;\n\n constructor() {\n _works = true;\n }\n\n function toggleWorks(bool active) external {\n _works = active;\n }\n\n function supportsInterface(bytes4 interfaceID) external pure returns (bool) {\n if (interfaceID == 0x01ffc9a7 || interfaceID == 0x150b7a02) {\n return true;\n } else {\n return false;\n }\n }\n\n function onERC721Received(\n address /*operator*/,\n address /*from*/,\n uint256 /*tokenId*/,\n bytes calldata /*data*/\n ) external view returns (bytes4) {\n if (_works) {\n return 0x150b7a02;\n } else {\n return 0x00000000;\n }\n }\n\n function transferNFT(address payable token, uint256 tokenId, address to) external {\n ERC721(token).safeTransferFrom(address(this), to, tokenId);\n }\n}\n" + }, + "contracts/mock/MockExternalCall.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\ncontract MockExternalCall {\n function callExternalFn(address contractAddress, bytes calldata encodedSignature) public {\n (bool success, ) = address(contractAddress).call(encodedSignature);\n require(success, \"Failed\");\n }\n}\n" + }, + "contracts/mock/MockHolographChild.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../Holograph.sol\";\n\ncontract MockHolographChild is Holograph {\n constructor() {}\n\n function emptyFunction() external pure returns (string memory) {\n return \"on purpose to remove verification conflict\";\n }\n}\n" + }, + "contracts/mock/MockHolographGenesisChild.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../HolographGenesis.sol\";\n\ncontract MockHolographGenesisChild is HolographGenesis {\n constructor() {}\n\n function approveDeployerMock(address newDeployer, bool approve) external onlyDeployer {\n return this.approveDeployer(newDeployer, approve);\n }\n\n function isApprovedDeployerMock(address deployer) external view returns (bool) {\n return this.isApprovedDeployer(deployer);\n }\n}\n" + }, + "contracts/mock/MockLZEndpoint.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\n\nimport \"../interface/HolographOperatorInterface.sol\";\nimport \"../interface/LayerZeroOverrides.sol\";\n\ncontract MockLZEndpoint is Admin {\n event LzEvent(uint16 _dstChainId, bytes _destination, bytes _payload);\n\n constructor() {\n assembly {\n sstore(_adminSlot, origin())\n }\n }\n\n function send(\n uint16 _dstChainId,\n bytes calldata _destination,\n bytes calldata _payload,\n address payable /* _refundAddress*/,\n address /* _zroPaymentAddress*/,\n bytes calldata /* _adapterParams*/\n ) external payable {\n // we really don't care about anything and just emit an event that we can leverage for multichain replication\n emit LzEvent(_dstChainId, _destination, _payload);\n }\n\n function estimateFees(\n uint16,\n address,\n bytes calldata,\n bool,\n bytes calldata\n ) external pure returns (uint256 nativeFee, uint256 zroFee) {\n nativeFee = 10 ** 15;\n zroFee = 10 ** 7;\n }\n\n function defaultSendLibrary() external view returns (address) {\n return address(this);\n }\n\n function getAppConfig(uint16, address) external view returns (LayerZeroOverrides.ApplicationConfiguration memory) {\n return LayerZeroOverrides.ApplicationConfiguration(0, 0, address(this), 0, 0, address(this));\n }\n\n function dstPriceLookup(uint16) external pure returns (uint128 dstPriceRatio, uint128 dstGasPriceInWei) {\n dstPriceRatio = 10 ** 10;\n dstGasPriceInWei = 1000000000;\n }\n\n function dstConfigLookup(\n uint16,\n uint16\n ) external pure returns (uint128 dstNativeAmtCap, uint64 baseGas, uint64 gasPerByte) {\n dstNativeAmtCap = 10 ** 18;\n baseGas = 50000;\n gasPerByte = 25;\n }\n\n function crossChainMessage(address target, uint256 gasLimit, bytes calldata payload) external {\n HolographOperatorInterface(target).crossChainMessage{gas: gasLimit}(payload);\n }\n}\n" + }, + "contracts/module/LayerZeroModule.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\n\nimport \"../enum/ChainIdType.sol\";\n\nimport \"../interface/CrossChainMessageInterface.sol\";\nimport \"../interface/HolographOperatorInterface.sol\";\nimport \"../interface/InitializableInterface.sol\";\nimport \"../interface/HolographInterfacesInterface.sol\";\nimport \"../interface/LayerZeroModuleInterface.sol\";\nimport \"../interface/LayerZeroOverrides.sol\";\n\nimport \"../struct/GasParameters.sol\";\n\nimport \"./OVM_GasPriceOracle.sol\";\n\n/**\n * @title Holograph LayerZero Module\n * @author https://github.com/holographxyz\n * @notice Holograph module for enabling LayerZero cross-chain messaging\n * @dev This contract abstracts all of the LayerZero specific logic into an isolated module\n */\ncontract LayerZeroModule is Admin, Initializable, CrossChainMessageInterface, LayerZeroModuleInterface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.bridge')) - 1)\n */\n bytes32 constant _bridgeSlot = 0xeb87cbb21687feb327e3d58c6c16d552231d12c7a0e8115042a4165fac8a77f9;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.interfaces')) - 1)\n */\n bytes32 constant _interfacesSlot = 0xbd3084b8c09da87ad159c247a60e209784196be2530cecbbd8f337fdd1848827;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.lZEndpoint')) - 1)\n */\n bytes32 constant _lZEndpointSlot = 0x56825e447adf54cdde5f04815fcf9b1dd26ef9d5c053625147c18b7c13091686;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.operator')) - 1)\n */\n bytes32 constant _operatorSlot = 0x7caba557ad34138fa3b7e43fb574e0e6cc10481c3073e0dffbc560db81b5c60f;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.gasParameters')) - 1)\n */\n bytes32 constant _gasParametersSlot = 0x15eee82a0af3c04e4b65c3842105c973a6b0fb2a68728bf035809e13b38ce8cf;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.gasParameters')) - 1)\n */\n bytes32 constant _optimismGasPriceOracleSlot = 0x46043c284a96474ab4a54c741ea0d0fce54e98eea878b99d4b85808fa6f71a5f;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (\n address bridge,\n address interfaces,\n address operator,\n address optimismGasPriceOracle,\n uint32[] memory chainIds,\n GasParameters[] memory gasParameters\n ) = abi.decode(initPayload, (address, address, address, address, uint32[], GasParameters[]));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_bridgeSlot, bridge)\n sstore(_interfacesSlot, interfaces)\n sstore(_operatorSlot, operator)\n sstore(_optimismGasPriceOracleSlot, optimismGasPriceOracle)\n }\n require(chainIds.length == gasParameters.length, \"HOLOGRAPH: wrong array lengths\");\n for (uint256 i = 0; i < chainIds.length; i++) {\n _setGasParameters(chainIds[i], gasParameters[i]);\n }\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @notice Receive cross-chain message from LayerZero\n * @dev This function only allows calls from the configured LayerZero endpoint address\n */\n function lzReceive(\n uint16 /* _srcChainId*/,\n bytes calldata _srcAddress,\n uint64 /* _nonce*/,\n bytes calldata _payload\n ) external payable {\n assembly {\n /**\n * @dev check if msg.sender is LayerZero Endpoint\n */\n switch eq(sload(_lZEndpointSlot), caller())\n case 0 {\n /**\n * @dev this is the assembly version of -> revert(\"HOLOGRAPH: LZ only endpoint\");\n */\n mstore(0x80, 0x08c379a000000000000000000000000000000000000000000000000000000000)\n mstore(0xa0, 0x0000002000000000000000000000000000000000000000000000000000000000)\n mstore(0xc0, 0x0000001b484f4c4f47524150483a204c5a206f6e6c7920656e64706f696e7400)\n mstore(0xe0, 0x0000000000000000000000000000000000000000000000000000000000000000)\n revert(0x80, 0xc4)\n }\n let ptr := mload(0x40)\n calldatacopy(add(ptr, 0x0c), _srcAddress.offset, _srcAddress.length)\n /**\n * @dev check if LZ from address is same as address(this)\n */\n switch eq(mload(ptr), address())\n case 0 {\n /**\n * @dev this is the assembly version of -> revert(\"HOLOGRAPH: unauthorized sender\");\n */\n mstore(0x80, 0x08c379a000000000000000000000000000000000000000000000000000000000)\n mstore(0xa0, 0x0000002000000000000000000000000000000000000000000000000000000000)\n mstore(0xc0, 0x0000001e484f4c4f47524150483a20756e617574686f72697a65642073656e64)\n mstore(0xe0, 0x6572000000000000000000000000000000000000000000000000000000000000)\n revert(0x80, 0xc4)\n }\n }\n /**\n * @dev if validation has passed, submit payload to Holograph Operator for converting into an operator job\n */\n _operator().crossChainMessage(_payload);\n }\n\n /**\n * @dev Need to add an extra function to get LZ gas amount needed for their internal cross-chain message verification\n */\n function send(\n uint256 /* gasLimit*/,\n uint256 /* gasPrice*/,\n uint32 toChain,\n address msgSender,\n uint256 msgValue,\n bytes calldata crossChainPayload\n ) external payable {\n require(msg.sender == address(_operator()), \"HOLOGRAPH: operator only call\");\n LayerZeroOverrides lZEndpoint;\n assembly {\n lZEndpoint := sload(_lZEndpointSlot)\n }\n GasParameters memory gasParameters = _gasParameters(toChain);\n // need to recalculate the gas amounts for LZ to deliver message\n lZEndpoint.send{value: msgValue}(\n uint16(_interfaces().getChainId(ChainIdType.HOLOGRAPH, uint256(toChain), ChainIdType.LAYERZERO)),\n abi.encodePacked(address(this), address(this)),\n crossChainPayload,\n payable(msgSender),\n address(this),\n abi.encodePacked(\n uint16(1),\n uint256(gasParameters.msgBaseGas + (crossChainPayload.length * gasParameters.msgGasPerByte))\n )\n );\n }\n\n function getMessageFee(\n uint32 toChain,\n uint256 gasLimit,\n uint256 gasPrice,\n bytes calldata crossChainPayload\n ) external view returns (uint256 hlgFee, uint256 msgFee, uint256 dstGasPrice) {\n uint16 lzDestChain = uint16(\n _interfaces().getChainId(ChainIdType.HOLOGRAPH, uint256(toChain), ChainIdType.LAYERZERO)\n );\n LayerZeroOverrides lz;\n assembly {\n lz := sload(_lZEndpointSlot)\n }\n // convert holograph chain id to lz chain id\n (uint128 dstPriceRatio, uint128 dstGasPriceInWei) = _getPricing(lz, lzDestChain);\n if (gasPrice == 0) {\n gasPrice = dstGasPriceInWei;\n }\n GasParameters memory gasParameters = _gasParameters(toChain);\n require(gasPrice > gasParameters.minGasPrice, \"HOLOGRAPH: gas price too low\");\n bytes memory adapterParams = abi.encodePacked(\n uint16(1),\n uint256(gasParameters.msgBaseGas + (crossChainPayload.length * gasParameters.msgGasPerByte))\n );\n gasLimit = gasLimit + gasParameters.jobBaseGas + (crossChainPayload.length * gasParameters.jobGasPerByte);\n gasLimit = gasLimit + (gasLimit / 10);\n require(gasLimit < gasParameters.maxGasLimit, \"HOLOGRAPH: gas limit over max\");\n (uint256 nativeFee, ) = lz.estimateFees(lzDestChain, address(this), crossChainPayload, false, adapterParams);\n hlgFee = ((gasPrice * gasLimit) * dstPriceRatio) / (10 ** 20);\n /*\n * @dev toChain is a ChainIdType.HOLOGRAPH, which can be found at https://github.com/holographxyz/networks/blob/main/src/networks.ts\n * chainId 7 == optimism\n * chainId 4000000015 == optimismTestnetGoerli\n */\n if (toChain == uint32(7) || toChain == uint32(4000000015)) {\n hlgFee += (_optimismGasPriceOracle().getL1Fee(crossChainPayload) * dstPriceRatio) / (10 ** 20);\n }\n msgFee = nativeFee;\n dstGasPrice = (dstGasPriceInWei * dstPriceRatio) / (10 ** 20);\n }\n\n function getHlgFee(\n uint32 toChain,\n uint256 gasLimit,\n uint256 gasPrice,\n bytes calldata crossChainPayload\n ) external view returns (uint256 hlgFee) {\n LayerZeroOverrides lz;\n assembly {\n lz := sload(_lZEndpointSlot)\n }\n uint16 lzDestChain = uint16(\n _interfaces().getChainId(ChainIdType.HOLOGRAPH, uint256(toChain), ChainIdType.LAYERZERO)\n );\n (uint128 dstPriceRatio, uint128 dstGasPriceInWei) = _getPricing(lz, lzDestChain);\n if (gasPrice == 0) {\n gasPrice = dstGasPriceInWei;\n }\n GasParameters memory gasParameters = _gasParameters(toChain);\n require(gasPrice > gasParameters.minGasPrice, \"HOLOGRAPH: gas price too low\");\n gasLimit = gasLimit + gasParameters.jobBaseGas + (crossChainPayload.length * gasParameters.jobGasPerByte);\n gasLimit = gasLimit + (gasLimit / 10);\n require(gasLimit < gasParameters.maxGasLimit, \"HOLOGRAPH: gas limit over max\");\n hlgFee = ((gasPrice * gasLimit) * dstPriceRatio) / (10 ** 20);\n /*\n * @dev toChain is a ChainIdType.HOLOGRAPH, which can be found at https://github.com/holographxyz/networks/blob/main/src/networks.ts\n * chainId 7 == optimism\n * chainId 4000000015 == optimismTestnetGoerli\n */\n if (toChain == uint32(7) || toChain == uint32(4000000015)) {\n hlgFee += (_optimismGasPriceOracle().getL1Fee(crossChainPayload) * dstPriceRatio) / (10 ** 20);\n }\n }\n\n function _getPricing(\n LayerZeroOverrides lz,\n uint16 lzDestChain\n ) private view returns (uint128 dstPriceRatio, uint128 dstGasPriceInWei) {\n return\n LayerZeroOverrides(LayerZeroOverrides(lz.defaultSendLibrary()).getAppConfig(lzDestChain, address(this)).relayer)\n .dstPriceLookup(lzDestChain);\n }\n\n /**\n * @notice Get the address of the Holograph Bridge module\n * @dev Used for beaming holographable assets cross-chain\n */\n function getBridge() external view returns (address bridge) {\n assembly {\n bridge := sload(_bridgeSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Bridge module address\n * @param bridge address of the Holograph Bridge smart contract to use\n */\n function setBridge(address bridge) external onlyAdmin {\n assembly {\n sstore(_bridgeSlot, bridge)\n }\n }\n\n /**\n * @notice Get the address of the Holograph Interfaces module\n * @dev Holograph uses this contract to store data that needs to be accessed by a large portion of the modules\n */\n function getInterfaces() external view returns (address interfaces) {\n assembly {\n interfaces := sload(_interfacesSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Interfaces module address\n * @param interfaces address of the Holograph Interfaces smart contract to use\n */\n function setInterfaces(address interfaces) external onlyAdmin {\n assembly {\n sstore(_interfacesSlot, interfaces)\n }\n }\n\n /**\n * @notice Get the address of the approved LayerZero Endpoint\n * @dev All lzReceive function calls allow only requests from this address\n */\n function getLZEndpoint() external view returns (address lZEndpoint) {\n assembly {\n lZEndpoint := sload(_lZEndpointSlot)\n }\n }\n\n /**\n * @notice Update the approved LayerZero Endpoint address\n * @param lZEndpoint address of the LayerZero Endpoint to use\n */\n function setLZEndpoint(address lZEndpoint) external onlyAdmin {\n assembly {\n sstore(_lZEndpointSlot, lZEndpoint)\n }\n }\n\n /**\n * @notice Get the address of the Holograph Operator module\n * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module\n */\n function getOperator() external view returns (address operator) {\n assembly {\n operator := sload(_operatorSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Operator module address\n * @param operator address of the Holograph Operator smart contract to use\n */\n function setOperator(address operator) external onlyAdmin {\n assembly {\n sstore(_operatorSlot, operator)\n }\n }\n\n /**\n * @notice Get the address of the Optimism Gas Price Oracle module\n * @dev Allows to properly calculate the L1 security fee for Optimism bridge transactions\n */\n function getOptimismGasPriceOracle() external view returns (address optimismGasPriceOracle) {\n assembly {\n optimismGasPriceOracle := sload(_optimismGasPriceOracleSlot)\n }\n }\n\n /**\n * @notice Update the Optimism Gas Price Oracle module address\n * @param optimismGasPriceOracle address of the Optimism Gas Price Oracle smart contract to use\n */\n function setOptimismGasPriceOracle(address optimismGasPriceOracle) external onlyAdmin {\n assembly {\n sstore(_optimismGasPriceOracleSlot, optimismGasPriceOracle)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Bridge Interface\n */\n function _bridge() private view returns (address bridge) {\n assembly {\n bridge := sload(_bridgeSlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Interfaces Interface\n */\n function _interfaces() private view returns (HolographInterfacesInterface interfaces) {\n assembly {\n interfaces := sload(_interfacesSlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Operator Interface\n */\n function _operator() private view returns (HolographOperatorInterface operator) {\n assembly {\n operator := sload(_operatorSlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the Optimism Gas Price Oracle Interface\n */\n function _optimismGasPriceOracle() private view returns (OVM_GasPriceOracle optimismGasPriceOracle) {\n assembly {\n optimismGasPriceOracle := sload(_optimismGasPriceOracleSlot)\n }\n }\n\n /**\n * @dev Purposefully reverts to prevent having any type of ether transfered into the contract\n */\n receive() external payable {\n revert();\n }\n\n /**\n * @dev Purposefully reverts to prevent any calls to undefined functions\n */\n fallback() external payable {\n revert();\n }\n\n /**\n * @notice Get the default or chain-specific GasParameters\n * @param chainId the Holograph ChainId to get gas parameters for, set to 0 for default\n */\n function getGasParameters(uint32 chainId) external view returns (GasParameters memory gasParameters) {\n return _gasParameters(chainId);\n }\n\n /**\n * @notice Update the default or chain-specific GasParameters\n * @param chainId the Holograph ChainId to set gas parameters for, set to 0 for default\n * @param gasParameters struct of all the gas parameters to set\n */\n function setGasParameters(uint32 chainId, GasParameters memory gasParameters) external onlyAdmin {\n _setGasParameters(chainId, gasParameters);\n }\n\n /**\n * @notice Update the default or chain-specific GasParameters\n * @param chainIds array of Holograph ChainId to set gas parameters for\n * @param gasParameters array of all the gas parameters to set\n */\n function setGasParameters(uint32[] memory chainIds, GasParameters[] memory gasParameters) external onlyAdmin {\n require(chainIds.length == gasParameters.length, \"HOLOGRAPH: wrong array lengths\");\n for (uint256 i = 0; i < chainIds.length; i++) {\n _setGasParameters(chainIds[i], gasParameters[i]);\n }\n }\n\n /**\n * @notice Internal function for setting the default or chain-specific GasParameters\n * @param chainId the Holograph ChainId to set gas parameters for, set to 0 for default\n * @param gasParameters struct of all the gas parameters to set\n */\n function _setGasParameters(uint32 chainId, GasParameters memory gasParameters) private {\n bytes32 slot = chainId == 0 ? _gasParametersSlot : keccak256(abi.encode(chainId, _gasParametersSlot));\n assembly {\n let pos := gasParameters\n for {\n let i := 0\n } lt(i, 6) {\n i := add(i, 1)\n } {\n sstore(add(slot, i), mload(pos))\n pos := add(pos, 32)\n }\n }\n }\n\n /**\n * @dev Internal function used for getting the default or chain-specific GasParameters\n * @param chainId the Holograph ChainId to get gas parameters for, set to 0 for default\n */\n function _gasParameters(uint32 chainId) private view returns (GasParameters memory gasParameters) {\n bytes32 slot = chainId == 0 ? _gasParametersSlot : keccak256(abi.encode(chainId, _gasParametersSlot));\n assembly {\n let pos := gasParameters\n for {\n let i := 0\n } lt(i, 6) {\n i := add(i, 1)\n } {\n mstore(pos, sload(add(slot, i)))\n pos := add(pos, 32)\n }\n }\n }\n}\n" + }, + "contracts/module/OVM_GasPriceOracle.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\n\n/**\n * @title OVM_GasPriceOracle\n * @dev This contract exposes the current l2 gas price, a measure of how congested the network\n * currently is. This measure is used by the Sequencer to determine what fee to charge for\n * transactions. When the system is more congested, the l2 gas price will increase and fees\n * will also increase as a result.\n *\n * All public variables are set while generating the initial L2 state. The\n * constructor doesn't run in practice as the L2 state generation script uses\n * the deployed bytecode instead of running the initcode.\n */\ncontract OVM_GasPriceOracle is Admin, Initializable {\n // Current L2 gas price\n uint256 public gasPrice;\n // Current L1 base fee\n uint256 public l1BaseFee;\n // Amortized cost of batch submission per transaction\n uint256 public overhead;\n // Value to scale the fee up by\n uint256 public scalar;\n // Number of decimals of the scalar\n uint256 public decimals;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (uint256 _gasPrice, uint256 _l1BaseFee, uint256 _overhead, uint256 _scalar, uint256 _decimals) = abi.decode(\n initPayload,\n (uint256, uint256, uint256, uint256, uint256)\n );\n gasPrice = _gasPrice;\n l1BaseFee = _l1BaseFee;\n overhead = _overhead;\n scalar = _scalar;\n decimals = _decimals;\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n event GasPriceUpdated(uint256);\n event L1BaseFeeUpdated(uint256);\n event OverheadUpdated(uint256);\n event ScalarUpdated(uint256);\n event DecimalsUpdated(uint256);\n\n /**\n * Allows the owner to modify the l2 gas price.\n * @param _gasPrice New l2 gas price.\n */\n function setGasPrice(uint256 _gasPrice) external onlyAdmin {\n gasPrice = _gasPrice;\n emit GasPriceUpdated(_gasPrice);\n }\n\n /**\n * Allows the owner to modify the l1 base fee.\n * @param _baseFee New l1 base fee\n */\n function setL1BaseFee(uint256 _baseFee) external onlyAdmin {\n l1BaseFee = _baseFee;\n emit L1BaseFeeUpdated(_baseFee);\n }\n\n /**\n * Allows the owner to modify the overhead.\n * @param _overhead New overhead\n */\n function setOverhead(uint256 _overhead) external onlyAdmin {\n overhead = _overhead;\n emit OverheadUpdated(_overhead);\n }\n\n /**\n * Allows the owner to modify the scalar.\n * @param _scalar New scalar\n */\n function setScalar(uint256 _scalar) external onlyAdmin {\n scalar = _scalar;\n emit ScalarUpdated(_scalar);\n }\n\n /**\n * Allows the owner to modify the decimals.\n * @param _decimals New decimals\n */\n function setDecimals(uint256 _decimals) external onlyAdmin {\n decimals = _decimals;\n emit DecimalsUpdated(_decimals);\n }\n\n /**\n * Computes the L1 portion of the fee\n * based on the size of the RLP encoded tx\n * and the current l1BaseFee\n * @param _data Unsigned RLP encoded tx, 6 elements\n * @return L1 fee that should be paid for the tx\n */\n function getL1Fee(bytes memory _data) external view returns (uint256) {\n uint256 l1GasUsed = getL1GasUsed(_data);\n uint256 l1Fee = l1GasUsed * l1BaseFee;\n uint256 divisor = 10 ** decimals;\n uint256 unscaled = l1Fee * scalar;\n uint256 scaled = unscaled / divisor;\n return scaled;\n }\n\n /**\n * Computes the amount of L1 gas used for a transaction\n * The overhead represents the per batch gas overhead of\n * posting both transaction and state roots to L1 given larger\n * batch sizes.\n * 4 gas for 0 byte\n * https://github.com/ethereum/go-ethereum/blob/9ada4a2e2c415e6b0b51c50e901336872e028872/params/protocol_params.go#L33\n * 16 gas for non zero byte\n * https://github.com/ethereum/go-ethereum/blob/9ada4a2e2c415e6b0b51c50e901336872e028872/params/protocol_params.go#L87\n * This will need to be updated if calldata gas prices change\n * Account for the transaction being unsigned\n * Padding is added to account for lack of signature on transaction\n * 1 byte for RLP V prefix\n * 1 byte for V\n * 1 byte for RLP R prefix\n * 32 bytes for R\n * 1 byte for RLP S prefix\n * 32 bytes for S\n * Total: 68 bytes of padding\n * @param _data Unsigned RLP encoded tx, 6 elements\n * @return Amount of L1 gas used for a transaction\n */\n function getL1GasUsed(bytes memory _data) public view returns (uint256) {\n uint256 total = 0;\n for (uint256 i = 0; i < _data.length; i++) {\n if (_data[i] == 0) {\n total += 4;\n } else {\n total += 16;\n }\n }\n uint256 unsigned = total + overhead;\n return unsigned + (68 * 16);\n }\n}\n" + }, + "contracts/proxy/CxipERC721Proxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\n\nimport \"../interface/InitializableInterface.sol\";\nimport \"../interface/HolographRegistryInterface.sol\";\n\ncontract CxipERC721Proxy is Admin, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.contractType')) - 1)\n */\n bytes32 constant _contractTypeSlot = 0x0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c7;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\n */\n bytes32 constant _registrySlot = 0xce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7;\n\n constructor() {}\n\n function init(bytes memory data) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (bytes32 contractType, address registry, bytes memory initCode) = abi.decode(data, (bytes32, address, bytes));\n assembly {\n sstore(_contractTypeSlot, contractType)\n sstore(_registrySlot, registry)\n }\n (bool success, bytes memory returnData) = getCxipERC721Source().delegatecall(\n abi.encodeWithSignature(\"init(bytes)\", initCode)\n );\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == InitializableInterface.init.selector, \"initialization failed\");\n\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n function getCxipERC721Source() public view returns (address) {\n HolographRegistryInterface registry;\n bytes32 contractType;\n assembly {\n registry := sload(_registrySlot)\n contractType := sload(_contractTypeSlot)\n }\n return registry.getContractTypeAddress(contractType);\n }\n\n receive() external payable {}\n\n fallback() external payable {\n address cxipErc721Source = getCxipERC721Source();\n assembly {\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), cxipErc721Source, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/proxy/HolographBridgeProxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\n\nimport \"../interface/InitializableInterface.sol\";\n\ncontract HolographBridgeProxy is Admin, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.bridge')) - 1)\n */\n bytes32 constant _bridgeSlot = 0xeb87cbb21687feb327e3d58c6c16d552231d12c7a0e8115042a4165fac8a77f9;\n\n constructor() {}\n\n function init(bytes memory data) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address bridge, bytes memory initCode) = abi.decode(data, (address, bytes));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_bridgeSlot, bridge)\n }\n (bool success, bytes memory returnData) = bridge.delegatecall(abi.encodeWithSignature(\"init(bytes)\", initCode));\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == InitializableInterface.init.selector, \"initialization failed\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n function getBridge() external view returns (address bridge) {\n assembly {\n bridge := sload(_bridgeSlot)\n }\n }\n\n function setBridge(address bridge) external onlyAdmin {\n assembly {\n sstore(_bridgeSlot, bridge)\n }\n }\n\n receive() external payable {}\n\n fallback() external payable {\n assembly {\n let bridge := sload(_bridgeSlot)\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), bridge, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/proxy/HolographFactoryProxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\n\nimport \"../interface/InitializableInterface.sol\";\n\ncontract HolographFactoryProxy is Admin, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.factory')) - 1)\n */\n bytes32 constant _factorySlot = 0xa49f20855ba576e09d13c8041c8039fa655356ea27f6c40f1ec46a4301cd5b23;\n\n constructor() {}\n\n function init(bytes memory data) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address factory, bytes memory initCode) = abi.decode(data, (address, bytes));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_factorySlot, factory)\n }\n (bool success, bytes memory returnData) = factory.delegatecall(abi.encodeWithSignature(\"init(bytes)\", initCode));\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == InitializableInterface.init.selector, \"initialization failed\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n function getFactory() external view returns (address factory) {\n assembly {\n factory := sload(_factorySlot)\n }\n }\n\n function setFactory(address factory) external onlyAdmin {\n assembly {\n sstore(_factorySlot, factory)\n }\n }\n\n receive() external payable {}\n\n fallback() external payable {\n assembly {\n let factory := sload(_factorySlot)\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), factory, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/proxy/HolographOperatorProxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\n\nimport \"../interface/InitializableInterface.sol\";\n\ncontract HolographOperatorProxy is Admin, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.operator')) - 1)\n */\n bytes32 constant _operatorSlot = 0x7caba557ad34138fa3b7e43fb574e0e6cc10481c3073e0dffbc560db81b5c60f;\n\n constructor() {}\n\n function init(bytes memory data) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address operator, bytes memory initCode) = abi.decode(data, (address, bytes));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_operatorSlot, operator)\n }\n (bool success, bytes memory returnData) = operator.delegatecall(abi.encodeWithSignature(\"init(bytes)\", initCode));\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == InitializableInterface.init.selector, \"initialization failed\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n function getOperator() external view returns (address operator) {\n assembly {\n operator := sload(_operatorSlot)\n }\n }\n\n function setOperator(address operator) external onlyAdmin {\n assembly {\n sstore(_operatorSlot, operator)\n }\n }\n\n receive() external payable {}\n\n fallback() external payable {\n assembly {\n let operator := sload(_operatorSlot)\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), operator, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/proxy/HolographRegistryProxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\n\nimport \"../interface/InitializableInterface.sol\";\n\ncontract HolographRegistryProxy is Admin, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\n */\n bytes32 constant _registrySlot = 0xce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7;\n\n constructor() {}\n\n function init(bytes memory data) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address registry, bytes memory initCode) = abi.decode(data, (address, bytes));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_registrySlot, registry)\n }\n (bool success, bytes memory returnData) = registry.delegatecall(abi.encodeWithSignature(\"init(bytes)\", initCode));\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == InitializableInterface.init.selector, \"initialization failed\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n function getRegistry() external view returns (address registry) {\n assembly {\n registry := sload(_registrySlot)\n }\n }\n\n function setRegistry(address registry) external onlyAdmin {\n assembly {\n sstore(_registrySlot, registry)\n }\n }\n\n receive() external payable {}\n\n fallback() external payable {\n assembly {\n let registry := sload(_registrySlot)\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), registry, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/proxy/HolographTreasuryProxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\n\nimport \"../interface/InitializableInterface.sol\";\n\ncontract HolographTreasuryProxy is Admin, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.treasury')) - 1)\n */\n bytes32 constant _treasurySlot = 0x4215e7a38d75164ca078bbd61d0992cdeb1ba16f3b3ead5944966d3e4080e8b6;\n\n constructor() {}\n\n function init(bytes memory data) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address treasury, bytes memory initCode) = abi.decode(data, (address, bytes));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_treasurySlot, treasury)\n }\n (bool success, bytes memory returnData) = treasury.delegatecall(abi.encodeWithSignature(\"init(bytes)\", initCode));\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == InitializableInterface.init.selector, \"initialization failed\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n function getTreasury() external view returns (address treasury) {\n assembly {\n treasury := sload(_treasurySlot)\n }\n }\n\n function setTreasury(address treasury) external onlyAdmin {\n assembly {\n sstore(_treasurySlot, treasury)\n }\n }\n\n receive() external payable {}\n\n fallback() external payable {\n assembly {\n let treasury := sload(_treasurySlot)\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), treasury, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/struct/BridgeSettings.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nstruct BridgeSettings {\n uint256 value;\n uint256 gasLimit;\n uint256 gasPrice;\n uint32 toChain;\n}\n" + }, + "contracts/struct/DeploymentConfig.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nstruct DeploymentConfig {\n bytes32 contractType;\n uint32 chainType;\n bytes32 salt;\n bytes byteCode;\n bytes initCode;\n}\n" + }, + "contracts/struct/GasParameters.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nstruct GasParameters {\n uint256 msgBaseGas;\n uint256 msgGasPerByte;\n uint256 jobBaseGas;\n uint256 jobGasPerByte;\n uint256 minGasPrice;\n uint256 maxGasLimit;\n}\n" + }, + "contracts/struct/OperatorJob.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nstruct OperatorJob {\n uint8 pod;\n uint16 blockTimes;\n address operator;\n uint40 startBlock;\n uint64 startTimestamp;\n uint16[5] fallbackOperators;\n}\n\n/*\n\nuint\t\tDigits\tMax value\n-----------------------------\nuint8\t\t3\t\t255\nuint16\t\t5\t\t65,535\nuint24\t\t8\t\t16,777,215\nuint32\t\t10\t\t4,294,967,295\nuint40\t\t13\t\t1,099,511,627,775\nuint48\t\t15\t\t281,474,976,710,655\nuint56\t\t17\t\t72,057,594,037,927,935\nuint64\t\t20\t\t18,446,744,073,709,551,615\nuint72\t\t22\t\t4,722,366,482,869,645,213,695\nuint80\t\t25\t\t1,208,925,819,614,629,174,706,175\nuint88\t\t27\t\t309,485,009,821,345,068,724,781,055\nuint96\t\t29\t\t79,228,162,514,264,337,593,543,950,335\n...\nuint128\t\t39\t\t340,282,366,920,938,463,463,374,607,431,768,211,455\n...\nuint256\t\t78\t\t115,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\n\n*/\n" + }, + "contracts/struct/Verification.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nstruct Verification {\n bytes32 r;\n bytes32 s;\n uint8 v;\n}\n" + }, + "contracts/struct/ZoraBidShares.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./ZoraDecimal.sol\";\n\nstruct HolographBidShares {\n // % of sale value that goes to the _previous_ owner of the nft\n HolographDecimal prevOwner;\n // % of sale value that goes to the original creator of the nft\n HolographDecimal creator;\n // % of sale value that goes to the seller (current owner) of the nft\n HolographDecimal owner;\n}\n" + }, + "contracts/struct/ZoraDecimal.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nstruct HolographDecimal {\n uint256 value;\n}\n" + }, + "contracts/token/CxipERC721.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/ERC721H.sol\";\n\nimport \"../enum/TokenUriType.sol\";\n\nimport \"../interface/HolographERC721Interface.sol\";\nimport \"../interface/HolographInterfacesInterface.sol\";\nimport \"../interface/HolographInterface.sol\";\nimport \"../interface/HolographerInterface.sol\";\n\n/**\n * @title CXIP ERC-721 Collection that is bridgeable via Holograph\n * @author Holograph Foundation\n * @notice A smart contract for minting and managing Holograph Bridgeable ERC721 NFTs.\n * @dev The entire logic and functionality of the smart contract is self-contained.\n */\ncontract CxipERC721 is ERC721H {\n /**\n * @dev Internal reference used for minting incremental token ids.\n */\n uint224 private _currentTokenId;\n\n /**\n * @dev Enum of type of token URI to use globally for the entire contract.\n */\n TokenUriType private _uriType;\n\n /**\n * @dev Enum mapping of type of token URI to use for specific tokenId.\n */\n mapping(uint256 => TokenUriType) private _tokenUriType;\n\n /**\n * @dev Mapping of IPFS URIs for tokenIds.\n */\n mapping(uint256 => mapping(TokenUriType => string)) private _tokenURIs;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n // we set this as default type since that's what Mint is currently using\n _uriType = TokenUriType.IPFS;\n address owner = abi.decode(initPayload, (address));\n _setOwner(owner);\n // run underlying initializer logic\n return _init(initPayload);\n }\n\n /**\n * @notice Get's the URI of the token.\n * @return string The URI.\n */\n function tokenURI(uint256 _tokenId) external view onlyHolographer returns (string memory) {\n TokenUriType uriType = _tokenUriType[_tokenId];\n if (uriType == TokenUriType.UNDEFINED) {\n uriType = _uriType;\n }\n return\n string(\n abi.encodePacked(\n HolographInterfacesInterface(\n HolographInterface(HolographerInterface(holographer()).getHolograph()).getInterfaces()\n ).getUriPrepend(uriType),\n _tokenURIs[_tokenId][uriType]\n )\n );\n }\n\n function cxipMint(\n uint224 tokenId,\n TokenUriType uriType,\n string calldata tokenUri\n ) external onlyHolographer onlyOwner {\n HolographERC721Interface H721 = HolographERC721Interface(holographer());\n uint256 chainPrepend = H721.sourceGetChainPrepend();\n if (tokenId == 0) {\n _currentTokenId += 1;\n while (\n H721.exists(chainPrepend + uint256(_currentTokenId)) || H721.burned(chainPrepend + uint256(_currentTokenId))\n ) {\n _currentTokenId += 1;\n }\n tokenId = _currentTokenId;\n }\n H721.sourceMint(msgSender(), tokenId);\n uint256 id = chainPrepend + uint256(tokenId);\n if (uriType == TokenUriType.UNDEFINED) {\n uriType = _uriType;\n }\n _tokenUriType[id] = uriType;\n _tokenURIs[id][uriType] = tokenUri;\n }\n\n function bridgeIn(\n uint32 /* _chainId*/,\n address /* _from*/,\n address /* _to*/,\n uint256 _tokenId,\n bytes calldata _data\n ) external onlyHolographer returns (bool) {\n (TokenUriType uriType, string memory tokenUri) = abi.decode(_data, (TokenUriType, string));\n _tokenUriType[_tokenId] = uriType;\n _tokenURIs[_tokenId][uriType] = tokenUri;\n return true;\n }\n\n function bridgeOut(\n uint32 /* _chainId*/,\n address /* _from*/,\n address /* _to*/,\n uint256 _tokenId\n ) external view onlyHolographer returns (bytes memory _data) {\n TokenUriType uriType = _tokenUriType[_tokenId];\n if (uriType == TokenUriType.UNDEFINED) {\n uriType = _uriType;\n }\n _data = abi.encode(uriType, _tokenURIs[_tokenId][uriType]);\n }\n\n function afterBurn(address /* _owner*/, uint256 _tokenId) external onlyHolographer returns (bool) {\n TokenUriType uriType = _tokenUriType[_tokenId];\n if (uriType == TokenUriType.UNDEFINED) {\n uriType = _uriType;\n }\n delete _tokenURIs[_tokenId][uriType];\n return true;\n }\n}\n" + }, + "contracts/token/HolographUtilityToken.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/HLGERC20H.sol\";\n\nimport \"../interface/ERC20.sol\";\nimport \"../interface/HolographERC20Interface.sol\";\nimport \"../interface/HolographInterface.sol\";\nimport \"../interface/HolographerInterface.sol\";\n\n/**\n * @title Holograph Utility Token.\n * @author Holograph Foundation\n * @notice A smart contract for minting and managing Holograph's ERC20 Utility Tokens.\n * @dev The entire logic and functionality of the smart contract is self-contained.\n */\ncontract HolographUtilityToken is HLGERC20H {\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n (address contractOwner, uint256 tokenAmount, uint256 targetChain, address tokenRecipient) = abi.decode(\n initPayload,\n (address, uint256, uint256, address)\n );\n _setOwner(contractOwner);\n /*\n * @dev Mint token only if target chain matches current chain. Or if no target chain has been selected.\n * Goal of this is to restrict minting on Ethereum only for mainnet deployment.\n */\n if (block.chainid == targetChain || targetChain == 0) {\n if (tokenAmount > 0) {\n HolographERC20Interface(msg.sender).sourceMint(tokenRecipient, tokenAmount);\n }\n }\n // run underlying initializer logic\n return _init(initPayload);\n }\n\n /**\n * @dev Temporarily placed to bypass bytecode conflicts\n */\n function isHLG() external pure returns (bool) {\n return true;\n }\n}\n" + }, + "contracts/token/hToken.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/HLGERC20H.sol\";\n\nimport \"../interface/ERC20.sol\";\nimport \"../interface/HolographERC20Interface.sol\";\nimport \"../interface/HolographInterface.sol\";\nimport \"../interface/HolographerInterface.sol\";\n\n/**\n * @title Holograph token (aka hToken), used to wrap and bridge native tokens across blockchains.\n * @author Holograph Foundation\n * @notice A smart contract for minting and managing Holograph's Bridgeable ERC20 Tokens.\n * @dev The entire logic and functionality of the smart contract is self-contained.\n */\ncontract hToken is HLGERC20H {\n /**\n * @dev Sample fee for unwrapping.\n */\n uint16 private _feeBp; // 10000 == 100.00%\n\n /**\n * @dev List of supported Wrapped Tokens (equivalent), on current-chain.\n */\n mapping(address => bool) private _supportedWrappers;\n\n /**\n * @dev Event that is triggered when native token is converted into hToken.\n */\n event Deposit(address indexed from, uint256 amount);\n\n /**\n * @dev Event that is triggered when ERC20 token is converted into hToken.\n */\n event TokenDeposit(address indexed token, address indexed from, uint256 amount);\n\n /**\n * @dev Event that is triggered when hToken is converted into native token.\n */\n event Withdrawal(address indexed to, uint256 amount);\n\n /**\n * @dev Event that is triggered when hToken is converted into ERC20 token.\n */\n event TokenWithdrawal(address indexed token, address indexed to, uint256 amount);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n (address contractOwner, uint16 fee) = abi.decode(initPayload, (address, uint16));\n _setOwner(contractOwner);\n _feeBp = fee;\n // run underlying initializer logic\n return _init(initPayload);\n }\n\n /**\n * @dev Send native token value, get back hToken equivalent.\n * @param recipient Address of where to send the hToken(s) to.\n */\n function holographNativeToken(address recipient) external payable onlyHolographer {\n require(\n (HolographerInterface(holographer()).getOriginChain() ==\n HolographInterface(HolographerInterface(holographer()).getHolograph()).getHolographChainId()),\n \"hToken: not native token\"\n );\n require(msg.value > 0, \"hToken: no value received\");\n address sender = msgSender();\n if (recipient == address(0)) {\n recipient = sender;\n }\n HolographERC20Interface(holographer()).sourceMint(recipient, msg.value);\n emit Deposit(sender, msg.value);\n }\n\n /**\n * @dev Send hToken, get back native token value equivalent.\n * @param recipient Address of where to send the native token(s) to.\n */\n function extractNativeToken(address payable recipient, uint256 amount) external onlyHolographer {\n address sender = msgSender();\n require(ERC20(address(this)).balanceOf(sender) >= amount, \"hToken: not enough hToken(s)\");\n require(\n (HolographerInterface(holographer()).getOriginChain() ==\n HolographInterface(HolographerInterface(holographer()).getHolograph()).getHolographChainId()),\n \"hToken: not on native chain\"\n );\n require(address(this).balance >= amount, \"hToken: not enough native tokens\");\n HolographERC20Interface(holographer()).sourceBurn(sender, amount);\n // HERE WE NEED TO ADD FEE MECHANISM TO EXTRACT xx.xxxx% FROM NATIVE TOKEN AMOUNT\n // THIS SHOULD GO SOMEWHERE TO REWARD CAPITAL PROVIDERS\n uint256 fee = (amount / 10000) * _feeBp;\n // for now we just leave fee in contract balance\n //\n // amount is updated to reflect fee subtraction\n amount = amount - fee;\n recipient.transfer(amount);\n emit Withdrawal(recipient, amount);\n }\n\n /**\n * @dev Send supported wrapped token, get back hToken equivalent.\n * @param recipient Address of where to send the hToken(s) to.\n */\n function holographWrappedToken(address token, address recipient, uint256 amount) external onlyHolographer {\n require(_supportedWrappers[token], \"hToken: unsupported token type\");\n ERC20 erc20 = ERC20(token);\n address sender = msgSender();\n require(erc20.allowance(sender, address(this)) >= amount, \"hToken: allowance too low\");\n uint256 previousBalance = erc20.balanceOf(address(this));\n require(erc20.transferFrom(sender, address(this), amount), \"hToken: ERC20 transfer failed\");\n uint256 currentBalance = erc20.balanceOf(address(this));\n uint256 difference = currentBalance - previousBalance;\n require(difference >= 0, \"hToken: no tokens transferred\");\n if (difference < amount) {\n // adjust for fee-based mechanisms\n // this allows for discrepancies to not fail the entire operation\n amount = difference;\n }\n if (recipient == address(0)) {\n recipient = sender;\n }\n HolographERC20Interface(holographer()).sourceMint(recipient, amount);\n emit TokenDeposit(token, sender, amount);\n }\n\n /**\n * @dev Send hToken, get back native token value equivalent.\n * @param recipient Address of where to send the native token(s) to.\n */\n function extractWrappedToken(address token, address payable recipient, uint256 amount) external onlyHolographer {\n require(_supportedWrappers[token], \"hToken: unsupported token type\");\n address sender = msgSender();\n require(ERC20(address(this)).balanceOf(sender) >= amount, \"hToken: not enough hToken(s)\");\n ERC20 erc20 = ERC20(token);\n uint256 previousBalance = erc20.balanceOf(address(this));\n require(previousBalance >= amount, \"hToken: not enough ERC20 tokens\");\n if (recipient == address(0)) {\n recipient = payable(sender);\n }\n // HERE WE NEED TO ADD FEE MECHANISM TO EXTRACT xx.xxxx% FROM NATIVE TOKEN AMOUNT\n // THIS SHOULD GO SOMEWHERE TO REWARD CAPITAL PROVIDERS\n uint256 fee = (amount / 10000) * _feeBp;\n uint256 adjustedAmount = amount - fee;\n // for now we just leave fee in contract balance\n erc20.transfer(recipient, adjustedAmount);\n uint256 currentBalance = erc20.balanceOf(address(this));\n uint256 difference = currentBalance - previousBalance;\n require(difference == adjustedAmount, \"hToken: incorrect new balance\");\n HolographERC20Interface(holographer()).sourceBurn(sender, amount);\n emit TokenWithdrawal(token, recipient, adjustedAmount);\n }\n\n function availableNativeTokens() external view onlyHolographer returns (uint256) {\n if (\n HolographerInterface(holographer()).getOriginChain() ==\n HolographInterface(HolographerInterface(holographer()).getHolograph()).getHolographChainId()\n ) {\n return address(this).balance;\n } else {\n return 0;\n }\n }\n\n function availableWrappedTokens(address token) external view onlyHolographer returns (uint256) {\n require(_supportedWrappers[token], \"hToken: unsupported token type\");\n return ERC20(token).balanceOf(address(this));\n }\n\n function updateSupportedWrapper(address token, bool supported) external onlyHolographer onlyOwner {\n _supportedWrappers[token] = supported;\n }\n\n /**\n * @dev Temporarily placed to bypass bytecode conflicts\n */\n function isHToken() external pure returns (bool) {\n return true;\n }\n}\n" + }, + "contracts/token/SampleERC20.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/StrictERC20H.sol\";\n\nimport \"../interface/HolographERC20Interface.sol\";\n\n/**\n * @title Sample ERC-20 token that is bridgeable via Holograph\n * @author Holograph Foundation\n * @notice A smart contract for minting and managing Holograph Bridgeable ERC20 Tokens.\n * @dev The entire logic and functionality of the smart contract is self-contained.\n */\ncontract SampleERC20 is StrictERC20H {\n /**\n * @dev Just a dummy value for now to test transferring of data.\n */\n mapping(address => bytes32) private _walletSalts;\n\n /**\n * @dev Temporary implementation to suppress compiler state mutability warnings.\n */\n bool private _dummy;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n // do your own custom logic here\n address contractOwner = abi.decode(initPayload, (address));\n _setOwner(contractOwner);\n // run underlying initializer logic\n return _init(initPayload);\n }\n\n /**\n * @dev Sample mint where anyone can mint any amounts of tokens.\n */\n function mint(address to, uint256 amount) external onlyHolographer onlyOwner {\n HolographERC20Interface(holographer()).sourceMint(to, amount);\n if (_walletSalts[to] == bytes32(0)) {\n _walletSalts[to] = keccak256(\n abi.encodePacked(to, amount, block.timestamp, block.number, blockhash(block.number - 1))\n );\n }\n }\n\n function bridgeIn(\n uint32 /* _chainId*/,\n address /* _from*/,\n address _to,\n uint256 /* _amount*/,\n bytes calldata _data\n ) external override onlyHolographer returns (bool) {\n bytes32 salt = abi.decode(_data, (bytes32));\n _walletSalts[_to] = salt;\n return true;\n }\n\n function bridgeOut(\n uint32 /* _chainId*/,\n address /* _from*/,\n address _to,\n uint256 /* _amount*/\n ) external override onlyHolographer returns (bytes memory _data) {\n _dummy = false;\n _data = abi.encode(_walletSalts[_to]);\n }\n}\n" + }, + "contracts/token/SampleERC721.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/StrictERC721H.sol\";\n\nimport \"../interface/HolographERC721Interface.sol\";\n\n/**\n * @title Sample ERC-721 Collection that is bridgeable via Holograph\n * @author Holograph Foundation\n * @notice A smart contract for minting and managing Holograph Bridgeable ERC721 NFTs.\n * @dev The entire logic and functionality of the smart contract is self-contained.\n */\ncontract SampleERC721 is StrictERC721H {\n /**\n * @dev Mapping of all token URIs.\n */\n mapping(uint256 => string) private _tokenURIs;\n\n /**\n * @dev Internal reference used for minting incremental token ids.\n */\n uint224 private _currentTokenId;\n\n /**\n * @dev Temporary implementation to suppress compiler state mutability warnings.\n */\n bool private _dummy;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n // do your own custom logic here\n address contractOwner = abi.decode(initPayload, (address));\n _setOwner(contractOwner);\n // run underlying initializer logic\n return _init(initPayload);\n }\n\n /**\n * @notice Get's the URI of the token.\n * @dev Defaults the the Arweave URI\n * @return string The URI.\n */\n function tokenURI(uint256 _tokenId) external view onlyHolographer returns (string memory) {\n return _tokenURIs[_tokenId];\n }\n\n /**\n * @dev Sample mint where anyone can mint specific token, with a custom URI\n */\n function mint(address to, uint224 tokenId, string calldata URI) external onlyHolographer onlyOwner {\n HolographERC721Interface H721 = HolographERC721Interface(holographer());\n if (tokenId == 0) {\n _currentTokenId += 1;\n while (H721.exists(uint256(_currentTokenId)) || H721.burned(uint256(_currentTokenId))) {\n _currentTokenId += 1;\n }\n tokenId = _currentTokenId;\n }\n H721.sourceMint(to, tokenId);\n uint256 id = H721.sourceGetChainPrepend() + uint256(tokenId);\n _tokenURIs[id] = URI;\n }\n\n function bridgeIn(\n uint32 /* _chainId*/,\n address /* _from*/,\n address /* _to*/,\n uint256 _tokenId,\n bytes calldata _data\n ) external override onlyHolographer returns (bool) {\n string memory URI = abi.decode(_data, (string));\n _tokenURIs[_tokenId] = URI;\n return true;\n }\n\n function bridgeOut(\n uint32 /* _chainId*/,\n address /* _from*/,\n address /* _to*/,\n uint256 _tokenId\n ) external override onlyHolographer returns (bytes memory _data) {\n _dummy = false;\n _data = abi.encode(_tokenURIs[_tokenId]);\n }\n\n function afterBurn(address /* _owner*/, uint256 _tokenId) external override onlyHolographer returns (bool) {\n delete _tokenURIs[_tokenId];\n return true;\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 999999 + }, + "metadata": { + "bytecodeHash": "none", + "useLiteralContent": true + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": ["ast"] + } + }, + "remappings": [ + "ds-test/=lib/forge-std/lib/ds-test/src/", + "erc721a-upgradeable/=erc721a-upgradeable/", + "forge-std/=lib/forge-std/src/" + ] + } +} diff --git a/deployments/develop/avalancheTestnet/HolographFactory.json b/deployments/develop/avalancheTestnet/HolographFactory.json index 1151b2456..e6e4518cb 100644 --- a/deployments/develop/avalancheTestnet/HolographFactory.json +++ b/deployments/develop/avalancheTestnet/HolographFactory.json @@ -1,5 +1,5 @@ { - "address": "0xE70F94ED069Cca85c040Cd79FC7Ee0121690dE35", + "address": "0xaF27d972B6Ad681F72bB9acAe5382e829DAe61C5", "abi": [ { "inputs": [], @@ -386,28 +386,28 @@ "type": "receive" } ], - "transactionHash": "0xe80c7714337f7df37f43f1bee4d30e8061422c9424bef67c6a285d3212df2d82", + "transactionHash": "0xf7b81f958846158807f3047a5a50aa0257859fc86ce60c0c4665bfb3e619a8fd", "receipt": { "to": "0x0C8aF56F7650a6E3685188d212044338c21d3F73", "from": "0xd078E391cBAEAa6C5785124a7207ff57d64604b7", "contractAddress": null, "transactionIndex": 0, - "gasUsed": "2506045", + "gasUsed": "2725119", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x29824098685db5d70be5c404f76c5506eda76da47ca7e8fdfecc44ccc88c642b", - "transactionHash": "0xe80c7714337f7df37f43f1bee4d30e8061422c9424bef67c6a285d3212df2d82", + "blockHash": "0x2659370b798dc275e34e03e4ef61669a7f3277dc405b3c6a95ab893eeba356fa", + "transactionHash": "0xf7b81f958846158807f3047a5a50aa0257859fc86ce60c0c4665bfb3e619a8fd", "logs": [], - "blockNumber": 20937818, - "cumulativeGasUsed": "2506045", + "blockNumber": 23888526, + "cumulativeGasUsed": "2725119", "status": 1, "byzantium": true }, "args": [], - "numDeployments": 4, - "solcInputHash": "c2684ac7ef00452775c6a94fe449842d", - "metadata": "{\"compiler\":{\"version\":\"0.8.13+commit.abaa5c0e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"BridgeableContractDeployed\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"adminCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"bridgeIn\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"bridgeOut\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"selector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"contractType\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"chainType\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"salt\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"byteCode\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"initCode\",\"type\":\"bytes\"}],\"internalType\":\"struct DeploymentConfig\",\"name\":\"config\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"}],\"internalType\":\"struct Verification\",\"name\":\"signature\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"}],\"name\":\"deployHolographableContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"contractType\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"chainType\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"salt\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"byteCode\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"initCode\",\"type\":\"bytes\"}],\"internalType\":\"struct DeploymentConfig\",\"name\":\"config\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"}],\"internalType\":\"struct Verification\",\"name\":\"signature\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"deployOnCurrentChain\",\"type\":\"bool\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"toChain\",\"type\":\"uint32\"}],\"internalType\":\"struct BridgeSettings[]\",\"name\":\"bridgeSettings\",\"type\":\"tuple[]\"}],\"name\":\"deployHolographableContractMultiChain\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"adminAddress\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getHolograph\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"holograph\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRegistry\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"registry\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"initPayload\",\"type\":\"bytes\"}],\"name\":\"init\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"adminAddress\",\"type\":\"address\"}],\"name\":\"setAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"holograph\",\"type\":\"address\"}],\"name\":\"setHolograph\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"registry\",\"type\":\"address\"}],\"name\":\"setRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"author\":\"https://github.com/holographxyz\",\"details\":\"The contract provides methods that allow for the creation of Holograph Protocol compliant smart contracts, that are capable of minting holographable assets\",\"kind\":\"dev\",\"methods\":{\"bridgeIn(uint32,bytes)\":{\"details\":\"This function directly forwards the calldata to the deployHolographableContract function It is used to allow for Holograph Bridge to make cross-chain deployments\"},\"bridgeOut(uint32,address,bytes)\":{\"details\":\"This function directly returns the calldata It is used to allow for Holograph Bridge to make cross-chain deployments\"},\"constructor\":{\"details\":\"Constructor is left empty and init is used instead\"},\"deployHolographableContract((bytes32,uint32,bytes32,bytes,bytes),(bytes32,bytes32,uint8),address)\":{\"details\":\"Using this function allows to deploy smart contracts that have the same address across all EVM chains\",\"params\":{\"config\":\"contract deployement configurations\",\"signature\":\"that was created by the wallet that created the original payload\",\"signer\":\"address of wallet that created the payload\"}},\"getHolograph()\":{\"details\":\"Used for storing a reference to all the primary modules and variables of the protocol\"},\"getRegistry()\":{\"details\":\"This module stores a reference for all deployed holographable smart contracts\"},\"init(bytes)\":{\"details\":\"This function is called by the deployer/factory when creating a contract\",\"params\":{\"initPayload\":\"abi encoded payload to use for contract initilaization\"}},\"setHolograph(address)\":{\"params\":{\"holograph\":\"address of the Holograph Protocol smart contract to use\"}},\"setRegistry(address)\":{\"params\":{\"registry\":\"address of the Holograph Registry smart contract to use\"}}},\"stateVariables\":{\"_holographSlot\":{\"details\":\"bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\"},\"_registrySlot\":{\"details\":\"bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\"}},\"title\":\"Holograph Factory\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"bridgeIn(uint32,bytes)\":{\"notice\":\"Deploy holographable contract via bridge request\"},\"bridgeOut(uint32,address,bytes)\":{\"notice\":\"Deploy holographable contract via bridge request\"},\"deployHolographableContract((bytes32,uint32,bytes32,bytes,bytes),(bytes32,bytes32,uint8),address)\":{\"notice\":\"Deploy a holographable smart contract\"},\"getHolograph()\":{\"notice\":\"Get the Holograph Protocol contract\"},\"getRegistry()\":{\"notice\":\"Get the Holograph Registry module\"},\"init(bytes)\":{\"notice\":\"Used internally to initialize the contract instead of through a constructor\"},\"setHolograph(address)\":{\"notice\":\"Update the Holograph Protocol contract address\"},\"setRegistry(address)\":{\"notice\":\"Update the Holograph Registry module address\"}},\"notice\":\"Deploy holographable contracts\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/HolographFactory.sol\":\"HolographFactory\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc721a-upgradeable/=erc721a-upgradeable/\",\":forge-std/=lib/forge-std/src/\"]},\"sources\":{\"contracts/HolographFactory.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nimport \\\"./abstract/Admin.sol\\\";\\nimport \\\"./abstract/Initializable.sol\\\";\\n\\nimport \\\"./enforcer/Holographer.sol\\\";\\n\\nimport \\\"./interface/Holographable.sol\\\";\\nimport \\\"./interface/HolographBridgeInterface.sol\\\";\\nimport \\\"./interface/HolographFactoryInterface.sol\\\";\\nimport \\\"./interface/HolographInterface.sol\\\";\\nimport \\\"./interface/HolographRegistryInterface.sol\\\";\\nimport \\\"./interface/InitializableInterface.sol\\\";\\n\\nimport \\\"./struct/BridgeSettings.sol\\\";\\nimport \\\"./struct/DeploymentConfig.sol\\\";\\nimport \\\"./struct/Verification.sol\\\";\\n\\n/**\\n * @title Holograph Factory\\n * @author https://github.com/holographxyz\\n * @notice Deploy holographable contracts\\n * @dev The contract provides methods that allow for the creation of Holograph Protocol compliant smart contracts, that are capable of minting holographable assets\\n */\\ncontract HolographFactory is Admin, Initializable, Holographable, HolographFactoryInterface {\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\\n */\\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\\n */\\n bytes32 constant _registrySlot = 0xce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7;\\n\\n /**\\n * @dev Constructor is left empty and init is used instead\\n */\\n constructor() {}\\n\\n /**\\n * @notice Used internally to initialize the contract instead of through a constructor\\n * @dev This function is called by the deployer/factory when creating a contract\\n * @param initPayload abi encoded payload to use for contract initilaization\\n */\\n function init(bytes memory initPayload) external override returns (bytes4) {\\n require(!_isInitialized(), \\\"HOLOGRAPH: already initialized\\\");\\n (address holograph, address registry) = abi.decode(initPayload, (address, address));\\n assembly {\\n sstore(_adminSlot, origin())\\n sstore(_holographSlot, holograph)\\n sstore(_registrySlot, registry)\\n }\\n _setInitialized();\\n return InitializableInterface.init.selector;\\n }\\n\\n /**\\n * @notice Deploy holographable contract via bridge request\\n * @dev This function directly forwards the calldata to the deployHolographableContract function\\n * It is used to allow for Holograph Bridge to make cross-chain deployments\\n */\\n function bridgeIn(\\n uint32, /* fromChain*/\\n bytes calldata payload\\n ) external returns (bytes4) {\\n (DeploymentConfig memory config, Verification memory signature, address signer) = abi.decode(\\n payload,\\n (DeploymentConfig, Verification, address)\\n );\\n HolographFactoryInterface(address(this)).deployHolographableContract(config, signature, signer);\\n return Holographable.bridgeIn.selector;\\n }\\n\\n /**\\n * @notice Deploy holographable contract via bridge request\\n * @dev This function directly returns the calldata\\n * It is used to allow for Holograph Bridge to make cross-chain deployments\\n */\\n function bridgeOut(\\n uint32, /* toChain*/\\n address, /* sender*/\\n bytes calldata payload\\n ) external pure returns (bytes4 selector, bytes memory data) {\\n return (Holographable.bridgeOut.selector, payload);\\n }\\n\\n function deployHolographableContractMultiChain(\\n DeploymentConfig memory config,\\n Verification memory signature,\\n address signer,\\n bool deployOnCurrentChain,\\n BridgeSettings[] memory bridgeSettings\\n ) external payable {\\n if (deployOnCurrentChain) {\\n deployHolographableContract(config, signature, signer);\\n }\\n bytes memory payload = abi.encode(config, signature, signer);\\n HolographInterface holograph;\\n assembly {\\n holograph := sload(_holographSlot)\\n }\\n HolographBridgeInterface bridge = HolographBridgeInterface(holograph.getBridge());\\n uint256 l = bridgeSettings.length;\\n for (uint256 i = 0; i < l; i++) {\\n bridge.bridgeOutRequest{value: bridgeSettings[i].value}(\\n bridgeSettings[i].toChain,\\n address(this),\\n bridgeSettings[i].gasLimit,\\n bridgeSettings[i].gasPrice,\\n payload\\n );\\n }\\n }\\n\\n /**\\n * @notice Deploy a holographable smart contract\\n * @dev Using this function allows to deploy smart contracts that have the same address across all EVM chains\\n * @param config contract deployement configurations\\n * @param signature that was created by the wallet that created the original payload\\n * @param signer address of wallet that created the payload\\n */\\n function deployHolographableContract(\\n DeploymentConfig memory config,\\n Verification memory signature,\\n address signer\\n ) public {\\n address registry;\\n address holograph;\\n assembly {\\n holograph := sload(_holographSlot)\\n registry := sload(_registrySlot)\\n }\\n /**\\n * @dev the configuration is encoded and hashed along with signer address\\n */\\n bytes32 hash = keccak256(\\n abi.encodePacked(\\n config.contractType,\\n config.chainType,\\n config.salt,\\n keccak256(config.byteCode),\\n keccak256(config.initCode),\\n signer\\n )\\n );\\n /**\\n * @dev the hash is validated against signature\\n * this is to guarantee that the original creator's configuration has not been altered\\n */\\n require(_verifySigner(signature.r, signature.s, signature.v, hash, signer), \\\"HOLOGRAPH: invalid signature\\\");\\n /**\\n * @dev check that this contract has not already been deployed on this chain\\n */\\n bytes memory holographerBytecode = type(Holographer).creationCode;\\n address holographerAddress = address(\\n uint160(uint256(keccak256(abi.encodePacked(bytes1(0xff), address(this), hash, keccak256(holographerBytecode)))))\\n );\\n require(!_isContract(holographerAddress), \\\"HOLOGRAPH: already deployed\\\");\\n /**\\n * @dev convert hash into uint256 which will be used as the salt for create2\\n */\\n uint256 saltInt = uint256(hash);\\n address sourceContractAddress;\\n bytes memory sourceByteCode = config.byteCode;\\n assembly {\\n /**\\n * @dev deploy the user created smart contract first\\n */\\n sourceContractAddress := create2(0, add(sourceByteCode, 0x20), mload(sourceByteCode), saltInt)\\n }\\n assembly {\\n /**\\n * @dev deploy the Holographer contract\\n */\\n holographerAddress := create2(0, add(holographerBytecode, 0x20), mload(holographerBytecode), saltInt)\\n }\\n /**\\n * @dev initialize the Holographer contract\\n */\\n require(\\n InitializableInterface(holographerAddress).init(\\n abi.encode(abi.encode(config.chainType, holograph, config.contractType, sourceContractAddress), config.initCode)\\n ) == InitializableInterface.init.selector,\\n \\\"initialization failed\\\"\\n );\\n /**\\n * @dev update the Holograph Registry with deployed contract address\\n */\\n HolographRegistryInterface(registry).setHolographedHashAddress(hash, holographerAddress);\\n /**\\n * @dev emit an event that on-chain indexers can easily read\\n */\\n emit BridgeableContractDeployed(holographerAddress, hash);\\n }\\n\\n /**\\n * @notice Get the Holograph Protocol contract\\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\\n */\\n function getHolograph() external view returns (address holograph) {\\n assembly {\\n holograph := sload(_holographSlot)\\n }\\n }\\n\\n /**\\n * @notice Update the Holograph Protocol contract address\\n * @param holograph address of the Holograph Protocol smart contract to use\\n */\\n function setHolograph(address holograph) external onlyAdmin {\\n assembly {\\n sstore(_holographSlot, holograph)\\n }\\n }\\n\\n /**\\n * @notice Get the Holograph Registry module\\n * @dev This module stores a reference for all deployed holographable smart contracts\\n */\\n function getRegistry() external view returns (address registry) {\\n assembly {\\n registry := sload(_registrySlot)\\n }\\n }\\n\\n /**\\n * @notice Update the Holograph Registry module address\\n * @param registry address of the Holograph Registry smart contract to use\\n */\\n function setRegistry(address registry) external onlyAdmin {\\n assembly {\\n sstore(_registrySlot, registry)\\n }\\n }\\n\\n /**\\n * @dev Internal function used for checking if a contract has been deployed at address\\n */\\n function _isContract(address contractAddress) private view returns (bool) {\\n bytes32 codehash;\\n assembly {\\n codehash := extcodehash(contractAddress)\\n }\\n return (codehash != 0x0 && codehash != 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470);\\n }\\n\\n /**\\n * @dev Internal function used for verifying a signature\\n */\\n function _verifySigner(\\n bytes32 r,\\n bytes32 s,\\n uint8 v,\\n bytes32 hash,\\n address signer\\n ) private pure returns (bool) {\\n if (v < 27) {\\n v += 27;\\n }\\n if (v != 27 && v != 28) {\\n return false;\\n }\\n // prevent signature malleability by checking if s-value is in the upper range\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n // if s-value is in upper range, calculate a new s-value\\n s = bytes32(0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - uint256(s));\\n // flip the v-value\\n if (v == 27) {\\n v = 28;\\n } else {\\n v = 27;\\n }\\n // check if s-value is still in upper range\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return false;\\n }\\n }\\n /**\\n * @dev signature is checked against EIP-191 first, then directly, to support legacy wallets\\n */\\n return (signer != address(0) &&\\n (ecrecover(keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash)), v, r, s) == signer ||\\n ecrecover(hash, v, r, s) == signer));\\n }\\n\\n /**\\n * @dev Purposefully reverts to prevent having any type of ether transfered into the contract\\n */\\n receive() external payable {\\n revert();\\n }\\n\\n /**\\n * @dev Purposefully reverts to prevent any calls to undefined functions\\n */\\n fallback() external payable {\\n revert();\\n }\\n}\\n\",\"keccak256\":\"0x8daccfb651b96557add6db9f587f21109fb5cf698f5db8566b92d936197c48f3\",\"license\":\"UNLICENSED\"},\"contracts/abstract/Admin.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nabstract contract Admin {\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.admin')) - 1)\\n */\\n bytes32 constant _adminSlot = 0x3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c9;\\n\\n modifier onlyAdmin() {\\n require(msg.sender == getAdmin(), \\\"HOLOGRAPH: admin only function\\\");\\n _;\\n }\\n\\n constructor() {}\\n\\n function admin() public view returns (address) {\\n return getAdmin();\\n }\\n\\n function getAdmin() public view returns (address adminAddress) {\\n assembly {\\n adminAddress := sload(_adminSlot)\\n }\\n }\\n\\n function setAdmin(address adminAddress) public onlyAdmin {\\n assembly {\\n sstore(_adminSlot, adminAddress)\\n }\\n }\\n\\n function adminCall(address target, bytes calldata data) external payable onlyAdmin {\\n assembly {\\n calldatacopy(0, data.offset, data.length)\\n let result := call(gas(), target, callvalue(), 0, data.length, 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n switch result\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x93552c9253b579c45113a150a6a3dfddb997afd939d09b49c34d040525734b1a\",\"license\":\"UNLICENSED\"},\"contracts/abstract/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nimport \\\"../interface/InitializableInterface.sol\\\";\\n\\n/**\\n * @title Initializable\\n * @author https://github.com/holographxyz\\n * @notice Use init instead of constructor\\n * @dev This allows for use of init function to make one time initializations without the need for a constructor\\n */\\nabstract contract Initializable is InitializableInterface {\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.initialized')) - 1)\\n */\\n bytes32 constant _initializedSlot = 0x4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a01;\\n\\n /**\\n * @dev Constructor is left empty and init is used instead\\n */\\n constructor() {}\\n\\n /**\\n * @notice Used internally to initialize the contract instead of through a constructor\\n * @dev This function is called by the deployer/factory when creating a contract\\n * @param initPayload abi encoded payload to use for contract initilaization\\n */\\n function init(bytes memory initPayload) external virtual returns (bytes4);\\n\\n function _isInitialized() internal view returns (bool initialized) {\\n assembly {\\n initialized := sload(_initializedSlot)\\n }\\n }\\n\\n function _setInitialized() internal {\\n assembly {\\n sstore(_initializedSlot, 0x0000000000000000000000000000000000000000000000000000000000000001)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa55dc367285f96952dec56adfbfb48b6a4be31aef9ba0d30ad8c91023a572462\",\"license\":\"UNLICENSED\"},\"contracts/enforcer/Holographer.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nimport \\\"../abstract/Admin.sol\\\";\\nimport \\\"../abstract/Initializable.sol\\\";\\n\\nimport \\\"../interface/HolographInterface.sol\\\";\\nimport \\\"../interface/HolographerInterface.sol\\\";\\nimport \\\"../interface/HolographRegistryInterface.sol\\\";\\nimport \\\"../interface/InitializableInterface.sol\\\";\\n\\n/**\\n * @dev This contract is a binder. It puts together all the variables to make the underlying contracts functional and be bridgeable.\\n */\\ncontract Holographer is Admin, Initializable, HolographerInterface {\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.originChain')) - 1)\\n */\\n bytes32 constant _originChainSlot = 0xd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d;\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\\n */\\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.contractType')) - 1)\\n */\\n bytes32 constant _contractTypeSlot = 0x0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c7;\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.sourceContract')) - 1)\\n */\\n bytes32 constant _sourceContractSlot = 0x27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b074;\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.blockHeight')) - 1)\\n */\\n bytes32 constant _blockHeightSlot = 0x9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de3;\\n\\n /**\\n * @dev Constructor is left empty and init is used instead\\n */\\n constructor() {}\\n\\n /**\\n * @notice Used internally to initialize the contract instead of through a constructor\\n * @dev This function is called by the deployer/factory when creating a contract\\n * @param initPayload abi encoded payload to use for contract initilaization\\n */\\n function init(bytes memory initPayload) external override returns (bytes4) {\\n require(!_isInitialized(), \\\"HOLOGRAPHER: already initialized\\\");\\n (bytes memory encoded, bytes memory initCode) = abi.decode(initPayload, (bytes, bytes));\\n (uint32 originChain, address holograph, bytes32 contractType, address sourceContract) = abi.decode(\\n encoded,\\n (uint32, address, bytes32, address)\\n );\\n assembly {\\n sstore(_adminSlot, caller())\\n sstore(_blockHeightSlot, number())\\n sstore(_contractTypeSlot, contractType)\\n sstore(_holographSlot, holograph)\\n sstore(_originChainSlot, originChain)\\n sstore(_sourceContractSlot, sourceContract)\\n }\\n (bool success, bytes memory returnData) = HolographRegistryInterface(HolographInterface(holograph).getRegistry())\\n .getReservedContractTypeAddress(contractType)\\n .delegatecall(abi.encodeWithSelector(InitializableInterface.init.selector, initCode));\\n bytes4 selector = abi.decode(returnData, (bytes4));\\n require(success && selector == InitializableInterface.init.selector, \\\"HOLOGRAPH: initialization failed\\\");\\n _setInitialized();\\n return InitializableInterface.init.selector;\\n }\\n\\n /**\\n * @dev Returns the contract type that is used for loading the Enforcer\\n */\\n function getContractType() external view returns (bytes32 contractType) {\\n assembly {\\n contractType := sload(_contractTypeSlot)\\n }\\n }\\n\\n /**\\n * @dev Returns the block height of when the smart contract was deployed. Useful for retrieving deployment config for re-deployment on other EVM-compatible chains.\\n */\\n function getDeploymentBlock() external view returns (uint256 deploymentBlock) {\\n assembly {\\n deploymentBlock := sload(_blockHeightSlot)\\n }\\n }\\n\\n /**\\n * @dev Returns a hardcoded address for the Holograph smart contract.\\n */\\n function getHolograph() external view returns (address holograph) {\\n assembly {\\n holograph := sload(_holographSlot)\\n }\\n }\\n\\n /**\\n * @dev Returns a hardcoded address for the Holograph smart contract that controls and enforces the ERC standards.\\n */\\n function getHolographEnforcer() public view returns (address) {\\n HolographInterface holograph;\\n bytes32 contractType;\\n assembly {\\n holograph := sload(_holographSlot)\\n contractType := sload(_contractTypeSlot)\\n }\\n return HolographRegistryInterface(holograph.getRegistry()).getReservedContractTypeAddress(contractType);\\n }\\n\\n /**\\n * @dev Returns the original chain that contract was deployed on.\\n */\\n function getOriginChain() external view returns (uint32 originChain) {\\n assembly {\\n originChain := sload(_originChainSlot)\\n }\\n }\\n\\n /**\\n * @dev Returns a hardcoded address for the custom secure storage contract deployed in parallel with this contract deployment.\\n */\\n function getSourceContract() external view returns (address sourceContract) {\\n assembly {\\n sourceContract := sload(_sourceContractSlot)\\n }\\n }\\n\\n /**\\n * @dev Purposefully left empty, to prevent running out of gas errors when receiving native token payments.\\n */\\n receive() external payable {}\\n\\n /**\\n * @dev This takes the Enforcer's source code, runs it, and uses current address for storage slots.\\n */\\n fallback() external payable {\\n address holographEnforcer = getHolographEnforcer();\\n assembly {\\n calldatacopy(0, 0, calldatasize())\\n let result := delegatecall(gas(), holographEnforcer, 0, calldatasize(), 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n switch result\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc31b575625e84743d9a14f282ef3894becece82a6f47ec945585ac5a0d1895f7\",\"license\":\"UNLICENSED\"},\"contracts/interface/HolographBridgeInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\n/**\\n * @title Holograph Bridge\\n * @author https://github.com/holographxyz\\n * @notice Beam any holographable contracts and assets across blockchains\\n * @dev The contract abstracts all the complexities of making bridge requests and uses a universal interface to bridge any type of holographable assets\\n */\\ninterface HolographBridgeInterface {\\n /**\\n * @notice Receive a beam from another chain\\n * @dev This function can only be called by the Holograph Operator module\\n * @param fromChain Holograph Chain ID where the brigeOutRequest was created\\n * @param holographableContract address of the destination contract that the bridgeInRequest is targeted for\\n * @param hToken address of the hToken contract that wrapped the origin chain native gas token\\n * @param hTokenRecipient address of recipient for the hToken reward\\n * @param hTokenValue exact amount of hToken reward in wei\\n * @param doNotRevert boolean used to specify if the call should revert\\n * @param bridgeInPayload actual abi encoded bytes of the data that the holographable contract bridgeIn function will receive\\n */\\n function bridgeInRequest(\\n uint256 nonce,\\n uint32 fromChain,\\n address holographableContract,\\n address hToken,\\n address hTokenRecipient,\\n uint256 hTokenValue,\\n bool doNotRevert,\\n bytes calldata bridgeInPayload\\n ) external payable;\\n\\n /**\\n * @notice Create a beam request for a destination chain\\n * @dev This function works for deploying contracts and beaming supported holographable assets across chains\\n * @param toChain Holograph Chain ID where the beam is being sent to\\n * @param holographableContract address of the contract for which the bridge request is being made\\n * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain\\n * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain\\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\\n */\\n function bridgeOutRequest(\\n uint32 toChain,\\n address holographableContract,\\n uint256 gasLimit,\\n uint256 gasPrice,\\n bytes calldata bridgeOutPayload\\n ) external payable;\\n\\n /**\\n * @notice Do not call this function, it will always revert\\n * @dev Used by getBridgeOutRequestPayload function\\n * It is purposefully inverted to always revert on a successful call\\n * Marked as external and not private to allow use inside try/catch of getBridgeOutRequestPayload function\\n * If this function does not revert and returns a string, it is the actual revert reason\\n * @param sender address of actual sender that is planning to make a bridgeOutRequest call\\n * @param toChain holograph chain id of destination chain\\n * @param holographableContract address of the contract for which the bridge request is being made\\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\\n */\\n function revertedBridgeOutRequest(\\n address sender,\\n uint32 toChain,\\n address holographableContract,\\n bytes calldata bridgeOutPayload\\n ) external returns (string memory revertReason);\\n\\n /**\\n * @notice Get the payload created by the bridgeOutRequest function\\n * @dev Use this function to get the payload that will be generated by a bridgeOutRequest\\n * Only use this with a static call\\n * @param toChain Holograph Chain ID where the beam is being sent to\\n * @param holographableContract address of the contract for which the bridge request is being made\\n * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain\\n * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain\\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\\n * @return samplePayload bytes made up of the bridgeOutRequest payload\\n */\\n function getBridgeOutRequestPayload(\\n uint32 toChain,\\n address holographableContract,\\n uint256 gasLimit,\\n uint256 gasPrice,\\n bytes calldata bridgeOutPayload\\n ) external returns (bytes memory samplePayload);\\n\\n /**\\n * @notice Get the fees associated with sending specific payload\\n * @dev Will provide exact costs on protocol and message side, combine the two to get total\\n * @param toChain holograph chain id of destination chain for payload\\n * @param gasLimit amount of gas to provide for executing payload on destination chain\\n * @param gasPrice maximum amount to pay for gas price, can be set to 0 and will be chose automatically\\n * @param crossChainPayload the entire packet being sent cross-chain\\n * @return hlgFee the amount (in wei) of native gas token that will cost for finalizing job on destiantion chain\\n * @return msgFee the amount (in wei) of native gas token that will cost for sending message to destiantion chain\\n * @return dstGasPrice the amount (in wei) that destination message maximum gas price will be\\n */\\n function getMessageFee(\\n uint32 toChain,\\n uint256 gasLimit,\\n uint256 gasPrice,\\n bytes calldata crossChainPayload\\n )\\n external\\n view\\n returns (\\n uint256 hlgFee,\\n uint256 msgFee,\\n uint256 dstGasPrice\\n );\\n\\n /**\\n * @notice Get the address of the Holograph Factory module\\n * @dev Used for deploying holographable smart contracts\\n */\\n function getFactory() external view returns (address factory);\\n\\n /**\\n * @notice Update the Holograph Factory module address\\n * @param factory address of the Holograph Factory smart contract to use\\n */\\n function setFactory(address factory) external;\\n\\n /**\\n * @notice Get the Holograph Protocol contract\\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\\n */\\n function getHolograph() external view returns (address holograph);\\n\\n /**\\n * @notice Update the Holograph Protocol contract address\\n * @param holograph address of the Holograph Protocol smart contract to use\\n */\\n function setHolograph(address holograph) external;\\n\\n /**\\n * @notice Get the latest job nonce\\n * @dev You can use the job nonce as a way to calculate total amount of bridge requests that have been made\\n */\\n function getJobNonce() external view returns (uint256 jobNonce);\\n\\n /**\\n * @notice Get the address of the Holograph Operator module\\n * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module\\n */\\n function getOperator() external view returns (address operator);\\n\\n /**\\n * @notice Update the Holograph Operator module address\\n * @param operator address of the Holograph Operator smart contract to use\\n */\\n function setOperator(address operator) external;\\n\\n /**\\n * @notice Get the Holograph Registry module\\n * @dev This module stores a reference for all deployed holographable smart contracts\\n */\\n function getRegistry() external view returns (address registry);\\n\\n /**\\n * @notice Update the Holograph Registry module address\\n * @param registry address of the Holograph Registry smart contract to use\\n */\\n function setRegistry(address registry) external;\\n}\\n\",\"keccak256\":\"0xa8e2efb427f7114bc2cd43d3cefd1e6be3ef10f7dce6b8acb6de66e50668824e\",\"license\":\"UNLICENSED\"},\"contracts/interface/HolographFactoryInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nimport \\\"../struct/DeploymentConfig.sol\\\";\\nimport \\\"../struct/Verification.sol\\\";\\n\\n/**\\n * @title Holograph Factory\\n * @author https://github.com/holographxyz\\n * @notice Deploy holographable contracts\\n * @dev The contract provides methods that allow for the creation of Holograph Protocol compliant smart contracts, that are capable of minting holographable assets\\n */\\ninterface HolographFactoryInterface {\\n /**\\n * @dev This event is fired every time that a bridgeable contract is deployed.\\n */\\n event BridgeableContractDeployed(address indexed contractAddress, bytes32 indexed hash);\\n\\n /**\\n * @notice Deploy a holographable smart contract\\n * @dev Using this function allows to deploy smart contracts that have the same address across all EVM chains\\n * @param config contract deployement configurations\\n * @param signature that was created by the wallet that created the original payload\\n * @param signer address of wallet that created the payload\\n */\\n function deployHolographableContract(\\n DeploymentConfig memory config,\\n Verification memory signature,\\n address signer\\n ) external;\\n\\n /**\\n * @notice Get the Holograph Protocol contract\\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\\n */\\n function getHolograph() external view returns (address holograph);\\n\\n /**\\n * @notice Update the Holograph Protocol contract address\\n * @param holograph address of the Holograph Protocol smart contract to use\\n */\\n function setHolograph(address holograph) external;\\n\\n /**\\n * @notice Get the Holograph Registry module\\n * @dev This module stores a reference for all deployed holographable smart contracts\\n */\\n function getRegistry() external view returns (address registry);\\n\\n /**\\n * @notice Update the Holograph Registry module address\\n * @param registry address of the Holograph Registry smart contract to use\\n */\\n function setRegistry(address registry) external;\\n}\\n\",\"keccak256\":\"0x44cd1db20207337ef6abde2d0f42837778d13fb62fe353b0ee9b293a601a0d71\",\"license\":\"UNLICENSED\"},\"contracts/interface/HolographInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\n/**\\n * @title Holograph Protocol\\n * @author https://github.com/holographxyz\\n * @notice This is the primary Holograph Protocol smart contract\\n * @dev This contract stores a reference to all the primary modules and variables of the protocol\\n */\\ninterface HolographInterface {\\n /**\\n * @notice Get the address of the Holograph Bridge module\\n * @dev Used for beaming holographable assets cross-chain\\n */\\n function getBridge() external view returns (address bridge);\\n\\n /**\\n * @notice Update the Holograph Bridge module address\\n * @param bridge address of the Holograph Bridge smart contract to use\\n */\\n function setBridge(address bridge) external;\\n\\n /**\\n * @notice Get the chain ID that the Protocol was deployed on\\n * @dev Useful for checking if/when a hard fork occurs\\n */\\n function getChainId() external view returns (uint256 chainId);\\n\\n /**\\n * @notice Update the chain ID\\n * @dev Useful for updating once a hard fork has been mitigated\\n * @param chainId EVM chain ID to use\\n */\\n function setChainId(uint256 chainId) external;\\n\\n /**\\n * @notice Get the address of the Holograph Factory module\\n * @dev Used for deploying holographable smart contracts\\n */\\n function getFactory() external view returns (address factory);\\n\\n /**\\n * @notice Update the Holograph Factory module address\\n * @param factory address of the Holograph Factory smart contract to use\\n */\\n function setFactory(address factory) external;\\n\\n /**\\n * @notice Get the Holograph chain Id\\n * @dev Holograph uses an internal chain id mapping\\n */\\n function getHolographChainId() external view returns (uint32 holographChainId);\\n\\n /**\\n * @notice Update the Holograph chain ID\\n * @dev Useful for updating once a hard fork was mitigated\\n * @param holographChainId Holograph chain ID to use\\n */\\n function setHolographChainId(uint32 holographChainId) external;\\n\\n /**\\n * @notice Get the address of the Holograph Interfaces module\\n * @dev Holograph uses this contract to store data that needs to be accessed by a large portion of the modules\\n */\\n function getInterfaces() external view returns (address interfaces);\\n\\n /**\\n * @notice Update the Holograph Interfaces module address\\n * @param interfaces address of the Holograph Interfaces smart contract to use\\n */\\n function setInterfaces(address interfaces) external;\\n\\n /**\\n * @notice Get the address of the Holograph Operator module\\n * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module\\n */\\n function getOperator() external view returns (address operator);\\n\\n /**\\n * @notice Update the Holograph Operator module address\\n * @param operator address of the Holograph Operator smart contract to use\\n */\\n function setOperator(address operator) external;\\n\\n /**\\n * @notice Get the Holograph Registry module\\n * @dev This module stores a reference for all deployed holographable smart contracts\\n */\\n function getRegistry() external view returns (address registry);\\n\\n /**\\n * @notice Update the Holograph Registry module address\\n * @param registry address of the Holograph Registry smart contract to use\\n */\\n function setRegistry(address registry) external;\\n\\n /**\\n * @notice Get the Holograph Treasury module\\n * @dev All of the Holograph Protocol assets are stored and managed by this module\\n */\\n function getTreasury() external view returns (address treasury);\\n\\n /**\\n * @notice Update the Holograph Treasury module address\\n * @param treasury address of the Holograph Treasury smart contract to use\\n */\\n function setTreasury(address treasury) external;\\n\\n /**\\n * @notice Get the Holograph Utility Token address\\n * @dev This is the official utility token of the Holograph Protocol\\n */\\n function getUtilityToken() external view returns (address utilityToken);\\n\\n /**\\n * @notice Update the Holograph Utility Token address\\n * @param utilityToken address of the Holograph Utility Token smart contract to use\\n */\\n function setUtilityToken(address utilityToken) external;\\n}\\n\",\"keccak256\":\"0x90b5643e77e914393c508d59b80f5739debfd72455029c0db041f92374b3f586\",\"license\":\"UNLICENSED\"},\"contracts/interface/HolographRegistryInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\ninterface HolographRegistryInterface {\\n function isHolographedContract(address smartContract) external view returns (bool);\\n\\n function isHolographedHashDeployed(bytes32 hash) external view returns (bool);\\n\\n function referenceContractTypeAddress(address contractAddress) external returns (bytes32);\\n\\n function getContractTypeAddress(bytes32 contractType) external view returns (address);\\n\\n function setContractTypeAddress(bytes32 contractType, address contractAddress) external;\\n\\n function getHolograph() external view returns (address holograph);\\n\\n function setHolograph(address holograph) external;\\n\\n function getHolographableContracts(uint256 index, uint256 length) external view returns (address[] memory contracts);\\n\\n function getHolographableContractsLength() external view returns (uint256);\\n\\n function getHolographedHashAddress(bytes32 hash) external view returns (address);\\n\\n function setHolographedHashAddress(bytes32 hash, address contractAddress) external;\\n\\n function getHToken(uint32 chainId) external view returns (address);\\n\\n function setHToken(uint32 chainId, address hToken) external;\\n\\n function getReservedContractTypeAddress(bytes32 contractType) external view returns (address contractTypeAddress);\\n\\n function setReservedContractTypeAddress(bytes32 hash, bool reserved) external;\\n\\n function setReservedContractTypeAddresses(bytes32[] calldata hashes, bool[] calldata reserved) external;\\n\\n function getUtilityToken() external view returns (address utilityToken);\\n\\n function setUtilityToken(address utilityToken) external;\\n}\\n\",\"keccak256\":\"0xaf69834caeee449c3d3d7c7da9bbd27368b448526d9b147482a319311288ad18\",\"license\":\"UNLICENSED\"},\"contracts/interface/Holographable.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\ninterface Holographable {\\n function bridgeIn(uint32 fromChain, bytes calldata payload) external returns (bytes4);\\n\\n function bridgeOut(\\n uint32 toChain,\\n address sender,\\n bytes calldata payload\\n ) external returns (bytes4 selector, bytes memory data);\\n}\\n\",\"keccak256\":\"0x4dd2fc1af269273c46156df8af5cedeed0dfb83f0bfa5696a8d64c768449285b\",\"license\":\"UNLICENSED\"},\"contracts/interface/HolographerInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\ninterface HolographerInterface {\\n function getContractType() external view returns (bytes32 contractType);\\n\\n function getDeploymentBlock() external view returns (uint256 deploymentBlock);\\n\\n function getHolograph() external view returns (address holograph);\\n\\n function getHolographEnforcer() external view returns (address);\\n\\n function getOriginChain() external view returns (uint32 originChain);\\n\\n function getSourceContract() external view returns (address sourceContract);\\n}\\n\",\"keccak256\":\"0x4274b9180266275a8df16b8e1f0956cc795fb1ab87db1c01264c343be3bea937\",\"license\":\"UNLICENSED\"},\"contracts/interface/InitializableInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\n/**\\n * @title Initializable\\n * @author https://github.com/holographxyz\\n * @notice Use init instead of constructor\\n * @dev This allows for use of init function to make one time initializations without the need of a constructor\\n */\\ninterface InitializableInterface {\\n /**\\n * @notice Used internally to initialize the contract instead of through a constructor\\n * @dev This function is called by the deployer/factory when creating a contract\\n * @param initPayload abi encoded payload to use for contract initilaization\\n */\\n function init(bytes memory initPayload) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0x0a76fae986c5c18110ce2b1818c84ec28b7bf7f8fb00d20b39b8d7225fbd892d\",\"license\":\"UNLICENSED\"},\"contracts/struct/BridgeSettings.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nstruct BridgeSettings {\\n uint256 value;\\n uint256 gasLimit;\\n uint256 gasPrice;\\n uint32 toChain;\\n}\\n\",\"keccak256\":\"0x405f453cf620c5e882cf6d915fd7d14c895877408a7fd7e298d6e751bd4a0ce1\",\"license\":\"UNLICENSED\"},\"contracts/struct/DeploymentConfig.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nstruct DeploymentConfig {\\n bytes32 contractType;\\n uint32 chainType;\\n bytes32 salt;\\n bytes byteCode;\\n bytes initCode;\\n}\\n\",\"keccak256\":\"0x5eb9e83676eb65fa424aa9ca79961e1602a749f264ea4f496a9c359dad0da726\",\"license\":\"UNLICENSED\"},\"contracts/struct/Verification.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nstruct Verification {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n}\\n\",\"keccak256\":\"0xd351869472bcb2497e0a771c6e7f7a0b794d099133c67f5f378a8f7839f9db92\",\"license\":\"UNLICENSED\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50612b68806100206000396000f3fe6080604052600436106100d65760003560e01c8063704b6c021161007f578063b7e0366111610059578063b7e036611461028d578063bf64a82d146102bb578063df6516bd146102ce578063f851a440146102ee57600080fd5b8063704b6c021461023a578063a8935c671461025a578063a91ee0dc1461026d57600080fd5b80634ddf47d4116100b05780634ddf47d4146101b25780635ab1bd53146101d25780636e9960c31461020657600080fd5b806308a1eb20146100e557806325d5cac81461013b5780634827ae0c1461015d57600080fd5b366100e057600080fd5b600080fd5b3480156100f157600080fd5b50610105610100366004611375565b610303565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020015b60405180910390f35b34801561014757600080fd5b5061015b6101563660046113ed565b6103ba565b005b34801561016957600080fd5b507fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a545b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610132565b3480156101be57600080fd5b506101056101cd36600461153f565b610499565b3480156101de57600080fd5b507fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e75461018d565b34801561021257600080fd5b507f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95461018d565b34801561024657600080fd5b5061015b6102553660046113ed565b610600565b61015b610268366004611697565b6106da565b34801561027957600080fd5b5061015b6102883660046113ed565b6108c1565b34801561029957600080fd5b506102ad6102a83660046117de565b61099b565b6040516101329291906118ac565b61015b6102c93660046118e7565b6109ef565b3480156102da57600080fd5b5061015b6102e9366004611907565b610aca565b3480156102fa57600080fd5b5061018d611015565b600080808061031485870187611907565b6040517fdf6516bd0000000000000000000000000000000000000000000000000000000081529295509093509150309063df6516bd9061035c9086908690869060040161196a565b600060405180830381600087803b15801561037657600080fd5b505af115801561038a573d6000803e3d6000fd5b507f08a1eb20000000000000000000000000000000000000000000000000000000009a9950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610475576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064015b60405180910390fd5b7fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55565b60006104c37f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a015490565b1561052a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a20616c726561647920696e697469616c697a65640000604482015260640161046c565b600080838060200190518101906105419190611a2c565b91509150327f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955817fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55807fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7556105d760017f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a0155565b507f4ddf47d4000000000000000000000000000000000000000000000000000000009392505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955565b81156106eb576106eb858585610aca565b60008585856040516020016107029392919061196a565b604051602081830303815290604052905060007fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a54905060008173ffffffffffffffffffffffffffffffffffffffff16630fffbaf36040518163ffffffff1660e01b8152600401602060405180830381865afa158015610786573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107aa9190611a66565b845190915060005b818110156108b5578273ffffffffffffffffffffffffffffffffffffffff1663e55856668783815181106107e8576107e8611a83565b60200260200101516000015188848151811061080657610806611a83565b602002602001015160600151308a868151811061082557610825611a83565b6020026020010151602001518b878151811061084357610843611a83565b6020026020010151604001518b6040518763ffffffff1660e01b8152600401610870959493929190611ab2565b6000604051808303818588803b15801561088957600080fd5b505af115801561089d573d6000803e3d6000fd5b505050505080806108ad90611b33565b9150506107b2565b50505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610977576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b7fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e755565b6000606063b7e0366160e01b848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250959c929b50919950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aa5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b808260003760008082600034875af13d6000803e808015610ac5573d6000f35b3d6000fd5b7fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a547fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e754845160208087015160408089015160608a015180519085012060808b01518051908601209251969796600096610bb796909594918b910195865260e09490941b7fffffffff0000000000000000000000000000000000000000000000000000000016602086015260248501929092526044840152606483015260601b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016608482015260980190565b604051602081830303815290604052805190602001209050610be88560000151866020015187604001518488611044565b610c4e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f484f4c4f47524150483a20696e76616c6964207369676e617475726500000000604482015260640161046c565b600060405180602001610c6090611306565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820381018352601f90910116604081815282516020808501919091207fff00000000000000000000000000000000000000000000000000000000000000828501527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b166021850152603584018790526055808501919091528251808503909101815260759093019091528151910120909150610d21816112cc565b15610d88576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f484f4c4f47524150483a20616c7265616479206465706c6f7965640000000000604482015260640161046c565b60608801518051849160009183906020830184f59150828551602087016000f560208c8101518d516040805163ffffffff9093169383019390935273ffffffffffffffffffffffffffffffffffffffff8b811693830193909352606082015284821660808201529195507f4ddf47d4000000000000000000000000000000000000000000000000000000009190861690634ddf47d49060a0016040516020818303038152906040528e60800151604051602001610e46929190611b6b565b6040516020818303038152906040526040518263ffffffff1660e01b8152600401610e719190611b90565b6020604051808303816000875af1158015610e90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eb49190611ba3565b7fffffffff000000000000000000000000000000000000000000000000000000001614610f3d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f696e697469616c697a6174696f6e206661696c65640000000000000000000000604482015260640161046c565b6040517f725229f60000000000000000000000000000000000000000000000000000000081526004810187905273ffffffffffffffffffffffffffffffffffffffff858116602483015289169063725229f690604401600060405180830381600087803b158015610fad57600080fd5b505af1158015610fc1573d6000803e3d6000fd5b505060405188925073ffffffffffffffffffffffffffffffffffffffff871691507fa802207d4c618b40db3b25b7b90e6f483e16b2c1f8d3610b15b345a718c6b41b90600090a35050505050505050505050565b600061103f7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95490565b905090565b6000601b8460ff1610156110605761105d601b85611be5565b93505b8360ff16601b1415801561107857508360ff16601c14155b15611085575060006112c3565b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0851115611122576110d7857ffffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141611c0a565b945060ff8416601b036110ed57601c93506110f2565b601b93505b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0851115611122575060006112c3565b73ffffffffffffffffffffffffffffffffffffffff8216158015906112c057506040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c810184905273ffffffffffffffffffffffffffffffffffffffff831690600190605c01604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600084529083018083525260ff881690820152606081018990526080810188905260a0016020604051602081039080840390855afa15801561120c573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff1614806112c0575060408051600081526020810180835285905260ff861691810191909152606081018790526080810186905273ffffffffffffffffffffffffffffffffffffffff83169060019060a0016020604051602081039080840390855afa15801561129e573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff16145b90505b95945050505050565b6000813f80158015906112ff57507fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708114155b9392505050565b610f3a80611c2283390190565b803563ffffffff8116811461132757600080fd5b919050565b60008083601f84011261133e57600080fd5b50813567ffffffffffffffff81111561135657600080fd5b60208301915083602082850101111561136e57600080fd5b9250929050565b60008060006040848603121561138a57600080fd5b61139384611313565b9250602084013567ffffffffffffffff8111156113af57600080fd5b6113bb8682870161132c565b9497909650939450505050565b73ffffffffffffffffffffffffffffffffffffffff811681146113ea57600080fd5b50565b6000602082840312156113ff57600080fd5b81356112ff816113c8565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516080810167ffffffffffffffff8111828210171561145c5761145c61140a565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156114a9576114a961140a565b604052919050565b600082601f8301126114c257600080fd5b813567ffffffffffffffff8111156114dc576114dc61140a565b61150d60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601611462565b81815284602083860101111561152257600080fd5b816020850160208301376000918101602001919091529392505050565b60006020828403121561155157600080fd5b813567ffffffffffffffff81111561156857600080fd5b611574848285016114b1565b949350505050565b600060a0828403121561158e57600080fd5b60405160a0810167ffffffffffffffff82821081831117156115b2576115b261140a565b81604052829350843583526115c960208601611313565b60208401526040850135604084015260608501359150808211156115ec57600080fd5b6115f8868387016114b1565b6060840152608085013591508082111561161157600080fd5b5061161e858286016114b1565b6080830152505092915050565b60006060828403121561163d57600080fd5b6040516060810181811067ffffffffffffffff821117156116605761166061140a565b80604052508091508235815260208301356020820152604083013560ff8116811461168a57600080fd5b6040919091015292915050565b600080600080600060e086880312156116af57600080fd5b853567ffffffffffffffff808211156116c757600080fd5b6116d389838a0161157c565b9650602091506116e589838a0161162b565b95506080808901356116f6816113c8565b955060a0890135801515811461170b57600080fd5b945060c08901358281111561171f57600080fd5b8901601f81018b1361173057600080fd5b8035838111156117425761174261140a565b611750858260051b01611462565b818152858101945060079190911b82018501908c82111561177057600080fd5b918501915b818310156117cb5783838e03121561178d5760008081fd5b611795611439565b8335815286840135878201526040808501359082015260606117b8818601611313565b9082015285529385019391830191611775565b8096505050505050509295509295909350565b600080600080606085870312156117f457600080fd5b6117fd85611313565b9350602085013561180d816113c8565b9250604085013567ffffffffffffffff81111561182957600080fd5b6118358782880161132c565b95989497509550505050565b6000815180845260005b818110156118675760208185018101518683018201520161184b565b81811115611879576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b7fffffffff00000000000000000000000000000000000000000000000000000000831681526040602082015260006115746040830184611841565b6000806000604084860312156118fc57600080fd5b8335611393816113c8565b600080600060a0848603121561191c57600080fd5b833567ffffffffffffffff81111561193357600080fd5b61193f8682870161157c565b93505061194f856020860161162b565b9150608084013561195f816113c8565b809150509250925092565b60a08152835160a082015263ffffffff60208501511660c0820152604084015160e08201526000606085015160a06101008401526119ac610140840182611841565b905060808601517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60848303016101208501526119e88282611841565b92505050835160208301526020840151604083015260ff6040850151166060830152611574608083018473ffffffffffffffffffffffffffffffffffffffff169052565b60008060408385031215611a3f57600080fd5b8251611a4a816113c8565b6020840151909250611a5b816113c8565b809150509250929050565b600060208284031215611a7857600080fd5b81516112ff816113c8565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b63ffffffff8616815273ffffffffffffffffffffffffffffffffffffffff8516602082015283604082015282606082015260a060808201526000611af960a0830184611841565b979650505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611b6457611b64611b04565b5060010190565b604081526000611b7e6040830185611841565b82810360208401526112c38185611841565b6020815260006112ff6020830184611841565b600060208284031215611bb557600080fd5b81517fffffffff00000000000000000000000000000000000000000000000000000000811681146112ff57600080fd5b600060ff821660ff84168060ff03821115611c0257611c02611b04565b019392505050565b600082821015611c1c57611c1c611b04565b50039056fe608060405234801561001057600080fd5b50610f1a806100206000396000f3fe6080604052600436106100c05760003560e01c806380d1cb3511610074578063c51a29e01161004e578063c51a29e0146102c1578063c8a4c3d5146102f5578063f851a4401461030a576100c7565b806380d1cb351461022c578063913a0ef21461026a578063bf64a82d146102ae576100c7565b80636e9960c3116100a55780636e9960c3146101a45780636faf275b146101d8578063704b6c021461020c576100c7565b80634827ae0c146100f95780634ddf47d414610153576100c7565b366100c757005b60006100d161031f565b90503660008037600080366000845af43d6000803e8080156100f2573d6000f35b3d6000fd5b005b34801561010557600080fd5b507fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a545b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b34801561015f57600080fd5b5061017361016e366004610bb4565b61045d565b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200161014a565b3480156101b057600080fd5b507f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c954610129565b3480156101e457600080fd5b507f27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b07454610129565b34801561021857600080fd5b506100f7610227366004610c59565b610911565b34801561023857600080fd5b507f9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de3545b60405190815260200161014a565b34801561027657600080fd5b507fd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d5460405163ffffffff909116815260200161014a565b6100f76102bc366004610c7d565b6109eb565b3480156102cd57600080fd5b507f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c75461025c565b34801561030157600080fd5b5061012961031f565b34801561031657600080fd5b50610129610ac1565b60008060007fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a5491507f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c75490508173ffffffffffffffffffffffffffffffffffffffff16635ab1bd536040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103db9190610d02565b73ffffffffffffffffffffffffffffffffffffffff166374b7510c826040518263ffffffff1660e01b815260040161041591815260200190565b602060405180830381865afa158015610432573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104569190610d02565b9250505090565b60006104877f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a015490565b156104f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f484f4c4f475241504845523a20616c726561647920696e697469616c697a656460448201526064015b60405180910390fd5b6000808380602001905181019061050a9190610d9c565b91509150600080600080858060200190518101906105289190610e00565b9350935093509350337f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955437f9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de355817f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c755827fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55837fd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d55807f27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b074556000808473ffffffffffffffffffffffffffffffffffffffff16635ab1bd536040518163ffffffff1660e01b8152600401602060405180830381865afa158015610650573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106749190610d02565b73ffffffffffffffffffffffffffffffffffffffff166374b7510c856040518263ffffffff1660e01b81526004016106ae91815260200190565b602060405180830381865afa1580156106cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ef9190610d02565b73ffffffffffffffffffffffffffffffffffffffff16634ddf47d460e01b8860405160240161071e9190610e5e565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009094169390931790925290516107a79190610eaf565b600060405180830381855af49150503d80600081146107e2576040519150601f19603f3d011682016040523d82523d6000602084013e6107e7565b606091505b50915091506000818060200190518101906108029190610ecb565b905082801561085257507fffffffff0000000000000000000000000000000000000000000000000000000081167f4ddf47d400000000000000000000000000000000000000000000000000000000145b6108b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f484f4c4f47524150483a20696e697469616c697a6174696f6e206661696c656460448201526064016104ea565b6108e160017f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a0155565b507f4ddf47d4000000000000000000000000000000000000000000000000000000009a9950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016104ea565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aa1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016104ea565b808260003760008082600034875af13d6000803e8080156100f2573d6000f35b6000610aeb7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95490565b905090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715610b6657610b66610af0565b604052919050565b600067ffffffffffffffff821115610b8857610b88610af0565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600060208284031215610bc657600080fd5b813567ffffffffffffffff811115610bdd57600080fd5b8201601f81018413610bee57600080fd5b8035610c01610bfc82610b6e565b610b1f565b818152856020838501011115610c1657600080fd5b81602084016020830137600091810160200191909152949350505050565b73ffffffffffffffffffffffffffffffffffffffff81168114610c5657600080fd5b50565b600060208284031215610c6b57600080fd5b8135610c7681610c34565b9392505050565b600080600060408486031215610c9257600080fd5b8335610c9d81610c34565b9250602084013567ffffffffffffffff80821115610cba57600080fd5b818601915086601f830112610cce57600080fd5b813581811115610cdd57600080fd5b876020828501011115610cef57600080fd5b6020830194508093505050509250925092565b600060208284031215610d1457600080fd5b8151610c7681610c34565b60005b83811015610d3a578181015183820152602001610d22565b83811115610d49576000848401525b50505050565b600082601f830112610d6057600080fd5b8151610d6e610bfc82610b6e565b818152846020838601011115610d8357600080fd5b610d94826020830160208701610d1f565b949350505050565b60008060408385031215610daf57600080fd5b825167ffffffffffffffff80821115610dc757600080fd5b610dd386838701610d4f565b93506020850151915080821115610de957600080fd5b50610df685828601610d4f565b9150509250929050565b60008060008060808587031215610e1657600080fd5b845163ffffffff81168114610e2a57600080fd5b6020860151909450610e3b81610c34565b604086015160608701519194509250610e5381610c34565b939692955090935050565b6020815260008251806020840152610e7d816040850160208701610d1f565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60008251610ec1818460208701610d1f565b9190910192915050565b600060208284031215610edd57600080fd5b81517fffffffff0000000000000000000000000000000000000000000000000000000081168114610c7657600080fdfea164736f6c634300080d000aa164736f6c634300080d000a", - "deployedBytecode": "0x6080604052600436106100d65760003560e01c8063704b6c021161007f578063b7e0366111610059578063b7e036611461028d578063bf64a82d146102bb578063df6516bd146102ce578063f851a440146102ee57600080fd5b8063704b6c021461023a578063a8935c671461025a578063a91ee0dc1461026d57600080fd5b80634ddf47d4116100b05780634ddf47d4146101b25780635ab1bd53146101d25780636e9960c31461020657600080fd5b806308a1eb20146100e557806325d5cac81461013b5780634827ae0c1461015d57600080fd5b366100e057600080fd5b600080fd5b3480156100f157600080fd5b50610105610100366004611375565b610303565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020015b60405180910390f35b34801561014757600080fd5b5061015b6101563660046113ed565b6103ba565b005b34801561016957600080fd5b507fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a545b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610132565b3480156101be57600080fd5b506101056101cd36600461153f565b610499565b3480156101de57600080fd5b507fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e75461018d565b34801561021257600080fd5b507f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95461018d565b34801561024657600080fd5b5061015b6102553660046113ed565b610600565b61015b610268366004611697565b6106da565b34801561027957600080fd5b5061015b6102883660046113ed565b6108c1565b34801561029957600080fd5b506102ad6102a83660046117de565b61099b565b6040516101329291906118ac565b61015b6102c93660046118e7565b6109ef565b3480156102da57600080fd5b5061015b6102e9366004611907565b610aca565b3480156102fa57600080fd5b5061018d611015565b600080808061031485870187611907565b6040517fdf6516bd0000000000000000000000000000000000000000000000000000000081529295509093509150309063df6516bd9061035c9086908690869060040161196a565b600060405180830381600087803b15801561037657600080fd5b505af115801561038a573d6000803e3d6000fd5b507f08a1eb20000000000000000000000000000000000000000000000000000000009a9950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610475576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064015b60405180910390fd5b7fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55565b60006104c37f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a015490565b1561052a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a20616c726561647920696e697469616c697a65640000604482015260640161046c565b600080838060200190518101906105419190611a2c565b91509150327f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955817fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55807fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7556105d760017f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a0155565b507f4ddf47d4000000000000000000000000000000000000000000000000000000009392505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955565b81156106eb576106eb858585610aca565b60008585856040516020016107029392919061196a565b604051602081830303815290604052905060007fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a54905060008173ffffffffffffffffffffffffffffffffffffffff16630fffbaf36040518163ffffffff1660e01b8152600401602060405180830381865afa158015610786573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107aa9190611a66565b845190915060005b818110156108b5578273ffffffffffffffffffffffffffffffffffffffff1663e55856668783815181106107e8576107e8611a83565b60200260200101516000015188848151811061080657610806611a83565b602002602001015160600151308a868151811061082557610825611a83565b6020026020010151602001518b878151811061084357610843611a83565b6020026020010151604001518b6040518763ffffffff1660e01b8152600401610870959493929190611ab2565b6000604051808303818588803b15801561088957600080fd5b505af115801561089d573d6000803e3d6000fd5b505050505080806108ad90611b33565b9150506107b2565b50505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610977576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b7fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e755565b6000606063b7e0366160e01b848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250959c929b50919950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aa5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b808260003760008082600034875af13d6000803e808015610ac5573d6000f35b3d6000fd5b7fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a547fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e754845160208087015160408089015160608a015180519085012060808b01518051908601209251969796600096610bb796909594918b910195865260e09490941b7fffffffff0000000000000000000000000000000000000000000000000000000016602086015260248501929092526044840152606483015260601b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016608482015260980190565b604051602081830303815290604052805190602001209050610be88560000151866020015187604001518488611044565b610c4e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f484f4c4f47524150483a20696e76616c6964207369676e617475726500000000604482015260640161046c565b600060405180602001610c6090611306565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820381018352601f90910116604081815282516020808501919091207fff00000000000000000000000000000000000000000000000000000000000000828501527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b166021850152603584018790526055808501919091528251808503909101815260759093019091528151910120909150610d21816112cc565b15610d88576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f484f4c4f47524150483a20616c7265616479206465706c6f7965640000000000604482015260640161046c565b60608801518051849160009183906020830184f59150828551602087016000f560208c8101518d516040805163ffffffff9093169383019390935273ffffffffffffffffffffffffffffffffffffffff8b811693830193909352606082015284821660808201529195507f4ddf47d4000000000000000000000000000000000000000000000000000000009190861690634ddf47d49060a0016040516020818303038152906040528e60800151604051602001610e46929190611b6b565b6040516020818303038152906040526040518263ffffffff1660e01b8152600401610e719190611b90565b6020604051808303816000875af1158015610e90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eb49190611ba3565b7fffffffff000000000000000000000000000000000000000000000000000000001614610f3d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f696e697469616c697a6174696f6e206661696c65640000000000000000000000604482015260640161046c565b6040517f725229f60000000000000000000000000000000000000000000000000000000081526004810187905273ffffffffffffffffffffffffffffffffffffffff858116602483015289169063725229f690604401600060405180830381600087803b158015610fad57600080fd5b505af1158015610fc1573d6000803e3d6000fd5b505060405188925073ffffffffffffffffffffffffffffffffffffffff871691507fa802207d4c618b40db3b25b7b90e6f483e16b2c1f8d3610b15b345a718c6b41b90600090a35050505050505050505050565b600061103f7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95490565b905090565b6000601b8460ff1610156110605761105d601b85611be5565b93505b8360ff16601b1415801561107857508360ff16601c14155b15611085575060006112c3565b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0851115611122576110d7857ffffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141611c0a565b945060ff8416601b036110ed57601c93506110f2565b601b93505b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0851115611122575060006112c3565b73ffffffffffffffffffffffffffffffffffffffff8216158015906112c057506040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c810184905273ffffffffffffffffffffffffffffffffffffffff831690600190605c01604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600084529083018083525260ff881690820152606081018990526080810188905260a0016020604051602081039080840390855afa15801561120c573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff1614806112c0575060408051600081526020810180835285905260ff861691810191909152606081018790526080810186905273ffffffffffffffffffffffffffffffffffffffff83169060019060a0016020604051602081039080840390855afa15801561129e573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff16145b90505b95945050505050565b6000813f80158015906112ff57507fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708114155b9392505050565b610f3a80611c2283390190565b803563ffffffff8116811461132757600080fd5b919050565b60008083601f84011261133e57600080fd5b50813567ffffffffffffffff81111561135657600080fd5b60208301915083602082850101111561136e57600080fd5b9250929050565b60008060006040848603121561138a57600080fd5b61139384611313565b9250602084013567ffffffffffffffff8111156113af57600080fd5b6113bb8682870161132c565b9497909650939450505050565b73ffffffffffffffffffffffffffffffffffffffff811681146113ea57600080fd5b50565b6000602082840312156113ff57600080fd5b81356112ff816113c8565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516080810167ffffffffffffffff8111828210171561145c5761145c61140a565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156114a9576114a961140a565b604052919050565b600082601f8301126114c257600080fd5b813567ffffffffffffffff8111156114dc576114dc61140a565b61150d60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601611462565b81815284602083860101111561152257600080fd5b816020850160208301376000918101602001919091529392505050565b60006020828403121561155157600080fd5b813567ffffffffffffffff81111561156857600080fd5b611574848285016114b1565b949350505050565b600060a0828403121561158e57600080fd5b60405160a0810167ffffffffffffffff82821081831117156115b2576115b261140a565b81604052829350843583526115c960208601611313565b60208401526040850135604084015260608501359150808211156115ec57600080fd5b6115f8868387016114b1565b6060840152608085013591508082111561161157600080fd5b5061161e858286016114b1565b6080830152505092915050565b60006060828403121561163d57600080fd5b6040516060810181811067ffffffffffffffff821117156116605761166061140a565b80604052508091508235815260208301356020820152604083013560ff8116811461168a57600080fd5b6040919091015292915050565b600080600080600060e086880312156116af57600080fd5b853567ffffffffffffffff808211156116c757600080fd5b6116d389838a0161157c565b9650602091506116e589838a0161162b565b95506080808901356116f6816113c8565b955060a0890135801515811461170b57600080fd5b945060c08901358281111561171f57600080fd5b8901601f81018b1361173057600080fd5b8035838111156117425761174261140a565b611750858260051b01611462565b818152858101945060079190911b82018501908c82111561177057600080fd5b918501915b818310156117cb5783838e03121561178d5760008081fd5b611795611439565b8335815286840135878201526040808501359082015260606117b8818601611313565b9082015285529385019391830191611775565b8096505050505050509295509295909350565b600080600080606085870312156117f457600080fd5b6117fd85611313565b9350602085013561180d816113c8565b9250604085013567ffffffffffffffff81111561182957600080fd5b6118358782880161132c565b95989497509550505050565b6000815180845260005b818110156118675760208185018101518683018201520161184b565b81811115611879576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b7fffffffff00000000000000000000000000000000000000000000000000000000831681526040602082015260006115746040830184611841565b6000806000604084860312156118fc57600080fd5b8335611393816113c8565b600080600060a0848603121561191c57600080fd5b833567ffffffffffffffff81111561193357600080fd5b61193f8682870161157c565b93505061194f856020860161162b565b9150608084013561195f816113c8565b809150509250925092565b60a08152835160a082015263ffffffff60208501511660c0820152604084015160e08201526000606085015160a06101008401526119ac610140840182611841565b905060808601517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60848303016101208501526119e88282611841565b92505050835160208301526020840151604083015260ff6040850151166060830152611574608083018473ffffffffffffffffffffffffffffffffffffffff169052565b60008060408385031215611a3f57600080fd5b8251611a4a816113c8565b6020840151909250611a5b816113c8565b809150509250929050565b600060208284031215611a7857600080fd5b81516112ff816113c8565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b63ffffffff8616815273ffffffffffffffffffffffffffffffffffffffff8516602082015283604082015282606082015260a060808201526000611af960a0830184611841565b979650505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611b6457611b64611b04565b5060010190565b604081526000611b7e6040830185611841565b82810360208401526112c38185611841565b6020815260006112ff6020830184611841565b600060208284031215611bb557600080fd5b81517fffffffff00000000000000000000000000000000000000000000000000000000811681146112ff57600080fd5b600060ff821660ff84168060ff03821115611c0257611c02611b04565b019392505050565b600082821015611c1c57611c1c611b04565b50039056fe608060405234801561001057600080fd5b50610f1a806100206000396000f3fe6080604052600436106100c05760003560e01c806380d1cb3511610074578063c51a29e01161004e578063c51a29e0146102c1578063c8a4c3d5146102f5578063f851a4401461030a576100c7565b806380d1cb351461022c578063913a0ef21461026a578063bf64a82d146102ae576100c7565b80636e9960c3116100a55780636e9960c3146101a45780636faf275b146101d8578063704b6c021461020c576100c7565b80634827ae0c146100f95780634ddf47d414610153576100c7565b366100c757005b60006100d161031f565b90503660008037600080366000845af43d6000803e8080156100f2573d6000f35b3d6000fd5b005b34801561010557600080fd5b507fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a545b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b34801561015f57600080fd5b5061017361016e366004610bb4565b61045d565b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200161014a565b3480156101b057600080fd5b507f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c954610129565b3480156101e457600080fd5b507f27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b07454610129565b34801561021857600080fd5b506100f7610227366004610c59565b610911565b34801561023857600080fd5b507f9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de3545b60405190815260200161014a565b34801561027657600080fd5b507fd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d5460405163ffffffff909116815260200161014a565b6100f76102bc366004610c7d565b6109eb565b3480156102cd57600080fd5b507f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c75461025c565b34801561030157600080fd5b5061012961031f565b34801561031657600080fd5b50610129610ac1565b60008060007fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a5491507f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c75490508173ffffffffffffffffffffffffffffffffffffffff16635ab1bd536040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103db9190610d02565b73ffffffffffffffffffffffffffffffffffffffff166374b7510c826040518263ffffffff1660e01b815260040161041591815260200190565b602060405180830381865afa158015610432573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104569190610d02565b9250505090565b60006104877f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a015490565b156104f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f484f4c4f475241504845523a20616c726561647920696e697469616c697a656460448201526064015b60405180910390fd5b6000808380602001905181019061050a9190610d9c565b91509150600080600080858060200190518101906105289190610e00565b9350935093509350337f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955437f9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de355817f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c755827fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55837fd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d55807f27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b074556000808473ffffffffffffffffffffffffffffffffffffffff16635ab1bd536040518163ffffffff1660e01b8152600401602060405180830381865afa158015610650573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106749190610d02565b73ffffffffffffffffffffffffffffffffffffffff166374b7510c856040518263ffffffff1660e01b81526004016106ae91815260200190565b602060405180830381865afa1580156106cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ef9190610d02565b73ffffffffffffffffffffffffffffffffffffffff16634ddf47d460e01b8860405160240161071e9190610e5e565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009094169390931790925290516107a79190610eaf565b600060405180830381855af49150503d80600081146107e2576040519150601f19603f3d011682016040523d82523d6000602084013e6107e7565b606091505b50915091506000818060200190518101906108029190610ecb565b905082801561085257507fffffffff0000000000000000000000000000000000000000000000000000000081167f4ddf47d400000000000000000000000000000000000000000000000000000000145b6108b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f484f4c4f47524150483a20696e697469616c697a6174696f6e206661696c656460448201526064016104ea565b6108e160017f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a0155565b507f4ddf47d4000000000000000000000000000000000000000000000000000000009a9950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016104ea565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aa1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016104ea565b808260003760008082600034875af13d6000803e8080156100f2573d6000f35b6000610aeb7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95490565b905090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715610b6657610b66610af0565b604052919050565b600067ffffffffffffffff821115610b8857610b88610af0565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600060208284031215610bc657600080fd5b813567ffffffffffffffff811115610bdd57600080fd5b8201601f81018413610bee57600080fd5b8035610c01610bfc82610b6e565b610b1f565b818152856020838501011115610c1657600080fd5b81602084016020830137600091810160200191909152949350505050565b73ffffffffffffffffffffffffffffffffffffffff81168114610c5657600080fd5b50565b600060208284031215610c6b57600080fd5b8135610c7681610c34565b9392505050565b600080600060408486031215610c9257600080fd5b8335610c9d81610c34565b9250602084013567ffffffffffffffff80821115610cba57600080fd5b818601915086601f830112610cce57600080fd5b813581811115610cdd57600080fd5b876020828501011115610cef57600080fd5b6020830194508093505050509250925092565b600060208284031215610d1457600080fd5b8151610c7681610c34565b60005b83811015610d3a578181015183820152602001610d22565b83811115610d49576000848401525b50505050565b600082601f830112610d6057600080fd5b8151610d6e610bfc82610b6e565b818152846020838601011115610d8357600080fd5b610d94826020830160208701610d1f565b949350505050565b60008060408385031215610daf57600080fd5b825167ffffffffffffffff80821115610dc757600080fd5b610dd386838701610d4f565b93506020850151915080821115610de957600080fd5b50610df685828601610d4f565b9150509250929050565b60008060008060808587031215610e1657600080fd5b845163ffffffff81168114610e2a57600080fd5b6020860151909450610e3b81610c34565b604086015160608701519194509250610e5381610c34565b939692955090935050565b6020815260008251806020840152610e7d816040850160208701610d1f565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60008251610ec1818460208701610d1f565b9190910192915050565b600060208284031215610edd57600080fd5b81517fffffffff0000000000000000000000000000000000000000000000000000000081168114610c7657600080fdfea164736f6c634300080d000aa164736f6c634300080d000a", + "numDeployments": 5, + "solcInputHash": "c71d96e115e745dd34ef9239c385494d", + "metadata": "{\"compiler\":{\"version\":\"0.8.13+commit.abaa5c0e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"BridgeableContractDeployed\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"adminCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"bridgeIn\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"bridgeOut\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"selector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"contractType\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"chainType\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"salt\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"byteCode\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"initCode\",\"type\":\"bytes\"}],\"internalType\":\"struct DeploymentConfig\",\"name\":\"config\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"}],\"internalType\":\"struct Verification\",\"name\":\"signature\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"}],\"name\":\"deployHolographableContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"contractType\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"chainType\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"salt\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"byteCode\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"initCode\",\"type\":\"bytes\"}],\"internalType\":\"struct DeploymentConfig\",\"name\":\"config\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"}],\"internalType\":\"struct Verification\",\"name\":\"signature\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"deployOnCurrentChain\",\"type\":\"bool\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"toChain\",\"type\":\"uint32\"}],\"internalType\":\"struct BridgeSettings[]\",\"name\":\"bridgeSettings\",\"type\":\"tuple[]\"}],\"name\":\"deployHolographableContractMultiChain\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"adminAddress\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getHolograph\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"holograph\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRegistry\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"registry\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"initPayload\",\"type\":\"bytes\"}],\"name\":\"init\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"adminAddress\",\"type\":\"address\"}],\"name\":\"setAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"holograph\",\"type\":\"address\"}],\"name\":\"setHolograph\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"registry\",\"type\":\"address\"}],\"name\":\"setRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"author\":\"https://github.com/holographxyz\",\"details\":\"The contract provides methods that allow for the creation of Holograph Protocol compliant smart contracts, that are capable of minting holographable assets\",\"kind\":\"dev\",\"methods\":{\"bridgeIn(uint32,bytes)\":{\"details\":\"This function directly forwards the calldata to the deployHolographableContract function It is used to allow for Holograph Bridge to make cross-chain deployments\"},\"bridgeOut(uint32,address,bytes)\":{\"details\":\"This function directly returns the calldata It is used to allow for Holograph Bridge to make cross-chain deployments\"},\"constructor\":{\"details\":\"Constructor is left empty and init is used instead\"},\"deployHolographableContract((bytes32,uint32,bytes32,bytes,bytes),(bytes32,bytes32,uint8),address)\":{\"details\":\"Using this function allows to deploy smart contracts that have the same address across all EVM chains\",\"params\":{\"config\":\"contract deployement configurations\",\"signature\":\"that was created by the wallet that created the original payload\",\"signer\":\"address of wallet that created the payload\"}},\"getHolograph()\":{\"details\":\"Used for storing a reference to all the primary modules and variables of the protocol\"},\"getRegistry()\":{\"details\":\"This module stores a reference for all deployed holographable smart contracts\"},\"init(bytes)\":{\"details\":\"This function is called by the deployer/factory when creating a contract\",\"params\":{\"initPayload\":\"abi encoded payload to use for contract initilaization\"}},\"setHolograph(address)\":{\"params\":{\"holograph\":\"address of the Holograph Protocol smart contract to use\"}},\"setRegistry(address)\":{\"params\":{\"registry\":\"address of the Holograph Registry smart contract to use\"}}},\"stateVariables\":{\"_holographSlot\":{\"details\":\"bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\"},\"_registrySlot\":{\"details\":\"bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\"}},\"title\":\"Holograph Factory\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"bridgeIn(uint32,bytes)\":{\"notice\":\"Deploy holographable contract via bridge request\"},\"bridgeOut(uint32,address,bytes)\":{\"notice\":\"Deploy holographable contract via bridge request\"},\"deployHolographableContract((bytes32,uint32,bytes32,bytes,bytes),(bytes32,bytes32,uint8),address)\":{\"notice\":\"Deploy a holographable smart contract\"},\"getHolograph()\":{\"notice\":\"Get the Holograph Protocol contract\"},\"getRegistry()\":{\"notice\":\"Get the Holograph Registry module\"},\"init(bytes)\":{\"notice\":\"Used internally to initialize the contract instead of through a constructor\"},\"setHolograph(address)\":{\"notice\":\"Update the Holograph Protocol contract address\"},\"setRegistry(address)\":{\"notice\":\"Update the Holograph Registry module address\"}},\"notice\":\"Deploy holographable contracts\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/HolographFactory.sol\":\"HolographFactory\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc721a-upgradeable/=erc721a-upgradeable/\",\":forge-std/=lib/forge-std/src/\"]},\"sources\":{\"contracts/HolographFactory.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nimport \\\"./abstract/Admin.sol\\\";\\nimport \\\"./abstract/Initializable.sol\\\";\\n\\nimport \\\"./enforcer/Holographer.sol\\\";\\n\\nimport \\\"./interface/Holographable.sol\\\";\\nimport \\\"./interface/HolographBridgeInterface.sol\\\";\\nimport \\\"./interface/HolographFactoryInterface.sol\\\";\\nimport \\\"./interface/HolographInterface.sol\\\";\\nimport \\\"./interface/HolographRegistryInterface.sol\\\";\\nimport \\\"./interface/InitializableInterface.sol\\\";\\n\\nimport \\\"./struct/BridgeSettings.sol\\\";\\nimport \\\"./struct/DeploymentConfig.sol\\\";\\nimport \\\"./struct/Verification.sol\\\";\\n\\nimport \\\"./library/Strings.sol\\\";\\n\\n/**\\n * @title Holograph Factory\\n * @author https://github.com/holographxyz\\n * @notice Deploy holographable contracts\\n * @dev The contract provides methods that allow for the creation of Holograph Protocol compliant smart contracts, that are capable of minting holographable assets\\n */\\ncontract HolographFactory is Admin, Initializable, Holographable, HolographFactoryInterface {\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\\n */\\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\\n */\\n bytes32 constant _registrySlot = 0xce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7;\\n\\n /**\\n * @dev Constructor is left empty and init is used instead\\n */\\n constructor() {}\\n\\n /**\\n * @notice Used internally to initialize the contract instead of through a constructor\\n * @dev This function is called by the deployer/factory when creating a contract\\n * @param initPayload abi encoded payload to use for contract initilaization\\n */\\n function init(bytes memory initPayload) external override returns (bytes4) {\\n require(!_isInitialized(), \\\"HOLOGRAPH: already initialized\\\");\\n (address holograph, address registry) = abi.decode(initPayload, (address, address));\\n assembly {\\n sstore(_adminSlot, origin())\\n sstore(_holographSlot, holograph)\\n sstore(_registrySlot, registry)\\n }\\n _setInitialized();\\n return InitializableInterface.init.selector;\\n }\\n\\n /**\\n * @notice Deploy holographable contract via bridge request\\n * @dev This function directly forwards the calldata to the deployHolographableContract function\\n * It is used to allow for Holograph Bridge to make cross-chain deployments\\n */\\n function bridgeIn(uint32 /* fromChain*/, bytes calldata payload) external returns (bytes4) {\\n (DeploymentConfig memory config, Verification memory signature, address signer) = abi.decode(\\n payload,\\n (DeploymentConfig, Verification, address)\\n );\\n HolographFactoryInterface(address(this)).deployHolographableContract(config, signature, signer);\\n return Holographable.bridgeIn.selector;\\n }\\n\\n /**\\n * @notice Deploy holographable contract via bridge request\\n * @dev This function directly returns the calldata\\n * It is used to allow for Holograph Bridge to make cross-chain deployments\\n */\\n function bridgeOut(\\n uint32 /* toChain*/,\\n address /* sender*/,\\n bytes calldata payload\\n ) external pure returns (bytes4 selector, bytes memory data) {\\n return (Holographable.bridgeOut.selector, payload);\\n }\\n\\n function deployHolographableContractMultiChain(\\n DeploymentConfig memory config,\\n Verification memory signature,\\n address signer,\\n bool deployOnCurrentChain,\\n BridgeSettings[] memory bridgeSettings\\n ) external payable {\\n if (deployOnCurrentChain) {\\n deployHolographableContract(config, signature, signer);\\n }\\n bytes memory payload = abi.encode(config, signature, signer);\\n HolographInterface holograph;\\n assembly {\\n holograph := sload(_holographSlot)\\n }\\n HolographBridgeInterface bridge = HolographBridgeInterface(holograph.getBridge());\\n uint256 l = bridgeSettings.length;\\n for (uint256 i = 0; i < l; i++) {\\n bridge.bridgeOutRequest{value: bridgeSettings[i].value}(\\n bridgeSettings[i].toChain,\\n address(this),\\n bridgeSettings[i].gasLimit,\\n bridgeSettings[i].gasPrice,\\n payload\\n );\\n }\\n }\\n\\n /**\\n * @notice Deploy a holographable smart contract\\n * @dev Using this function allows to deploy smart contracts that have the same address across all EVM chains\\n * @param config contract deployement configurations\\n * @param signature that was created by the wallet that created the original payload\\n * @param signer address of wallet that created the payload\\n */\\n function deployHolographableContract(\\n DeploymentConfig memory config,\\n Verification memory signature,\\n address signer\\n ) public {\\n address registry;\\n address holograph;\\n assembly {\\n holograph := sload(_holographSlot)\\n registry := sload(_registrySlot)\\n }\\n /**\\n * @dev the configuration is encoded and hashed along with signer address\\n */\\n bytes32 hash = keccak256(\\n abi.encodePacked(\\n config.contractType,\\n config.chainType,\\n config.salt,\\n keccak256(config.byteCode),\\n keccak256(config.initCode),\\n signer\\n )\\n );\\n /**\\n * @dev the hash is validated against signature\\n * this is to guarantee that the original creator's configuration has not been altered\\n */\\n require(_verifySigner(signature.r, signature.s, signature.v, hash, signer), \\\"HOLOGRAPH: invalid signature\\\");\\n /**\\n * @dev check that this contract has not already been deployed on this chain\\n */\\n bytes memory holographerBytecode = type(Holographer).creationCode;\\n address holographerAddress = address(\\n uint160(uint256(keccak256(abi.encodePacked(bytes1(0xff), address(this), hash, keccak256(holographerBytecode)))))\\n );\\n require(!_isContract(holographerAddress), \\\"HOLOGRAPH: already deployed\\\");\\n /**\\n * @dev convert hash into uint256 which will be used as the salt for create2\\n */\\n uint256 saltInt = uint256(hash);\\n address sourceContractAddress;\\n bytes memory sourceByteCode = config.byteCode;\\n assembly {\\n /**\\n * @dev deploy the user created smart contract first\\n */\\n sourceContractAddress := create2(0, add(sourceByteCode, 0x20), mload(sourceByteCode), saltInt)\\n }\\n assembly {\\n /**\\n * @dev deploy the Holographer contract\\n */\\n holographerAddress := create2(0, add(holographerBytecode, 0x20), mload(holographerBytecode), saltInt)\\n }\\n /**\\n * @dev initialize the Holographer contract\\n */\\n require(\\n InitializableInterface(holographerAddress).init(\\n abi.encode(abi.encode(config.chainType, holograph, config.contractType, sourceContractAddress), config.initCode)\\n ) == InitializableInterface.init.selector,\\n \\\"initialization failed\\\"\\n );\\n /**\\n * @dev update the Holograph Registry with deployed contract address\\n */\\n HolographRegistryInterface(registry).setHolographedHashAddress(hash, holographerAddress);\\n /**\\n * @dev emit an event that on-chain indexers can easily read\\n */\\n emit BridgeableContractDeployed(holographerAddress, hash);\\n }\\n\\n /**\\n * @notice Get the Holograph Protocol contract\\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\\n */\\n function getHolograph() external view returns (address holograph) {\\n assembly {\\n holograph := sload(_holographSlot)\\n }\\n }\\n\\n /**\\n * @notice Update the Holograph Protocol contract address\\n * @param holograph address of the Holograph Protocol smart contract to use\\n */\\n function setHolograph(address holograph) external onlyAdmin {\\n assembly {\\n sstore(_holographSlot, holograph)\\n }\\n }\\n\\n /**\\n * @notice Get the Holograph Registry module\\n * @dev This module stores a reference for all deployed holographable smart contracts\\n */\\n function getRegistry() external view returns (address registry) {\\n assembly {\\n registry := sload(_registrySlot)\\n }\\n }\\n\\n /**\\n * @notice Update the Holograph Registry module address\\n * @param registry address of the Holograph Registry smart contract to use\\n */\\n function setRegistry(address registry) external onlyAdmin {\\n assembly {\\n sstore(_registrySlot, registry)\\n }\\n }\\n\\n /**\\n * @dev Internal function used for checking if a contract has been deployed at address\\n */\\n function _isContract(address contractAddress) private view returns (bool) {\\n bytes32 codehash;\\n assembly {\\n codehash := extcodehash(contractAddress)\\n }\\n return (codehash != 0x0 && codehash != 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470);\\n }\\n\\n /**\\n * @dev Internal function used for verifying a signature\\n */\\n function _verifySigner(bytes32 r, bytes32 s, uint8 v, bytes32 hash, address signer) private pure returns (bool) {\\n if (v < 27) {\\n v += 27;\\n }\\n if (v != 27 && v != 28) {\\n return false;\\n }\\n // prevent signature malleability by checking if s-value is in the upper range\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n // if s-value is in upper range, calculate a new s-value\\n s = bytes32(0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - uint256(s));\\n // flip the v-value\\n if (v == 27) {\\n v = 28;\\n } else {\\n v = 27;\\n }\\n // check if s-value is still in upper range\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return false;\\n }\\n }\\n /**\\n * @dev signature is checked against EIP-191 first, then directly, to support legacy wallets\\n */\\n return (signer != address(0) &&\\n (ecrecover(keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash)), v, r, s) == signer ||\\n (\\n ecrecover(\\n keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n66\\\", Strings.toHexString(uint256(hash), 32))),\\n v,\\n r,\\n s\\n )\\n ) ==\\n signer ||\\n ecrecover(hash, v, r, s) == signer));\\n }\\n\\n /**\\n * @dev Purposefully reverts to prevent having any type of ether transfered into the contract\\n */\\n receive() external payable {\\n revert();\\n }\\n\\n /**\\n * @dev Purposefully reverts to prevent any calls to undefined functions\\n */\\n fallback() external payable {\\n revert();\\n }\\n}\\n\",\"keccak256\":\"0xb18538929ca40465f6762c4a6204f631d4a9844e2af366d46d9c340a4c75757c\",\"license\":\"UNLICENSED\"},\"contracts/abstract/Admin.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nabstract contract Admin {\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.admin')) - 1)\\n */\\n bytes32 constant _adminSlot = 0x3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c9;\\n\\n modifier onlyAdmin() {\\n require(msg.sender == getAdmin(), \\\"HOLOGRAPH: admin only function\\\");\\n _;\\n }\\n\\n constructor() {}\\n\\n function admin() public view returns (address) {\\n return getAdmin();\\n }\\n\\n function getAdmin() public view returns (address adminAddress) {\\n assembly {\\n adminAddress := sload(_adminSlot)\\n }\\n }\\n\\n function setAdmin(address adminAddress) public onlyAdmin {\\n assembly {\\n sstore(_adminSlot, adminAddress)\\n }\\n }\\n\\n function adminCall(address target, bytes calldata data) external payable onlyAdmin {\\n assembly {\\n calldatacopy(0, data.offset, data.length)\\n let result := call(gas(), target, callvalue(), 0, data.length, 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n switch result\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x93552c9253b579c45113a150a6a3dfddb997afd939d09b49c34d040525734b1a\",\"license\":\"UNLICENSED\"},\"contracts/abstract/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nimport \\\"../interface/InitializableInterface.sol\\\";\\n\\n/**\\n * @title Initializable\\n * @author https://github.com/holographxyz\\n * @notice Use init instead of constructor\\n * @dev This allows for use of init function to make one time initializations without the need for a constructor\\n */\\nabstract contract Initializable is InitializableInterface {\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.initialized')) - 1)\\n */\\n bytes32 constant _initializedSlot = 0x4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a01;\\n\\n /**\\n * @dev Constructor is left empty and init is used instead\\n */\\n constructor() {}\\n\\n /**\\n * @notice Used internally to initialize the contract instead of through a constructor\\n * @dev This function is called by the deployer/factory when creating a contract\\n * @param initPayload abi encoded payload to use for contract initilaization\\n */\\n function init(bytes memory initPayload) external virtual returns (bytes4);\\n\\n function _isInitialized() internal view returns (bool initialized) {\\n assembly {\\n initialized := sload(_initializedSlot)\\n }\\n }\\n\\n function _setInitialized() internal {\\n assembly {\\n sstore(_initializedSlot, 0x0000000000000000000000000000000000000000000000000000000000000001)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa55dc367285f96952dec56adfbfb48b6a4be31aef9ba0d30ad8c91023a572462\",\"license\":\"UNLICENSED\"},\"contracts/enforcer/Holographer.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nimport \\\"../abstract/Admin.sol\\\";\\nimport \\\"../abstract/Initializable.sol\\\";\\n\\nimport \\\"../interface/HolographInterface.sol\\\";\\nimport \\\"../interface/HolographerInterface.sol\\\";\\nimport \\\"../interface/HolographRegistryInterface.sol\\\";\\nimport \\\"../interface/InitializableInterface.sol\\\";\\n\\n/**\\n * @dev This contract is a binder. It puts together all the variables to make the underlying contracts functional and be bridgeable.\\n */\\ncontract Holographer is Admin, Initializable, HolographerInterface {\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.originChain')) - 1)\\n */\\n bytes32 constant _originChainSlot = 0xd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d;\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\\n */\\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.contractType')) - 1)\\n */\\n bytes32 constant _contractTypeSlot = 0x0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c7;\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.sourceContract')) - 1)\\n */\\n bytes32 constant _sourceContractSlot = 0x27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b074;\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.blockHeight')) - 1)\\n */\\n bytes32 constant _blockHeightSlot = 0x9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de3;\\n\\n /**\\n * @dev Constructor is left empty and init is used instead\\n */\\n constructor() {}\\n\\n /**\\n * @notice Used internally to initialize the contract instead of through a constructor\\n * @dev This function is called by the deployer/factory when creating a contract\\n * @param initPayload abi encoded payload to use for contract initilaization\\n */\\n function init(bytes memory initPayload) external override returns (bytes4) {\\n require(!_isInitialized(), \\\"HOLOGRAPHER: already initialized\\\");\\n (bytes memory encoded, bytes memory initCode) = abi.decode(initPayload, (bytes, bytes));\\n (uint32 originChain, address holograph, bytes32 contractType, address sourceContract) = abi.decode(\\n encoded,\\n (uint32, address, bytes32, address)\\n );\\n assembly {\\n sstore(_adminSlot, caller())\\n sstore(_blockHeightSlot, number())\\n sstore(_contractTypeSlot, contractType)\\n sstore(_holographSlot, holograph)\\n sstore(_originChainSlot, originChain)\\n sstore(_sourceContractSlot, sourceContract)\\n }\\n (bool success, bytes memory returnData) = HolographRegistryInterface(HolographInterface(holograph).getRegistry())\\n .getReservedContractTypeAddress(contractType)\\n .delegatecall(abi.encodeWithSelector(InitializableInterface.init.selector, initCode));\\n bytes4 selector = abi.decode(returnData, (bytes4));\\n require(success && selector == InitializableInterface.init.selector, \\\"HOLOGRAPH: initialization failed\\\");\\n _setInitialized();\\n return InitializableInterface.init.selector;\\n }\\n\\n /**\\n * @dev Returns the contract type that is used for loading the Enforcer\\n */\\n function getContractType() external view returns (bytes32 contractType) {\\n assembly {\\n contractType := sload(_contractTypeSlot)\\n }\\n }\\n\\n /**\\n * @dev Returns the block height of when the smart contract was deployed. Useful for retrieving deployment config for re-deployment on other EVM-compatible chains.\\n */\\n function getDeploymentBlock() external view returns (uint256 deploymentBlock) {\\n assembly {\\n deploymentBlock := sload(_blockHeightSlot)\\n }\\n }\\n\\n /**\\n * @dev Returns a hardcoded address for the Holograph smart contract.\\n */\\n function getHolograph() external view returns (address holograph) {\\n assembly {\\n holograph := sload(_holographSlot)\\n }\\n }\\n\\n /**\\n * @dev Returns a hardcoded address for the Holograph smart contract that controls and enforces the ERC standards.\\n */\\n function getHolographEnforcer() public view returns (address) {\\n HolographInterface holograph;\\n bytes32 contractType;\\n assembly {\\n holograph := sload(_holographSlot)\\n contractType := sload(_contractTypeSlot)\\n }\\n return HolographRegistryInterface(holograph.getRegistry()).getReservedContractTypeAddress(contractType);\\n }\\n\\n /**\\n * @dev Returns the original chain that contract was deployed on.\\n */\\n function getOriginChain() external view returns (uint32 originChain) {\\n assembly {\\n originChain := sload(_originChainSlot)\\n }\\n }\\n\\n /**\\n * @dev Returns a hardcoded address for the custom secure storage contract deployed in parallel with this contract deployment.\\n */\\n function getSourceContract() external view returns (address sourceContract) {\\n assembly {\\n sourceContract := sload(_sourceContractSlot)\\n }\\n }\\n\\n /**\\n * @dev Purposefully left empty, to prevent running out of gas errors when receiving native token payments.\\n */\\n receive() external payable {}\\n\\n /**\\n * @dev This takes the Enforcer's source code, runs it, and uses current address for storage slots.\\n */\\n fallback() external payable {\\n address holographEnforcer = getHolographEnforcer();\\n assembly {\\n calldatacopy(0, 0, calldatasize())\\n let result := delegatecall(gas(), holographEnforcer, 0, calldatasize(), 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n switch result\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc31b575625e84743d9a14f282ef3894becece82a6f47ec945585ac5a0d1895f7\",\"license\":\"UNLICENSED\"},\"contracts/interface/HolographBridgeInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\n/**\\n * @title Holograph Bridge\\n * @author https://github.com/holographxyz\\n * @notice Beam any holographable contracts and assets across blockchains\\n * @dev The contract abstracts all the complexities of making bridge requests and uses a universal interface to bridge any type of holographable assets\\n */\\ninterface HolographBridgeInterface {\\n /**\\n * @notice Receive a beam from another chain\\n * @dev This function can only be called by the Holograph Operator module\\n * @param fromChain Holograph Chain ID where the brigeOutRequest was created\\n * @param holographableContract address of the destination contract that the bridgeInRequest is targeted for\\n * @param hToken address of the hToken contract that wrapped the origin chain native gas token\\n * @param hTokenRecipient address of recipient for the hToken reward\\n * @param hTokenValue exact amount of hToken reward in wei\\n * @param doNotRevert boolean used to specify if the call should revert\\n * @param bridgeInPayload actual abi encoded bytes of the data that the holographable contract bridgeIn function will receive\\n */\\n function bridgeInRequest(\\n uint256 nonce,\\n uint32 fromChain,\\n address holographableContract,\\n address hToken,\\n address hTokenRecipient,\\n uint256 hTokenValue,\\n bool doNotRevert,\\n bytes calldata bridgeInPayload\\n ) external payable;\\n\\n /**\\n * @notice Create a beam request for a destination chain\\n * @dev This function works for deploying contracts and beaming supported holographable assets across chains\\n * @param toChain Holograph Chain ID where the beam is being sent to\\n * @param holographableContract address of the contract for which the bridge request is being made\\n * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain\\n * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain\\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\\n */\\n function bridgeOutRequest(\\n uint32 toChain,\\n address holographableContract,\\n uint256 gasLimit,\\n uint256 gasPrice,\\n bytes calldata bridgeOutPayload\\n ) external payable;\\n\\n /**\\n * @notice Do not call this function, it will always revert\\n * @dev Used by getBridgeOutRequestPayload function\\n * It is purposefully inverted to always revert on a successful call\\n * Marked as external and not private to allow use inside try/catch of getBridgeOutRequestPayload function\\n * If this function does not revert and returns a string, it is the actual revert reason\\n * @param sender address of actual sender that is planning to make a bridgeOutRequest call\\n * @param toChain holograph chain id of destination chain\\n * @param holographableContract address of the contract for which the bridge request is being made\\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\\n */\\n function revertedBridgeOutRequest(\\n address sender,\\n uint32 toChain,\\n address holographableContract,\\n bytes calldata bridgeOutPayload\\n ) external returns (string memory revertReason);\\n\\n /**\\n * @notice Get the payload created by the bridgeOutRequest function\\n * @dev Use this function to get the payload that will be generated by a bridgeOutRequest\\n * Only use this with a static call\\n * @param toChain Holograph Chain ID where the beam is being sent to\\n * @param holographableContract address of the contract for which the bridge request is being made\\n * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain\\n * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain\\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\\n * @return samplePayload bytes made up of the bridgeOutRequest payload\\n */\\n function getBridgeOutRequestPayload(\\n uint32 toChain,\\n address holographableContract,\\n uint256 gasLimit,\\n uint256 gasPrice,\\n bytes calldata bridgeOutPayload\\n ) external returns (bytes memory samplePayload);\\n\\n /**\\n * @notice Get the fees associated with sending specific payload\\n * @dev Will provide exact costs on protocol and message side, combine the two to get total\\n * @param toChain holograph chain id of destination chain for payload\\n * @param gasLimit amount of gas to provide for executing payload on destination chain\\n * @param gasPrice maximum amount to pay for gas price, can be set to 0 and will be chose automatically\\n * @param crossChainPayload the entire packet being sent cross-chain\\n * @return hlgFee the amount (in wei) of native gas token that will cost for finalizing job on destiantion chain\\n * @return msgFee the amount (in wei) of native gas token that will cost for sending message to destiantion chain\\n * @return dstGasPrice the amount (in wei) that destination message maximum gas price will be\\n */\\n function getMessageFee(\\n uint32 toChain,\\n uint256 gasLimit,\\n uint256 gasPrice,\\n bytes calldata crossChainPayload\\n ) external view returns (uint256 hlgFee, uint256 msgFee, uint256 dstGasPrice);\\n\\n /**\\n * @notice Get the address of the Holograph Factory module\\n * @dev Used for deploying holographable smart contracts\\n */\\n function getFactory() external view returns (address factory);\\n\\n /**\\n * @notice Update the Holograph Factory module address\\n * @param factory address of the Holograph Factory smart contract to use\\n */\\n function setFactory(address factory) external;\\n\\n /**\\n * @notice Get the Holograph Protocol contract\\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\\n */\\n function getHolograph() external view returns (address holograph);\\n\\n /**\\n * @notice Update the Holograph Protocol contract address\\n * @param holograph address of the Holograph Protocol smart contract to use\\n */\\n function setHolograph(address holograph) external;\\n\\n /**\\n * @notice Get the latest job nonce\\n * @dev You can use the job nonce as a way to calculate total amount of bridge requests that have been made\\n */\\n function getJobNonce() external view returns (uint256 jobNonce);\\n\\n /**\\n * @notice Get the address of the Holograph Operator module\\n * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module\\n */\\n function getOperator() external view returns (address operator);\\n\\n /**\\n * @notice Update the Holograph Operator module address\\n * @param operator address of the Holograph Operator smart contract to use\\n */\\n function setOperator(address operator) external;\\n\\n /**\\n * @notice Get the Holograph Registry module\\n * @dev This module stores a reference for all deployed holographable smart contracts\\n */\\n function getRegistry() external view returns (address registry);\\n\\n /**\\n * @notice Update the Holograph Registry module address\\n * @param registry address of the Holograph Registry smart contract to use\\n */\\n function setRegistry(address registry) external;\\n}\\n\",\"keccak256\":\"0x6e49ef7e89b6271241da6df330eb5d5cf48da3be31408bb5d99c48d51c0ef176\",\"license\":\"UNLICENSED\"},\"contracts/interface/HolographFactoryInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nimport \\\"../struct/DeploymentConfig.sol\\\";\\nimport \\\"../struct/Verification.sol\\\";\\n\\n/**\\n * @title Holograph Factory\\n * @author https://github.com/holographxyz\\n * @notice Deploy holographable contracts\\n * @dev The contract provides methods that allow for the creation of Holograph Protocol compliant smart contracts, that are capable of minting holographable assets\\n */\\ninterface HolographFactoryInterface {\\n /**\\n * @dev This event is fired every time that a bridgeable contract is deployed.\\n */\\n event BridgeableContractDeployed(address indexed contractAddress, bytes32 indexed hash);\\n\\n /**\\n * @notice Deploy a holographable smart contract\\n * @dev Using this function allows to deploy smart contracts that have the same address across all EVM chains\\n * @param config contract deployement configurations\\n * @param signature that was created by the wallet that created the original payload\\n * @param signer address of wallet that created the payload\\n */\\n function deployHolographableContract(\\n DeploymentConfig memory config,\\n Verification memory signature,\\n address signer\\n ) external;\\n\\n /**\\n * @notice Get the Holograph Protocol contract\\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\\n */\\n function getHolograph() external view returns (address holograph);\\n\\n /**\\n * @notice Update the Holograph Protocol contract address\\n * @param holograph address of the Holograph Protocol smart contract to use\\n */\\n function setHolograph(address holograph) external;\\n\\n /**\\n * @notice Get the Holograph Registry module\\n * @dev This module stores a reference for all deployed holographable smart contracts\\n */\\n function getRegistry() external view returns (address registry);\\n\\n /**\\n * @notice Update the Holograph Registry module address\\n * @param registry address of the Holograph Registry smart contract to use\\n */\\n function setRegistry(address registry) external;\\n}\\n\",\"keccak256\":\"0x44cd1db20207337ef6abde2d0f42837778d13fb62fe353b0ee9b293a601a0d71\",\"license\":\"UNLICENSED\"},\"contracts/interface/HolographInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\n/**\\n * @title Holograph Protocol\\n * @author https://github.com/holographxyz\\n * @notice This is the primary Holograph Protocol smart contract\\n * @dev This contract stores a reference to all the primary modules and variables of the protocol\\n */\\ninterface HolographInterface {\\n /**\\n * @notice Get the address of the Holograph Bridge module\\n * @dev Used for beaming holographable assets cross-chain\\n */\\n function getBridge() external view returns (address bridge);\\n\\n /**\\n * @notice Update the Holograph Bridge module address\\n * @param bridge address of the Holograph Bridge smart contract to use\\n */\\n function setBridge(address bridge) external;\\n\\n /**\\n * @notice Get the chain ID that the Protocol was deployed on\\n * @dev Useful for checking if/when a hard fork occurs\\n */\\n function getChainId() external view returns (uint256 chainId);\\n\\n /**\\n * @notice Update the chain ID\\n * @dev Useful for updating once a hard fork has been mitigated\\n * @param chainId EVM chain ID to use\\n */\\n function setChainId(uint256 chainId) external;\\n\\n /**\\n * @notice Get the address of the Holograph Factory module\\n * @dev Used for deploying holographable smart contracts\\n */\\n function getFactory() external view returns (address factory);\\n\\n /**\\n * @notice Update the Holograph Factory module address\\n * @param factory address of the Holograph Factory smart contract to use\\n */\\n function setFactory(address factory) external;\\n\\n /**\\n * @notice Get the Holograph chain Id\\n * @dev Holograph uses an internal chain id mapping\\n */\\n function getHolographChainId() external view returns (uint32 holographChainId);\\n\\n /**\\n * @notice Update the Holograph chain ID\\n * @dev Useful for updating once a hard fork was mitigated\\n * @param holographChainId Holograph chain ID to use\\n */\\n function setHolographChainId(uint32 holographChainId) external;\\n\\n /**\\n * @notice Get the address of the Holograph Interfaces module\\n * @dev Holograph uses this contract to store data that needs to be accessed by a large portion of the modules\\n */\\n function getInterfaces() external view returns (address interfaces);\\n\\n /**\\n * @notice Update the Holograph Interfaces module address\\n * @param interfaces address of the Holograph Interfaces smart contract to use\\n */\\n function setInterfaces(address interfaces) external;\\n\\n /**\\n * @notice Get the address of the Holograph Operator module\\n * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module\\n */\\n function getOperator() external view returns (address operator);\\n\\n /**\\n * @notice Update the Holograph Operator module address\\n * @param operator address of the Holograph Operator smart contract to use\\n */\\n function setOperator(address operator) external;\\n\\n /**\\n * @notice Get the Holograph Registry module\\n * @dev This module stores a reference for all deployed holographable smart contracts\\n */\\n function getRegistry() external view returns (address registry);\\n\\n /**\\n * @notice Update the Holograph Registry module address\\n * @param registry address of the Holograph Registry smart contract to use\\n */\\n function setRegistry(address registry) external;\\n\\n /**\\n * @notice Get the Holograph Treasury module\\n * @dev All of the Holograph Protocol assets are stored and managed by this module\\n */\\n function getTreasury() external view returns (address treasury);\\n\\n /**\\n * @notice Update the Holograph Treasury module address\\n * @param treasury address of the Holograph Treasury smart contract to use\\n */\\n function setTreasury(address treasury) external;\\n\\n /**\\n * @notice Get the Holograph Utility Token address\\n * @dev This is the official utility token of the Holograph Protocol\\n */\\n function getUtilityToken() external view returns (address utilityToken);\\n\\n /**\\n * @notice Update the Holograph Utility Token address\\n * @param utilityToken address of the Holograph Utility Token smart contract to use\\n */\\n function setUtilityToken(address utilityToken) external;\\n}\\n\",\"keccak256\":\"0x90b5643e77e914393c508d59b80f5739debfd72455029c0db041f92374b3f586\",\"license\":\"UNLICENSED\"},\"contracts/interface/HolographRegistryInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\ninterface HolographRegistryInterface {\\n event HolographableContractEvent(address indexed _holographableContract, bytes _payload);\\n\\n function isHolographedContract(address smartContract) external view returns (bool);\\n\\n function isHolographedHashDeployed(bytes32 hash) external view returns (bool);\\n\\n function referenceContractTypeAddress(address contractAddress) external returns (bytes32);\\n\\n function getContractTypeAddress(bytes32 contractType) external view returns (address);\\n\\n function setContractTypeAddress(bytes32 contractType, address contractAddress) external;\\n\\n function getHolograph() external view returns (address holograph);\\n\\n function setHolograph(address holograph) external;\\n\\n function getHolographableContracts(uint256 index, uint256 length) external view returns (address[] memory contracts);\\n\\n function getHolographableContractsLength() external view returns (uint256);\\n\\n function getHolographedHashAddress(bytes32 hash) external view returns (address);\\n\\n function setHolographedHashAddress(bytes32 hash, address contractAddress) external;\\n\\n function getHToken(uint32 chainId) external view returns (address);\\n\\n function setHToken(uint32 chainId, address hToken) external;\\n\\n function getReservedContractTypeAddress(bytes32 contractType) external view returns (address contractTypeAddress);\\n\\n function setReservedContractTypeAddress(bytes32 hash, bool reserved) external;\\n\\n function setReservedContractTypeAddresses(bytes32[] calldata hashes, bool[] calldata reserved) external;\\n\\n function getUtilityToken() external view returns (address utilityToken);\\n\\n function setUtilityToken(address utilityToken) external;\\n\\n function holographableEvent(bytes calldata payload) external;\\n}\\n\",\"keccak256\":\"0x5e270e2ec4413f7e49d7bc4dd4d935549d3f5234f786e5a7f435cf77850ba966\",\"license\":\"UNLICENSED\"},\"contracts/interface/Holographable.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\ninterface Holographable {\\n function bridgeIn(uint32 fromChain, bytes calldata payload) external returns (bytes4);\\n\\n function bridgeOut(\\n uint32 toChain,\\n address sender,\\n bytes calldata payload\\n ) external returns (bytes4 selector, bytes memory data);\\n}\\n\",\"keccak256\":\"0x4dd2fc1af269273c46156df8af5cedeed0dfb83f0bfa5696a8d64c768449285b\",\"license\":\"UNLICENSED\"},\"contracts/interface/HolographerInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\ninterface HolographerInterface {\\n function getContractType() external view returns (bytes32 contractType);\\n\\n function getDeploymentBlock() external view returns (uint256 deploymentBlock);\\n\\n function getHolograph() external view returns (address holograph);\\n\\n function getHolographEnforcer() external view returns (address);\\n\\n function getOriginChain() external view returns (uint32 originChain);\\n\\n function getSourceContract() external view returns (address sourceContract);\\n}\\n\",\"keccak256\":\"0x4274b9180266275a8df16b8e1f0956cc795fb1ab87db1c01264c343be3bea937\",\"license\":\"UNLICENSED\"},\"contracts/interface/InitializableInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\n/**\\n * @title Initializable\\n * @author https://github.com/holographxyz\\n * @notice Use init instead of constructor\\n * @dev This allows for use of init function to make one time initializations without the need of a constructor\\n */\\ninterface InitializableInterface {\\n /**\\n * @notice Used internally to initialize the contract instead of through a constructor\\n * @dev This function is called by the deployer/factory when creating a contract\\n * @param initPayload abi encoded payload to use for contract initilaization\\n */\\n function init(bytes memory initPayload) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0x0a76fae986c5c18110ce2b1818c84ec28b7bf7f8fb00d20b39b8d7225fbd892d\",\"license\":\"UNLICENSED\"},\"contracts/library/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nlibrary Strings {\\n function toHexString(address account) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(account)));\\n }\\n\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\n }\\n\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = bytes16(\\\"0123456789abcdef\\\")[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n function toAsciiString(address x) internal pure returns (string memory) {\\n bytes memory s = new bytes(40);\\n for (uint256 i = 0; i < 20; i++) {\\n bytes1 b = bytes1(uint8(uint256(uint160(x)) / (2 ** (8 * (19 - i)))));\\n bytes1 hi = bytes1(uint8(b) / 16);\\n bytes1 lo = bytes1(uint8(b) - 16 * uint8(hi));\\n s[2 * i] = char(hi);\\n s[2 * i + 1] = char(lo);\\n }\\n return string(s);\\n }\\n\\n function char(bytes1 b) internal pure returns (bytes1 c) {\\n if (uint8(b) < 10) {\\n return bytes1(uint8(b) + 0x30);\\n } else {\\n return bytes1(uint8(b) + 0x57);\\n }\\n }\\n\\n function uint2str(uint256 _i) internal pure returns (string memory _uint256AsString) {\\n if (_i == 0) {\\n return \\\"0\\\";\\n }\\n uint256 j = _i;\\n uint256 len;\\n while (j != 0) {\\n len++;\\n j /= 10;\\n }\\n bytes memory bstr = new bytes(len);\\n uint256 k = len;\\n while (_i != 0) {\\n k = k - 1;\\n uint8 temp = (48 + uint8(_i - (_i / 10) * 10));\\n bytes1 b1 = bytes1(temp);\\n bstr[k] = b1;\\n _i /= 10;\\n }\\n return string(bstr);\\n }\\n\\n function toString(uint256 value) internal pure returns (string memory) {\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0xbfc8f2c75b679aefa1c0c0ef095665b957ebaeabde39fb15ce17afcdd4110492\",\"license\":\"UNLICENSED\"},\"contracts/struct/BridgeSettings.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nstruct BridgeSettings {\\n uint256 value;\\n uint256 gasLimit;\\n uint256 gasPrice;\\n uint32 toChain;\\n}\\n\",\"keccak256\":\"0x405f453cf620c5e882cf6d915fd7d14c895877408a7fd7e298d6e751bd4a0ce1\",\"license\":\"UNLICENSED\"},\"contracts/struct/DeploymentConfig.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nstruct DeploymentConfig {\\n bytes32 contractType;\\n uint32 chainType;\\n bytes32 salt;\\n bytes byteCode;\\n bytes initCode;\\n}\\n\",\"keccak256\":\"0x5eb9e83676eb65fa424aa9ca79961e1602a749f264ea4f496a9c359dad0da726\",\"license\":\"UNLICENSED\"},\"contracts/struct/Verification.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nstruct Verification {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n}\\n\",\"keccak256\":\"0xd351869472bcb2497e0a771c6e7f7a0b794d099133c67f5f378a8f7839f9db92\",\"license\":\"UNLICENSED\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50612f61806100206000396000f3fe6080604052600436106100d65760003560e01c8063704b6c021161007f578063b7e0366111610059578063b7e036611461028d578063bf64a82d146102bb578063df6516bd146102ce578063f851a440146102ee57600080fd5b8063704b6c021461023a578063a8935c671461025a578063a91ee0dc1461026d57600080fd5b80634ddf47d4116100b05780634ddf47d4146101b25780635ab1bd53146101d25780636e9960c31461020657600080fd5b806308a1eb20146100e557806325d5cac81461013b5780634827ae0c1461015d57600080fd5b366100e057600080fd5b600080fd5b3480156100f157600080fd5b50610105610100366004611690565b610303565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020015b60405180910390f35b34801561014757600080fd5b5061015b610156366004611708565b6103ba565b005b34801561016957600080fd5b507fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a545b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610132565b3480156101be57600080fd5b506101056101cd36600461185a565b610499565b3480156101de57600080fd5b507fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e75461018d565b34801561021257600080fd5b507f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95461018d565b34801561024657600080fd5b5061015b610255366004611708565b610600565b61015b6102683660046119b2565b6106da565b34801561027957600080fd5b5061015b610288366004611708565b6108c1565b34801561029957600080fd5b506102ad6102a8366004611af9565b61099b565b604051610132929190611bd6565b61015b6102c9366004611c11565b6109ef565b3480156102da57600080fd5b5061015b6102e9366004611c31565b610aca565b3480156102fa57600080fd5b5061018d611015565b600080808061031485870187611c31565b6040517fdf6516bd0000000000000000000000000000000000000000000000000000000081529295509093509150309063df6516bd9061035c90869086908690600401611c94565b600060405180830381600087803b15801561037657600080fd5b505af115801561038a573d6000803e3d6000fd5b507f08a1eb20000000000000000000000000000000000000000000000000000000009a9950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610475576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064015b60405180910390fd5b7fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55565b60006104c37f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a015490565b1561052a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a20616c726561647920696e697469616c697a65640000604482015260640161046c565b600080838060200190518101906105419190611d56565b91509150327f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955817fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55807fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7556105d760017f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a0155565b507f4ddf47d4000000000000000000000000000000000000000000000000000000009392505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955565b81156106eb576106eb858585610aca565b600085858560405160200161070293929190611c94565b604051602081830303815290604052905060007fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a54905060008173ffffffffffffffffffffffffffffffffffffffff16630fffbaf36040518163ffffffff1660e01b8152600401602060405180830381865afa158015610786573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107aa9190611d90565b845190915060005b818110156108b5578273ffffffffffffffffffffffffffffffffffffffff1663e55856668783815181106107e8576107e8611dad565b60200260200101516000015188848151811061080657610806611dad565b602002602001015160600151308a868151811061082557610825611dad565b6020026020010151602001518b878151811061084357610843611dad565b6020026020010151604001518b6040518763ffffffff1660e01b8152600401610870959493929190611ddc565b6000604051808303818588803b15801561088957600080fd5b505af115801561089d573d6000803e3d6000fd5b505050505080806108ad90611e5d565b9150506107b2565b50505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610977576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b7fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e755565b6000606063b7e0366160e01b848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250959c929b50919950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aa5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b808260003760008082600034875af13d6000803e808015610ac5573d6000f35b3d6000fd5b7fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a547fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e754845160208087015160408089015160608a015180519085012060808b01518051908601209251969796600096610bb796909594918b910195865260e09490941b7fffffffff0000000000000000000000000000000000000000000000000000000016602086015260248501929092526044840152606483015260601b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016608482015260980190565b604051602081830303815290604052805190602001209050610be88560000151866020015187604001518488611044565b610c4e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f484f4c4f47524150483a20696e76616c6964207369676e617475726500000000604482015260640161046c565b600060405180602001610c6090611621565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820381018352601f90910116604081815282516020808501919091207fff00000000000000000000000000000000000000000000000000000000000000828501527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b166021850152603584018790526055808501919091528251808503909101815260759093019091528151910120909150610d21816113a4565b15610d88576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f484f4c4f47524150483a20616c7265616479206465706c6f7965640000000000604482015260640161046c565b60608801518051849160009183906020830184f59150828551602087016000f560208c8101518d516040805163ffffffff9093169383019390935273ffffffffffffffffffffffffffffffffffffffff8b811693830193909352606082015284821660808201529195507f4ddf47d4000000000000000000000000000000000000000000000000000000009190861690634ddf47d49060a0016040516020818303038152906040528e60800151604051602001610e46929190611e95565b6040516020818303038152906040526040518263ffffffff1660e01b8152600401610e719190611eba565b6020604051808303816000875af1158015610e90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eb49190611ecd565b7fffffffff000000000000000000000000000000000000000000000000000000001614610f3d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f696e697469616c697a6174696f6e206661696c65640000000000000000000000604482015260640161046c565b6040517f725229f60000000000000000000000000000000000000000000000000000000081526004810187905273ffffffffffffffffffffffffffffffffffffffff858116602483015289169063725229f690604401600060405180830381600087803b158015610fad57600080fd5b505af1158015610fc1573d6000803e3d6000fd5b505060405188925073ffffffffffffffffffffffffffffffffffffffff871691507fa802207d4c618b40db3b25b7b90e6f483e16b2c1f8d3610b15b345a718c6b41b90600090a35050505050505050505050565b600061103f7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95490565b905090565b6000601b8460ff1610156110605761105d601b85611f0f565b93505b8360ff16601b1415801561107857508360ff16601c14155b156110855750600061139b565b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0851115611122576110d7857ffffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141611f34565b945060ff8416601b036110ed57601c93506110f2565b601b93505b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08511156111225750600061139b565b73ffffffffffffffffffffffffffffffffffffffff82161580159061139857506040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c810184905273ffffffffffffffffffffffffffffffffffffffff831690600190605c01604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600084529083018083525260ff881690820152606081018990526080810188905260a0016020604051602081039080840390855afa15801561120c573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff161480611305575073ffffffffffffffffffffffffffffffffffffffff821660016112578560206113de565b6040516020016112679190611f4b565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600084529083018083525260ff881690820152606081018990526080810188905260a0016020604051602081039080840390855afa1580156112e3573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff16145b80611398575060408051600081526020810180835285905260ff861691810191909152606081018790526080810186905273ffffffffffffffffffffffffffffffffffffffff83169060019060a0016020604051602081039080840390855afa158015611376573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff16145b90505b95945050505050565b6000813f80158015906113d757507fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708114155b9392505050565b606060006113ed836002611f90565b6113f8906002611fcd565b67ffffffffffffffff81111561141057611410611725565b6040519080825280601f01601f19166020018201604052801561143a576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061147157611471611dad565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106114d4576114d4611dad565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000611510846002611f90565b61151b906001611fcd565b90505b60018111156115b8577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061155c5761155c611dad565b1a60f81b82828151811061157257611572611dad565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c936115b181611fe5565b905061151e565b5083156113d7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161046c565b610f3a8061201b83390190565b803563ffffffff8116811461164257600080fd5b919050565b60008083601f84011261165957600080fd5b50813567ffffffffffffffff81111561167157600080fd5b60208301915083602082850101111561168957600080fd5b9250929050565b6000806000604084860312156116a557600080fd5b6116ae8461162e565b9250602084013567ffffffffffffffff8111156116ca57600080fd5b6116d686828701611647565b9497909650939450505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461170557600080fd5b50565b60006020828403121561171a57600080fd5b81356113d7816116e3565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516080810167ffffffffffffffff8111828210171561177757611777611725565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156117c4576117c4611725565b604052919050565b600082601f8301126117dd57600080fd5b813567ffffffffffffffff8111156117f7576117f7611725565b61182860207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160161177d565b81815284602083860101111561183d57600080fd5b816020850160208301376000918101602001919091529392505050565b60006020828403121561186c57600080fd5b813567ffffffffffffffff81111561188357600080fd5b61188f848285016117cc565b949350505050565b600060a082840312156118a957600080fd5b60405160a0810167ffffffffffffffff82821081831117156118cd576118cd611725565b81604052829350843583526118e46020860161162e565b602084015260408501356040840152606085013591508082111561190757600080fd5b611913868387016117cc565b6060840152608085013591508082111561192c57600080fd5b50611939858286016117cc565b6080830152505092915050565b60006060828403121561195857600080fd5b6040516060810181811067ffffffffffffffff8211171561197b5761197b611725565b80604052508091508235815260208301356020820152604083013560ff811681146119a557600080fd5b6040919091015292915050565b600080600080600060e086880312156119ca57600080fd5b853567ffffffffffffffff808211156119e257600080fd5b6119ee89838a01611897565b965060209150611a0089838a01611946565b9550608080890135611a11816116e3565b955060a08901358015158114611a2657600080fd5b945060c089013582811115611a3a57600080fd5b8901601f81018b13611a4b57600080fd5b803583811115611a5d57611a5d611725565b611a6b858260051b0161177d565b818152858101945060079190911b82018501908c821115611a8b57600080fd5b918501915b81831015611ae65783838e031215611aa85760008081fd5b611ab0611754565b833581528684013587820152604080850135908201526060611ad381860161162e565b9082015285529385019391830191611a90565b8096505050505050509295509295909350565b60008060008060608587031215611b0f57600080fd5b611b188561162e565b93506020850135611b28816116e3565b9250604085013567ffffffffffffffff811115611b4457600080fd5b611b5087828801611647565b95989497509550505050565b60005b83811015611b77578181015183820152602001611b5f565b83811115611b86576000848401525b50505050565b60008151808452611ba4816020860160208601611b5c565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b7fffffffff000000000000000000000000000000000000000000000000000000008316815260406020820152600061188f6040830184611b8c565b600080600060408486031215611c2657600080fd5b83356116ae816116e3565b600080600060a08486031215611c4657600080fd5b833567ffffffffffffffff811115611c5d57600080fd5b611c6986828701611897565b935050611c798560208601611946565b91506080840135611c89816116e3565b809150509250925092565b60a08152835160a082015263ffffffff60208501511660c0820152604084015160e08201526000606085015160a0610100840152611cd6610140840182611b8c565b905060808601517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6084830301610120850152611d128282611b8c565b92505050835160208301526020840151604083015260ff604085015116606083015261188f608083018473ffffffffffffffffffffffffffffffffffffffff169052565b60008060408385031215611d6957600080fd5b8251611d74816116e3565b6020840151909250611d85816116e3565b809150509250929050565b600060208284031215611da257600080fd5b81516113d7816116e3565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b63ffffffff8616815273ffffffffffffffffffffffffffffffffffffffff8516602082015283604082015282606082015260a060808201526000611e2360a0830184611b8c565b979650505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611e8e57611e8e611e2e565b5060010190565b604081526000611ea86040830185611b8c565b828103602084015261139b8185611b8c565b6020815260006113d76020830184611b8c565b600060208284031215611edf57600080fd5b81517fffffffff00000000000000000000000000000000000000000000000000000000811681146113d757600080fd5b600060ff821660ff84168060ff03821115611f2c57611f2c611e2e565b019392505050565b600082821015611f4657611f46611e2e565b500390565b7f19457468657265756d205369676e6564204d6573736167653a0a363600000000815260008251611f8381601c850160208701611b5c565b91909101601c0192915050565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611fc857611fc8611e2e565b500290565b60008219821115611fe057611fe0611e2e565b500190565b600081611ff457611ff4611e2e565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019056fe608060405234801561001057600080fd5b50610f1a806100206000396000f3fe6080604052600436106100c05760003560e01c806380d1cb3511610074578063c51a29e01161004e578063c51a29e0146102c1578063c8a4c3d5146102f5578063f851a4401461030a576100c7565b806380d1cb351461022c578063913a0ef21461026a578063bf64a82d146102ae576100c7565b80636e9960c3116100a55780636e9960c3146101a45780636faf275b146101d8578063704b6c021461020c576100c7565b80634827ae0c146100f95780634ddf47d414610153576100c7565b366100c757005b60006100d161031f565b90503660008037600080366000845af43d6000803e8080156100f2573d6000f35b3d6000fd5b005b34801561010557600080fd5b507fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a545b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b34801561015f57600080fd5b5061017361016e366004610bb4565b61045d565b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200161014a565b3480156101b057600080fd5b507f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c954610129565b3480156101e457600080fd5b507f27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b07454610129565b34801561021857600080fd5b506100f7610227366004610c59565b610911565b34801561023857600080fd5b507f9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de3545b60405190815260200161014a565b34801561027657600080fd5b507fd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d5460405163ffffffff909116815260200161014a565b6100f76102bc366004610c7d565b6109eb565b3480156102cd57600080fd5b507f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c75461025c565b34801561030157600080fd5b5061012961031f565b34801561031657600080fd5b50610129610ac1565b60008060007fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a5491507f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c75490508173ffffffffffffffffffffffffffffffffffffffff16635ab1bd536040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103db9190610d02565b73ffffffffffffffffffffffffffffffffffffffff166374b7510c826040518263ffffffff1660e01b815260040161041591815260200190565b602060405180830381865afa158015610432573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104569190610d02565b9250505090565b60006104877f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a015490565b156104f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f484f4c4f475241504845523a20616c726561647920696e697469616c697a656460448201526064015b60405180910390fd5b6000808380602001905181019061050a9190610d9c565b91509150600080600080858060200190518101906105289190610e00565b9350935093509350337f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955437f9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de355817f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c755827fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55837fd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d55807f27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b074556000808473ffffffffffffffffffffffffffffffffffffffff16635ab1bd536040518163ffffffff1660e01b8152600401602060405180830381865afa158015610650573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106749190610d02565b73ffffffffffffffffffffffffffffffffffffffff166374b7510c856040518263ffffffff1660e01b81526004016106ae91815260200190565b602060405180830381865afa1580156106cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ef9190610d02565b73ffffffffffffffffffffffffffffffffffffffff16634ddf47d460e01b8860405160240161071e9190610e5e565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009094169390931790925290516107a79190610eaf565b600060405180830381855af49150503d80600081146107e2576040519150601f19603f3d011682016040523d82523d6000602084013e6107e7565b606091505b50915091506000818060200190518101906108029190610ecb565b905082801561085257507fffffffff0000000000000000000000000000000000000000000000000000000081167f4ddf47d400000000000000000000000000000000000000000000000000000000145b6108b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f484f4c4f47524150483a20696e697469616c697a6174696f6e206661696c656460448201526064016104ea565b6108e160017f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a0155565b507f4ddf47d4000000000000000000000000000000000000000000000000000000009a9950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016104ea565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aa1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016104ea565b808260003760008082600034875af13d6000803e8080156100f2573d6000f35b6000610aeb7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95490565b905090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715610b6657610b66610af0565b604052919050565b600067ffffffffffffffff821115610b8857610b88610af0565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600060208284031215610bc657600080fd5b813567ffffffffffffffff811115610bdd57600080fd5b8201601f81018413610bee57600080fd5b8035610c01610bfc82610b6e565b610b1f565b818152856020838501011115610c1657600080fd5b81602084016020830137600091810160200191909152949350505050565b73ffffffffffffffffffffffffffffffffffffffff81168114610c5657600080fd5b50565b600060208284031215610c6b57600080fd5b8135610c7681610c34565b9392505050565b600080600060408486031215610c9257600080fd5b8335610c9d81610c34565b9250602084013567ffffffffffffffff80821115610cba57600080fd5b818601915086601f830112610cce57600080fd5b813581811115610cdd57600080fd5b876020828501011115610cef57600080fd5b6020830194508093505050509250925092565b600060208284031215610d1457600080fd5b8151610c7681610c34565b60005b83811015610d3a578181015183820152602001610d22565b83811115610d49576000848401525b50505050565b600082601f830112610d6057600080fd5b8151610d6e610bfc82610b6e565b818152846020838601011115610d8357600080fd5b610d94826020830160208701610d1f565b949350505050565b60008060408385031215610daf57600080fd5b825167ffffffffffffffff80821115610dc757600080fd5b610dd386838701610d4f565b93506020850151915080821115610de957600080fd5b50610df685828601610d4f565b9150509250929050565b60008060008060808587031215610e1657600080fd5b845163ffffffff81168114610e2a57600080fd5b6020860151909450610e3b81610c34565b604086015160608701519194509250610e5381610c34565b939692955090935050565b6020815260008251806020840152610e7d816040850160208701610d1f565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60008251610ec1818460208701610d1f565b9190910192915050565b600060208284031215610edd57600080fd5b81517fffffffff0000000000000000000000000000000000000000000000000000000081168114610c7657600080fdfea164736f6c634300080d000aa164736f6c634300080d000a", + "deployedBytecode": "0x6080604052600436106100d65760003560e01c8063704b6c021161007f578063b7e0366111610059578063b7e036611461028d578063bf64a82d146102bb578063df6516bd146102ce578063f851a440146102ee57600080fd5b8063704b6c021461023a578063a8935c671461025a578063a91ee0dc1461026d57600080fd5b80634ddf47d4116100b05780634ddf47d4146101b25780635ab1bd53146101d25780636e9960c31461020657600080fd5b806308a1eb20146100e557806325d5cac81461013b5780634827ae0c1461015d57600080fd5b366100e057600080fd5b600080fd5b3480156100f157600080fd5b50610105610100366004611690565b610303565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020015b60405180910390f35b34801561014757600080fd5b5061015b610156366004611708565b6103ba565b005b34801561016957600080fd5b507fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a545b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610132565b3480156101be57600080fd5b506101056101cd36600461185a565b610499565b3480156101de57600080fd5b507fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e75461018d565b34801561021257600080fd5b507f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95461018d565b34801561024657600080fd5b5061015b610255366004611708565b610600565b61015b6102683660046119b2565b6106da565b34801561027957600080fd5b5061015b610288366004611708565b6108c1565b34801561029957600080fd5b506102ad6102a8366004611af9565b61099b565b604051610132929190611bd6565b61015b6102c9366004611c11565b6109ef565b3480156102da57600080fd5b5061015b6102e9366004611c31565b610aca565b3480156102fa57600080fd5b5061018d611015565b600080808061031485870187611c31565b6040517fdf6516bd0000000000000000000000000000000000000000000000000000000081529295509093509150309063df6516bd9061035c90869086908690600401611c94565b600060405180830381600087803b15801561037657600080fd5b505af115801561038a573d6000803e3d6000fd5b507f08a1eb20000000000000000000000000000000000000000000000000000000009a9950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610475576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064015b60405180910390fd5b7fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55565b60006104c37f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a015490565b1561052a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a20616c726561647920696e697469616c697a65640000604482015260640161046c565b600080838060200190518101906105419190611d56565b91509150327f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955817fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55807fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7556105d760017f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a0155565b507f4ddf47d4000000000000000000000000000000000000000000000000000000009392505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955565b81156106eb576106eb858585610aca565b600085858560405160200161070293929190611c94565b604051602081830303815290604052905060007fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a54905060008173ffffffffffffffffffffffffffffffffffffffff16630fffbaf36040518163ffffffff1660e01b8152600401602060405180830381865afa158015610786573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107aa9190611d90565b845190915060005b818110156108b5578273ffffffffffffffffffffffffffffffffffffffff1663e55856668783815181106107e8576107e8611dad565b60200260200101516000015188848151811061080657610806611dad565b602002602001015160600151308a868151811061082557610825611dad565b6020026020010151602001518b878151811061084357610843611dad565b6020026020010151604001518b6040518763ffffffff1660e01b8152600401610870959493929190611ddc565b6000604051808303818588803b15801561088957600080fd5b505af115801561089d573d6000803e3d6000fd5b505050505080806108ad90611e5d565b9150506107b2565b50505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610977576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b7fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e755565b6000606063b7e0366160e01b848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250959c929b50919950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aa5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b808260003760008082600034875af13d6000803e808015610ac5573d6000f35b3d6000fd5b7fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a547fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e754845160208087015160408089015160608a015180519085012060808b01518051908601209251969796600096610bb796909594918b910195865260e09490941b7fffffffff0000000000000000000000000000000000000000000000000000000016602086015260248501929092526044840152606483015260601b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016608482015260980190565b604051602081830303815290604052805190602001209050610be88560000151866020015187604001518488611044565b610c4e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f484f4c4f47524150483a20696e76616c6964207369676e617475726500000000604482015260640161046c565b600060405180602001610c6090611621565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820381018352601f90910116604081815282516020808501919091207fff00000000000000000000000000000000000000000000000000000000000000828501527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b166021850152603584018790526055808501919091528251808503909101815260759093019091528151910120909150610d21816113a4565b15610d88576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f484f4c4f47524150483a20616c7265616479206465706c6f7965640000000000604482015260640161046c565b60608801518051849160009183906020830184f59150828551602087016000f560208c8101518d516040805163ffffffff9093169383019390935273ffffffffffffffffffffffffffffffffffffffff8b811693830193909352606082015284821660808201529195507f4ddf47d4000000000000000000000000000000000000000000000000000000009190861690634ddf47d49060a0016040516020818303038152906040528e60800151604051602001610e46929190611e95565b6040516020818303038152906040526040518263ffffffff1660e01b8152600401610e719190611eba565b6020604051808303816000875af1158015610e90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eb49190611ecd565b7fffffffff000000000000000000000000000000000000000000000000000000001614610f3d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f696e697469616c697a6174696f6e206661696c65640000000000000000000000604482015260640161046c565b6040517f725229f60000000000000000000000000000000000000000000000000000000081526004810187905273ffffffffffffffffffffffffffffffffffffffff858116602483015289169063725229f690604401600060405180830381600087803b158015610fad57600080fd5b505af1158015610fc1573d6000803e3d6000fd5b505060405188925073ffffffffffffffffffffffffffffffffffffffff871691507fa802207d4c618b40db3b25b7b90e6f483e16b2c1f8d3610b15b345a718c6b41b90600090a35050505050505050505050565b600061103f7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95490565b905090565b6000601b8460ff1610156110605761105d601b85611f0f565b93505b8360ff16601b1415801561107857508360ff16601c14155b156110855750600061139b565b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0851115611122576110d7857ffffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141611f34565b945060ff8416601b036110ed57601c93506110f2565b601b93505b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08511156111225750600061139b565b73ffffffffffffffffffffffffffffffffffffffff82161580159061139857506040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c810184905273ffffffffffffffffffffffffffffffffffffffff831690600190605c01604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600084529083018083525260ff881690820152606081018990526080810188905260a0016020604051602081039080840390855afa15801561120c573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff161480611305575073ffffffffffffffffffffffffffffffffffffffff821660016112578560206113de565b6040516020016112679190611f4b565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600084529083018083525260ff881690820152606081018990526080810188905260a0016020604051602081039080840390855afa1580156112e3573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff16145b80611398575060408051600081526020810180835285905260ff861691810191909152606081018790526080810186905273ffffffffffffffffffffffffffffffffffffffff83169060019060a0016020604051602081039080840390855afa158015611376573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff16145b90505b95945050505050565b6000813f80158015906113d757507fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708114155b9392505050565b606060006113ed836002611f90565b6113f8906002611fcd565b67ffffffffffffffff81111561141057611410611725565b6040519080825280601f01601f19166020018201604052801561143a576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061147157611471611dad565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106114d4576114d4611dad565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000611510846002611f90565b61151b906001611fcd565b90505b60018111156115b8577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061155c5761155c611dad565b1a60f81b82828151811061157257611572611dad565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c936115b181611fe5565b905061151e565b5083156113d7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161046c565b610f3a8061201b83390190565b803563ffffffff8116811461164257600080fd5b919050565b60008083601f84011261165957600080fd5b50813567ffffffffffffffff81111561167157600080fd5b60208301915083602082850101111561168957600080fd5b9250929050565b6000806000604084860312156116a557600080fd5b6116ae8461162e565b9250602084013567ffffffffffffffff8111156116ca57600080fd5b6116d686828701611647565b9497909650939450505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461170557600080fd5b50565b60006020828403121561171a57600080fd5b81356113d7816116e3565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516080810167ffffffffffffffff8111828210171561177757611777611725565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156117c4576117c4611725565b604052919050565b600082601f8301126117dd57600080fd5b813567ffffffffffffffff8111156117f7576117f7611725565b61182860207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160161177d565b81815284602083860101111561183d57600080fd5b816020850160208301376000918101602001919091529392505050565b60006020828403121561186c57600080fd5b813567ffffffffffffffff81111561188357600080fd5b61188f848285016117cc565b949350505050565b600060a082840312156118a957600080fd5b60405160a0810167ffffffffffffffff82821081831117156118cd576118cd611725565b81604052829350843583526118e46020860161162e565b602084015260408501356040840152606085013591508082111561190757600080fd5b611913868387016117cc565b6060840152608085013591508082111561192c57600080fd5b50611939858286016117cc565b6080830152505092915050565b60006060828403121561195857600080fd5b6040516060810181811067ffffffffffffffff8211171561197b5761197b611725565b80604052508091508235815260208301356020820152604083013560ff811681146119a557600080fd5b6040919091015292915050565b600080600080600060e086880312156119ca57600080fd5b853567ffffffffffffffff808211156119e257600080fd5b6119ee89838a01611897565b965060209150611a0089838a01611946565b9550608080890135611a11816116e3565b955060a08901358015158114611a2657600080fd5b945060c089013582811115611a3a57600080fd5b8901601f81018b13611a4b57600080fd5b803583811115611a5d57611a5d611725565b611a6b858260051b0161177d565b818152858101945060079190911b82018501908c821115611a8b57600080fd5b918501915b81831015611ae65783838e031215611aa85760008081fd5b611ab0611754565b833581528684013587820152604080850135908201526060611ad381860161162e565b9082015285529385019391830191611a90565b8096505050505050509295509295909350565b60008060008060608587031215611b0f57600080fd5b611b188561162e565b93506020850135611b28816116e3565b9250604085013567ffffffffffffffff811115611b4457600080fd5b611b5087828801611647565b95989497509550505050565b60005b83811015611b77578181015183820152602001611b5f565b83811115611b86576000848401525b50505050565b60008151808452611ba4816020860160208601611b5c565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b7fffffffff000000000000000000000000000000000000000000000000000000008316815260406020820152600061188f6040830184611b8c565b600080600060408486031215611c2657600080fd5b83356116ae816116e3565b600080600060a08486031215611c4657600080fd5b833567ffffffffffffffff811115611c5d57600080fd5b611c6986828701611897565b935050611c798560208601611946565b91506080840135611c89816116e3565b809150509250925092565b60a08152835160a082015263ffffffff60208501511660c0820152604084015160e08201526000606085015160a0610100840152611cd6610140840182611b8c565b905060808601517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6084830301610120850152611d128282611b8c565b92505050835160208301526020840151604083015260ff604085015116606083015261188f608083018473ffffffffffffffffffffffffffffffffffffffff169052565b60008060408385031215611d6957600080fd5b8251611d74816116e3565b6020840151909250611d85816116e3565b809150509250929050565b600060208284031215611da257600080fd5b81516113d7816116e3565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b63ffffffff8616815273ffffffffffffffffffffffffffffffffffffffff8516602082015283604082015282606082015260a060808201526000611e2360a0830184611b8c565b979650505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611e8e57611e8e611e2e565b5060010190565b604081526000611ea86040830185611b8c565b828103602084015261139b8185611b8c565b6020815260006113d76020830184611b8c565b600060208284031215611edf57600080fd5b81517fffffffff00000000000000000000000000000000000000000000000000000000811681146113d757600080fd5b600060ff821660ff84168060ff03821115611f2c57611f2c611e2e565b019392505050565b600082821015611f4657611f46611e2e565b500390565b7f19457468657265756d205369676e6564204d6573736167653a0a363600000000815260008251611f8381601c850160208701611b5c565b91909101601c0192915050565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611fc857611fc8611e2e565b500290565b60008219821115611fe057611fe0611e2e565b500190565b600081611ff457611ff4611e2e565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019056fe608060405234801561001057600080fd5b50610f1a806100206000396000f3fe6080604052600436106100c05760003560e01c806380d1cb3511610074578063c51a29e01161004e578063c51a29e0146102c1578063c8a4c3d5146102f5578063f851a4401461030a576100c7565b806380d1cb351461022c578063913a0ef21461026a578063bf64a82d146102ae576100c7565b80636e9960c3116100a55780636e9960c3146101a45780636faf275b146101d8578063704b6c021461020c576100c7565b80634827ae0c146100f95780634ddf47d414610153576100c7565b366100c757005b60006100d161031f565b90503660008037600080366000845af43d6000803e8080156100f2573d6000f35b3d6000fd5b005b34801561010557600080fd5b507fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a545b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b34801561015f57600080fd5b5061017361016e366004610bb4565b61045d565b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200161014a565b3480156101b057600080fd5b507f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c954610129565b3480156101e457600080fd5b507f27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b07454610129565b34801561021857600080fd5b506100f7610227366004610c59565b610911565b34801561023857600080fd5b507f9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de3545b60405190815260200161014a565b34801561027657600080fd5b507fd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d5460405163ffffffff909116815260200161014a565b6100f76102bc366004610c7d565b6109eb565b3480156102cd57600080fd5b507f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c75461025c565b34801561030157600080fd5b5061012961031f565b34801561031657600080fd5b50610129610ac1565b60008060007fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a5491507f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c75490508173ffffffffffffffffffffffffffffffffffffffff16635ab1bd536040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103db9190610d02565b73ffffffffffffffffffffffffffffffffffffffff166374b7510c826040518263ffffffff1660e01b815260040161041591815260200190565b602060405180830381865afa158015610432573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104569190610d02565b9250505090565b60006104877f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a015490565b156104f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f484f4c4f475241504845523a20616c726561647920696e697469616c697a656460448201526064015b60405180910390fd5b6000808380602001905181019061050a9190610d9c565b91509150600080600080858060200190518101906105289190610e00565b9350935093509350337f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955437f9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de355817f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c755827fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55837fd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d55807f27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b074556000808473ffffffffffffffffffffffffffffffffffffffff16635ab1bd536040518163ffffffff1660e01b8152600401602060405180830381865afa158015610650573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106749190610d02565b73ffffffffffffffffffffffffffffffffffffffff166374b7510c856040518263ffffffff1660e01b81526004016106ae91815260200190565b602060405180830381865afa1580156106cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ef9190610d02565b73ffffffffffffffffffffffffffffffffffffffff16634ddf47d460e01b8860405160240161071e9190610e5e565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009094169390931790925290516107a79190610eaf565b600060405180830381855af49150503d80600081146107e2576040519150601f19603f3d011682016040523d82523d6000602084013e6107e7565b606091505b50915091506000818060200190518101906108029190610ecb565b905082801561085257507fffffffff0000000000000000000000000000000000000000000000000000000081167f4ddf47d400000000000000000000000000000000000000000000000000000000145b6108b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f484f4c4f47524150483a20696e697469616c697a6174696f6e206661696c656460448201526064016104ea565b6108e160017f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a0155565b507f4ddf47d4000000000000000000000000000000000000000000000000000000009a9950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016104ea565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aa1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016104ea565b808260003760008082600034875af13d6000803e8080156100f2573d6000f35b6000610aeb7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95490565b905090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715610b6657610b66610af0565b604052919050565b600067ffffffffffffffff821115610b8857610b88610af0565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600060208284031215610bc657600080fd5b813567ffffffffffffffff811115610bdd57600080fd5b8201601f81018413610bee57600080fd5b8035610c01610bfc82610b6e565b610b1f565b818152856020838501011115610c1657600080fd5b81602084016020830137600091810160200191909152949350505050565b73ffffffffffffffffffffffffffffffffffffffff81168114610c5657600080fd5b50565b600060208284031215610c6b57600080fd5b8135610c7681610c34565b9392505050565b600080600060408486031215610c9257600080fd5b8335610c9d81610c34565b9250602084013567ffffffffffffffff80821115610cba57600080fd5b818601915086601f830112610cce57600080fd5b813581811115610cdd57600080fd5b876020828501011115610cef57600080fd5b6020830194508093505050509250925092565b600060208284031215610d1457600080fd5b8151610c7681610c34565b60005b83811015610d3a578181015183820152602001610d22565b83811115610d49576000848401525b50505050565b600082601f830112610d6057600080fd5b8151610d6e610bfc82610b6e565b818152846020838601011115610d8357600080fd5b610d94826020830160208701610d1f565b949350505050565b60008060408385031215610daf57600080fd5b825167ffffffffffffffff80821115610dc757600080fd5b610dd386838701610d4f565b93506020850151915080821115610de957600080fd5b50610df685828601610d4f565b9150509250929050565b60008060008060808587031215610e1657600080fd5b845163ffffffff81168114610e2a57600080fd5b6020860151909450610e3b81610c34565b604086015160608701519194509250610e5381610c34565b939692955090935050565b6020815260008251806020840152610e7d816040850160208701610d1f565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60008251610ec1818460208701610d1f565b9190910192915050565b600060208284031215610edd57600080fd5b81517fffffffff0000000000000000000000000000000000000000000000000000000081168114610c7657600080fdfea164736f6c634300080d000aa164736f6c634300080d000a", "devdoc": { "author": "https://github.com/holographxyz", "details": "The contract provides methods that allow for the creation of Holograph Protocol compliant smart contracts, that are capable of minting holographable assets", diff --git a/deployments/develop/avalancheTestnet/solcInputs/c71d96e115e745dd34ef9239c385494d.json b/deployments/develop/avalancheTestnet/solcInputs/c71d96e115e745dd34ef9239c385494d.json new file mode 100644 index 000000000..2f9c65ed5 --- /dev/null +++ b/deployments/develop/avalancheTestnet/solcInputs/c71d96e115e745dd34ef9239c385494d.json @@ -0,0 +1,465 @@ +{ + "language": "Solidity", + "sources": { + "contracts/abstract/Admin.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nabstract contract Admin {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.admin')) - 1)\n */\n bytes32 constant _adminSlot = 0x3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c9;\n\n modifier onlyAdmin() {\n require(msg.sender == getAdmin(), \"HOLOGRAPH: admin only function\");\n _;\n }\n\n constructor() {}\n\n function admin() public view returns (address) {\n return getAdmin();\n }\n\n function getAdmin() public view returns (address adminAddress) {\n assembly {\n adminAddress := sload(_adminSlot)\n }\n }\n\n function setAdmin(address adminAddress) public onlyAdmin {\n assembly {\n sstore(_adminSlot, adminAddress)\n }\n }\n\n function adminCall(address target, bytes calldata data) external payable onlyAdmin {\n assembly {\n calldatacopy(0, data.offset, data.length)\n let result := call(gas(), target, callvalue(), 0, data.length, 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/abstract/EIP712.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/cryptography/draft-EIP712.sol)\n\npragma solidity 0.8.13;\n\nimport \"../library/ECDSA.sol\";\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\n *\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\n *\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\n * ({_hashTypedDataV4}).\n *\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\n * the chain id to protect against replay attacks on an eventual fork of the chain.\n *\n * NOTE: This contract implements the version of the encoding known as \"v4\", as implemented by the JSON RPC method\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\n *\n * _Available since v3.4._\n */\nabstract contract EIP712 {\n /* solhint-disable var-name-mixedcase */\n // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to\n // invalidate the cached domain separator if the chain id changes.\n // WE CANNOT USE immutable VALUES SINCE IT BREAKS OUT CREATE2 COMPUTATIONS ON DEPLOYER SCRIPTS\n // AFTER MAKING NECESARRY CHANGES, WE CAN ADD IT BACK IN\n bytes32 private _CACHED_DOMAIN_SEPARATOR;\n uint256 private _CACHED_CHAIN_ID;\n address private _CACHED_THIS;\n\n bytes32 private _HASHED_NAME;\n bytes32 private _HASHED_VERSION;\n bytes32 private _TYPE_HASH;\n\n /* solhint-enable var-name-mixedcase */\n\n /**\n * @dev Initializes the domain separator and parameter caches.\n *\n * The meaning of `name` and `version` is specified in\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\n *\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\n * - `version`: the current major version of the signing domain.\n *\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\n * contract upgrade].\n */\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n function _eip712_init(string memory name, string memory version) internal {\n bytes32 hashedName = keccak256(bytes(name));\n bytes32 hashedVersion = keccak256(bytes(version));\n bytes32 typeHash = keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\");\n _HASHED_NAME = hashedName;\n _HASHED_VERSION = hashedVersion;\n _CACHED_CHAIN_ID = block.chainid;\n _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion);\n _CACHED_THIS = address(this);\n _TYPE_HASH = typeHash;\n }\n\n /**\n * @dev Returns the domain separator for the current chain.\n */\n function _domainSeparatorV4() internal view returns (bytes32) {\n if (address(this) == _CACHED_THIS && block.chainid == _CACHED_CHAIN_ID) {\n return _CACHED_DOMAIN_SEPARATOR;\n } else {\n return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION);\n }\n }\n\n function _buildDomainSeparator(\n bytes32 typeHash,\n bytes32 nameHash,\n bytes32 versionHash\n ) private view returns (bytes32) {\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\n }\n\n /**\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\n * function returns the hash of the fully encoded EIP712 message for this domain.\n *\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\n *\n * ```solidity\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\n * keccak256(\"Mail(address to,string contents)\"),\n * mailTo,\n * keccak256(bytes(mailContents))\n * )));\n * address signer = ECDSA.recover(digest, signature);\n * ```\n */\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\n return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);\n }\n}\n" + }, + "contracts/abstract/ERC1155H.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Initializable.sol\";\n\nabstract contract ERC1155H is Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holographer')) - 1)\n */\n bytes32 constant _holographerSlot = 0xe9fcff60011c1a99f7b7244d1f2d9da93d79ea8ef3654ce590d775575255b2bd;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.owner')) - 1)\n */\n bytes32 constant _ownerSlot = 0xb56711ba6bd3ded7639fc335ee7524fe668a79d7558c85992e3f8494cf772777;\n\n modifier onlyHolographer() {\n require(msg.sender == holographer(), \"ERC1155: holographer only\");\n _;\n }\n\n modifier onlyOwner() {\n require(msgSender() == _getOwner(), \"ERC1155: owner only function\");\n _;\n }\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external virtual override returns (bytes4) {\n return _init(initPayload);\n }\n\n function _init(bytes memory /* initPayload*/) internal returns (bytes4) {\n require(!_isInitialized(), \"ERC1155: already initialized\");\n address _holographer = msg.sender;\n address currentOwner;\n assembly {\n sstore(_holographerSlot, _holographer)\n currentOwner := sload(_ownerSlot)\n }\n require(currentOwner != address(0), \"HOLOGRAPH: owner not set\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @dev The Holographer passes original msg.sender via calldata. This function extracts it.\n */\n function msgSender() internal view returns (address sender) {\n assembly {\n switch eq(caller(), sload(_holographerSlot))\n case 0 {\n sender := caller()\n }\n default {\n sender := calldataload(sub(calldatasize(), 0x20))\n }\n }\n }\n\n /**\n * @dev Address of Holograph ERC1155 standards enforcer smart contract.\n */\n function holographer() internal view returns (address _holographer) {\n assembly {\n _holographer := sload(_holographerSlot)\n }\n }\n\n function supportsInterface(bytes4) external pure virtual returns (bool) {\n return false;\n }\n\n /**\n * @dev Address of initial creator/owner of the collection.\n */\n function owner() external view virtual returns (address) {\n return _getOwner();\n }\n\n function isOwner() external view returns (bool) {\n return (msgSender() == _getOwner());\n }\n\n function isOwner(address wallet) external view returns (bool) {\n return wallet == _getOwner();\n }\n\n function _getOwner() internal view returns (address ownerAddress) {\n assembly {\n ownerAddress := sload(_ownerSlot)\n }\n }\n\n function _setOwner(address ownerAddress) internal {\n assembly {\n sstore(_ownerSlot, ownerAddress)\n }\n }\n\n function withdraw() external virtual onlyOwner {\n payable(_getOwner()).transfer(address(this).balance);\n }\n\n event FundsReceived(address indexed source, uint256 amount);\n\n /**\n * @dev This function emits an event to indicate native gas token receipt. Do not rely on this to work.\n * Please use custom payable functions for accepting native value.\n */\n receive() external payable virtual {\n emit FundsReceived(msgSender(), msg.value);\n }\n\n /**\n * @dev Return true for any un-implemented event hooks\n */\n fallback() external payable virtual {\n assembly {\n switch eq(sload(_holographerSlot), caller())\n case 1 {\n mstore(0x80, 0x0000000000000000000000000000000000000000000000000000000000000001)\n return(0x80, 0x20)\n }\n default {\n revert(0x00, 0x00)\n }\n }\n }\n}\n" + }, + "contracts/abstract/ERC20H.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Initializable.sol\";\n\nabstract contract ERC20H is Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holographer')) - 1)\n */\n bytes32 constant _holographerSlot = 0xe9fcff60011c1a99f7b7244d1f2d9da93d79ea8ef3654ce590d775575255b2bd;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.owner')) - 1)\n */\n bytes32 constant _ownerSlot = 0xb56711ba6bd3ded7639fc335ee7524fe668a79d7558c85992e3f8494cf772777;\n\n modifier onlyHolographer() {\n require(msg.sender == holographer(), \"ERC20: holographer only\");\n _;\n }\n\n modifier onlyOwner() {\n require(msgSender() == _getOwner(), \"ERC20: owner only function\");\n _;\n }\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external virtual override returns (bytes4) {\n return _init(initPayload);\n }\n\n function _init(bytes memory /* initPayload*/) internal returns (bytes4) {\n require(!_isInitialized(), \"ERC20: already initialized\");\n address _holographer = msg.sender;\n address currentOwner;\n assembly {\n sstore(_holographerSlot, _holographer)\n currentOwner := sload(_ownerSlot)\n }\n require(currentOwner != address(0), \"HOLOGRAPH: owner not set\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @dev The Holographer passes original msg.sender via calldata. This function extracts it.\n */\n function msgSender() internal view returns (address sender) {\n assembly {\n switch eq(caller(), sload(_holographerSlot))\n case 0 {\n sender := caller()\n }\n default {\n sender := calldataload(sub(calldatasize(), 0x20))\n }\n }\n }\n\n /**\n * @dev Address of Holograph ERC20 standards enforcer smart contract.\n */\n function holographer() internal view returns (address _holographer) {\n assembly {\n _holographer := sload(_holographerSlot)\n }\n }\n\n function supportsInterface(bytes4) external pure virtual returns (bool) {\n return false;\n }\n\n /**\n * @dev Address of initial creator/owner of the token contract.\n */\n function owner() external view virtual returns (address) {\n return _getOwner();\n }\n\n function isOwner() external view returns (bool) {\n return (msgSender() == _getOwner());\n }\n\n function isOwner(address wallet) external view returns (bool) {\n return wallet == _getOwner();\n }\n\n function _getOwner() internal view returns (address ownerAddress) {\n assembly {\n ownerAddress := sload(_ownerSlot)\n }\n }\n\n function _setOwner(address ownerAddress) internal {\n assembly {\n sstore(_ownerSlot, ownerAddress)\n }\n }\n\n function withdraw() external virtual onlyOwner {\n payable(_getOwner()).transfer(address(this).balance);\n }\n\n event FundsReceived(address indexed source, uint256 amount);\n\n /**\n * @dev This function emits an event to indicate native gas token receipt. Do not rely on this to work.\n * Please use custom payable functions for accepting native value.\n */\n receive() external payable virtual {\n emit FundsReceived(msgSender(), msg.value);\n }\n\n /**\n * @dev Return true for any un-implemented event hooks\n */\n fallback() external payable virtual {\n assembly {\n switch eq(sload(_holographerSlot), caller())\n case 1 {\n mstore(0x80, 0x0000000000000000000000000000000000000000000000000000000000000001)\n return(0x80, 0x20)\n }\n default {\n revert(0x00, 0x00)\n }\n }\n }\n}\n" + }, + "contracts/abstract/ERC721H.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Initializable.sol\";\n\nabstract contract ERC721H is Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holographer')) - 1)\n */\n bytes32 constant _holographerSlot = 0xe9fcff60011c1a99f7b7244d1f2d9da93d79ea8ef3654ce590d775575255b2bd;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.owner')) - 1)\n */\n bytes32 constant _ownerSlot = 0xb56711ba6bd3ded7639fc335ee7524fe668a79d7558c85992e3f8494cf772777;\n\n modifier onlyHolographer() {\n require(msg.sender == holographer(), \"ERC721: holographer only\");\n _;\n }\n\n modifier onlyOwner() {\n require(msgSender() == _getOwner(), \"ERC721: owner only function\");\n _;\n }\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external virtual override returns (bytes4) {\n return _init(initPayload);\n }\n\n function _init(bytes memory /* initPayload*/) internal returns (bytes4) {\n require(!_isInitialized(), \"ERC721: already initialized\");\n address _holographer = msg.sender;\n address currentOwner;\n assembly {\n sstore(_holographerSlot, _holographer)\n currentOwner := sload(_ownerSlot)\n }\n require(currentOwner != address(0), \"HOLOGRAPH: owner not set\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @dev The Holographer passes original msg.sender via calldata. This function extracts it.\n */\n function msgSender() internal view returns (address sender) {\n assembly {\n switch eq(caller(), sload(_holographerSlot))\n case 0 {\n sender := caller()\n }\n default {\n sender := calldataload(sub(calldatasize(), 0x20))\n }\n }\n }\n\n /**\n * @dev Address of Holograph ERC721 standards enforcer smart contract.\n */\n function holographer() internal view returns (address _holographer) {\n assembly {\n _holographer := sload(_holographerSlot)\n }\n }\n\n function supportsInterface(bytes4) external pure virtual returns (bool) {\n return false;\n }\n\n /**\n * @dev Address of initial creator/owner of the collection.\n */\n function owner() external view virtual returns (address) {\n return _getOwner();\n }\n\n function isOwner() external view returns (bool) {\n return (msgSender() == _getOwner());\n }\n\n function isOwner(address wallet) external view returns (bool) {\n return wallet == _getOwner();\n }\n\n function _getOwner() internal view returns (address ownerAddress) {\n assembly {\n ownerAddress := sload(_ownerSlot)\n }\n }\n\n function _setOwner(address ownerAddress) internal {\n assembly {\n sstore(_ownerSlot, ownerAddress)\n }\n }\n\n function withdraw() external virtual onlyOwner {\n payable(_getOwner()).transfer(address(this).balance);\n }\n\n event FundsReceived(address indexed source, uint256 amount);\n\n /**\n * @dev This function emits an event to indicate native gas token receipt. Do not rely on this to work.\n * Please use custom payable functions for accepting native value.\n */\n receive() external payable virtual {\n emit FundsReceived(msgSender(), msg.value);\n }\n\n /**\n * @dev Return true for any un-implemented event hooks\n */\n fallback() external payable virtual {\n assembly {\n switch eq(sload(_holographerSlot), caller())\n case 1 {\n mstore(0x80, 0x0000000000000000000000000000000000000000000000000000000000000001)\n return(0x80, 0x20)\n }\n default {\n revert(0x00, 0x00)\n }\n }\n }\n}\n" + }, + "contracts/abstract/GenericH.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Initializable.sol\";\n\nabstract contract GenericH is Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holographer')) - 1)\n */\n bytes32 constant _holographerSlot = 0xe9fcff60011c1a99f7b7244d1f2d9da93d79ea8ef3654ce590d775575255b2bd;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.owner')) - 1)\n */\n bytes32 constant _ownerSlot = 0xb56711ba6bd3ded7639fc335ee7524fe668a79d7558c85992e3f8494cf772777;\n\n modifier onlyHolographer() {\n require(msg.sender == holographer(), \"GENERIC: holographer only\");\n _;\n }\n\n modifier onlyOwner() {\n require(msgSender() == _getOwner(), \"GENERIC: owner only function\");\n _;\n }\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external virtual override returns (bytes4) {\n return _init(initPayload);\n }\n\n function _init(bytes memory /* initPayload*/) internal returns (bytes4) {\n require(!_isInitialized(), \"GENERIC: already initialized\");\n address _holographer = msg.sender;\n address currentOwner;\n assembly {\n sstore(_holographerSlot, _holographer)\n currentOwner := sload(_ownerSlot)\n }\n require(currentOwner != address(0), \"HOLOGRAPH: owner not set\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @dev The Holographer passes original msg.sender via calldata. This function extracts it.\n */\n function msgSender() internal view returns (address sender) {\n assembly {\n switch eq(caller(), sload(_holographerSlot))\n case 0 {\n sender := caller()\n }\n default {\n sender := calldataload(sub(calldatasize(), 0x20))\n }\n }\n }\n\n /**\n * @dev Address of Holograph GENERIC standards enforcer smart contract.\n */\n function holographer() internal view returns (address _holographer) {\n assembly {\n _holographer := sload(_holographerSlot)\n }\n }\n\n function supportsInterface(bytes4) external pure virtual returns (bool) {\n return false;\n }\n\n /**\n * @dev Address of initial creator/owner of the contract.\n */\n function owner() external view virtual returns (address) {\n return _getOwner();\n }\n\n function isOwner() external view returns (bool) {\n return (msgSender() == _getOwner());\n }\n\n function isOwner(address wallet) external view returns (bool) {\n return wallet == _getOwner();\n }\n\n function _getOwner() internal view returns (address ownerAddress) {\n assembly {\n ownerAddress := sload(_ownerSlot)\n }\n }\n\n function _setOwner(address ownerAddress) internal {\n assembly {\n sstore(_ownerSlot, ownerAddress)\n }\n }\n\n function withdraw() external virtual onlyOwner {\n payable(_getOwner()).transfer(address(this).balance);\n }\n\n event FundsReceived(address indexed source, uint256 amount);\n\n /**\n * @dev This function emits an event to indicate native gas token receipt. Do not rely on this to work.\n * Please use custom payable functions for accepting native value.\n */\n receive() external payable virtual {\n emit FundsReceived(msgSender(), msg.value);\n }\n\n /**\n * @dev Return true for any un-implemented event hooks\n */\n fallback() external payable virtual {\n assembly {\n switch eq(sload(_holographerSlot), caller())\n case 1 {\n mstore(0x80, 0x0000000000000000000000000000000000000000000000000000000000000001)\n return(0x80, 0x20)\n }\n default {\n revert(0x00, 0x00)\n }\n }\n }\n}\n" + }, + "contracts/abstract/HLGERC20H.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Initializable.sol\";\n\nabstract contract HLGERC20H is Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holographer')) - 1)\n */\n bytes32 constant _holographerSlot = 0xe9fcff60011c1a99f7b7244d1f2d9da93d79ea8ef3654ce590d775575255b2bd;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.owner')) - 1)\n */\n bytes32 constant _ownerSlot = 0xb56711ba6bd3ded7639fc335ee7524fe668a79d7558c85992e3f8494cf772777;\n\n modifier onlyHolographer() {\n require(msg.sender == holographer(), \"ERC20: holographer only\");\n _;\n }\n\n modifier onlyOwner() {\n if (msg.sender == holographer()) {\n require(msgSender() == _getOwner(), \"ERC20: owner only function\");\n } else {\n require(msg.sender == _getOwner(), \"ERC20: owner only function\");\n }\n _;\n }\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external virtual override returns (bytes4) {\n return _init(initPayload);\n }\n\n function _init(bytes memory /* initPayload*/) internal returns (bytes4) {\n require(!_isInitialized(), \"ERC20: already initialized\");\n address _holographer = msg.sender;\n address currentOwner;\n assembly {\n sstore(_holographerSlot, _holographer)\n currentOwner := sload(_ownerSlot)\n }\n require(currentOwner != address(0), \"HOLOGRAPH: owner not set\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @dev The Holographer passes original msg.sender via calldata. This function extracts it.\n */\n function msgSender() internal pure returns (address sender) {\n assembly {\n sender := calldataload(sub(calldatasize(), 0x20))\n }\n }\n\n /**\n * @dev Address of Holograph ERC20 standards enforcer smart contract.\n */\n function holographer() internal view returns (address _holographer) {\n assembly {\n _holographer := sload(_holographerSlot)\n }\n }\n\n function supportsInterface(bytes4) external pure returns (bool) {\n return false;\n }\n\n /**\n * @dev Address of initial creator/owner of the token contract.\n */\n function owner() external view returns (address) {\n return _getOwner();\n }\n\n function isOwner() external view returns (bool) {\n if (msg.sender == holographer()) {\n return msgSender() == _getOwner();\n } else {\n return msg.sender == _getOwner();\n }\n }\n\n function isOwner(address wallet) external view returns (bool) {\n return wallet == _getOwner();\n }\n\n function _getOwner() internal view returns (address ownerAddress) {\n assembly {\n ownerAddress := sload(_ownerSlot)\n }\n }\n\n function _setOwner(address ownerAddress) internal {\n assembly {\n sstore(_ownerSlot, ownerAddress)\n }\n }\n\n function withdraw() external virtual onlyOwner {\n payable(_getOwner()).transfer(address(this).balance);\n }\n\n /**\n * @dev This function is unreachable unless custom contract address is called directly.\n * Please use custom payable functions for accepting native value.\n */\n receive() external payable {\n revert(\"ERC20: unreachable code\");\n }\n\n /**\n * @dev Return true for any un-implemented event hooks\n */\n fallback() external payable {\n assembly {\n switch eq(sload(_holographerSlot), caller())\n case 1 {\n mstore(0x80, 0x0000000000000000000000000000000000000000000000000000000000000001)\n return(0x80, 0x20)\n }\n default {\n revert(0x00, 0x00)\n }\n }\n }\n}\n" + }, + "contracts/abstract/Initializable.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../interface/InitializableInterface.sol\";\n\n/**\n * @title Initializable\n * @author https://github.com/holographxyz\n * @notice Use init instead of constructor\n * @dev This allows for use of init function to make one time initializations without the need for a constructor\n */\nabstract contract Initializable is InitializableInterface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.initialized')) - 1)\n */\n bytes32 constant _initializedSlot = 0x4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a01;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external virtual returns (bytes4);\n\n function _isInitialized() internal view returns (bool initialized) {\n assembly {\n initialized := sload(_initializedSlot)\n }\n }\n\n function _setInitialized() internal {\n assembly {\n sstore(_initializedSlot, 0x0000000000000000000000000000000000000000000000000000000000000001)\n }\n }\n}\n" + }, + "contracts/abstract/NonReentrant.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nabstract contract NonReentrant {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.reentrant')) - 1)\n */\n bytes32 constant _reentrantSlot = 0x04b524dd539523930d3901481aa9455d7752b49add99e1647adb8b09a3137279;\n\n modifier nonReentrant() {\n require(getStatus() != 2, \"HOLOGRAPH: reentrant call\");\n setStatus(2);\n _;\n setStatus(1);\n }\n\n constructor() {}\n\n function getStatus() internal view returns (uint256 status) {\n assembly {\n status := sload(_reentrantSlot)\n }\n }\n\n function setStatus(uint256 status) internal {\n assembly {\n sstore(_reentrantSlot, status)\n }\n }\n}\n" + }, + "contracts/abstract/Owner.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nabstract contract Owner {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.owner')) - 1)\n */\n bytes32 constant _ownerSlot = 0xb56711ba6bd3ded7639fc335ee7524fe668a79d7558c85992e3f8494cf772777;\n\n /**\n * @dev Event emitted when contract owner is changed.\n */\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n modifier onlyOwner() virtual {\n require(msg.sender == getOwner(), \"HOLOGRAPH: owner only function\");\n _;\n }\n\n function owner() external view virtual returns (address) {\n return getOwner();\n }\n\n constructor() {}\n\n function getOwner() public view returns (address ownerAddress) {\n assembly {\n ownerAddress := sload(_ownerSlot)\n }\n }\n\n function setOwner(address ownerAddress) public virtual onlyOwner {\n address previousOwner = getOwner();\n assembly {\n sstore(_ownerSlot, ownerAddress)\n }\n emit OwnershipTransferred(previousOwner, ownerAddress);\n }\n\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0), \"HOLOGRAPH: zero address\");\n assembly {\n sstore(_ownerSlot, newOwner)\n }\n }\n\n function ownerCall(address target, bytes calldata data) external payable onlyOwner {\n assembly {\n calldatacopy(0, data.offset, data.length)\n let result := call(gas(), target, callvalue(), 0, data.length, 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/abstract/StrictERC1155H.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../interface/HolographedERC1155.sol\";\n\nimport \"./ERC1155H.sol\";\n\nabstract contract StrictERC1155H is ERC1155H, HolographedERC1155 {\n /**\n * @dev Dummy variable to prevent empty functions from making \"switch to pure\" warnings.\n */\n bool private _success;\n\n function bridgeIn(\n uint32 /* _chainId*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool) {\n _success = true;\n return true;\n }\n\n function bridgeOut(\n uint32 /* _chainId*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bytes memory _data) {\n _success = true;\n _data = abi.encode(holographer());\n }\n\n function afterApprove(\n address /* _owner*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeApprove(\n address /* _owner*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterApprovalAll(\n address /* _to*/,\n bool /* _approved*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeApprovalAll(\n address /* _to*/,\n bool /* _approved*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterBurn(\n address /* _owner*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeBurn(\n address /* _owner*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterMint(\n address /* _owner*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeMint(\n address /* _owner*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterSafeTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeSafeTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterOnERC1155Received(\n address /* _operator*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeOnERC1155Received(\n address /* _operator*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n}\n" + }, + "contracts/abstract/StrictERC20H.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../interface/HolographedERC20.sol\";\n\nimport \"./ERC20H.sol\";\n\nabstract contract StrictERC20H is ERC20H, HolographedERC20 {\n /**\n * @dev Dummy variable to prevent empty functions from making \"switch to pure\" warnings.\n */\n bool private _success;\n\n function bridgeIn(\n uint32 /* _chainId*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool) {\n _success = true;\n return true;\n }\n\n function bridgeOut(\n uint32 /* _chainId*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bytes memory _data) {\n /**\n * @dev This is just here to suppress unused parameter warning\n */\n _data = abi.encodePacked(holographer());\n _success = true;\n }\n\n function afterApprove(\n address /* _owner*/,\n address /* _to*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeApprove(\n address /* _owner*/,\n address /* _to*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterOnERC20Received(\n address /* _token*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeOnERC20Received(\n address /* _token*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterBurn(\n address /* _owner*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeBurn(\n address /* _owner*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterMint(\n address /* _owner*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeMint(\n address /* _owner*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterSafeTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeSafeTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function onAllowance(\n address /* _owner*/,\n address /* _to*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = false;\n return _success;\n }\n}\n" + }, + "contracts/abstract/StrictERC721H.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../interface/HolographedERC721.sol\";\n\nimport \"./ERC721H.sol\";\n\nabstract contract StrictERC721H is ERC721H, HolographedERC721 {\n /**\n * @dev Dummy variable to prevent empty functions from making \"switch to pure\" warnings.\n */\n bool private _success;\n\n function bridgeIn(\n uint32 /* _chainId*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool) {\n _success = true;\n return true;\n }\n\n function bridgeOut(\n uint32 /* _chainId*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/\n ) external virtual onlyHolographer returns (bytes memory _data) {\n _success = true;\n _data = abi.encode(holographer());\n }\n\n function afterApprove(\n address /* _owner*/,\n address /* _to*/,\n uint256 /* _tokenId*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeApprove(\n address /* _owner*/,\n address /* _to*/,\n uint256 /* _tokenId*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterApprovalAll(\n address /* _sender*/,\n address /* _to*/,\n bool /* _approved*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeApprovalAll(\n address /* _sender*/,\n address /* _to*/,\n bool /* _approved*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterBurn(\n address /* _owner*/,\n uint256 /* _tokenId*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeBurn(\n address /* _owner*/,\n uint256 /* _tokenId*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterMint(\n address /* _owner*/,\n uint256 /* _tokenId*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeMint(\n address /* _owner*/,\n uint256 /* _tokenId*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterSafeTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeSafeTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterOnERC721Received(\n address /* _operator*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeOnERC721Received(\n address /* _operator*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function onIsApprovedForAll(\n address /* _wallet*/,\n address /* _operator*/\n ) external view virtual onlyHolographer returns (bool approved) {\n approved = _success;\n return false;\n }\n\n function contractURI() external view virtual onlyHolographer returns (string memory contractJSON) {\n contractJSON = _success ? \"\" : \"\";\n }\n}\n" + }, + "contracts/drops/interface/IDropsPriceOracle.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\ninterface IDropsPriceOracle {\n function convertUsdToWei(uint256 usdAmount) external view returns (uint256 weiAmount);\n}\n" + }, + "contracts/drops/interface/IHolographDropERC721.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {IMetadataRenderer} from \"./IMetadataRenderer.sol\";\n\nimport {AddressMintDetails} from \"../struct/AddressMintDetails.sol\";\nimport {SaleDetails} from \"../struct/SaleDetails.sol\";\n\n/// @notice Interface for HOLOGRAPH Drops contract\ninterface IHolographDropERC721 {\n // Access errors\n\n /// @notice Only admin can access this function\n error Access_OnlyAdmin();\n /// @notice Missing the given role or admin access\n error Access_MissingRoleOrAdmin(bytes32 role);\n /// @notice Withdraw is not allowed by this user\n error Access_WithdrawNotAllowed();\n /// @notice Cannot withdraw funds due to ETH send failure.\n error Withdraw_FundsSendFailure();\n /// @notice Mint fee send failure\n error MintFee_FundsSendFailure();\n\n /// @notice Call to external metadata renderer failed.\n error ExternalMetadataRenderer_CallFailed();\n\n /// @notice Thrown when the operator for the contract is not allowed\n /// @dev Used when strict enforcement of marketplaces for creator royalties is desired.\n error OperatorNotAllowed(address operator);\n\n /// @notice Thrown when there is no active market filter DAO address supported for the current chain\n /// @dev Used for enabling and disabling filter for the given chain.\n error MarketFilterDAOAddressNotSupportedForChain();\n\n /// @notice Used when the operator filter registry external call fails\n /// @dev Used for bubbling error up to clients.\n error RemoteOperatorFilterRegistryCallFailed();\n\n // Sale/Purchase errors\n /// @notice Sale is inactive\n error Sale_Inactive();\n /// @notice Presale is inactive\n error Presale_Inactive();\n /// @notice Presale merkle root is invalid\n error Presale_MerkleNotApproved();\n /// @notice Wrong price for purchase\n error Purchase_WrongPrice(uint256 correctPrice);\n /// @notice NFT sold out\n error Mint_SoldOut();\n /// @notice Too many purchase for address\n error Purchase_TooManyForAddress();\n /// @notice Too many presale for address\n error Presale_TooManyForAddress();\n\n // Admin errors\n /// @notice Royalty percentage too high\n error Setup_RoyaltyPercentageTooHigh(uint16 maxRoyaltyBPS);\n /// @notice Invalid admin upgrade address\n error Admin_InvalidUpgradeAddress(address proposedAddress);\n /// @notice Unable to finalize an edition not marked as open (size set to uint64_max_value)\n error Admin_UnableToFinalizeNotOpenEdition();\n\n /// @notice Event emitted for mint fee payout\n /// @param mintFeeAmount amount of the mint fee\n /// @param mintFeeRecipient recipient of the mint fee\n /// @param success if the payout succeeded\n event MintFeePayout(uint256 mintFeeAmount, address mintFeeRecipient, bool success);\n\n /// @notice Event emitted for each sale\n /// @param to address sale was made to\n /// @param quantity quantity of the minted nfts\n /// @param pricePerToken price for each token\n /// @param firstPurchasedTokenId first purchased token ID (to get range add to quantity for max)\n event Sale(\n address indexed to,\n uint256 indexed quantity,\n uint256 indexed pricePerToken,\n uint256 firstPurchasedTokenId\n );\n\n /// @notice Sales configuration has been changed\n /// @dev To access new sales configuration, use getter function.\n /// @param changedBy Changed by user\n event SalesConfigChanged(address indexed changedBy);\n\n /// @notice Event emitted when the funds recipient is changed\n /// @param newAddress new address for the funds recipient\n /// @param changedBy address that the recipient is changed by\n event FundsRecipientChanged(address indexed newAddress, address indexed changedBy);\n\n /// @notice Event emitted when the funds are withdrawn from the minting contract\n /// @param withdrawnBy address that issued the withdraw\n /// @param withdrawnTo address that the funds were withdrawn to\n /// @param amount amount that was withdrawn\n /// @param feeRecipient user getting withdraw fee (if any)\n /// @param feeAmount amount of the fee getting sent (if any)\n event FundsWithdrawn(\n address indexed withdrawnBy,\n address indexed withdrawnTo,\n uint256 amount,\n address feeRecipient,\n uint256 feeAmount\n );\n\n /// @notice Event emitted when an open mint is finalized and further minting is closed forever on the contract.\n /// @param sender address sending close mint\n /// @param numberOfMints number of mints the contract is finalized at\n event OpenMintFinalized(address indexed sender, uint256 numberOfMints);\n\n /// @notice Event emitted when metadata renderer is updated.\n /// @param sender address of the updater\n /// @param renderer new metadata renderer address\n event UpdatedMetadataRenderer(address sender, IMetadataRenderer renderer);\n\n /// @notice Admin function to update the sales configuration settings\n /// @param publicSalePrice public sale price in ether\n /// @param maxSalePurchasePerAddress Max # of purchases (public) per address allowed\n /// @param publicSaleStart unix timestamp when the public sale starts\n /// @param publicSaleEnd unix timestamp when the public sale ends (set to 0 to disable)\n /// @param presaleStart unix timestamp when the presale starts\n /// @param presaleEnd unix timestamp when the presale ends\n /// @param presaleMerkleRoot merkle root for the presale information\n function setSaleConfiguration(\n uint104 publicSalePrice,\n uint32 maxSalePurchasePerAddress,\n uint64 publicSaleStart,\n uint64 publicSaleEnd,\n uint64 presaleStart,\n uint64 presaleEnd,\n bytes32 presaleMerkleRoot\n ) external;\n\n /// @notice External purchase function (payable in eth)\n /// @param quantity to purchase\n /// @return first minted token ID\n function purchase(uint256 quantity) external payable returns (uint256);\n\n /// @notice External purchase presale function (takes a merkle proof and matches to root) (payable in eth)\n /// @param quantity to purchase\n /// @param maxQuantity can purchase (verified by merkle root)\n /// @param pricePerToken price per token allowed (verified by merkle root)\n /// @param merkleProof input for merkle proof leaf verified by merkle root\n /// @return first minted token ID\n function purchasePresale(\n uint256 quantity,\n uint256 maxQuantity,\n uint256 pricePerToken,\n bytes32[] memory merkleProof\n ) external payable returns (uint256);\n\n /// @notice Function to return the global sales details for the given drop\n function saleDetails() external view returns (SaleDetails memory);\n\n /// @notice Function to return the specific sales details for a given address\n /// @param minter address for minter to return mint information for\n function mintedPerAddress(address minter) external view returns (AddressMintDetails memory);\n\n /// @notice This is the opensea/public owner setting that can be set by the contract admin\n function owner() external view returns (address);\n\n /// @notice Update the metadata renderer\n /// @param newRenderer new address for renderer\n /// @param setupRenderer data to call to bootstrap data for the new renderer (optional)\n function setMetadataRenderer(IMetadataRenderer newRenderer, bytes memory setupRenderer) external;\n\n /// @notice This is an admin mint function to mint a quantity to a specific address\n /// @param to address to mint to\n /// @param quantity quantity to mint\n /// @return the id of the first minted NFT\n function adminMint(address to, uint256 quantity) external returns (uint256);\n\n /// @notice This is an admin mint function to mint a single nft each to a list of addresses\n /// @param to list of addresses to mint an NFT each to\n /// @return the id of the first minted NFT\n function adminMintAirdrop(address[] memory to) external returns (uint256);\n\n /// @dev Getter for admin role associated with the contract to handle metadata\n /// @return boolean if address is admin\n function isAdmin(address user) external view returns (bool);\n}\n" + }, + "contracts/drops/interface/IMetadataRenderer.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\ninterface IMetadataRenderer {\n function tokenURI(uint256) external view returns (string memory);\n\n function contractURI() external view returns (string memory);\n\n function initializeWithData(bytes memory initData) external;\n}\n" + }, + "contracts/drops/interface/IOperatorFilterRegistry.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\ninterface IOperatorFilterRegistry {\n function isOperatorAllowed(address registrant, address operator) external view returns (bool);\n\n function register(address registrant) external;\n\n function registerAndSubscribe(address registrant, address subscription) external;\n\n function registerAndCopyEntries(address registrant, address registrantToCopy) external;\n\n function updateOperator(address registrant, address operator, bool filtered) external;\n\n function updateOperators(address registrant, address[] calldata operators, bool filtered) external;\n\n function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external;\n\n function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external;\n\n function subscribe(address registrant, address registrantToSubscribe) external;\n\n function unsubscribe(address registrant, bool copyExistingEntries) external;\n\n function subscriptionOf(address addr) external returns (address registrant);\n\n function subscribers(address registrant) external returns (address[] memory);\n\n function subscriberAt(address registrant, uint256 index) external returns (address);\n\n function copyEntriesOf(address registrant, address registrantToCopy) external;\n\n function isOperatorFiltered(address registrant, address operator) external returns (bool);\n\n function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool);\n\n function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool);\n\n function filteredOperators(address addr) external returns (address[] memory);\n\n function filteredCodeHashes(address addr) external returns (bytes32[] memory);\n\n function filteredOperatorAt(address registrant, uint256 index) external returns (address);\n\n function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32);\n\n function isRegistered(address addr) external returns (bool);\n\n function codeHashOf(address addr) external returns (bytes32);\n\n function unregister(address registrant) external;\n}\n" + }, + "contracts/drops/library/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nlibrary Address {\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "contracts/drops/library/MerkleProof.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nlibrary MerkleProof {\n /**\n * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree\n * defined by `root`. For this, a `proof` must be provided, containing\n * sibling hashes on the branch from the leaf to the root of the tree. Each\n * pair of leaves and each pair of pre-images are assumed to be sorted.\n */\n function verify(bytes32[] memory proof, bytes32 root, bytes32 leaf) internal pure returns (bool) {\n return processProof(proof, leaf) == root;\n }\n\n /**\n * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up\n * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt\n * hash matches the root of the tree. When processing the proof, the pairs\n * of leafs & pre-images are assumed to be sorted.\n *\n * _Available since v4.4._\n */\n function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {\n bytes32 computedHash = leaf;\n for (uint256 i = 0; i < proof.length; i++) {\n bytes32 proofElement = proof[i];\n if (computedHash <= proofElement) {\n // Hash(current computed hash + current element of the proof)\n computedHash = _efficientHash(computedHash, proofElement);\n } else {\n // Hash(current element of the proof + current computed hash)\n computedHash = _efficientHash(proofElement, computedHash);\n }\n }\n return computedHash;\n }\n\n function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {\n assembly {\n mstore(0x00, a)\n mstore(0x20, b)\n value := keccak256(0x00, 0x40)\n }\n }\n}\n" + }, + "contracts/drops/library/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nlibrary Strings {\n bytes16 private constant _HEX_SYMBOLS = \"0123456789abcdef\";\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n // Inspired by OraclizeAPI's implementation - MIT licence\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n if (value == 0) {\n return \"0\";\n }\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n bytes memory buffer = new bytes(digits);\n while (value != 0) {\n digits -= 1;\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n value /= 10;\n }\n return string(buffer);\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n if (value == 0) {\n return \"0x00\";\n }\n uint256 temp = value;\n uint256 length = 0;\n while (temp != 0) {\n length++;\n temp >>= 8;\n }\n return toHexString(value, length);\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n}\n" + }, + "contracts/drops/metadata/DropsMetadataRenderer.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IMetadataRenderer} from \"../interface/IMetadataRenderer.sol\";\n\nimport {Strings} from \"../library/Strings.sol\";\n\nimport {MetadataRenderAdminCheck} from \"./MetadataRenderAdminCheck.sol\";\n\n/// @notice Drops metadata system\ncontract DropsMetadataRenderer is Initializable, IMetadataRenderer, MetadataRenderAdminCheck {\n error MetadataFrozen();\n\n /// Event to mark updated metadata information\n event MetadataUpdated(\n address indexed target,\n string metadataBase,\n string metadataExtension,\n string contractURI,\n uint256 freezeAt\n );\n\n /// @notice Hash to mark updated provenance hash\n event ProvenanceHashUpdated(address indexed target, bytes32 provenanceHash);\n\n /// @notice Struct to store metadata info and update data\n struct MetadataURIInfo {\n string base;\n string extension;\n string contractURI;\n uint256 freezeAt;\n }\n\n /// @notice NFT metadata by contract\n mapping(address => MetadataURIInfo) public metadataBaseByContract;\n\n /// @notice Optional provenance hashes for NFT metadata by contract\n mapping(address => bytes32) public provenanceHashes;\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @dev A blank init function is required to be able to call genesisDeriveFutureAddress to get the deterministic address\n * @dev Since no data is required to be intialized the selector is just returned and _setInitialized() does not need to be called\n */\n function init(bytes memory /* initPayload */) external pure override returns (bytes4) {\n return Initializable.init.selector;\n }\n\n /// @notice Standard init for drop metadata from root drop contract\n /// @param data passed in for initialization\n function initializeWithData(bytes memory data) external {\n // data format: string baseURI, string newContractURI\n (string memory initialBaseURI, string memory initialContractURI) = abi.decode(data, (string, string));\n _updateMetadataDetails(msg.sender, initialBaseURI, \"\", initialContractURI, 0);\n }\n\n /// @notice Update the provenance hash (optional) for a given nft\n /// @param target target address to update\n /// @param provenanceHash provenance hash to set\n function updateProvenanceHash(address target, bytes32 provenanceHash) external requireSenderAdmin(target) {\n provenanceHashes[target] = provenanceHash;\n emit ProvenanceHashUpdated(target, provenanceHash);\n }\n\n /// @notice Update metadata base URI and contract URI\n /// @param baseUri new base URI\n /// @param newContractUri new contract URI (can be an empty string)\n function updateMetadataBase(\n address target,\n string memory baseUri,\n string memory newContractUri\n ) external requireSenderAdmin(target) {\n _updateMetadataDetails(target, baseUri, \"\", newContractUri, 0);\n }\n\n /// @notice Update metadata base URI, extension, contract URI and freezing detailsUpdate metadata base URI, extension, contract URI and freezing detailsUpdate metadata base URI, extension, contract URI and freezing detailsUpdate metadata base URI, extension, contract URI and freezing detailsUpdate metadata base URI, extension, contract URI and freezing detailsUpdate metadata base URI, extension, contract URI and freezing detailsUpdate metadata base URI, extension, contract URI and freezing detailsUpdate metadata base URI, extension, contract URI and freezing details\n /// @param target target contract to update metadata for\n /// @param metadataBase new base URI to update metadata with\n /// @param metadataExtension new extension to append to base metadata URI\n /// @param freezeAt time to freeze the contract metadata at (set to 0 to disable)\n function updateMetadataBaseWithDetails(\n address target,\n string memory metadataBase,\n string memory metadataExtension,\n string memory newContractURI,\n uint256 freezeAt\n ) external requireSenderAdmin(target) {\n _updateMetadataDetails(target, metadataBase, metadataExtension, newContractURI, freezeAt);\n }\n\n /// @notice Internal metadata update function\n /// @param metadataBase Base URI to update metadata for\n /// @param metadataExtension Extension URI to update metadata for\n /// @param freezeAt timestamp to freeze metadata (set to 0 to disable freezing)\n function _updateMetadataDetails(\n address target,\n string memory metadataBase,\n string memory metadataExtension,\n string memory newContractURI,\n uint256 freezeAt\n ) internal {\n if (freezeAt != 0 && freezeAt > block.timestamp) {\n revert MetadataFrozen();\n }\n\n metadataBaseByContract[target] = MetadataURIInfo({\n base: metadataBase,\n extension: metadataExtension,\n contractURI: newContractURI,\n freezeAt: freezeAt\n });\n emit MetadataUpdated({\n target: target,\n metadataBase: metadataBase,\n metadataExtension: metadataExtension,\n contractURI: newContractURI,\n freezeAt: freezeAt\n });\n }\n\n /// @notice A contract URI for the given drop contract\n /// @dev reverts if a contract uri is not provided\n /// @return contract uri for the contract metadata\n function contractURI() external view override returns (string memory) {\n string memory uri = metadataBaseByContract[msg.sender].contractURI;\n if (bytes(uri).length == 0) revert();\n return uri;\n }\n\n /// @notice A token URI for the given drops contract\n /// @dev reverts if a contract uri is not set\n /// @return token URI for the given token ID and contract (set by msg.sender)\n function tokenURI(uint256 tokenId) external view override returns (string memory) {\n MetadataURIInfo memory info = metadataBaseByContract[msg.sender];\n\n if (bytes(info.base).length == 0) revert();\n\n return string(abi.encodePacked(info.base, Strings.toString(tokenId), info.extension));\n }\n}\n" + }, + "contracts/drops/metadata/EditionsMetadataRenderer.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport \"../../abstract/Initializable.sol\";\n\nimport {IMetadataRenderer} from \"../interface/IMetadataRenderer.sol\";\nimport {IHolographDropERC721} from \"../interface/IHolographDropERC721.sol\";\nimport {ERC721Metadata} from \"../../interface/ERC721Metadata.sol\";\nimport {NFTMetadataRenderer} from \"../utils/NFTMetadataRenderer.sol\";\nimport {MetadataRenderAdminCheck} from \"./MetadataRenderAdminCheck.sol\";\n\nimport {Configuration} from \"../struct/Configuration.sol\";\n\ninterface DropConfigGetter {\n function config() external view returns (Configuration memory config);\n}\n\n/// @notice EditionsMetadataRenderer for editions support\ncontract EditionsMetadataRenderer is Initializable, IMetadataRenderer, MetadataRenderAdminCheck {\n /// @notice Storage for token edition information\n struct TokenEditionInfo {\n string description;\n string imageURI;\n string animationURI;\n }\n\n /// @notice Event for updated Media URIs\n event MediaURIsUpdated(address indexed target, address sender, string imageURI, string animationURI);\n\n /// @notice Event for a new edition initialized\n /// @dev admin function indexer feedback\n event EditionInitialized(address indexed target, string description, string imageURI, string animationURI);\n\n /// @notice Description updated for this edition\n /// @dev admin function indexer feedback\n event DescriptionUpdated(address indexed target, address sender, string newDescription);\n\n /// @notice Token information mapping storage\n mapping(address => TokenEditionInfo) public tokenInfos;\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @dev A blank init function is required to be able to call genesisDeriveFutureAddress to get the deterministic address\n * @dev Since no data is required to be intialized the selector is just returned and _setInitialized() does not need to be called\n */\n function init(bytes memory /* initPayload */) external pure override returns (bytes4) {\n return InitializableInterface.init.selector;\n }\n\n /// @notice Update media URIs\n /// @param target target for contract to update metadata for\n /// @param imageURI new image uri address\n /// @param animationURI new animation uri address\n function updateMediaURIs(\n address target,\n string memory imageURI,\n string memory animationURI\n ) external requireSenderAdmin(target) {\n tokenInfos[target].imageURI = imageURI;\n tokenInfos[target].animationURI = animationURI;\n emit MediaURIsUpdated({target: target, sender: msg.sender, imageURI: imageURI, animationURI: animationURI});\n }\n\n /// @notice Admin function to update description\n /// @param target target description\n /// @param newDescription new description\n function updateDescription(address target, string memory newDescription) external requireSenderAdmin(target) {\n tokenInfos[target].description = newDescription;\n\n emit DescriptionUpdated({target: target, sender: msg.sender, newDescription: newDescription});\n }\n\n /// @notice Default initializer for edition data from a specific contract\n /// @param data data to init with\n function initializeWithData(bytes memory data) external {\n // data format: description, imageURI, animationURI\n (string memory description, string memory imageURI, string memory animationURI) = abi.decode(\n data,\n (string, string, string)\n );\n\n tokenInfos[msg.sender] = TokenEditionInfo({\n description: description,\n imageURI: imageURI,\n animationURI: animationURI\n });\n emit EditionInitialized({\n target: msg.sender,\n description: description,\n imageURI: imageURI,\n animationURI: animationURI\n });\n }\n\n /// @notice Contract URI information getter\n /// @return contract uri (if set)\n function contractURI() external view override returns (string memory) {\n address target = msg.sender;\n TokenEditionInfo storage editionInfo = tokenInfos[target];\n Configuration memory config = DropConfigGetter(target).config();\n\n return\n NFTMetadataRenderer.encodeContractURIJSON({\n name: ERC721Metadata(target).name(),\n description: editionInfo.description,\n imageURI: editionInfo.imageURI,\n animationURI: editionInfo.animationURI,\n royaltyBPS: uint256(config.royaltyBPS),\n royaltyRecipient: config.fundsRecipient\n });\n }\n\n /// @notice Token URI information getter\n /// @param tokenId to get uri for\n /// @return contract uri (if set)\n function tokenURI(uint256 tokenId) external view override returns (string memory) {\n address target = msg.sender;\n\n TokenEditionInfo memory info = tokenInfos[target];\n IHolographDropERC721 media = IHolographDropERC721(target);\n\n uint256 maxSupply = media.saleDetails().maxSupply;\n\n // For open editions, set max supply to 0 for renderer to remove the edition max number\n // This will be added back on once the open edition is \"finalized\"\n if (maxSupply == type(uint64).max) {\n maxSupply = 0;\n }\n\n return\n NFTMetadataRenderer.createMetadataEdition({\n name: ERC721Metadata(target).name(),\n description: info.description,\n imageURI: info.imageURI,\n animationURI: info.animationURI,\n tokenOfEdition: tokenId,\n editionSize: maxSupply\n });\n }\n}\n" + }, + "contracts/drops/metadata/MetadataRenderAdminCheck.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {IHolographDropERC721} from \"../interface/IHolographDropERC721.sol\";\n\ncontract MetadataRenderAdminCheck {\n error Access_OnlyAdmin();\n\n /// @notice Modifier to require the sender to be an admin\n /// @param target address that the user wants to modify\n modifier requireSenderAdmin(address target) {\n if (target != msg.sender && !IHolographDropERC721(target).isAdmin(msg.sender)) {\n revert Access_OnlyAdmin();\n }\n\n _;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleArbitrumNova.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOracleArbitrumNova is Admin, Initializable, IDropsPriceOracle {\n address constant WETH = 0x0000000000000000000000000000000000000000; // 18 decimals\n address constant USDC = 0x0000000000000000000000000000000000000000; // 6 decimals\n address constant USDT = 0x0000000000000000000000000000000000000000; // 6 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n\n IUniswapV2Pair constant UniV2UsdcPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n IUniswapV2Pair constant UniV2UsdtPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external view returns (uint256 weiAmount) {\n weiAmount =\n (_getSushiUSDC(usdAmount) + _getSushiUSDT(usdAmount) + _getUniUSDC(usdAmount) + _getUniUSDT(usdAmount)) /\n 4;\n }\n\n function _getSushiUSDC(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdcPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getSushiUSDT(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdtPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUniUSDC(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = UniV2UsdcPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUniUSDT(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = UniV2UsdtPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleArbitrumOne.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOracleArbitrumOne is Admin, Initializable, IDropsPriceOracle {\n address constant WETH = 0x82aF49447D8a07e3bd95BD0d56f35241523fBab1; // 18 decimals\n address constant USDC = 0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8; // 6 decimals\n address constant USDT = 0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9; // 6 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0x905dfCD5649217c42684f23958568e533C711Aa3);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0xCB0E5bFa72bBb4d16AB5aA0c60601c438F04b4ad);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external view returns (uint256 weiAmount) {\n weiAmount = (_getSushiUSDC(usdAmount) + _getSushiUSDT(usdAmount)) / 2;\n }\n\n function _getSushiUSDC(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdcPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDC\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getSushiUSDT(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdtPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleArbitrumTestnetGoerli.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOracleArbitrumTestnetGoerli is Admin, Initializable, IDropsPriceOracle {\n address constant WETH = 0x0000000000000000000000000000000000000000; // 18 decimals\n address constant USDC = 0x0000000000000000000000000000000000000000; // 6 decimals\n address constant USDT = 0x0000000000000000000000000000000000000000; // 6 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n\n IUniswapV2Pair constant UniV2UsdcPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n IUniswapV2Pair constant UniV2UsdtPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external pure returns (uint256 weiAmount) {\n weiAmount = (_getSushiUSDC(usdAmount) + _getSushiUSDT(usdAmount)) / 2;\n }\n\n function _getSushiUSDC(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdcPool.getReserves();\n uint112 _reserve0 = 14248413024234;\n uint112 _reserve1 = 8237558200010903232972;\n // x is always native token / WETH\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getSushiUSDT(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdtPool.getReserves();\n uint112 _reserve0 = 7190540826553156156218;\n uint112 _reserve1 = 12394808861997;\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleAvalanche.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {ILBPair} from \"./interface/ILBPair.sol\";\nimport {ILBRouter} from \"./interface/ILBRouter.sol\";\n\ncontract DropsPriceOracleAvalanche is Admin, Initializable, IDropsPriceOracle {\n address constant WAVAX = 0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7; // 18 decimals\n address constant USDC = 0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E; // 6 decimals\n address constant USDT = 0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7; // 6 decimals\n\n ILBRouter constant TraderJoeRouter = ILBRouter(0xb4315e873dBcf96Ffd0acd8EA43f689D8c20fB30);\n ILBPair constant TraderJoeUsdcPool = ILBPair(0xD446eb1660F766d533BeCeEf890Df7A69d26f7d1);\n ILBPair constant TraderJoeUsdtPool = ILBPair(0x87EB2F90d7D0034571f343fb7429AE22C1Bd9F72);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external view returns (uint256 weiAmount) {\n if (usdAmount == 0) {\n weiAmount = 0;\n return weiAmount;\n }\n weiAmount = (_getTraderJoeUSDC(usdAmount) + _getTraderJoeUSDT(usdAmount)) / 2;\n }\n\n function _getTraderJoeUSDC(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint128 amountIn, uint128 amountOutLeft, uint128 fee) = TraderJoeRouter.getSwapIn(\n TraderJoeUsdcPool,\n uint128(usdAmount),\n true\n );\n weiAmount = amountIn + fee;\n }\n\n function _getTraderJoeUSDT(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint128 amountIn, uint128 amountOutLeft, uint128 fee) = TraderJoeRouter.getSwapIn(\n TraderJoeUsdtPool,\n uint128(usdAmount),\n true\n );\n weiAmount = amountIn + fee;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleAvalancheTestnet.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOracleAvalancheTestnet is Admin, Initializable, IDropsPriceOracle {\n address constant WAVAX = 0xd00ae08403B9bbb9124bB305C09058E32C39A48c;\n address constant USDC = 0x5425890298aed601595a70AB815c96711a31Bc65; // 6 decimals\n address constant USDT = 0x0000000000000000000000000000000000000000; // 6 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0x1B92bf7394d317A758d953F6428445A8977e195C);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external pure returns (uint256 weiAmount) {\n weiAmount = (_getSushiUSDC(usdAmount) + _getSushiUSDT(usdAmount)) / 2;\n }\n\n function _getSushiUSDC(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdcPool.getReserves();\n uint112 _reserve0 = 133224784402692878349;\n uint112 _reserve1 = 2205199060;\n // x is always native token / WAVAX\n uint256 x = _reserve0;\n // y is always USD token / USDC\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getSushiUSDT(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdtPool.getReserves();\n uint112 _reserve0 = 2205199060;\n uint112 _reserve1 = 133224784402692878349;\n // x is always native token / WAVAX\n uint256 x = _reserve1;\n // y is always USD token / USDT\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleBinanceSmartChain.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOracleBinanceSmartChain is Admin, Initializable, IDropsPriceOracle {\n address constant WBNB = 0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c;\n address constant USDC = 0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d; // 18 decimals\n address constant USDT = 0x55d398326f99059fF775485246999027B3197955; // 18 decimals\n address constant BUSD = 0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56; // 18 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0xc7632B7b2d768bbb30a404E13E1dE48d1439ec21);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0x2905817b020fD35D9d09672946362b62766f0d69);\n IUniswapV2Pair constant SushiV2BusdPool = IUniswapV2Pair(0xDc558D64c29721d74C4456CfB4363a6e6660A9Bb);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external view returns (uint256 weiAmount) {\n weiAmount = (_getUSDC(usdAmount) + _getUSDT(usdAmount) + _getBUSD(usdAmount)) / 3;\n }\n\n function _getUSDC(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n usdAmount = usdAmount * (10 ** (18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdcPool.getReserves();\n // x is always native token / WBNB\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUSDT(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n usdAmount = usdAmount * (10 ** (18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdtPool.getReserves();\n // x is always native token / WBNB\n uint256 x = _reserve1;\n // y is always USD token / USDT\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getBUSD(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n usdAmount = usdAmount * (10 ** (18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2BusdPool.getReserves();\n // x is always native token / WBNB\n uint256 x = _reserve0;\n // y is always USD token / BUSD\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleBinanceSmartChainTestnet.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOracleBinanceSmartChainTestnet is Admin, Initializable, IDropsPriceOracle {\n address constant WBNB = 0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd;\n address constant USDC = 0x0000000000000000000000000000000000000000; // 18 decimals\n address constant USDT = 0x337610d27c682E347C9cD60BD4b3b107C9d34dDd; // 18 decimals\n address constant BUSD = 0xeD24FC36d5Ee211Ea25A80239Fb8C4Cfd80f12Ee; // 18 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0x622A814A1c842D34F9828370d9015Dc9d4c5b6F1);\n IUniswapV2Pair constant SushiV2BusdPool = IUniswapV2Pair(0x9A0eeceDA5c0203924484F5467cEE4321cf6A189);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external pure returns (uint256 weiAmount) {\n weiAmount = (_getUSDC(usdAmount) + _getUSDT(usdAmount) + _getBUSD(usdAmount)) / 3;\n }\n\n function _getUSDC(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n usdAmount = usdAmount * (10 ** (18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdcPool.getReserves();\n uint112 _reserve0 = 13021882855694508203763;\n uint112 _reserve1 = 40694382259814793835;\n // x is always native token / WBNB\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUSDT(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n usdAmount = usdAmount * (10 ** (18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdtPool.getReserves();\n uint112 _reserve0 = 27194218672878436248359;\n uint112 _reserve1 = 85236077287017749564;\n // x is always native token / WBNB\n uint256 x = _reserve1;\n // y is always USD token / USDT\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getBUSD(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n usdAmount = usdAmount * (10 ** (18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2BusdPool.getReserves();\n uint112 _reserve0 = 18888866298338593382;\n uint112 _reserve1 = 6055244885106491861952;\n // x is always native token / WBNB\n uint256 x = _reserve0;\n // y is always USD token / BUSD\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleEthereum.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOracleEthereum is Admin, Initializable, IDropsPriceOracle {\n address constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; // 18 decimals\n address constant USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48; // 6 decimals\n address constant USDT = 0xdAC17F958D2ee523a2206206994597C13D831ec7; // 6 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0x397FF1542f962076d0BFE58eA045FfA2d347ACa0);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0x06da0fd433C1A5d7a4faa01111c044910A184553);\n\n IUniswapV2Pair constant UniV2UsdcPool = IUniswapV2Pair(0xB4e16d0168e52d35CaCD2c6185b44281Ec28C9Dc);\n IUniswapV2Pair constant UniV2UsdtPool = IUniswapV2Pair(0x0d4a11d5EEaaC28EC3F61d100daF4d40471f1852);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external view returns (uint256 weiAmount) {\n weiAmount =\n (_getSushiUSDC(usdAmount) + _getSushiUSDT(usdAmount) + _getUniUSDC(usdAmount) + _getUniUSDT(usdAmount)) /\n 4;\n }\n\n function _getSushiUSDC(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdcPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getSushiUSDT(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdtPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUniUSDC(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = UniV2UsdcPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUniUSDT(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = UniV2UsdtPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleEthereumTestnetGoerli.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOracleEthereumTestnetGoerli is Admin, Initializable, IDropsPriceOracle {\n address constant WETH = 0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6; // 18 decimals\n address constant USDC = 0x07865c6E87B9F70255377e024ace6630C1Eaa37F; // 6 decimals\n address constant USDT = 0x0000000000000000000000000000000000000000; // 6 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n\n IUniswapV2Pair constant UniV2UsdcPool = IUniswapV2Pair(0xB4e16d0168e52d35CaCD2c6185b44281Ec28C9Dc);\n IUniswapV2Pair constant UniV2UsdtPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external pure returns (uint256 weiAmount) {\n weiAmount =\n (_getSushiUSDC(usdAmount) + _getSushiUSDT(usdAmount) + _getUniUSDC(usdAmount) + _getUniUSDT(usdAmount)) /\n 4;\n }\n\n function _getSushiUSDC(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdcPool.getReserves();\n uint112 _reserve0 = 14248413024234;\n uint112 _reserve1 = 8237558200010903232972;\n // x is always native token / WETH\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getSushiUSDT(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdtPool.getReserves();\n uint112 _reserve0 = 7190540826553156156218;\n uint112 _reserve1 = 12394808861997;\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUniUSDC(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = UniV2UsdcPool.getReserves();\n uint112 _reserve0 = 27969935741431;\n uint112 _reserve1 = 16175569695347837629371;\n // x is always native token / WETH\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUniUSDT(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = UniV2UsdtPool.getReserves();\n uint112 _reserve0 = 16492332449237327237450;\n uint112 _reserve1 = 28443279643692;\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleOptimism.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOracleOptimism is Admin, Initializable, IDropsPriceOracle {\n address constant WETH = 0x4200000000000000000000000000000000000006; // 18 decimals\n address constant USDC = 0x7F5c764cBc14f9669B88837ca1490cCa17c31607; // 6 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0x7086622E6Db990385B102D79CB1218947fb549a9);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external view returns (uint256 weiAmount) {\n weiAmount = _getSushiUSDC(usdAmount);\n }\n\n function _getSushiUSDC(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdcPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDC\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleOptimismTestnetGoerli.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOracleOptimismTestnetGoerli is Admin, Initializable, IDropsPriceOracle {\n address constant WETH = 0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6; // 18 decimals\n address constant USDC = 0x07865c6E87B9F70255377e024ace6630C1Eaa37F; // 6 decimals\n address constant USDT = 0x0000000000000000000000000000000000000000; // 6 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n\n IUniswapV2Pair constant UniV2UsdcPool = IUniswapV2Pair(0xB4e16d0168e52d35CaCD2c6185b44281Ec28C9Dc);\n IUniswapV2Pair constant UniV2UsdtPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external pure returns (uint256 weiAmount) {\n weiAmount =\n (_getSushiUSDC(usdAmount) + _getSushiUSDT(usdAmount) + _getUniUSDC(usdAmount) + _getUniUSDT(usdAmount)) /\n 4;\n }\n\n function _getSushiUSDC(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdcPool.getReserves();\n uint112 _reserve0 = 14248413024234;\n uint112 _reserve1 = 8237558200010903232972;\n // x is always native token / WETH\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getSushiUSDT(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdtPool.getReserves();\n uint112 _reserve0 = 7190540826553156156218;\n uint112 _reserve1 = 12394808861997;\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUniUSDC(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = UniV2UsdcPool.getReserves();\n uint112 _reserve0 = 27969935741431;\n uint112 _reserve1 = 16175569695347837629371;\n // x is always native token / WETH\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUniUSDT(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = UniV2UsdtPool.getReserves();\n uint112 _reserve0 = 16492332449237327237450;\n uint112 _reserve1 = 28443279643692;\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOraclePolygon.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOraclePolygon is Admin, Initializable, IDropsPriceOracle {\n address constant WMATIC = 0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270; // 18 decimals\n address constant USDC = 0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174; // 6 decimals\n address constant USDT = 0xc2132D05D31c914a87C6611C10748AEb04B58e8F; // 6 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0xcd353F79d9FADe311fC3119B841e1f456b54e858);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0x55FF76BFFC3Cdd9D5FdbBC2ece4528ECcE45047e);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external view returns (uint256 weiAmount) {\n weiAmount = (_getUSDC(usdAmount) + _getUSDT(usdAmount)) / 2;\n }\n\n function _getUSDC(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdcPool.getReserves();\n // x is always native token / WMATIC\n uint256 x = _reserve0;\n // y is always USD token / USDC\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUSDT(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdtPool.getReserves();\n // x is always native token / WMATIC\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOraclePolygonTestnet.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOraclePolygonTestnet is Admin, Initializable, IDropsPriceOracle {\n address constant WMATIC = 0x5B67676a984807a212b1c59eBFc9B3568a474F0a; // 18 decimals\n address constant USDC = 0x742DfA5Aa70a8212857966D491D67B09Ce7D6ec7; // 6 decimals\n address constant USDT = 0x0000000000000000000000000000000000000000; // 6 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0x412D4b3C56836ff78F1C8197c6718A6DFf3702F5);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external pure returns (uint256 weiAmount) {\n weiAmount = (_getUSDC(usdAmount) + _getUSDT(usdAmount)) / 2;\n }\n\n function _getUSDC(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdcPool.getReserves();\n uint112 _reserve0 = 185186616552407552407159;\n uint112 _reserve1 = 207981749778;\n // x is always native token / WMATIC\n uint256 x = _reserve0;\n // y is always USD token / USDC\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUSDT(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdtPool.getReserves();\n uint112 _reserve0 = 13799757434002573084812;\n uint112 _reserve1 = 15484391886;\n // x is always native token / WMATIC\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DummyDropsPriceOracle.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DummyDropsPriceOracle is Admin, Initializable, IDropsPriceOracle {\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external pure returns (uint256 weiAmount) {\n uint112 _reserve0 = 8237558200010903232972;\n uint112 _reserve1 = 14248413024234;\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDC\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/interface/ILBPair.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\ninterface ILBPair {\n function tokenX() external view returns (address);\n\n function tokenY() external view returns (address);\n\n function getReservesAndId() external view returns (uint256 reserveX, uint256 reserveY, uint256 activeId);\n}\n" + }, + "contracts/drops/oracle/interface/ILBRouter.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {ILBPair} from \"./ILBPair.sol\";\n\ninterface ILBRouter {\n function getSwapIn(\n ILBPair LBPair,\n uint128 amountOut,\n bool swapForY\n ) external view returns (uint128 amountIn, uint128 amountOutLeft, uint128 fee);\n}\n" + }, + "contracts/drops/oracle/interface/IUniswapV2Pair.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\ninterface IUniswapV2Pair {\n event Approval(address indexed owner, address indexed spender, uint256 value);\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n function name() external pure returns (string memory);\n\n function symbol() external pure returns (string memory);\n\n function decimals() external pure returns (uint8);\n\n function totalSupply() external view returns (uint256);\n\n function balanceOf(address owner) external view returns (uint256);\n\n function allowance(address owner, address spender) external view returns (uint256);\n\n function approve(address spender, uint256 value) external returns (bool);\n\n function transfer(address to, uint256 value) external returns (bool);\n\n function transferFrom(address from, address to, uint256 value) external returns (bool);\n\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n\n function PERMIT_TYPEHASH() external pure returns (bytes32);\n\n function nonces(address owner) external view returns (uint256);\n\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n event Mint(address indexed sender, uint256 amount0, uint256 amount1);\n event Burn(address indexed sender, uint256 amount0, uint256 amount1, address indexed to);\n event Swap(\n address indexed sender,\n uint256 amount0In,\n uint256 amount1In,\n uint256 amount0Out,\n uint256 amount1Out,\n address indexed to\n );\n event Sync(uint112 reserve0, uint112 reserve1);\n\n function MINIMUM_LIQUIDITY() external pure returns (uint256);\n\n function factory() external view returns (address);\n\n function token0() external view returns (address);\n\n function token1() external view returns (address);\n\n function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);\n\n function price0CumulativeLast() external view returns (uint256);\n\n function price1CumulativeLast() external view returns (uint256);\n\n function kLast() external view returns (uint256);\n\n function mint(address to) external returns (uint256 liquidity);\n\n function burn(address to) external returns (uint256 amount0, uint256 amount1);\n\n function swap(uint256 amount0Out, uint256 amount1Out, address to, bytes calldata data) external;\n\n function skim(address to) external;\n\n function sync() external;\n\n function initialize(address, address) external;\n}\n" + }, + "contracts/drops/oracle/interface/IUniswapV3Pair.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\ninterface IUniswapV3PoolImmutables {\n /// @notice The contract that deployed the pool, which must adhere to the IUniswapV3Factory interface\n /// @return The contract address\n function factory() external view returns (address);\n\n /// @notice The first of the two tokens of the pool, sorted by address\n /// @return The token contract address\n function token0() external view returns (address);\n\n /// @notice The second of the two tokens of the pool, sorted by address\n /// @return The token contract address\n function token1() external view returns (address);\n\n /// @notice The pool's fee in hundredths of a bip, i.e. 1e-6\n /// @return The fee\n function fee() external view returns (uint24);\n\n /// @notice The pool tick spacing\n /// @dev Ticks can only be used at multiples of this value, minimum of 1 and always positive\n /// e.g.: a tickSpacing of 3 means ticks can be initialized every 3rd tick, i.e., ..., -6, -3, 0, 3, 6, ...\n /// This value is an int24 to avoid casting even though it is always positive.\n /// @return The tick spacing\n function tickSpacing() external view returns (int24);\n\n /// @notice The maximum amount of position liquidity that can use any tick in the range\n /// @dev This parameter is enforced per tick to prevent liquidity from overflowing a uint128 at any point, and\n /// also prevents out-of-range liquidity from being used to prevent adding in-range liquidity to a pool\n /// @return The max amount of liquidity per tick\n function maxLiquidityPerTick() external view returns (uint128);\n}\n\ninterface IUniswapV3PoolState {\n /// @notice The 0th storage slot in the pool stores many values, and is exposed as a single method to save gas\n /// when accessed externally.\n /// @return sqrtPriceX96 The current price of the pool as a sqrt(token1/token0) Q64.96 value\n /// tick The current tick of the pool, i.e. according to the last tick transition that was run.\n /// This value may not always be equal to SqrtTickMath.getTickAtSqrtRatio(sqrtPriceX96) if the price is on a tick\n /// boundary.\n /// observationIndex The index of the last oracle observation that was written,\n /// observationCardinality The current maximum number of observations stored in the pool,\n /// observationCardinalityNext The next maximum number of observations, to be updated when the observation.\n /// feeProtocol The protocol fee for both tokens of the pool.\n /// Encoded as two 4 bit values, where the protocol fee of token1 is shifted 4 bits and the protocol fee of token0\n /// is the lower 4 bits. Used as the denominator of a fraction of the swap fee, e.g. 4 means 1/4th of the swap fee.\n /// unlocked Whether the pool is currently locked to reentrancy\n function slot0()\n external\n view\n returns (\n uint160 sqrtPriceX96,\n int24 tick,\n uint16 observationIndex,\n uint16 observationCardinality,\n uint16 observationCardinalityNext,\n uint8 feeProtocol,\n bool unlocked\n );\n\n /// @notice The fee growth as a Q128.128 fees of token0 collected per unit of liquidity for the entire life of the pool\n /// @dev This value can overflow the uint256\n function feeGrowthGlobal0X128() external view returns (uint256);\n\n /// @notice The fee growth as a Q128.128 fees of token1 collected per unit of liquidity for the entire life of the pool\n /// @dev This value can overflow the uint256\n function feeGrowthGlobal1X128() external view returns (uint256);\n\n /// @notice The amounts of token0 and token1 that are owed to the protocol\n /// @dev Protocol fees will never exceed uint128 max in either token\n function protocolFees() external view returns (uint128 token0, uint128 token1);\n\n /// @notice The currently in range liquidity available to the pool\n /// @dev This value has no relationship to the total liquidity across all ticks\n function liquidity() external view returns (uint128);\n\n /// @notice Look up information about a specific tick in the pool\n /// @param tick The tick to look up\n /// @return liquidityGross the total amount of position liquidity that uses the pool either as tick lower or\n /// tick upper,\n /// liquidityNet how much liquidity changes when the pool price crosses the tick,\n /// feeGrowthOutside0X128 the fee growth on the other side of the tick from the current tick in token0,\n /// feeGrowthOutside1X128 the fee growth on the other side of the tick from the current tick in token1,\n /// tickCumulativeOutside the cumulative tick value on the other side of the tick from the current tick\n /// secondsPerLiquidityOutsideX128 the seconds spent per liquidity on the other side of the tick from the current tick,\n /// secondsOutside the seconds spent on the other side of the tick from the current tick,\n /// initialized Set to true if the tick is initialized, i.e. liquidityGross is greater than 0, otherwise equal to false.\n /// Outside values can only be used if the tick is initialized, i.e. if liquidityGross is greater than 0.\n /// In addition, these values are only relative and must be used only in comparison to previous snapshots for\n /// a specific position.\n function ticks(\n int24 tick\n )\n external\n view\n returns (\n uint128 liquidityGross,\n int128 liquidityNet,\n uint256 feeGrowthOutside0X128,\n uint256 feeGrowthOutside1X128,\n int56 tickCumulativeOutside,\n uint160 secondsPerLiquidityOutsideX128,\n uint32 secondsOutside,\n bool initialized\n );\n\n /// @notice Returns 256 packed tick initialized boolean values. See TickBitmap for more information\n function tickBitmap(int16 wordPosition) external view returns (uint256);\n\n /// @notice Returns the information about a position by the position's key\n /// @param key The position's key is a hash of a preimage composed by the owner, tickLower and tickUpper\n /// @return _liquidity The amount of liquidity in the position,\n /// Returns feeGrowthInside0LastX128 fee growth of token0 inside the tick range as of the last mint/burn/poke,\n /// Returns feeGrowthInside1LastX128 fee growth of token1 inside the tick range as of the last mint/burn/poke,\n /// Returns tokensOwed0 the computed amount of token0 owed to the position as of the last mint/burn/poke,\n /// Returns tokensOwed1 the computed amount of token1 owed to the position as of the last mint/burn/poke\n function positions(\n bytes32 key\n )\n external\n view\n returns (\n uint128 _liquidity,\n uint256 feeGrowthInside0LastX128,\n uint256 feeGrowthInside1LastX128,\n uint128 tokensOwed0,\n uint128 tokensOwed1\n );\n\n /// @notice Returns data about a specific observation index\n /// @param index The element of the observations array to fetch\n /// @dev You most likely want to use #observe() instead of this method to get an observation as of some amount of time\n /// ago, rather than at a specific index in the array.\n /// @return blockTimestamp The timestamp of the observation,\n /// Returns tickCumulative the tick multiplied by seconds elapsed for the life of the pool as of the observation timestamp,\n /// Returns secondsPerLiquidityCumulativeX128 the seconds per in range liquidity for the life of the pool as of the observation timestamp,\n /// Returns initialized whether the observation has been initialized and the values are safe to use\n function observations(\n uint256 index\n )\n external\n view\n returns (uint32 blockTimestamp, int56 tickCumulative, uint160 secondsPerLiquidityCumulativeX128, bool initialized);\n}\n\ninterface IUniswapV3PoolDerivedState {\n /// @notice Returns the cumulative tick and liquidity as of each timestamp `secondsAgo` from the current block timestamp\n /// @dev To get a time weighted average tick or liquidity-in-range, you must call this with two values, one representing\n /// the beginning of the period and another for the end of the period. E.g., to get the last hour time-weighted average tick,\n /// you must call it with secondsAgos = [3600, 0].\n /// @dev The time weighted average tick represents the geometric time weighted average price of the pool, in\n /// log base sqrt(1.0001) of token1 / token0. The TickMath library can be used to go from a tick value to a ratio.\n /// @param secondsAgos From how long ago each cumulative tick and liquidity value should be returned\n /// @return tickCumulatives Cumulative tick values as of each `secondsAgos` from the current block timestamp\n /// @return secondsPerLiquidityCumulativeX128s Cumulative seconds per liquidity-in-range value as of each `secondsAgos` from the current block\n /// timestamp\n function observe(\n uint32[] calldata secondsAgos\n ) external view returns (int56[] memory tickCumulatives, uint160[] memory secondsPerLiquidityCumulativeX128s);\n\n /// @notice Returns a snapshot of the tick cumulative, seconds per liquidity and seconds inside a tick range\n /// @dev Snapshots must only be compared to other snapshots, taken over a period for which a position existed.\n /// I.e., snapshots cannot be compared if a position is not held for the entire period between when the first\n /// snapshot is taken and the second snapshot is taken.\n /// @param tickLower The lower tick of the range\n /// @param tickUpper The upper tick of the range\n /// @return tickCumulativeInside The snapshot of the tick accumulator for the range\n /// @return secondsPerLiquidityInsideX128 The snapshot of seconds per liquidity for the range\n /// @return secondsInside The snapshot of seconds per liquidity for the range\n function snapshotCumulativesInside(\n int24 tickLower,\n int24 tickUpper\n ) external view returns (int56 tickCumulativeInside, uint160 secondsPerLiquidityInsideX128, uint32 secondsInside);\n}\n\ninterface IUniswapV3PoolActions {\n /// @notice Sets the initial price for the pool\n /// @dev Price is represented as a sqrt(amountToken1/amountToken0) Q64.96 value\n /// @param sqrtPriceX96 the initial sqrt price of the pool as a Q64.96\n function initialize(uint160 sqrtPriceX96) external;\n\n /// @notice Adds liquidity for the given recipient/tickLower/tickUpper position\n /// @dev The caller of this method receives a callback in the form of IUniswapV3MintCallback#uniswapV3MintCallback\n /// in which they must pay any token0 or token1 owed for the liquidity. The amount of token0/token1 due depends\n /// on tickLower, tickUpper, the amount of liquidity, and the current price.\n /// @param recipient The address for which the liquidity will be created\n /// @param tickLower The lower tick of the position in which to add liquidity\n /// @param tickUpper The upper tick of the position in which to add liquidity\n /// @param amount The amount of liquidity to mint\n /// @param data Any data that should be passed through to the callback\n /// @return amount0 The amount of token0 that was paid to mint the given amount of liquidity. Matches the value in the callback\n /// @return amount1 The amount of token1 that was paid to mint the given amount of liquidity. Matches the value in the callback\n function mint(\n address recipient,\n int24 tickLower,\n int24 tickUpper,\n uint128 amount,\n bytes calldata data\n ) external returns (uint256 amount0, uint256 amount1);\n\n /// @notice Collects tokens owed to a position\n /// @dev Does not recompute fees earned, which must be done either via mint or burn of any amount of liquidity.\n /// Collect must be called by the position owner. To withdraw only token0 or only token1, amount0Requested or\n /// amount1Requested may be set to zero. To withdraw all tokens owed, caller may pass any value greater than the\n /// actual tokens owed, e.g. type(uint128).max. Tokens owed may be from accumulated swap fees or burned liquidity.\n /// @param recipient The address which should receive the fees collected\n /// @param tickLower The lower tick of the position for which to collect fees\n /// @param tickUpper The upper tick of the position for which to collect fees\n /// @param amount0Requested How much token0 should be withdrawn from the fees owed\n /// @param amount1Requested How much token1 should be withdrawn from the fees owed\n /// @return amount0 The amount of fees collected in token0\n /// @return amount1 The amount of fees collected in token1\n function collect(\n address recipient,\n int24 tickLower,\n int24 tickUpper,\n uint128 amount0Requested,\n uint128 amount1Requested\n ) external returns (uint128 amount0, uint128 amount1);\n\n /// @notice Burn liquidity from the sender and account tokens owed for the liquidity to the position\n /// @dev Can be used to trigger a recalculation of fees owed to a position by calling with an amount of 0\n /// @dev Fees must be collected separately via a call to #collect\n /// @param tickLower The lower tick of the position for which to burn liquidity\n /// @param tickUpper The upper tick of the position for which to burn liquidity\n /// @param amount How much liquidity to burn\n /// @return amount0 The amount of token0 sent to the recipient\n /// @return amount1 The amount of token1 sent to the recipient\n function burn(int24 tickLower, int24 tickUpper, uint128 amount) external returns (uint256 amount0, uint256 amount1);\n\n /// @notice Swap token0 for token1, or token1 for token0\n /// @dev The caller of this method receives a callback in the form of IUniswapV3SwapCallback#uniswapV3SwapCallback\n /// @param recipient The address to receive the output of the swap\n /// @param zeroForOne The direction of the swap, true for token0 to token1, false for token1 to token0\n /// @param amountSpecified The amount of the swap, which implicitly configures the swap as exact input (positive), or exact output (negative)\n /// @param sqrtPriceLimitX96 The Q64.96 sqrt price limit. If zero for one, the price cannot be less than this\n /// value after the swap. If one for zero, the price cannot be greater than this value after the swap\n /// @param data Any data to be passed through to the callback\n /// @return amount0 The delta of the balance of token0 of the pool, exact when negative, minimum when positive\n /// @return amount1 The delta of the balance of token1 of the pool, exact when negative, minimum when positive\n function swap(\n address recipient,\n bool zeroForOne,\n int256 amountSpecified,\n uint160 sqrtPriceLimitX96,\n bytes calldata data\n ) external returns (int256 amount0, int256 amount1);\n\n /// @notice Receive token0 and/or token1 and pay it back, plus a fee, in the callback\n /// @dev The caller of this method receives a callback in the form of IUniswapV3FlashCallback#uniswapV3FlashCallback\n /// @dev Can be used to donate underlying tokens pro-rata to currently in-range liquidity providers by calling\n /// with 0 amount{0,1} and sending the donation amount(s) from the callback\n /// @param recipient The address which will receive the token0 and token1 amounts\n /// @param amount0 The amount of token0 to send\n /// @param amount1 The amount of token1 to send\n /// @param data Any data to be passed through to the callback\n function flash(address recipient, uint256 amount0, uint256 amount1, bytes calldata data) external;\n\n /// @notice Increase the maximum number of price and liquidity observations that this pool will store\n /// @dev This method is no-op if the pool already has an observationCardinalityNext greater than or equal to\n /// the input observationCardinalityNext.\n /// @param observationCardinalityNext The desired minimum number of observations for the pool to store\n function increaseObservationCardinalityNext(uint16 observationCardinalityNext) external;\n}\n\ninterface IUniswapV3PoolOwnerActions {\n /// @notice Set the denominator of the protocol's % share of the fees\n /// @param feeProtocol0 new protocol fee for token0 of the pool\n /// @param feeProtocol1 new protocol fee for token1 of the pool\n function setFeeProtocol(uint8 feeProtocol0, uint8 feeProtocol1) external;\n\n /// @notice Collect the protocol fee accrued to the pool\n /// @param recipient The address to which collected protocol fees should be sent\n /// @param amount0Requested The maximum amount of token0 to send, can be 0 to collect fees in only token1\n /// @param amount1Requested The maximum amount of token1 to send, can be 0 to collect fees in only token0\n /// @return amount0 The protocol fee collected in token0\n /// @return amount1 The protocol fee collected in token1\n function collectProtocol(\n address recipient,\n uint128 amount0Requested,\n uint128 amount1Requested\n ) external returns (uint128 amount0, uint128 amount1);\n}\n\ninterface IUniswapV3PoolEvents {\n /// @notice Emitted exactly once by a pool when #initialize is first called on the pool\n /// @dev Mint/Burn/Swap cannot be emitted by the pool before Initialize\n /// @param sqrtPriceX96 The initial sqrt price of the pool, as a Q64.96\n /// @param tick The initial tick of the pool, i.e. log base 1.0001 of the starting price of the pool\n event Initialize(uint160 sqrtPriceX96, int24 tick);\n\n /// @notice Emitted when liquidity is minted for a given position\n /// @param sender The address that minted the liquidity\n /// @param owner The owner of the position and recipient of any minted liquidity\n /// @param tickLower The lower tick of the position\n /// @param tickUpper The upper tick of the position\n /// @param amount The amount of liquidity minted to the position range\n /// @param amount0 How much token0 was required for the minted liquidity\n /// @param amount1 How much token1 was required for the minted liquidity\n event Mint(\n address sender,\n address indexed owner,\n int24 indexed tickLower,\n int24 indexed tickUpper,\n uint128 amount,\n uint256 amount0,\n uint256 amount1\n );\n\n /// @notice Emitted when fees are collected by the owner of a position\n /// @dev Collect events may be emitted with zero amount0 and amount1 when the caller chooses not to collect fees\n /// @param owner The owner of the position for which fees are collected\n /// @param tickLower The lower tick of the position\n /// @param tickUpper The upper tick of the position\n /// @param amount0 The amount of token0 fees collected\n /// @param amount1 The amount of token1 fees collected\n event Collect(\n address indexed owner,\n address recipient,\n int24 indexed tickLower,\n int24 indexed tickUpper,\n uint128 amount0,\n uint128 amount1\n );\n\n /// @notice Emitted when a position's liquidity is removed\n /// @dev Does not withdraw any fees earned by the liquidity position, which must be withdrawn via #collect\n /// @param owner The owner of the position for which liquidity is removed\n /// @param tickLower The lower tick of the position\n /// @param tickUpper The upper tick of the position\n /// @param amount The amount of liquidity to remove\n /// @param amount0 The amount of token0 withdrawn\n /// @param amount1 The amount of token1 withdrawn\n event Burn(\n address indexed owner,\n int24 indexed tickLower,\n int24 indexed tickUpper,\n uint128 amount,\n uint256 amount0,\n uint256 amount1\n );\n\n /// @notice Emitted by the pool for any swaps between token0 and token1\n /// @param sender The address that initiated the swap call, and that received the callback\n /// @param recipient The address that received the output of the swap\n /// @param amount0 The delta of the token0 balance of the pool\n /// @param amount1 The delta of the token1 balance of the pool\n /// @param sqrtPriceX96 The sqrt(price) of the pool after the swap, as a Q64.96\n /// @param liquidity The liquidity of the pool after the swap\n /// @param tick The log base 1.0001 of price of the pool after the swap\n event Swap(\n address indexed sender,\n address indexed recipient,\n int256 amount0,\n int256 amount1,\n uint160 sqrtPriceX96,\n uint128 liquidity,\n int24 tick\n );\n\n /// @notice Emitted by the pool for any flashes of token0/token1\n /// @param sender The address that initiated the swap call, and that received the callback\n /// @param recipient The address that received the tokens from flash\n /// @param amount0 The amount of token0 that was flashed\n /// @param amount1 The amount of token1 that was flashed\n /// @param paid0 The amount of token0 paid for the flash, which can exceed the amount0 plus the fee\n /// @param paid1 The amount of token1 paid for the flash, which can exceed the amount1 plus the fee\n event Flash(\n address indexed sender,\n address indexed recipient,\n uint256 amount0,\n uint256 amount1,\n uint256 paid0,\n uint256 paid1\n );\n\n /// @notice Emitted by the pool for increases to the number of observations that can be stored\n /// @dev observationCardinalityNext is not the observation cardinality until an observation is written at the index\n /// just before a mint/swap/burn.\n /// @param observationCardinalityNextOld The previous value of the next observation cardinality\n /// @param observationCardinalityNextNew The updated value of the next observation cardinality\n event IncreaseObservationCardinalityNext(uint16 observationCardinalityNextOld, uint16 observationCardinalityNextNew);\n\n /// @notice Emitted when the protocol fee is changed by the pool\n /// @param feeProtocol0Old The previous value of the token0 protocol fee\n /// @param feeProtocol1Old The previous value of the token1 protocol fee\n /// @param feeProtocol0New The updated value of the token0 protocol fee\n /// @param feeProtocol1New The updated value of the token1 protocol fee\n event SetFeeProtocol(uint8 feeProtocol0Old, uint8 feeProtocol1Old, uint8 feeProtocol0New, uint8 feeProtocol1New);\n\n /// @notice Emitted when the collected protocol fees are withdrawn by the factory owner\n /// @param sender The address that collects the protocol fees\n /// @param recipient The address that receives the collected protocol fees\n /// @param amount0 The amount of token0 protocol fees that is withdrawn\n /// @param amount0 The amount of token1 protocol fees that is withdrawn\n event CollectProtocol(address indexed sender, address indexed recipient, uint128 amount0, uint128 amount1);\n}\n\ninterface IUniswapV3Pool is\n IUniswapV3PoolImmutables,\n IUniswapV3PoolState,\n IUniswapV3PoolDerivedState,\n IUniswapV3PoolActions,\n IUniswapV3PoolOwnerActions,\n IUniswapV3PoolEvents\n{}\n\ninterface IUniswapV3Pair is IUniswapV3Pool {}\n" + }, + "contracts/drops/oracle/interface/IUniswapV3Quoter.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\ninterface IUniswapV3Quoter {\n /// @notice Returns the amount out received for a given exact input swap without executing the swap\n /// @param path The path of the swap, i.e. each token pair and the pool fee\n /// @param amountIn The amount of the first token to swap\n /// @return amountOut The amount of the last token that would be received\n function quoteExactInput(bytes memory path, uint256 amountIn) external returns (uint256 amountOut);\n\n /// @notice Returns the amount out received for a given exact input but for a swap of a single pool\n /// @param tokenIn The token being swapped in\n /// @param tokenOut The token being swapped out\n /// @param fee The fee of the token pool to consider for the pair\n /// @param amountIn The desired input amount\n /// @param sqrtPriceLimitX96 The price limit of the pool that cannot be exceeded by the swap\n /// @return amountOut The amount of `tokenOut` that would be received\n function quoteExactInputSingle(\n address tokenIn,\n address tokenOut,\n uint24 fee,\n uint256 amountIn,\n uint160 sqrtPriceLimitX96\n ) external returns (uint256 amountOut);\n\n /// @notice Returns the amount in required for a given exact output swap without executing the swap\n /// @param path The path of the swap, i.e. each token pair and the pool fee\n /// @param amountOut The amount of the last token to receive\n /// @return amountIn The amount of first token required to be paid\n function quoteExactOutput(bytes memory path, uint256 amountOut) external returns (uint256 amountIn);\n\n /// @notice Returns the amount in required to receive the given exact output amount but for a swap of a single pool\n /// @param tokenIn The token being swapped in\n /// @param tokenOut The token being swapped out\n /// @param fee The fee of the token pool to consider for the pair\n /// @param amountOut The desired output amount\n /// @param sqrtPriceLimitX96 The price limit of the pool that cannot be exceeded by the swap\n /// @return amountIn The amount required as the input for the swap in order to receive `amountOut`\n function quoteExactOutputSingle(\n address tokenIn,\n address tokenOut,\n uint24 fee,\n uint256 amountOut,\n uint160 sqrtPriceLimitX96\n ) external returns (uint256 amountIn);\n}\n" + }, + "contracts/drops/proxy/DropsMetadataRendererProxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../../abstract/Admin.sol\";\nimport \"../../abstract/Initializable.sol\";\n\ncontract DropsMetadataRendererProxy is Admin, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.dropsMetadataRenderer')) - 1)\n */\n bytes32 constant _dropsMetadataRendererSlot = 0xe1d18664c68b1eedd4e2fc65b2d42097f2cd8cd4c2f1a9a6418986c9f5da3817;\n\n constructor() {}\n\n function init(bytes memory data) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address dropsMetadataRenderer, bytes memory initCode) = abi.decode(data, (address, bytes));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_dropsMetadataRendererSlot, dropsMetadataRenderer)\n }\n (bool success, bytes memory returnData) = dropsMetadataRenderer.delegatecall(\n abi.encodeWithSignature(\"init(bytes)\", initCode)\n );\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == Initializable.init.selector, \"initialization failed\");\n _setInitialized();\n return Initializable.init.selector;\n }\n\n function getDropsMetadataRenderer() external view returns (address dropsMetadataRenderer) {\n assembly {\n dropsMetadataRenderer := sload(_dropsMetadataRendererSlot)\n }\n }\n\n function setDropsMetadataRenderer(address dropsMetadataRenderer) external onlyAdmin {\n assembly {\n sstore(_dropsMetadataRendererSlot, dropsMetadataRenderer)\n }\n }\n\n receive() external payable {}\n\n fallback() external payable {\n assembly {\n let dropsMetadataRenderer := sload(_dropsMetadataRendererSlot)\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), dropsMetadataRenderer, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/drops/proxy/DropsPriceOracleProxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../../abstract/Admin.sol\";\nimport \"../../abstract/Initializable.sol\";\n\ncontract DropsPriceOracleProxy is Admin, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.dropsPriceOracle')) - 1)\n */\n bytes32 constant _dropsPriceOracleSlot = 0x26600f0171e5a2b86874be26285c66444b2a6fa5f62114757214d5e732aded36;\n\n constructor() {}\n\n function init(bytes memory data) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address dropsPriceOracle, bytes memory initCode) = abi.decode(data, (address, bytes));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_dropsPriceOracleSlot, dropsPriceOracle)\n }\n (bool success, bytes memory returnData) = dropsPriceOracle.delegatecall(\n abi.encodeWithSignature(\"init(bytes)\", initCode)\n );\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == Initializable.init.selector, \"initialization failed\");\n _setInitialized();\n return Initializable.init.selector;\n }\n\n function getDropsPriceOracle() external view returns (address dropsPriceOracle) {\n assembly {\n dropsPriceOracle := sload(_dropsPriceOracleSlot)\n }\n }\n\n function setDropsPriceOracle(address dropsPriceOracle) external onlyAdmin {\n assembly {\n sstore(_dropsPriceOracleSlot, dropsPriceOracle)\n }\n }\n\n receive() external payable {}\n\n fallback() external payable {\n assembly {\n let dropsPriceOracle := sload(_dropsPriceOracleSlot)\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), dropsPriceOracle, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/drops/proxy/EditionsMetadataRendererProxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../../abstract/Admin.sol\";\nimport \"../../abstract/Initializable.sol\";\n\ncontract EditionsMetadataRendererProxy is Admin, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.editionsMetadataRenderer')) - 1)\n */\n bytes32 constant _editionsMetadataRendererSlot = 0x747f2428bc473d14fd9642872693b7bc7ad3f58057c4c084ce1f541a26e4bcb1;\n\n constructor() {}\n\n function init(bytes memory data) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address editionsMetadataRenderer, bytes memory initCode) = abi.decode(data, (address, bytes));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_editionsMetadataRendererSlot, editionsMetadataRenderer)\n }\n (bool success, bytes memory returnData) = editionsMetadataRenderer.delegatecall(\n abi.encodeWithSignature(\"init(bytes)\", initCode)\n );\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == Initializable.init.selector, \"initialization failed\");\n _setInitialized();\n return Initializable.init.selector;\n }\n\n function getEditionsMetadataRenderer() external view returns (address editionsMetadataRenderer) {\n assembly {\n editionsMetadataRenderer := sload(_editionsMetadataRendererSlot)\n }\n }\n\n function setEditionsMetadataRenderer(address editionsMetadataRenderer) external onlyAdmin {\n assembly {\n sstore(_editionsMetadataRendererSlot, editionsMetadataRenderer)\n }\n }\n\n receive() external payable {}\n\n fallback() external payable {\n assembly {\n let editionsMetadataRenderer := sload(_editionsMetadataRendererSlot)\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), editionsMetadataRenderer, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/drops/proxy/HolographDropERC721Proxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../../abstract/Admin.sol\";\nimport \"../../abstract/Initializable.sol\";\n\nimport \"../../interface/HolographRegistryInterface.sol\";\n\ncontract HolographDropERC721Proxy is Admin, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.contractType')) - 1)\n */\n bytes32 constant _contractTypeSlot = 0x0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c7;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\n */\n bytes32 constant _registrySlot = 0xce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7;\n\n constructor() {}\n\n function init(bytes memory data) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (bytes32 contractType, address registry, bytes memory initCode) = abi.decode(data, (bytes32, address, bytes));\n assembly {\n sstore(_contractTypeSlot, contractType)\n sstore(_registrySlot, registry)\n }\n (bool success, bytes memory returnData) = getHolographDropERC721Source().delegatecall(\n abi.encodeWithSignature(\"init(bytes)\", initCode)\n );\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == Initializable.init.selector, \"initialization failed\");\n\n _setInitialized();\n return Initializable.init.selector;\n }\n\n function getHolographDropERC721Source() public view returns (address) {\n HolographRegistryInterface registry;\n bytes32 contractType;\n assembly {\n registry := sload(_registrySlot)\n contractType := sload(_contractTypeSlot)\n }\n return registry.getContractTypeAddress(contractType);\n }\n\n receive() external payable {}\n\n fallback() external payable {\n address HolographDropERC721Source = getHolographDropERC721Source();\n assembly {\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), HolographDropERC721Source, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/drops/struct/AddressMintDetails.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\n/// @notice Return type of specific mint counts and details per address\nstruct AddressMintDetails {\n /// Number of total mints from the given address\n uint256 totalMints;\n /// Number of presale mints from the given address\n uint256 presaleMints;\n /// Number of public mints from the given address\n uint256 publicMints;\n}\n" + }, + "contracts/drops/struct/Configuration.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {IMetadataRenderer} from \"../interface/IMetadataRenderer.sol\";\n\n/// @notice General configuration for NFT Minting and bookkeeping\nstruct Configuration {\n /// @dev Metadata renderer (uint160)\n IMetadataRenderer metadataRenderer;\n /// @dev Total size of edition that can be minted (uint160+64 = 224)\n uint64 editionSize;\n /// @dev Royalty amount in bps (uint224+16 = 240)\n uint16 royaltyBPS;\n /// @dev Funds recipient for sale (new slot, uint160)\n address payable fundsRecipient;\n}\n" + }, + "contracts/drops/struct/DropsInitializer.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {SalesConfiguration} from \"./SalesConfiguration.sol\";\n\n/// @param erc721TransferHelper Transfer helper contract\n/// @param marketFilterAddress Market filter address - Manage subscription to the for marketplace filtering based off royalty payouts.\n/// @param initialOwner User that owns and can mint the edition, gets royalty and sales payouts and can update the base url if needed.\n/// @param fundsRecipient Wallet/user that receives funds from sale\n/// @param editionSize Number of editions that can be minted in total. If type(uint64).max, unlimited editions can be minted as an open edition.\n/// @param royaltyBPS BPS of the royalty set on the contract. Can be 0 for no royalty.\n/// @param salesConfiguration The initial SalesConfiguration\n/// @param metadataRenderer Renderer contract to use\n/// @param metadataRendererInit Renderer data initial contract\nstruct DropsInitializer {\n address erc721TransferHelper;\n address marketFilterAddress;\n address initialOwner;\n address payable fundsRecipient;\n uint64 editionSize;\n uint16 royaltyBPS;\n bool enableOpenSeaRoyaltyRegistry;\n SalesConfiguration salesConfiguration;\n address metadataRenderer;\n bytes metadataRendererInit;\n}\n" + }, + "contracts/drops/struct/SaleDetails.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\n/// @notice Return value for sales details to use with front-ends\nstruct SaleDetails {\n // Synthesized status variables for sale and presale\n bool publicSaleActive;\n bool presaleActive;\n // Price for public sale\n uint256 publicSalePrice;\n // Timed sale actions for public sale\n uint64 publicSaleStart;\n uint64 publicSaleEnd;\n // Timed sale actions for presale\n uint64 presaleStart;\n uint64 presaleEnd;\n // Merkle root (includes address, quantity, and price data for each entry)\n bytes32 presaleMerkleRoot;\n // Limit public sale to a specific number of mints per wallet\n uint256 maxSalePurchasePerAddress;\n // Information about the rest of the supply\n // Total that have been minted\n uint256 totalMinted;\n // The total supply available\n uint256 maxSupply;\n}\n" + }, + "contracts/drops/struct/SalesConfiguration.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\n/// @notice Sales states and configuration\n/// @dev Uses 3 storage slots\nstruct SalesConfiguration {\n /// @dev Public sale price (max ether value > 1000 ether with this value)\n uint104 publicSalePrice;\n /// @notice Purchase mint limit per address (if set to 0 === unlimited mints)\n /// @dev Max purchase number per txn (90+32 = 122)\n uint32 maxSalePurchasePerAddress;\n /// @dev uint64 type allows for dates into 292 billion years\n /// @notice Public sale start timestamp (136+64 = 186)\n uint64 publicSaleStart;\n /// @notice Public sale end timestamp (186+64 = 250)\n uint64 publicSaleEnd;\n /// @notice Presale start timestamp\n /// @dev new storage slot\n uint64 presaleStart;\n /// @notice Presale end timestamp\n uint64 presaleEnd;\n /// @notice Presale merkle root\n bytes32 presaleMerkleRoot;\n}\n" + }, + "contracts/drops/token/HolographDropERC721.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport {ERC721H} from \"../../abstract/ERC721H.sol\";\nimport {NonReentrant} from \"../../abstract/NonReentrant.sol\";\n\nimport {HolographERC721Interface} from \"../../interface/HolographERC721Interface.sol\";\nimport {HolographerInterface} from \"../../interface/HolographerInterface.sol\";\nimport {HolographInterface} from \"../../interface/HolographInterface.sol\";\n\nimport {AddressMintDetails} from \"../struct/AddressMintDetails.sol\";\nimport {Configuration} from \"../struct/Configuration.sol\";\nimport {DropsInitializer} from \"../struct/DropsInitializer.sol\";\nimport {SaleDetails} from \"../struct/SaleDetails.sol\";\nimport {SalesConfiguration} from \"../struct/SalesConfiguration.sol\";\n\nimport {Address} from \"../library/Address.sol\";\nimport {MerkleProof} from \"../library/MerkleProof.sol\";\n\nimport {IMetadataRenderer} from \"../interface/IMetadataRenderer.sol\";\nimport {IOperatorFilterRegistry} from \"../interface/IOperatorFilterRegistry.sol\";\nimport {IHolographDropERC721} from \"../interface/IHolographDropERC721.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\n\n/**\n * @dev This contract subscribes to the following HolographERC721 events:\n * - beforeSafeTransfer\n * - beforeTransfer\n * - onIsApprovedForAll\n * - customContractURI\n *\n * Do not enable or subscribe to any other events unless you modified your source code for them.\n */\ncontract HolographDropERC721 is NonReentrant, ERC721H, IHolographDropERC721 {\n /**\n * CONTRACT VARIABLES\n * all variables, without custom storage slots, are defined here\n */\n\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.osRegistryEnabled')) - 1)\n */\n bytes32 constant _osRegistryEnabledSlot = 0x5c835f3b6bd322d9a084ffdeac746df2b96cce308e7f0612f4ff4f9c490734cc;\n\n /**\n * @dev Address of the operator filter registry\n */\n IOperatorFilterRegistry public constant openseaOperatorFilterRegistry =\n IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E);\n\n /**\n * @dev Address of the price oracle proxy\n */\n IDropsPriceOracle public constant dropsPriceOracle = IDropsPriceOracle(0xA3Db09EEC42BAfF7A50fb8F9aF90A0e035Ef3302);\n\n /**\n * @dev Internal reference used for minting incremental token ids.\n */\n uint224 private _currentTokenId;\n\n /**\n * @dev HOLOGRAPH transfer helper address for auto-approval\n */\n address public erc721TransferHelper;\n\n /**\n * @dev Address of the market filter registry\n */\n address public marketFilterAddress;\n\n /**\n * @notice Configuration for NFT minting contract storage\n */\n Configuration public config;\n\n /**\n * @notice Sales configuration\n */\n SalesConfiguration public salesConfig;\n\n /**\n * @dev Mapping for presale mint counts by address to allow public mint limit\n */\n mapping(address => uint256) public presaleMintsByAddress;\n\n /**\n * @dev Mapping for presale mint counts by address to allow public mint limit\n */\n mapping(address => uint256) public totalMintsByAddress;\n\n /**\n * CUSTOM ERRORS\n */\n\n /**\n * @notice Thrown when there is no active market filter address supported for the current chain\n * @dev Used for enabling and disabling filter for the given chain.\n */\n error MarketFilterAddressNotSupportedForChain();\n\n /**\n * MODIFIERS\n */\n\n /**\n * @notice Allows user to mint tokens at a quantity\n */\n modifier canMintTokens(uint256 quantity) {\n if (config.editionSize != 0 && quantity + _currentTokenId > config.editionSize) {\n revert Mint_SoldOut();\n }\n\n _;\n }\n\n /**\n * @notice Presale active\n */\n modifier onlyPresaleActive() {\n if (!_presaleActive()) {\n revert Presale_Inactive();\n }\n\n _;\n }\n\n /**\n * @notice Public sale active\n */\n modifier onlyPublicSaleActive() {\n if (!_publicSaleActive()) {\n revert Sale_Inactive();\n }\n\n _;\n }\n\n /**\n * CONTRACT INITIALIZERS\n * init function is used instead of constructor\n */\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n\n DropsInitializer memory initializer = abi.decode(initPayload, (DropsInitializer));\n\n erc721TransferHelper = initializer.erc721TransferHelper;\n if (initializer.marketFilterAddress != address(0)) {\n marketFilterAddress = initializer.marketFilterAddress;\n }\n\n // Setup the owner role\n _setOwner(initializer.initialOwner);\n\n // Setup config variables\n config = Configuration({\n metadataRenderer: IMetadataRenderer(initializer.metadataRenderer),\n editionSize: initializer.editionSize,\n royaltyBPS: initializer.royaltyBPS,\n fundsRecipient: initializer.fundsRecipient\n });\n\n salesConfig = initializer.salesConfiguration;\n\n // TODO: Need to make sure to initialize the metadata renderer\n if (initializer.metadataRenderer != address(0)) {\n IMetadataRenderer(initializer.metadataRenderer).initializeWithData(initializer.metadataRendererInit);\n }\n\n if (initializer.enableOpenSeaRoyaltyRegistry && Address.isContract(address(openseaOperatorFilterRegistry))) {\n if (marketFilterAddress == address(0)) {\n // this is a default filter that can be used for OS royalty filtering\n // marketFilterAddress = 0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6;\n // we just register to OS royalties and let OS handle it for us with their default filter contract\n HolographERC721Interface(holographer()).sourceExternalCall(\n address(openseaOperatorFilterRegistry),\n abi.encodeWithSelector(IOperatorFilterRegistry.register.selector, holographer())\n );\n } else {\n // allow user to specify custom filtering contract address\n HolographERC721Interface(holographer()).sourceExternalCall(\n address(openseaOperatorFilterRegistry),\n abi.encodeWithSelector(\n IOperatorFilterRegistry.registerAndSubscribe.selector,\n holographer(),\n marketFilterAddress\n )\n );\n }\n assembly {\n sstore(_osRegistryEnabledSlot, true)\n }\n }\n\n setStatus(1);\n\n return _init(initPayload);\n }\n\n /**\n * PUBLIC NON STATE CHANGING FUNCTIONS\n * static\n */\n\n /**\n * @notice Returns the version of the contract\n * @dev Used for contract versioning and validation\n * @return version string representing the version of the contract\n */\n function version() external pure returns (string memory) {\n return \"1.0.0\";\n }\n\n function supportsInterface(bytes4 interfaceId) external pure override returns (bool) {\n return interfaceId == type(IHolographDropERC721).interfaceId;\n }\n\n /**\n * PUBLIC NON STATE CHANGING FUNCTIONS\n * dynamic\n */\n\n function owner() external view override(ERC721H, IHolographDropERC721) returns (address) {\n return _getOwner();\n }\n\n function isAdmin(address user) external view returns (bool) {\n return (_getOwner() == user);\n }\n\n function beforeSafeTransfer(\n address _from,\n address /* _to*/,\n uint256 /* _tokenId*/,\n bytes calldata /* _data*/\n ) external view returns (bool) {\n if (\n _from != address(0) && // skip on mints\n _from != msgSender() // skip on transfers from sender\n ) {\n bool osRegistryEnabled;\n assembly {\n osRegistryEnabled := sload(_osRegistryEnabledSlot)\n }\n if (osRegistryEnabled) {\n try openseaOperatorFilterRegistry.isOperatorAllowed(address(this), msgSender()) returns (bool allowed) {\n return allowed;\n } catch {\n revert OperatorNotAllowed(msgSender());\n }\n }\n }\n return true;\n }\n\n function beforeTransfer(\n address _from,\n address /* _to*/,\n uint256 /* _tokenId*/,\n bytes calldata /* _data*/\n ) external view returns (bool) {\n if (\n _from != address(0) && // skip on mints\n _from != msgSender() // skip on transfers from sender\n ) {\n bool osRegistryEnabled;\n assembly {\n osRegistryEnabled := sload(_osRegistryEnabledSlot)\n }\n if (osRegistryEnabled) {\n try openseaOperatorFilterRegistry.isOperatorAllowed(address(this), msgSender()) returns (bool allowed) {\n return allowed;\n } catch {\n revert OperatorNotAllowed(msgSender());\n }\n }\n }\n return true;\n }\n\n function onIsApprovedForAll(address /* _wallet*/, address _operator) external view returns (bool approved) {\n approved = (erc721TransferHelper != address(0) && _operator == erc721TransferHelper);\n }\n\n /**\n * @notice Sale details\n * @return SaleDetails sale information details\n */\n function saleDetails() external view returns (SaleDetails memory) {\n return\n SaleDetails({\n publicSaleActive: _publicSaleActive(),\n presaleActive: _presaleActive(),\n publicSalePrice: salesConfig.publicSalePrice,\n publicSaleStart: salesConfig.publicSaleStart,\n publicSaleEnd: salesConfig.publicSaleEnd,\n presaleStart: salesConfig.presaleStart,\n presaleEnd: salesConfig.presaleEnd,\n presaleMerkleRoot: salesConfig.presaleMerkleRoot,\n totalMinted: _currentTokenId,\n maxSupply: config.editionSize,\n maxSalePurchasePerAddress: salesConfig.maxSalePurchasePerAddress\n });\n }\n\n /**\n * @dev Number of NFTs the user has minted per address\n * @param minter to get counts for\n */\n function mintedPerAddress(address minter) external view returns (AddressMintDetails memory) {\n return\n AddressMintDetails({\n presaleMints: presaleMintsByAddress[minter],\n publicMints: totalMintsByAddress[minter] - presaleMintsByAddress[minter],\n totalMints: totalMintsByAddress[minter]\n });\n }\n\n /**\n * @notice Contract URI Getter, proxies to metadataRenderer\n * @return Contract URI\n */\n function contractURI() external view returns (string memory) {\n return config.metadataRenderer.contractURI();\n }\n\n /**\n * @notice Getter for metadataRenderer contract\n */\n function metadataRenderer() external view returns (IMetadataRenderer) {\n return IMetadataRenderer(config.metadataRenderer);\n }\n\n /**\n * @notice Convert USD price to current price in native Ether\n */\n function getNativePrice() external view returns (uint256) {\n return _usdToWei(salesConfig.publicSalePrice);\n }\n\n /**\n * @notice Returns the name of the token through the holographer entrypoint\n */\n function name() external view returns (string memory) {\n return HolographERC721Interface(holographer()).name();\n }\n\n /**\n * @notice Token URI Getter, proxies to metadataRenderer\n * @param tokenId id of token to get URI for\n * @return Token URI\n */\n function tokenURI(uint256 tokenId) external view returns (string memory) {\n HolographERC721Interface H721 = HolographERC721Interface(holographer());\n require(H721.exists(tokenId), \"ERC721: token does not exist\");\n\n return config.metadataRenderer.tokenURI(tokenId);\n }\n\n /**\n * PUBLIC STATE CHANGING FUNCTIONS\n * available to all\n */\n\n function multicall(bytes[] memory data) public returns (bytes[] memory results) {\n results = new bytes[](data.length);\n for (uint256 i = 0; i < data.length; i++) {\n results[i] = Address.functionDelegateCall(address(this), abi.encodePacked(data[i], msgSender()));\n }\n }\n\n /**\n * @dev This allows the user to purchase/mint a edition at the given price in the contract.\n */\n function purchase(\n uint256 quantity\n ) external payable nonReentrant canMintTokens(quantity) onlyPublicSaleActive returns (uint256) {\n uint256 salePrice = _usdToWei(salesConfig.publicSalePrice);\n\n if (msg.value < salePrice * quantity) {\n revert Purchase_WrongPrice(salesConfig.publicSalePrice * quantity);\n }\n uint256 remainder = msg.value - (salePrice * quantity);\n\n // If max purchase per address == 0 there is no limit.\n // Any other number, the per address mint limit is that.\n if (\n salesConfig.maxSalePurchasePerAddress != 0 &&\n totalMintsByAddress[msgSender()] + quantity - presaleMintsByAddress[msgSender()] >\n salesConfig.maxSalePurchasePerAddress\n ) {\n revert Purchase_TooManyForAddress();\n }\n\n _mintNFTs(msgSender(), quantity);\n\n HolographERC721Interface H721 = HolographERC721Interface(holographer());\n uint256 chainPrepend = H721.sourceGetChainPrepend();\n uint256 firstMintedTokenId = (chainPrepend + uint256(_currentTokenId - quantity)) + 1;\n\n emit Sale({\n to: msgSender(),\n quantity: quantity,\n pricePerToken: salePrice,\n firstPurchasedTokenId: firstMintedTokenId\n });\n\n if (remainder > 0) {\n msgSender().call{value: remainder, gas: gasleft() > 210_000 ? 210_000 : gasleft()}(\"\");\n }\n\n return firstMintedTokenId;\n }\n\n /**\n * @notice Merkle-tree based presale purchase function\n * @param quantity quantity to purchase\n * @param maxQuantity max quantity that can be purchased via merkle proof #\n * @param pricePerToken price that each token is purchased at\n * @param merkleProof proof for presale mint\n */\n function purchasePresale(\n uint256 quantity,\n uint256 maxQuantity,\n uint256 pricePerToken,\n bytes32[] calldata merkleProof\n ) external payable nonReentrant canMintTokens(quantity) onlyPresaleActive returns (uint256) {\n if (\n !MerkleProof.verify(\n merkleProof,\n salesConfig.presaleMerkleRoot,\n keccak256(\n // address, uint256, uint256\n abi.encode(msgSender(), maxQuantity, pricePerToken)\n )\n )\n ) {\n revert Presale_MerkleNotApproved();\n }\n\n uint256 weiPricePerToken = _usdToWei(pricePerToken);\n if (msg.value < weiPricePerToken * quantity) {\n revert Purchase_WrongPrice(pricePerToken * quantity);\n }\n uint256 remainder = msg.value - (weiPricePerToken * quantity);\n\n presaleMintsByAddress[msgSender()] += quantity;\n if (presaleMintsByAddress[msgSender()] > maxQuantity) {\n revert Presale_TooManyForAddress();\n }\n\n _mintNFTs(msgSender(), quantity);\n\n HolographERC721Interface H721 = HolographERC721Interface(holographer());\n uint256 chainPrepend = H721.sourceGetChainPrepend();\n uint256 firstMintedTokenId = (chainPrepend + uint256(_currentTokenId - quantity)) + 1;\n\n emit Sale({\n to: msgSender(),\n quantity: quantity,\n pricePerToken: weiPricePerToken,\n firstPurchasedTokenId: firstMintedTokenId\n });\n\n if (remainder > 0) {\n msgSender().call{value: remainder, gas: gasleft() > 210_000 ? 210_000 : gasleft()}(\"\");\n }\n\n return firstMintedTokenId;\n }\n\n /**\n * PUBLIC STATE CHANGING FUNCTIONS\n * admin only\n */\n\n /**\n * @notice Proxy to update market filter settings in the main registry contracts\n * @notice Requires admin permissions\n * @param args Calldata args to pass to the registry\n */\n function updateMarketFilterSettings(bytes calldata args) external onlyOwner {\n HolographERC721Interface(holographer()).sourceExternalCall(address(openseaOperatorFilterRegistry), args);\n bool osRegistryEnabled = openseaOperatorFilterRegistry.isRegistered(holographer());\n assembly {\n sstore(_osRegistryEnabledSlot, osRegistryEnabled)\n }\n }\n\n /**\n * @notice Manage subscription for marketplace filtering based off royalty payouts.\n * @param enable Enable filtering to non-royalty payout marketplaces\n */\n function manageMarketFilterSubscription(bool enable) external onlyOwner {\n address self = holographer();\n if (marketFilterAddress == address(0)) {\n revert MarketFilterAddressNotSupportedForChain();\n }\n if (!openseaOperatorFilterRegistry.isRegistered(self) && enable) {\n HolographERC721Interface(self).sourceExternalCall(\n address(openseaOperatorFilterRegistry),\n abi.encodeWithSelector(IOperatorFilterRegistry.registerAndSubscribe.selector, self, marketFilterAddress)\n );\n } else if (enable) {\n HolographERC721Interface(self).sourceExternalCall(\n address(openseaOperatorFilterRegistry),\n abi.encodeWithSelector(IOperatorFilterRegistry.subscribe.selector, self, marketFilterAddress)\n );\n } else {\n HolographERC721Interface(self).sourceExternalCall(\n address(openseaOperatorFilterRegistry),\n abi.encodeWithSelector(IOperatorFilterRegistry.unsubscribe.selector, self, false)\n );\n HolographERC721Interface(self).sourceExternalCall(\n address(openseaOperatorFilterRegistry),\n abi.encodeWithSelector(IOperatorFilterRegistry.unregister.selector, self)\n );\n }\n bool osRegistryEnabled = openseaOperatorFilterRegistry.isRegistered(self);\n assembly {\n sstore(_osRegistryEnabledSlot, osRegistryEnabled)\n }\n }\n\n function modifyMarketFilterAddress(address newMarketFilterAddress) external onlyOwner {\n marketFilterAddress = newMarketFilterAddress;\n }\n\n /**\n * @notice Admin mint tokens to a recipient for free\n * @param recipient recipient to mint to\n * @param quantity quantity to mint\n */\n function adminMint(address recipient, uint256 quantity) external onlyOwner canMintTokens(quantity) returns (uint256) {\n _mintNFTs(recipient, quantity);\n\n return _currentTokenId;\n }\n\n /**\n * @dev Mints multiple editions to the given list of addresses.\n * @param recipients list of addresses to send the newly minted editions to\n */\n function adminMintAirdrop(\n address[] calldata recipients\n ) external onlyOwner canMintTokens(recipients.length) returns (uint256) {\n unchecked {\n for (uint256 i = 0; i < recipients.length; i++) {\n _mintNFTs(recipients[i], 1);\n }\n }\n\n return _currentTokenId;\n }\n\n /**\n * @notice Set a new metadata renderer\n * @param newRenderer new renderer address to use\n * @param setupRenderer data to setup new renderer with\n */\n function setMetadataRenderer(IMetadataRenderer newRenderer, bytes memory setupRenderer) external onlyOwner {\n config.metadataRenderer = newRenderer;\n\n if (setupRenderer.length > 0) {\n newRenderer.initializeWithData(setupRenderer);\n }\n\n emit UpdatedMetadataRenderer({sender: msgSender(), renderer: newRenderer});\n }\n\n /**\n * @dev This sets the sales configuration\n * @param publicSalePrice New public sale price\n * @param maxSalePurchasePerAddress Max # of purchases (public) per address allowed\n * @param publicSaleStart unix timestamp when the public sale starts\n * @param publicSaleEnd unix timestamp when the public sale ends (set to 0 to disable)\n * @param presaleStart unix timestamp when the presale starts\n * @param presaleEnd unix timestamp when the presale ends\n * @param presaleMerkleRoot merkle root for the presale information\n */\n function setSaleConfiguration(\n uint104 publicSalePrice,\n uint32 maxSalePurchasePerAddress,\n uint64 publicSaleStart,\n uint64 publicSaleEnd,\n uint64 presaleStart,\n uint64 presaleEnd,\n bytes32 presaleMerkleRoot\n ) external onlyOwner {\n salesConfig.publicSalePrice = publicSalePrice;\n salesConfig.maxSalePurchasePerAddress = maxSalePurchasePerAddress;\n salesConfig.publicSaleStart = publicSaleStart;\n salesConfig.publicSaleEnd = publicSaleEnd;\n salesConfig.presaleStart = presaleStart;\n salesConfig.presaleEnd = presaleEnd;\n salesConfig.presaleMerkleRoot = presaleMerkleRoot;\n\n emit SalesConfigChanged(msgSender());\n }\n\n /**\n * @notice Set a different funds recipient\n * @param newRecipientAddress new funds recipient address\n */\n function setFundsRecipient(address payable newRecipientAddress) external onlyOwner {\n if (newRecipientAddress == address(0)) {\n revert(\"Funds Recipient cannot be 0 address\");\n }\n config.fundsRecipient = newRecipientAddress;\n emit FundsRecipientChanged(newRecipientAddress, msgSender());\n }\n\n /**\n * @notice This withdraws ETH from the contract to the contract owner.\n */\n function withdraw() external override nonReentrant {\n if (config.fundsRecipient == address(0)) {\n revert(\"Funds Recipient address not set\");\n }\n address sender = msgSender();\n\n // Get fee amount\n uint256 funds = address(this).balance;\n address payable feeRecipient = payable(\n HolographInterface(HolographerInterface(holographer()).getHolograph()).getTreasury()\n );\n // for now set it to 0 since there is no fee\n uint256 holographFee = 0;\n\n // Check if withdraw is allowed for sender\n if (sender != config.fundsRecipient && sender != _getOwner() && sender != feeRecipient) {\n revert Access_WithdrawNotAllowed();\n }\n\n // Payout HOLOGRAPH fee\n if (holographFee > 0) {\n (bool successFee, ) = feeRecipient.call{value: holographFee, gas: 210_000}(\"\");\n if (!successFee) {\n revert Withdraw_FundsSendFailure();\n }\n funds -= holographFee;\n }\n\n // Payout recipient\n (bool successFunds, ) = config.fundsRecipient.call{value: funds, gas: 210_000}(\"\");\n if (!successFunds) {\n revert Withdraw_FundsSendFailure();\n }\n\n // Emit event for indexing\n emit FundsWithdrawn(sender, config.fundsRecipient, funds, feeRecipient, holographFee);\n }\n\n /**\n * @notice Admin function to finalize and open edition sale\n */\n function finalizeOpenEdition() external onlyOwner {\n if (config.editionSize != type(uint64).max) {\n revert Admin_UnableToFinalizeNotOpenEdition();\n }\n\n config.editionSize = uint64(_currentTokenId);\n emit OpenMintFinalized(msgSender(), config.editionSize);\n }\n\n /**\n * INTERNAL FUNCTIONS\n * non state changing\n */\n\n function _presaleActive() internal view returns (bool) {\n return salesConfig.presaleStart <= block.timestamp && salesConfig.presaleEnd > block.timestamp;\n }\n\n function _publicSaleActive() internal view returns (bool) {\n return salesConfig.publicSaleStart <= block.timestamp && salesConfig.publicSaleEnd > block.timestamp;\n }\n\n function _usdToWei(uint256 amount) internal view returns (uint256 weiAmount) {\n if (amount == 0) {\n return 0;\n }\n weiAmount = dropsPriceOracle.convertUsdToWei(amount);\n }\n\n /**\n * INTERNAL FUNCTIONS\n * state changing\n */\n\n function _mintNFTs(address recipient, uint256 quantity) internal {\n HolographERC721Interface H721 = HolographERC721Interface(holographer());\n uint256 chainPrepend = H721.sourceGetChainPrepend();\n uint224 tokenId = 0;\n for (uint256 i = 0; i < quantity; i++) {\n _currentTokenId += 1;\n while (\n H721.exists(chainPrepend + uint256(_currentTokenId)) || H721.burned(chainPrepend + uint256(_currentTokenId))\n ) {\n _currentTokenId += 1;\n }\n tokenId = _currentTokenId;\n H721.sourceMint(recipient, tokenId);\n // uint256 id = chainPrepend + uint256(tokenId);\n }\n }\n\n fallback() external payable override {\n assembly {\n // Allocate memory for the error message\n let errorMsg := mload(0x40)\n\n // Error message: \"Function not found\", properly padded with zeroes\n mstore(errorMsg, 0x46756e6374696f6e206e6f7420666f756e640000000000000000000000000000)\n\n // Revert with the error message\n revert(errorMsg, 20) // 20 is the length of the error message in bytes\n }\n }\n}\n" + }, + "contracts/drops/utils/NFTMetadataRenderer.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nlibrary Math {\n enum Rounding {\n Down, // Toward negative infinity\n Up, // Toward infinity\n Zero // Toward zero\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds up instead\n * of rounding down.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b - 1) / b can overflow on addition, so we distribute.\n return a == 0 ? 0 : (a - 1) / b + 1;\n }\n\n /**\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\n * with further edits by Uniswap Labs also under MIT license.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\n unchecked {\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = prod1 * 2^256 + prod0.\n uint256 prod0; // Least significant 256 bits of the product\n uint256 prod1; // Most significant 256 bits of the product\n assembly {\n let mm := mulmod(x, y, not(0))\n prod0 := mul(x, y)\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n }\n\n // Handle non-overflow cases, 256 by 256 division.\n if (prod1 == 0) {\n return prod0 / denominator;\n }\n\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\n require(denominator > prod1);\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [prod1 prod0].\n uint256 remainder;\n assembly {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n prod1 := sub(prod1, gt(remainder, prod0))\n prod0 := sub(prod0, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\n // See https://cs.stackexchange.com/q/138556/92363.\n\n // Does not overflow because the denominator cannot be zero at this stage in the function.\n uint256 twos = denominator & (~denominator + 1);\n assembly {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [prod1 prod0] by twos.\n prod0 := div(prod0, twos)\n\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from prod1 into prod0.\n prod0 |= prod1 * twos;\n\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv = 1 mod 2^4.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\n // in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\n // is no longer required.\n result = prod0 * inverse;\n return result;\n }\n }\n\n /**\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\n uint256 result = mulDiv(x, y, denominator);\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\n result += 1;\n }\n return result;\n }\n\n /**\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 128;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 64;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 32;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 16;\n }\n if (value >> 8 > 0) {\n value >>= 8;\n result += 8;\n }\n if (value >> 4 > 0) {\n value >>= 4;\n result += 4;\n }\n if (value >> 2 > 0) {\n value >>= 2;\n result += 2;\n }\n if (value >> 1 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log2(value);\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10 ** 64) {\n value /= 10 ** 64;\n result += 64;\n }\n if (value >= 10 ** 32) {\n value /= 10 ** 32;\n result += 32;\n }\n if (value >= 10 ** 16) {\n value /= 10 ** 16;\n result += 16;\n }\n if (value >= 10 ** 8) {\n value /= 10 ** 8;\n result += 8;\n }\n if (value >= 10 ** 4) {\n value /= 10 ** 4;\n result += 4;\n }\n if (value >= 10 ** 2) {\n value /= 10 ** 2;\n result += 2;\n }\n if (value >= 10 ** 1) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log10(value);\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256, rounded down, of a positive value.\n * Returns 0 if given 0.\n *\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n */\n function log256(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 16;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 8;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 4;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 2;\n }\n if (value >> 8 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log256(value);\n return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);\n }\n }\n}\n\nlibrary Strings {\n bytes16 private constant _SYMBOLS = \"0123456789abcdef\";\n uint8 private constant _ADDRESS_LENGTH = 20;\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n unchecked {\n uint256 length = Math.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n /// @solidity memory-safe-assembly\n assembly {\n ptr := add(buffer, add(32, length))\n }\n while (true) {\n ptr--;\n /// @solidity memory-safe-assembly\n assembly {\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n unchecked {\n return toHexString(value, Math.log256(value) + 1);\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\n }\n}\n\nlibrary Base64 {\n /**\n * @dev Base64 Encoding/Decoding Table\n */\n string internal constant _TABLE = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\n\n /**\n * @dev Converts a `bytes` to its Bytes64 `string` representation.\n */\n function encode(bytes memory data) internal pure returns (string memory) {\n /**\n * Inspired by Brecht Devos (Brechtpd) implementation - MIT licence\n * https://github.com/Brechtpd/base64/blob/e78d9fd951e7b0977ddca77d92dc85183770daf4/base64.sol\n */\n if (data.length == 0) return \"\";\n\n // Loads the table into memory\n string memory table = _TABLE;\n\n // Encoding takes 3 bytes chunks of binary data from `bytes` data parameter\n // and split into 4 numbers of 6 bits.\n // The final Base64 length should be `bytes` data length multiplied by 4/3 rounded up\n // - `data.length + 2` -> Round up\n // - `/ 3` -> Number of 3-bytes chunks\n // - `4 *` -> 4 characters for each chunk\n string memory result = new string(4 * ((data.length + 2) / 3));\n\n /// @solidity memory-safe-assembly\n assembly {\n // Prepare the lookup table (skip the first \"length\" byte)\n let tablePtr := add(table, 1)\n\n // Prepare result pointer, jump over length\n let resultPtr := add(result, 32)\n\n // Run over the input, 3 bytes at a time\n for {\n let dataPtr := data\n let endPtr := add(data, mload(data))\n } lt(dataPtr, endPtr) {\n\n } {\n // Advance 3 bytes\n dataPtr := add(dataPtr, 3)\n let input := mload(dataPtr)\n\n // To write each character, shift the 3 bytes (18 bits) chunk\n // 4 times in blocks of 6 bits for each character (18, 12, 6, 0)\n // and apply logical AND with 0x3F which is the number of\n // the previous character in the ASCII table prior to the Base64 Table\n // The result is then added to the table to get the character to write,\n // and finally write it in the result pointer but with a left shift\n // of 256 (1 byte) - 8 (1 ASCII char) = 248 bits\n\n mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F))))\n resultPtr := add(resultPtr, 1) // Advance\n\n mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F))))\n resultPtr := add(resultPtr, 1) // Advance\n\n mstore8(resultPtr, mload(add(tablePtr, and(shr(6, input), 0x3F))))\n resultPtr := add(resultPtr, 1) // Advance\n\n mstore8(resultPtr, mload(add(tablePtr, and(input, 0x3F))))\n resultPtr := add(resultPtr, 1) // Advance\n }\n\n // When data `bytes` is not exactly 3 bytes long\n // it is padded with `=` characters at the end\n switch mod(mload(data), 3)\n case 1 {\n mstore8(sub(resultPtr, 1), 0x3d)\n mstore8(sub(resultPtr, 2), 0x3d)\n }\n case 2 {\n mstore8(sub(resultPtr, 1), 0x3d)\n }\n }\n\n return result;\n }\n}\n\n/// NFT metadata library for rendering metadata associated with editions\nlibrary NFTMetadataRenderer {\n /// Generate edition metadata from storage information as base64-json blob\n /// Combines the media data and metadata\n /// @param name Name of NFT in metadata\n /// @param description Description of NFT in metadata\n /// @param imageURI URI of image to render for edition\n /// @param animationURI URI of animation to render for edition\n /// @param tokenOfEdition Token ID for specific token\n /// @param editionSize Size of entire edition to show\n function createMetadataEdition(\n string memory name,\n string memory description,\n string memory imageURI,\n string memory animationURI,\n uint256 tokenOfEdition,\n uint256 editionSize\n ) internal pure returns (string memory) {\n string memory _tokenMediaData = tokenMediaData(imageURI, animationURI);\n bytes memory json = createMetadataJSON(name, description, _tokenMediaData, tokenOfEdition, editionSize);\n return encodeMetadataJSON(json);\n }\n\n function encodeContractURIJSON(\n string memory name,\n string memory description,\n string memory imageURI,\n string memory animationURI,\n uint256 royaltyBPS,\n address royaltyRecipient\n ) internal pure returns (string memory) {\n bytes memory imageSpace = bytes(\"\");\n if (bytes(imageURI).length > 0) {\n imageSpace = abi.encodePacked('\", \"image\": \"', imageURI);\n }\n bytes memory animationSpace = bytes(\"\");\n if (bytes(animationURI).length > 0) {\n animationSpace = abi.encodePacked('\", \"animation_url\": \"', animationURI);\n }\n\n return\n string(\n encodeMetadataJSON(\n abi.encodePacked(\n '{\"name\": \"',\n name,\n '\", \"description\": \"',\n description,\n // this is for opensea since they don't respect ERC2981 right now\n '\", \"seller_fee_basis_points\": ',\n Strings.toString(royaltyBPS),\n ', \"fee_recipient\": \"',\n Strings.toHexString(uint256(uint160(royaltyRecipient)), 20),\n imageSpace,\n animationSpace,\n '\"}'\n )\n )\n );\n }\n\n /// Function to create the metadata json string for the nft edition\n /// @param name Name of NFT in metadata\n /// @param description Description of NFT in metadata\n /// @param mediaData Data for media to include in json object\n /// @param tokenOfEdition Token ID for specific token\n /// @param editionSize Size of entire edition to show\n function createMetadataJSON(\n string memory name,\n string memory description,\n string memory mediaData,\n uint256 tokenOfEdition,\n uint256 editionSize\n ) internal pure returns (bytes memory) {\n bytes memory editionSizeText;\n if (editionSize > 0) {\n editionSizeText = abi.encodePacked(\"/\", Strings.toString(editionSize));\n }\n return\n abi.encodePacked(\n '{\"name\": \"',\n name,\n \" \",\n Strings.toString(tokenOfEdition),\n editionSizeText,\n '\", \"',\n 'description\": \"',\n description,\n '\", \"',\n mediaData,\n 'properties\": {\"number\": ',\n Strings.toString(tokenOfEdition),\n ', \"name\": \"',\n name,\n '\"}}'\n );\n }\n\n /// Encodes the argument json bytes into base64-data uri format\n /// @param json Raw json to base64 and turn into a data-uri\n function encodeMetadataJSON(bytes memory json) internal pure returns (string memory) {\n return string(abi.encodePacked(\"data:application/json;base64,\", Base64.encode(json)));\n }\n\n /// Generates edition metadata from storage information as base64-json blob\n /// Combines the media data and metadata\n /// @param imageUrl URL of image to render for edition\n /// @param animationUrl URL of animation to render for edition\n function tokenMediaData(string memory imageUrl, string memory animationUrl) internal pure returns (string memory) {\n bool hasImage = bytes(imageUrl).length > 0;\n bool hasAnimation = bytes(animationUrl).length > 0;\n if (hasImage && hasAnimation) {\n return string(abi.encodePacked('image\": \"', imageUrl, '\", \"animation_url\": \"', animationUrl, '\", \"'));\n }\n if (hasImage) {\n return string(abi.encodePacked('image\": \"', imageUrl, '\", \"'));\n }\n if (hasAnimation) {\n return string(abi.encodePacked('animation_url\": \"', animationUrl, '\", \"'));\n }\n\n return \"\";\n }\n}\n" + }, + "contracts/enforcer/Holographer.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\n\nimport \"../interface/HolographInterface.sol\";\nimport \"../interface/HolographerInterface.sol\";\nimport \"../interface/HolographRegistryInterface.sol\";\nimport \"../interface/InitializableInterface.sol\";\n\n/**\n * @dev This contract is a binder. It puts together all the variables to make the underlying contracts functional and be bridgeable.\n */\ncontract Holographer is Admin, Initializable, HolographerInterface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.originChain')) - 1)\n */\n bytes32 constant _originChainSlot = 0xd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\n */\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.contractType')) - 1)\n */\n bytes32 constant _contractTypeSlot = 0x0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c7;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.sourceContract')) - 1)\n */\n bytes32 constant _sourceContractSlot = 0x27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b074;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.blockHeight')) - 1)\n */\n bytes32 constant _blockHeightSlot = 0x9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de3;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPHER: already initialized\");\n (bytes memory encoded, bytes memory initCode) = abi.decode(initPayload, (bytes, bytes));\n (uint32 originChain, address holograph, bytes32 contractType, address sourceContract) = abi.decode(\n encoded,\n (uint32, address, bytes32, address)\n );\n assembly {\n sstore(_adminSlot, caller())\n sstore(_blockHeightSlot, number())\n sstore(_contractTypeSlot, contractType)\n sstore(_holographSlot, holograph)\n sstore(_originChainSlot, originChain)\n sstore(_sourceContractSlot, sourceContract)\n }\n (bool success, bytes memory returnData) = HolographRegistryInterface(HolographInterface(holograph).getRegistry())\n .getReservedContractTypeAddress(contractType)\n .delegatecall(abi.encodeWithSelector(InitializableInterface.init.selector, initCode));\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == InitializableInterface.init.selector, \"HOLOGRAPH: initialization failed\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @dev Returns the contract type that is used for loading the Enforcer\n */\n function getContractType() external view returns (bytes32 contractType) {\n assembly {\n contractType := sload(_contractTypeSlot)\n }\n }\n\n /**\n * @dev Returns the block height of when the smart contract was deployed. Useful for retrieving deployment config for re-deployment on other EVM-compatible chains.\n */\n function getDeploymentBlock() external view returns (uint256 deploymentBlock) {\n assembly {\n deploymentBlock := sload(_blockHeightSlot)\n }\n }\n\n /**\n * @dev Returns a hardcoded address for the Holograph smart contract.\n */\n function getHolograph() external view returns (address holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n /**\n * @dev Returns a hardcoded address for the Holograph smart contract that controls and enforces the ERC standards.\n */\n function getHolographEnforcer() public view returns (address) {\n HolographInterface holograph;\n bytes32 contractType;\n assembly {\n holograph := sload(_holographSlot)\n contractType := sload(_contractTypeSlot)\n }\n return HolographRegistryInterface(holograph.getRegistry()).getReservedContractTypeAddress(contractType);\n }\n\n /**\n * @dev Returns the original chain that contract was deployed on.\n */\n function getOriginChain() external view returns (uint32 originChain) {\n assembly {\n originChain := sload(_originChainSlot)\n }\n }\n\n /**\n * @dev Returns a hardcoded address for the custom secure storage contract deployed in parallel with this contract deployment.\n */\n function getSourceContract() external view returns (address sourceContract) {\n assembly {\n sourceContract := sload(_sourceContractSlot)\n }\n }\n\n /**\n * @dev Purposefully left empty, to prevent running out of gas errors when receiving native token payments.\n */\n receive() external payable {}\n\n /**\n * @dev This takes the Enforcer's source code, runs it, and uses current address for storage slots.\n */\n fallback() external payable {\n address holographEnforcer = getHolographEnforcer();\n assembly {\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), holographEnforcer, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/enforcer/HolographERC20.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/EIP712.sol\";\nimport \"../abstract/Initializable.sol\";\nimport \"../abstract/NonReentrant.sol\";\nimport \"../abstract/Owner.sol\";\n\nimport \"../enum/HolographERC20Event.sol\";\nimport \"../enum/InterfaceType.sol\";\n\nimport \"../interface/ERC20.sol\";\nimport \"../interface/ERC20Burnable.sol\";\nimport \"../interface/HolographERC20Interface.sol\";\nimport \"../interface/ERC20Metadata.sol\";\nimport \"../interface/ERC20Permit.sol\";\nimport \"../interface/ERC20Receiver.sol\";\nimport \"../interface/ERC20Safer.sol\";\nimport \"../interface/ERC165.sol\";\nimport \"../interface/Holographable.sol\";\nimport \"../interface/HolographedERC20.sol\";\nimport \"../interface/HolographInterface.sol\";\nimport \"../interface/HolographerInterface.sol\";\nimport \"../interface/HolographRegistryInterface.sol\";\nimport \"../interface/InitializableInterface.sol\";\nimport \"../interface/HolographInterfacesInterface.sol\";\nimport \"../interface/Ownable.sol\";\n\n/**\n * @title Holograph Bridgeable ERC-20 Token\n * @author Holograph Foundation\n * @notice A smart contract for minting and managing Holograph Bridgeable ERC20 Tokens.\n * @dev The entire logic and functionality of the smart contract is self-contained.\n */\ncontract HolographERC20 is Admin, Owner, Initializable, NonReentrant, EIP712, HolographERC20Interface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\n */\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.sourceContract')) - 1)\n */\n bytes32 constant _sourceContractSlot = 0x27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b074;\n\n /**\n * @dev Configuration for events to trigger for source smart contract.\n */\n uint256 private _eventConfig;\n\n /**\n * @dev Mapping of all the addresse's balances.\n */\n mapping(address => uint256) private _balances;\n\n /**\n * @dev Mapping of all authorized operators, and capped amounts.\n */\n mapping(address => mapping(address => uint256)) private _allowances;\n\n /**\n * @dev Total number of token in circulation.\n */\n uint256 private _totalSupply;\n\n /**\n * @dev Token name.\n */\n string private _name;\n\n /**\n * @dev Token ticker symbol.\n */\n string private _symbol;\n\n /**\n * @dev Token number of decimal places.\n */\n uint8 private _decimals;\n\n /**\n * @dev List of used up nonces. Used in the ERC20Permit interface functionality.\n */\n mapping(address => uint256) private _nonces;\n\n /**\n * @notice Only allow calls from bridge smart contract.\n */\n modifier onlyBridge() {\n require(msg.sender == _holograph().getBridge(), \"ERC20: bridge only call\");\n _;\n }\n\n /**\n * @notice Only allow calls from source smart contract.\n */\n modifier onlySource() {\n address sourceContract;\n assembly {\n sourceContract := sload(_sourceContractSlot)\n }\n require(msg.sender == sourceContract, \"ERC20: source only call\");\n _;\n }\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"ERC20: already initialized\");\n InitializableInterface sourceContract;\n assembly {\n sstore(_reentrantSlot, 0x0000000000000000000000000000000000000000000000000000000000000001)\n sstore(_ownerSlot, caller())\n sourceContract := sload(_sourceContractSlot)\n }\n (\n string memory contractName,\n string memory contractSymbol,\n uint8 contractDecimals,\n uint256 eventConfig,\n string memory domainSeperator,\n string memory domainVersion,\n bool skipInit,\n bytes memory initCode\n ) = abi.decode(initPayload, (string, string, uint8, uint256, string, string, bool, bytes));\n _name = contractName;\n _symbol = contractSymbol;\n _decimals = contractDecimals;\n _eventConfig = eventConfig;\n if (!skipInit) {\n require(sourceContract.init(initCode) == InitializableInterface.init.selector, \"ERC20: could not init source\");\n }\n _setInitialized();\n _eip712_init(domainSeperator, domainVersion);\n return InitializableInterface.init.selector;\n }\n\n /**\n * @dev Purposefully left empty, to prevent running out of gas errors when receiving native token payments.\n */\n receive() external payable {}\n\n /**\n * @notice Fallback to the source contract.\n * @dev Any function call that is not covered here, will automatically be sent over to the source contract.\n */\n fallback() external payable {\n assembly {\n calldatacopy(0, 0, calldatasize())\n mstore(calldatasize(), caller())\n let result := call(gas(), sload(_sourceContractSlot), callvalue(), 0, add(calldatasize(), 0x20), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /*\n * @dev all calls to source contract go through this function in order to inject original msg.sender in calldata\n */\n function _sourceCall(bytes memory payload) private returns (bool output) {\n assembly {\n mstore(add(payload, add(mload(payload), 0x20)), caller())\n // offset memory position by 32 bytes to skip the 32 bytes where bytes length is stored\n // add 32 bytes to bytes length to include the appended msg.sender to calldata\n let result := call(\n gas(),\n sload(_sourceContractSlot),\n callvalue(),\n add(payload, 0x20),\n add(mload(payload), 0x20),\n 0,\n 0\n )\n let pos := mload(0x40)\n // reserve memory space for return data\n mstore(0x40, add(pos, returndatasize()))\n returndatacopy(pos, 0, returndatasize())\n switch result\n case 0 {\n revert(pos, returndatasize())\n }\n output := mload(pos)\n }\n }\n\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n /**\n * @dev Although EIP-165 is not required for ERC20 contracts, we still decided to implement it.\n *\n * This makes it easier for external smart contracts to easily identify a valid ERC20 token contract.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool) {\n HolographInterfacesInterface interfaces = HolographInterfacesInterface(_interfaces());\n ERC165 erc165Contract;\n assembly {\n erc165Contract := sload(_sourceContractSlot)\n }\n if (\n interfaces.supportsInterface(InterfaceType.ERC20, interfaceId) || erc165Contract.supportsInterface(interfaceId) // check global interfaces // check if source supports interface\n ) {\n return true;\n } else {\n return false;\n }\n }\n\n function allowance(address account, address spender) public view returns (uint256) {\n return _allowances[account][spender];\n }\n\n function balanceOf(address account) public view returns (uint256) {\n return _balances[account];\n }\n\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() public view returns (bytes32) {\n return _domainSeparatorV4();\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function nonces(address account) public view returns (uint256) {\n return _nonces[account];\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function totalSupply() public view returns (uint256) {\n return _totalSupply;\n }\n\n function approve(address spender, uint256 amount) public returns (bool) {\n if (_isEventRegistered(HolographERC20Event.beforeApprove)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC20.beforeApprove.selector, msg.sender, spender, amount))\n );\n }\n _approve(msg.sender, spender, amount);\n if (_isEventRegistered(HolographERC20Event.afterApprove)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC20.afterApprove.selector, msg.sender, spender, amount)));\n }\n return true;\n }\n\n function burn(uint256 amount) public {\n if (_isEventRegistered(HolographERC20Event.beforeBurn)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC20.beforeBurn.selector, msg.sender, amount)));\n }\n _burn(msg.sender, amount);\n if (_isEventRegistered(HolographERC20Event.afterBurn)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC20.afterBurn.selector, msg.sender, amount)));\n }\n }\n\n function _allowance(address account, address to, uint256 amount) internal {\n uint256 currentAllowance = _allowances[account][to];\n if (currentAllowance >= amount) {\n unchecked {\n _allowances[account][to] = currentAllowance - amount;\n }\n } else {\n if (_isEventRegistered(HolographERC20Event.onAllowance)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC20.onAllowance.selector, account, to, amount)),\n \"ERC20: amount exceeds allowance\"\n );\n _allowances[account][to] = 0;\n } else {\n revert(\"ERC20: amount exceeds allowance\");\n }\n }\n }\n\n function burnFrom(address account, uint256 amount) public returns (bool) {\n _allowance(account, msg.sender, amount);\n if (_isEventRegistered(HolographERC20Event.beforeBurn)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC20.beforeBurn.selector, account, amount)));\n }\n _burn(account, amount);\n if (_isEventRegistered(HolographERC20Event.afterBurn)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC20.afterBurn.selector, account, amount)));\n }\n return true;\n }\n\n function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {\n uint256 currentAllowance = _allowances[msg.sender][spender];\n require(currentAllowance >= subtractedValue, \"ERC20: decreased below zero\");\n uint256 newAllowance;\n unchecked {\n newAllowance = currentAllowance - subtractedValue;\n }\n if (_isEventRegistered(HolographERC20Event.beforeApprove)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC20.beforeApprove.selector, msg.sender, spender, newAllowance))\n );\n }\n _approve(msg.sender, spender, newAllowance);\n if (_isEventRegistered(HolographERC20Event.afterApprove)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC20.afterApprove.selector, msg.sender, spender, newAllowance))\n );\n }\n return true;\n }\n\n function bridgeIn(uint32 fromChain, bytes calldata payload) external onlyBridge returns (bytes4) {\n (address from, address to, uint256 amount, bytes memory data) = abi.decode(\n payload,\n (address, address, uint256, bytes)\n );\n _mint(to, amount);\n if (_isEventRegistered(HolographERC20Event.bridgeIn)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC20.bridgeIn.selector, fromChain, from, to, amount, data)),\n \"HOLOGRAPH: bridge in failed\"\n );\n }\n return Holographable.bridgeIn.selector;\n }\n\n function bridgeOut(\n uint32 toChain,\n address sender,\n bytes calldata payload\n ) external onlyBridge returns (bytes4 selector, bytes memory data) {\n (address from, address to, uint256 amount) = abi.decode(payload, (address, address, uint256));\n if (sender != from) {\n _allowance(from, sender, amount);\n }\n if (_isEventRegistered(HolographERC20Event.bridgeOut)) {\n /*\n * @dev making a bridgeOut call to source contract\n * assembly is used so that msg.sender can be injected in the calldata\n */\n bytes memory sourcePayload = abi.encodeWithSelector(\n HolographedERC20.bridgeOut.selector,\n toChain,\n from,\n to,\n amount\n );\n assembly {\n // it is important to add 32 bytes in order to accommodate the first 32 bytes being used for storing length of bytes\n mstore(add(sourcePayload, add(mload(sourcePayload), 0x20)), caller())\n let result := call(\n gas(),\n sload(_sourceContractSlot),\n callvalue(),\n // start reading data from memory position, plus 32 bytes, to skip bytes length indicator\n add(sourcePayload, 0x20),\n // add an additional 32 bytes to bytes length to include the appended caller address\n add(mload(sourcePayload), 0x20),\n 0,\n 0\n )\n // when reading back data, skip the first 32 bytes which is used to indicate bytes position in calldata\n // also subtract 32 bytes from returndatasize to accomodate the skipped first 32 bytes\n returndatacopy(data, 0x20, sub(returndatasize(), 0x20))\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n }\n }\n _burn(from, amount);\n return (Holographable.bridgeOut.selector, abi.encode(from, to, amount, data));\n }\n\n /**\n * @dev Allows the bridge to mint tokens (used for hTokens only).\n */\n function holographBridgeMint(address to, uint256 amount) external onlyBridge returns (bytes4) {\n _mint(to, amount);\n return HolographERC20Interface.holographBridgeMint.selector;\n }\n\n function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {\n uint256 currentAllowance = _allowances[msg.sender][spender];\n uint256 newAllowance;\n unchecked {\n newAllowance = currentAllowance + addedValue;\n }\n unchecked {\n require(newAllowance >= currentAllowance, \"ERC20: increased above max value\");\n }\n if (_isEventRegistered(HolographERC20Event.beforeApprove)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC20.beforeApprove.selector, msg.sender, spender, newAllowance))\n );\n }\n _approve(msg.sender, spender, newAllowance);\n if (_isEventRegistered(HolographERC20Event.afterApprove)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC20.afterApprove.selector, msg.sender, spender, newAllowance))\n );\n }\n return true;\n }\n\n function onERC20Received(\n address account,\n address sender,\n uint256 amount,\n bytes calldata data\n ) public returns (bytes4) {\n require(_isContract(account), \"ERC20: operator not contract\");\n if (_isEventRegistered(HolographERC20Event.beforeOnERC20Received)) {\n require(\n _sourceCall(\n abi.encodeWithSelector(\n HolographedERC20.beforeOnERC20Received.selector,\n account,\n sender,\n address(this),\n amount,\n data\n )\n )\n );\n }\n try ERC20(account).balanceOf(address(this)) returns (uint256) {\n // do nothing, just want to see if this reverts due to invalid erc-20 contract\n } catch {\n revert(\"ERC20: failed getting balance\");\n }\n if (_isEventRegistered(HolographERC20Event.afterOnERC20Received)) {\n require(\n _sourceCall(\n abi.encodeWithSelector(\n HolographedERC20.afterOnERC20Received.selector,\n account,\n sender,\n address(this),\n amount,\n data\n )\n )\n );\n }\n return ERC20Receiver.onERC20Received.selector;\n }\n\n function permit(\n address account,\n address spender,\n uint256 amount,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) public {\n require(block.timestamp <= deadline, \"ERC20: expired deadline\");\n bytes32 structHash = keccak256(\n abi.encode(\n 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9,\n account,\n spender,\n amount,\n _useNonce(account),\n deadline\n )\n );\n bytes32 hash = _hashTypedDataV4(structHash);\n address signer = _recover(r, s, v, hash);\n require(signer == account, \"ERC20: invalid signature\");\n if (_isEventRegistered(HolographERC20Event.beforeApprove)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC20.beforeApprove.selector, account, spender, amount)));\n }\n _approve(account, spender, amount);\n if (_isEventRegistered(HolographERC20Event.afterApprove)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC20.afterApprove.selector, account, spender, amount)));\n }\n }\n\n function safeTransfer(address recipient, uint256 amount) public returns (bool) {\n return safeTransfer(recipient, amount, \"\");\n }\n\n function safeTransfer(address recipient, uint256 amount, bytes memory data) public returns (bool) {\n if (_isEventRegistered(HolographERC20Event.beforeSafeTransfer)) {\n require(\n _sourceCall(\n abi.encodeWithSelector(HolographedERC20.beforeSafeTransfer.selector, msg.sender, recipient, amount, data)\n )\n );\n }\n _transfer(msg.sender, recipient, amount);\n if (_isEventRegistered(HolographERC20Event.afterSafeTransfer)) {\n require(\n _sourceCall(\n abi.encodeWithSelector(HolographedERC20.afterSafeTransfer.selector, msg.sender, recipient, amount, data)\n )\n );\n }\n return true;\n }\n\n function safeTransferFrom(address account, address recipient, uint256 amount) public returns (bool) {\n return safeTransferFrom(account, recipient, amount, \"\");\n }\n\n function safeTransferFrom(\n address account,\n address recipient,\n uint256 amount,\n bytes memory data\n ) public returns (bool) {\n if (account != msg.sender) {\n /*\n * @dev This is intentionally enabled to remove friction when operator or bridge needs to move tokens\n */\n if (msg.sender != _holograph().getBridge() && msg.sender != _holograph().getOperator()) {\n _allowance(account, msg.sender, amount);\n }\n }\n if (_isEventRegistered(HolographERC20Event.beforeSafeTransfer)) {\n require(\n _sourceCall(\n abi.encodeWithSelector(HolographedERC20.beforeSafeTransfer.selector, account, recipient, amount, data)\n )\n );\n }\n _transfer(account, recipient, amount);\n if (_isEventRegistered(HolographERC20Event.afterSafeTransfer)) {\n require(\n _sourceCall(\n abi.encodeWithSelector(HolographedERC20.afterSafeTransfer.selector, account, recipient, amount, data)\n )\n );\n }\n return true;\n }\n\n /**\n * @dev Allows for source smart contract to burn tokens.\n */\n function sourceBurn(address from, uint256 amount) external onlySource {\n _burn(from, amount);\n }\n\n /**\n * @dev Allows for source smart contract to mint tokens.\n */\n function sourceMint(address to, uint256 amount) external onlySource {\n _mint(to, amount);\n }\n\n /**\n * @dev Allows for source smart contract to mint a batch of token amounts.\n */\n function sourceMintBatch(address[] calldata wallets, uint256[] calldata amounts) external onlySource {\n for (uint256 i = 0; i < wallets.length; i++) {\n _mint(wallets[i], amounts[i]);\n }\n }\n\n /**\n * @dev Allows for source smart contract to transfer tokens.\n */\n function sourceTransfer(address from, address to, uint256 amount) external onlySource {\n _transfer(from, to, amount);\n }\n\n /**\n * @dev Allows for source smart contract to withdraw contract balance.\n */\n function sourceTransfer(address payable destination, uint256 amount) external onlySource {\n destination.transfer(amount);\n }\n\n /**\n * @dev Allows for source smart contract to make calls to external contracts\n */\n function sourceExternalCall(address target, bytes calldata data) external onlySource {\n assembly {\n calldatacopy(0, data.offset, data.length)\n let result := call(gas(), target, callvalue(), 0, data.length, 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n function transfer(address recipient, uint256 amount) public returns (bool) {\n if (_isEventRegistered(HolographERC20Event.beforeTransfer)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC20.beforeTransfer.selector, msg.sender, recipient, amount))\n );\n }\n _transfer(msg.sender, recipient, amount);\n if (_isEventRegistered(HolographERC20Event.afterTransfer)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC20.afterTransfer.selector, msg.sender, recipient, amount))\n );\n }\n return true;\n }\n\n function transferFrom(address account, address recipient, uint256 amount) public returns (bool) {\n if (account != msg.sender) {\n /*\n * @dev This is intentionally enabled to remove friction when operator or bridge needs to move tokens\n */\n if (msg.sender != _holograph().getBridge() && msg.sender != _holograph().getOperator()) {\n _allowance(account, msg.sender, amount);\n }\n }\n if (_isEventRegistered(HolographERC20Event.beforeTransfer)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC20.beforeTransfer.selector, account, recipient, amount))\n );\n }\n _transfer(account, recipient, amount);\n if (_isEventRegistered(HolographERC20Event.afterTransfer)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC20.afterTransfer.selector, account, recipient, amount)));\n }\n return true;\n }\n\n function _approve(address account, address spender, uint256 amount) private {\n require(account != address(0), \"ERC20: account is zero address\");\n require(spender != address(0), \"ERC20: spender is zero address\");\n _allowances[account][spender] = amount;\n emit Approval(account, spender, amount);\n }\n\n function _burn(address account, uint256 amount) private {\n require(account != address(0), \"ERC20: account is zero address\");\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n }\n _totalSupply -= amount;\n _registryTransfer(account, address(0), amount);\n }\n\n /**\n * @notice Mints tokens.\n * @dev Mint a specific amount of tokens to a specific address.\n * @param to Address to mint to.\n * @param amount Amount of tokens to mint.\n */\n function _mint(address to, uint256 amount) private {\n require(to != address(0), \"ERC20: minting to burn address\");\n _totalSupply += amount;\n _balances[to] += amount;\n _registryTransfer(address(0), to, amount);\n }\n\n function _transfer(address account, address recipient, uint256 amount) private {\n require(account != address(0), \"ERC20: account is zero address\");\n require(recipient != address(0), \"ERC20: recipient is zero address\");\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n }\n _balances[recipient] += amount;\n _registryTransfer(account, recipient, amount);\n }\n\n function _registryTransfer(address _from, address _to, uint256 _amount) private {\n emit Transfer(_from, _to, _amount);\n HolographRegistryInterface(_holograph().getRegistry()).holographableEvent(\n abi.encode(\n // keccak256(\"TransferERC20(address,address,uint256)\")\n bytes32(0x9b035625e569d1d2bf54830a290aefba7ab11610ba8490871dc62b86b63a8956),\n _from,\n _to,\n _amount\n )\n );\n }\n\n /**\n * @dev \"Consume a nonce\": return the current value and increment.\n *\n * _Available since v4.1._\n */\n function _useNonce(address account) private returns (uint256 current) {\n current = _nonces[account];\n _nonces[account]++;\n }\n\n function _isContract(address contractAddress) private view returns (bool) {\n bytes32 codehash;\n assembly {\n codehash := extcodehash(contractAddress)\n }\n return (codehash != 0x0 && codehash != 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470);\n }\n\n /**\n * @dev Internal function used for identifying signer\n */\n function _recover(bytes32 r, bytes32 s, uint8 v, bytes32 hash) private pure returns (address signer) {\n if (v < 27) {\n v += 27;\n }\n require(v == 27 || v == 28, \"ERC20: invalid v-value\");\n // prevent signature malleability by checking if s-value is in the upper range\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n // if s-value is in upper range, calculate a new s-value\n s = bytes32(0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - uint256(s));\n // flip the v-value\n if (v == 27) {\n v = 28;\n } else {\n v = 27;\n }\n // check if s-value is still in upper range\n require(\n uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0,\n \"ERC20: invalid s-value\"\n );\n }\n signer = ecrecover(hash, v, r, s);\n require(signer != address(0), \"ERC20: zero address signer\");\n }\n\n /**\n * @dev Get the interfaces contract address.\n */\n function _interfaces() private view returns (address) {\n return _holograph().getInterfaces();\n }\n\n function owner() public view override returns (address) {\n Ownable ownableContract;\n assembly {\n ownableContract := sload(_sourceContractSlot)\n }\n return ownableContract.owner();\n }\n\n function _holograph() private view returns (HolographInterface holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n function _isEventRegistered(HolographERC20Event _eventName) private view returns (bool) {\n return ((_eventConfig >> uint256(_eventName)) & uint256(1) == 1 ? true : false);\n }\n}\n" + }, + "contracts/enforcer/HolographERC721.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\nimport \"../abstract/Owner.sol\";\n\nimport \"../enum/HolographERC721Event.sol\";\nimport \"../enum/InterfaceType.sol\";\n\nimport \"../interface/ERC165.sol\";\nimport \"../interface/ERC721.sol\";\nimport \"../interface/HolographERC721Interface.sol\";\nimport \"../interface/ERC721Metadata.sol\";\nimport \"../interface/ERC721TokenReceiver.sol\";\nimport \"../interface/Holographable.sol\";\nimport \"../interface/HolographedERC721.sol\";\nimport \"../interface/HolographInterface.sol\";\nimport \"../interface/HolographerInterface.sol\";\nimport \"../interface/HolographRegistryInterface.sol\";\nimport \"../interface/InitializableInterface.sol\";\nimport \"../interface/HolographInterfacesInterface.sol\";\nimport \"../interface/HolographRoyaltiesInterface.sol\";\nimport \"../interface/Ownable.sol\";\n\n/**\n * @title Holograph Bridgeable ERC-721 Collection\n * @author Holograph Foundation\n * @notice A smart contract for minting and managing Holograph Bridgeable ERC721 NFTs.\n * @dev The entire logic and functionality of the smart contract is self-contained.\n */\ncontract HolographERC721 is Admin, Owner, HolographERC721Interface, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\n */\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.sourceContract')) - 1)\n */\n bytes32 constant _sourceContractSlot = 0x27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b074;\n\n /**\n * @dev Configuration for events to trigger for source smart contract.\n */\n uint256 private _eventConfig;\n\n /**\n * @dev Collection name.\n */\n string private _name;\n\n /**\n * @dev Collection symbol.\n */\n string private _symbol;\n\n /**\n * @dev Collection royalty base points.\n */\n uint16 private _bps;\n\n /**\n * @dev Array of all token ids in collection.\n */\n uint256[] private _allTokens;\n\n /**\n * @dev Map of token id to array index of _ownedTokens.\n */\n mapping(uint256 => uint256) private _ownedTokensIndex;\n\n /**\n * @dev Token id to wallet (owner) address map.\n */\n mapping(uint256 => address) private _tokenOwner;\n\n /**\n * @dev 1-to-1 map of token id that was assigned an approved operator address.\n */\n mapping(uint256 => address) private _tokenApprovals;\n\n /**\n * @dev Map of total tokens owner by a specific address.\n */\n mapping(address => uint256) private _ownedTokensCount;\n\n /**\n * @dev Map of array of token ids owned by a specific address.\n */\n mapping(address => uint256[]) private _ownedTokens;\n\n /**\n * @notice Map of full operator approval for a particular address.\n * @dev Usually utilised for supporting marketplace proxy wallets.\n */\n mapping(address => mapping(address => bool)) private _operatorApprovals;\n\n /**\n * @dev Mapping from token id to position in the allTokens array.\n */\n mapping(uint256 => uint256) private _allTokensIndex;\n\n /**\n * @dev Mapping of all token ids that have been burned. This is to prevent re-minting of same token ids.\n */\n mapping(uint256 => bool) private _burnedTokens;\n\n /**\n * @notice Only allow calls from bridge smart contract.\n */\n modifier onlyBridge() {\n require(msg.sender == _holograph().getBridge(), \"ERC721: bridge only call\");\n _;\n }\n\n /**\n * @notice Only allow calls from source smart contract.\n */\n modifier onlySource() {\n address sourceContract;\n assembly {\n sourceContract := sload(_sourceContractSlot)\n }\n require(msg.sender == sourceContract, \"ERC721: source only call\");\n _;\n }\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"ERC721: already initialized\");\n InitializableInterface sourceContract;\n assembly {\n sstore(_ownerSlot, caller())\n sourceContract := sload(_sourceContractSlot)\n }\n (\n string memory contractName,\n string memory contractSymbol,\n uint16 contractBps,\n uint256 eventConfig,\n bool skipInit,\n bytes memory initCode\n ) = abi.decode(initPayload, (string, string, uint16, uint256, bool, bytes));\n _name = contractName;\n _symbol = contractSymbol;\n _bps = contractBps;\n _eventConfig = eventConfig;\n if (!skipInit) {\n require(sourceContract.init(initCode) == InitializableInterface.init.selector, \"ERC721: could not init source\");\n (bool success, bytes memory returnData) = _royalties().delegatecall(\n abi.encodeWithSelector(\n HolographRoyaltiesInterface.initHolographRoyalties.selector,\n abi.encode(uint256(contractBps), uint256(0))\n )\n );\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == InitializableInterface.init.selector, \"ERC721: could not init royalties\");\n }\n\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @notice Gets a base64 encoded contract JSON file.\n * @return string The URI.\n */\n function contractURI() external view returns (string memory) {\n if (_isEventRegistered(HolographERC721Event.customContractURI)) {\n assembly {\n calldatacopy(0, 0, calldatasize())\n mstore(calldatasize(), caller())\n let result := staticcall(gas(), sload(_sourceContractSlot), 0, add(calldatasize(), 0x20), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n return HolographInterfacesInterface(_interfaces()).contractURI(_name, \"\", \"\", _bps, address(this));\n }\n\n /**\n * @notice Gets the name of the collection.\n * @return string The collection name.\n */\n function name() external view returns (string memory) {\n return _name;\n }\n\n /**\n * @notice Shows the interfaces the contracts support\n * @dev Must add new 4 byte interface Ids here to acknowledge support\n * @param interfaceId ERC165 style 4 byte interfaceId.\n * @return bool True if supported.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool) {\n HolographInterfacesInterface interfaces = HolographInterfacesInterface(_interfaces());\n ERC165 erc165Contract;\n assembly {\n erc165Contract := sload(_sourceContractSlot)\n }\n if (\n interfaces.supportsInterface(InterfaceType.ERC721, interfaceId) || // check global interfaces\n interfaces.supportsInterface(InterfaceType.ROYALTIES, interfaceId) || // check if royalties supports interface\n erc165Contract.supportsInterface(interfaceId) // check if source supports interface\n ) {\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * @notice Gets the collection's symbol.\n * @return string The symbol.\n */\n function symbol() external view returns (string memory) {\n return _symbol;\n }\n\n /**\n * @notice Get's the URI of the token.\n * @dev Defaults the the Arweave URI\n * @return string The URI.\n */\n function tokenURI(uint256 tokenId) external view returns (string memory) {\n assembly {\n calldatacopy(0, 0, calldatasize())\n mstore(calldatasize(), caller())\n let result := staticcall(gas(), sload(_sourceContractSlot), 0, add(calldatasize(), 0x20), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @notice Get list of tokens owned by wallet.\n * @param wallet The wallet address to get tokens for.\n * @return uint256[] Returns an array of token ids owned by wallet.\n */\n function tokensOfOwner(address wallet) external view returns (uint256[] memory) {\n return _ownedTokens[wallet];\n }\n\n /**\n * @notice Get set length list, starting from index, for tokens owned by wallet.\n * @param wallet The wallet address to get tokens for.\n * @param index The index to start enumeration from.\n * @param length The length of returned results.\n * @return tokenIds uint256[] Returns a set length array of token ids owned by wallet.\n */\n function tokensOfOwner(\n address wallet,\n uint256 index,\n uint256 length\n ) external view returns (uint256[] memory tokenIds) {\n uint256 supply = _ownedTokensCount[wallet];\n if (index + length > supply) {\n length = supply - index;\n }\n tokenIds = new uint256[](length);\n for (uint256 i = 0; i < length; i++) {\n tokenIds[i] = _ownedTokens[wallet][index + i];\n }\n }\n\n /**\n * @notice Adds a new address to the token's approval list.\n * @dev Requires the sender to be in the approved addresses.\n * @param to The address to approve.\n * @param tokenId The affected token.\n */\n function approve(address to, uint256 tokenId) external payable {\n address tokenOwner = _tokenOwner[tokenId];\n require(to != tokenOwner, \"ERC721: cannot approve self\");\n require(_isApprovedStrict(msg.sender, tokenId), \"ERC721: not approved sender\");\n if (_isEventRegistered(HolographERC721Event.beforeApprove)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC721.beforeApprove.selector, tokenOwner, to, tokenId)));\n }\n _tokenApprovals[tokenId] = to;\n emit Approval(tokenOwner, to, tokenId);\n if (_isEventRegistered(HolographERC721Event.afterApprove)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC721.afterApprove.selector, tokenOwner, to, tokenId)));\n }\n }\n\n /**\n * @notice Burns the token.\n * @dev The sender must be the owner or approved.\n * @param tokenId The token to burn.\n */\n function burn(uint256 tokenId) external {\n require(_isApproved(msg.sender, tokenId), \"ERC721: not approved sender\");\n address wallet = _tokenOwner[tokenId];\n if (_isEventRegistered(HolographERC721Event.beforeBurn)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC721.beforeBurn.selector, wallet, tokenId)));\n }\n _burn(wallet, tokenId);\n if (_isEventRegistered(HolographERC721Event.afterBurn)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC721.afterBurn.selector, wallet, tokenId)));\n }\n }\n\n function bridgeIn(uint32 fromChain, bytes calldata payload) external onlyBridge returns (bytes4) {\n (address from, address to, uint256 tokenId, bytes memory data) = abi.decode(\n payload,\n (address, address, uint256, bytes)\n );\n require(!_exists(tokenId), \"ERC721: token already exists\");\n delete _burnedTokens[tokenId];\n _mint(to, tokenId);\n if (_isEventRegistered(HolographERC721Event.bridgeIn)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC721.bridgeIn.selector, fromChain, from, to, tokenId, data)),\n \"HOLOGRAPH: bridge in failed\"\n );\n }\n return Holographable.bridgeIn.selector;\n }\n\n function bridgeOut(\n uint32 toChain,\n address sender,\n bytes calldata payload\n ) external onlyBridge returns (bytes4 selector, bytes memory data) {\n (address from, address to, uint256 tokenId) = abi.decode(payload, (address, address, uint256));\n require(to != address(0), \"ERC721: zero address\");\n require(_isApproved(sender, tokenId), \"ERC721: sender not approved\");\n require(from == _tokenOwner[tokenId], \"ERC721: from is not owner\");\n if (_isEventRegistered(HolographERC721Event.bridgeOut)) {\n /*\n * @dev making a bridgeOut call to source contract\n * assembly is used so that msg.sender can be injected in the calldata\n */\n bytes memory sourcePayload = abi.encodeWithSelector(\n HolographedERC721.bridgeOut.selector,\n toChain,\n from,\n to,\n tokenId\n );\n assembly {\n // it is important to add 32 bytes in order to accommodate the first 32 bytes being used for storing length of bytes\n mstore(add(sourcePayload, add(mload(sourcePayload), 0x20)), caller())\n let result := call(\n gas(),\n sload(_sourceContractSlot),\n callvalue(),\n // start reading data from memory position, plus 32 bytes, to skip bytes length indicator\n add(sourcePayload, 0x20),\n // add an additional 32 bytes to bytes length to include the appended caller address\n add(mload(sourcePayload), 0x20),\n 0,\n 0\n )\n // when reading back data, skip the first 32 bytes which is used to indicate bytes position in calldata\n // also subtract 32 bytes from returndatasize to accomodate the skipped first 32 bytes\n returndatacopy(data, 0x20, sub(returndatasize(), 0x20))\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n }\n }\n _burn(from, tokenId);\n return (Holographable.bridgeOut.selector, abi.encode(from, to, tokenId, data));\n }\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n * @param from cannot be the zero address.\n * @param to cannot be the zero address.\n * @param tokenId token must exist and be owned by `from`.\n */\n function safeTransferFrom(address from, address to, uint256 tokenId) external payable {\n safeTransferFrom(from, to, tokenId, \"\");\n }\n\n /**\n * @notice Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n * @dev Since it's not being used, the _data variable is commented out to avoid compiler warnings.\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n * @param from cannot be the zero address.\n * @param to cannot be the zero address.\n * @param tokenId token must exist and be owned by `from`.\n */\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public payable {\n require(_isApproved(msg.sender, tokenId), \"ERC721: not approved sender\");\n if (_isEventRegistered(HolographERC721Event.beforeSafeTransfer)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC721.beforeSafeTransfer.selector, from, to, tokenId, data))\n );\n }\n _transferFrom(from, to, tokenId);\n if (_isContract(to)) {\n require(\n ERC721TokenReceiver(to).onERC721Received(msg.sender, from, tokenId, data) ==\n ERC721TokenReceiver.onERC721Received.selector,\n \"ERC721: onERC721Received fail\"\n );\n }\n if (_isEventRegistered(HolographERC721Event.afterSafeTransfer)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC721.afterSafeTransfer.selector, from, to, tokenId, data))\n );\n }\n }\n\n /**\n * @notice Adds a new approved operator.\n * @dev Allows platforms to sell/transfer all your NFTs. Used with proxy contracts like OpenSea/Rarible.\n * @param to The address to approve.\n * @param approved Turn on or off approval status.\n */\n function setApprovalForAll(address to, bool approved) external {\n require(to != msg.sender, \"ERC721: cannot approve self\");\n if (_isEventRegistered(HolographERC721Event.beforeApprovalAll)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC721.beforeApprovalAll.selector, msg.sender, to, approved))\n );\n }\n _operatorApprovals[msg.sender][to] = approved;\n emit ApprovalForAll(msg.sender, to, approved);\n if (_isEventRegistered(HolographERC721Event.afterApprovalAll)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC721.afterApprovalAll.selector, msg.sender, to, approved))\n );\n }\n }\n\n /**\n * @dev Allows for source smart contract to burn a token.\n * Note: this is put in place to make sure that custom logic could be implemented for merging, gamification, etc.\n * Note: token cannot be burned if it's locked by bridge.\n */\n function sourceBurn(uint256 tokenId) external onlySource {\n address wallet = _tokenOwner[tokenId];\n _burn(wallet, tokenId);\n }\n\n /**\n * @dev Allows for source smart contract to mint a token.\n */\n function sourceMint(address to, uint224 tokenId) external onlySource {\n // uint32 is reserved for chain id to be used\n // we need to get current chain id, and prepend it to tokenId\n // this will prevent possible tokenId overlap if minting simultaneously on multiple chains is possible\n uint256 token = uint256(bytes32(abi.encodePacked(_chain(), tokenId)));\n require(!_burnedTokens[token], \"ERC721: can't mint burned token\");\n _mint(to, token);\n }\n\n /**\n * @dev Allows source to get the prepend for their tokenIds.\n */\n function sourceGetChainPrepend() external view onlySource returns (uint256) {\n return uint256(bytes32(abi.encodePacked(_chain(), uint224(0))));\n }\n\n /**\n * @dev Allows for source smart contract to mint a batch of tokens.\n */\n function sourceMintBatch(address to, uint224[] calldata tokenIds) external onlySource {\n require(tokenIds.length < 1000, \"ERC721: max batch size is 1000\");\n uint32 chain = _chain();\n uint256 token;\n for (uint256 i = 0; i < tokenIds.length; i++) {\n require(!_burnedTokens[token], \"ERC721: can't mint burned token\");\n token = uint256(bytes32(abi.encodePacked(chain, tokenIds[i])));\n require(!_burnedTokens[token], \"ERC721: can't mint burned token\");\n _mint(to, token);\n }\n }\n\n /**\n * @dev Allows for source smart contract to mint a batch of tokens.\n */\n function sourceMintBatch(address[] calldata wallets, uint224[] calldata tokenIds) external onlySource {\n require(wallets.length == tokenIds.length, \"ERC721: array length missmatch\");\n require(tokenIds.length < 1000, \"ERC721: max batch size is 1000\");\n uint32 chain = _chain();\n uint256 token;\n for (uint256 i = 0; i < tokenIds.length; i++) {\n token = uint256(bytes32(abi.encodePacked(chain, tokenIds[i])));\n require(!_burnedTokens[token], \"ERC721: can't mint burned token\");\n _mint(wallets[i], token);\n }\n }\n\n /**\n * @dev Allows for source smart contract to mint a batch of tokens.\n */\n function sourceMintBatchIncremental(address to, uint224 startingTokenId, uint256 length) external onlySource {\n uint256 token = uint256(bytes32(abi.encodePacked(_chain(), startingTokenId)));\n for (uint256 i = 0; i < length; i++) {\n require(!_burnedTokens[token], \"ERC721: can't mint burned token\");\n _mint(to, token);\n token++;\n }\n }\n\n /**\n * @dev Allows for source smart contract to transfer a token.\n * Note: this is put in place to make sure that custom logic could be implemented for merging, gamification, etc.\n * Note: token cannot be transfered if it's locked by bridge.\n */\n function sourceTransfer(address to, uint256 tokenId) external onlySource {\n require(!_burnedTokens[tokenId], \"ERC721: token has been burned\");\n address wallet = _tokenOwner[tokenId];\n _transferFrom(wallet, to, tokenId);\n }\n\n /**\n * @dev Allows for source smart contract to make calls to external contracts\n */\n function sourceExternalCall(address target, bytes calldata data) external onlySource {\n assembly {\n calldatacopy(0, data.offset, data.length)\n let result := call(gas(), target, callvalue(), 0, data.length, 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @notice Transfers `tokenId` token from `msg.sender` to `to`.\n * @dev WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\n * @param to cannot be the zero address.\n * @param tokenId token must be owned by `from`.\n */\n function transfer(address to, uint256 tokenId) external payable {\n transferFrom(msg.sender, to, tokenId, \"\");\n }\n\n /**\n * @notice Transfers `tokenId` token from `from` to `to`.\n * @dev WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\n * @param from cannot be the zero address.\n * @param to cannot be the zero address.\n * @param tokenId token must be owned by `from`.\n */\n function transferFrom(address from, address to, uint256 tokenId) public payable {\n transferFrom(from, to, tokenId, \"\");\n }\n\n /**\n * @notice Transfers `tokenId` token from `from` to `to`.\n * @dev WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\n * @dev Since it's not being used, the _data variable is commented out to avoid compiler warnings.\n * @param from cannot be the zero address.\n * @param to cannot be the zero address.\n * @param tokenId token must be owned by `from`.\n * @param data additional data to pass.\n */\n function transferFrom(address from, address to, uint256 tokenId, bytes memory data) public payable {\n require(_isApproved(msg.sender, tokenId), \"ERC721: not approved sender\");\n if (_isEventRegistered(HolographERC721Event.beforeTransfer)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC721.beforeTransfer.selector, from, to, tokenId, data)));\n }\n _transferFrom(from, to, tokenId);\n if (_isEventRegistered(HolographERC721Event.afterTransfer)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC721.afterTransfer.selector, from, to, tokenId, data)));\n }\n }\n\n /**\n * @notice Get total number of tokens owned by wallet.\n * @dev Used to see total amount of tokens owned by a specific wallet.\n * @param wallet Address for which to get token balance.\n * @return uint256 Returns an integer, representing total amount of tokens held by address.\n */\n function balanceOf(address wallet) public view returns (uint256) {\n return _ownedTokensCount[wallet];\n }\n\n function burned(uint256 tokenId) public view returns (bool) {\n return _burnedTokens[tokenId];\n }\n\n /**\n * @notice Decimal places to have for totalSupply.\n * @dev Since ERC721s are single, we use 0 as the decimal places to make sure a round number for totalSupply.\n * @return uint256 Returns the number of decimal places to have for totalSupply.\n */\n function decimals() external pure returns (uint256) {\n return 0;\n }\n\n function exists(uint256 tokenId) public view returns (bool) {\n return _tokenOwner[tokenId] != address(0);\n }\n\n /**\n * @notice Gets the approved address for the token.\n * @dev Single operator set for a specific token. Usually used for one-time very specific authorisations.\n * @param tokenId Token id to get approved operator for.\n * @return address Approved address for token.\n */\n function getApproved(uint256 tokenId) external view returns (address) {\n return _tokenApprovals[tokenId];\n }\n\n /**\n * @notice Checks if the address is approved.\n * @dev Includes references to OpenSea and Rarible marketplace proxies.\n * @param wallet Address of the wallet.\n * @param operator Address of the marketplace operator.\n * @return bool True if approved.\n */\n function isApprovedForAll(address wallet, address operator) external view returns (bool) {\n return (_operatorApprovals[wallet][operator] || _sourceApproved(wallet, operator));\n }\n\n /**\n * @notice Checks who the owner of a token is.\n * @dev The token must exist.\n * @param tokenId The token to look up.\n * @return address Owner of the token.\n */\n function ownerOf(uint256 tokenId) external view returns (address) {\n address tokenOwner = _tokenOwner[tokenId];\n require(tokenOwner != address(0), \"ERC721: token does not exist\");\n return tokenOwner;\n }\n\n /**\n * @notice Get token by index.\n * @dev Used in conjunction with totalSupply function to iterate over all tokens in collection.\n * @param index Index of token in array.\n * @return uint256 Returns the token id of token located at that index.\n */\n function tokenByIndex(uint256 index) external view returns (uint256) {\n require(index < _allTokens.length, \"ERC721: index out of bounds\");\n return _allTokens[index];\n }\n\n /**\n * @notice Get set length list, starting from index, for all tokens.\n * @param index The index to start enumeration from.\n * @param length The length of returned results.\n * @return tokenIds uint256[] Returns a set length array of token ids minted.\n */\n function tokens(uint256 index, uint256 length) external view returns (uint256[] memory tokenIds) {\n uint256 supply = _allTokens.length;\n if (index + length > supply) {\n length = supply - index;\n }\n tokenIds = new uint256[](length);\n for (uint256 i = 0; i < length; i++) {\n tokenIds[i] = _allTokens[index + i];\n }\n }\n\n /**\n * @notice Get token from wallet by index instead of token id.\n * @dev Helpful for wallet token enumeration where token id info is not yet available. Use in conjunction with balanceOf function.\n * @param wallet Specific address for which to get token for.\n * @param index Index of token in array.\n * @return uint256 Returns the token id of token located at that index in specified wallet.\n */\n function tokenOfOwnerByIndex(address wallet, uint256 index) external view returns (uint256) {\n require(index < balanceOf(wallet), \"ERC721: index out of bounds\");\n return _ownedTokens[wallet][index];\n }\n\n /**\n * @notice Total amount of tokens in the collection.\n * @dev Ignores burned tokens.\n * @return uint256 Returns the total number of active (not burned) tokens.\n */\n function totalSupply() external view returns (uint256) {\n return _allTokens.length;\n }\n\n /**\n * @notice Empty function that is triggered by external contract on NFT transfer.\n * @dev We have this blank function in place to make sure that external contract sending in NFTs don't error out.\n * @dev Since it's not being used, the _operator variable is commented out to avoid compiler warnings.\n * @dev Since it's not being used, the _from variable is commented out to avoid compiler warnings.\n * @dev Since it's not being used, the _tokenId variable is commented out to avoid compiler warnings.\n * @dev Since it's not being used, the _data variable is commented out to avoid compiler warnings.\n * @return bytes4 Returns the interfaceId of onERC721Received.\n */\n function onERC721Received(\n address _operator,\n address _from,\n uint256 _tokenId,\n bytes calldata _data\n ) external returns (bytes4) {\n require(_isContract(_operator), \"ERC721: operator not contract\");\n if (_isEventRegistered(HolographERC721Event.beforeOnERC721Received)) {\n require(\n _sourceCall(\n abi.encodeWithSelector(\n HolographedERC721.beforeOnERC721Received.selector,\n _operator,\n _from,\n address(this),\n _tokenId,\n _data\n )\n )\n );\n }\n try HolographERC721Interface(_operator).ownerOf(_tokenId) returns (address tokenOwner) {\n require(tokenOwner == address(this), \"ERC721: contract not token owner\");\n } catch {\n revert(\"ERC721: token does not exist\");\n }\n if (_isEventRegistered(HolographERC721Event.afterOnERC721Received)) {\n require(\n _sourceCall(\n abi.encodeWithSelector(\n HolographedERC721.afterOnERC721Received.selector,\n _operator,\n _from,\n address(this),\n _tokenId,\n _data\n )\n )\n );\n }\n return ERC721TokenReceiver.onERC721Received.selector;\n }\n\n /**\n * @dev Add a newly minted token into managed list of tokens.\n * @param to Address of token owner for which to add the token.\n * @param tokenId Id of token to add.\n */\n function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {\n _ownedTokensIndex[tokenId] = _ownedTokensCount[to];\n _ownedTokensCount[to]++;\n _ownedTokens[to].push(tokenId);\n _allTokensIndex[tokenId] = _allTokens.length;\n _allTokens.push(tokenId);\n }\n\n /**\n * @notice Burns the token.\n * @dev All validation needs to be done before calling this function.\n * @param wallet Address of current token owner.\n * @param tokenId The token to burn.\n */\n function _burn(address wallet, uint256 tokenId) private {\n _clearApproval(tokenId);\n _tokenOwner[tokenId] = address(0);\n _registryTransfer(wallet, address(0), tokenId);\n _removeTokenFromOwnerEnumeration(wallet, tokenId);\n _burnedTokens[tokenId] = true;\n }\n\n /**\n * @notice Deletes a token from the approval list.\n * @dev Removes from count.\n * @param tokenId T.\n */\n function _clearApproval(uint256 tokenId) private {\n delete _tokenApprovals[tokenId];\n }\n\n /**\n * @notice Mints an NFT.\n * @dev Can to mint the token to the zero address and the token cannot already exist.\n * @param to Address to mint to.\n * @param tokenId The new token.\n */\n function _mint(address to, uint256 tokenId) private {\n require(tokenId > 0, \"ERC721: token id cannot be zero\");\n require(to != address(0), \"ERC721: minting to burn address\");\n require(!_exists(tokenId), \"ERC721: token already exists\");\n require(!_burnedTokens[tokenId], \"ERC721: token has been burned\");\n _tokenOwner[tokenId] = to;\n _registryTransfer(address(0), to, tokenId);\n _addTokenToOwnerEnumeration(to, tokenId);\n }\n\n function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {\n uint256 lastTokenIndex = _allTokens.length - 1;\n uint256 tokenIndex = _allTokensIndex[tokenId];\n uint256 lastTokenId = _allTokens[lastTokenIndex];\n _allTokens[tokenIndex] = lastTokenId;\n _allTokensIndex[lastTokenId] = tokenIndex;\n delete _allTokensIndex[tokenId];\n delete _allTokens[lastTokenIndex];\n _allTokens.pop();\n }\n\n /**\n * @dev Remove a token from managed list of tokens.\n * @param from Address of token owner for which to remove the token.\n * @param tokenId Id of token to remove.\n */\n function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {\n _removeTokenFromAllTokensEnumeration(tokenId);\n _ownedTokensCount[from]--;\n uint256 lastTokenIndex = _ownedTokensCount[from];\n uint256 tokenIndex = _ownedTokensIndex[tokenId];\n if (tokenIndex != lastTokenIndex) {\n uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];\n _ownedTokens[from][tokenIndex] = lastTokenId;\n _ownedTokensIndex[lastTokenId] = tokenIndex;\n }\n if (lastTokenIndex == 0) {\n delete _ownedTokens[from];\n } else {\n delete _ownedTokens[from][lastTokenIndex];\n _ownedTokens[from].pop();\n }\n }\n\n /**\n * @dev Primary private function that handles the transfer/mint/burn functionality.\n * @param from Address from where token is being transferred. Zero address means it is being minted.\n * @param to Address to whom the token is being transferred. Zero address means it is being burned.\n * @param tokenId Id of token that is being transferred/minted/burned.\n */\n function _transferFrom(address from, address to, uint256 tokenId) private {\n require(_tokenOwner[tokenId] == from, \"ERC721: token not owned\");\n require(to != address(0), \"ERC721: use burn instead\");\n _clearApproval(tokenId);\n _tokenOwner[tokenId] = to;\n _registryTransfer(from, to, tokenId);\n _removeTokenFromOwnerEnumeration(from, tokenId);\n _addTokenToOwnerEnumeration(to, tokenId);\n }\n\n function _chain() private view returns (uint32) {\n uint32 currentChain = HolographInterface(HolographerInterface(payable(address(this))).getHolograph())\n .getHolographChainId();\n if (currentChain != HolographerInterface(payable(address(this))).getOriginChain()) {\n return currentChain;\n }\n return uint32(0);\n }\n\n /**\n * @notice Checks if the token owner exists.\n * @dev If the address is the zero address no owner exists.\n * @param tokenId The affected token.\n * @return bool True if it exists.\n */\n function _exists(uint256 tokenId) private view returns (bool) {\n address tokenOwner = _tokenOwner[tokenId];\n return tokenOwner != address(0);\n }\n\n function _sourceApproved(address _tokenWallet, address _tokenSpender) internal view returns (bool approved) {\n if (_isEventRegistered(HolographERC721Event.onIsApprovedForAll)) {\n HolographedERC721 sourceContract;\n assembly {\n sourceContract := sload(_sourceContractSlot)\n }\n if (sourceContract.onIsApprovedForAll(_tokenWallet, _tokenSpender)) {\n approved = true;\n }\n }\n }\n\n /**\n * @notice Checks if the address is an approved one.\n * @dev Uses inlined checks for different usecases of approval.\n * @param spender Address of the spender.\n * @param tokenId The affected token.\n * @return bool True if approved.\n */\n function _isApproved(address spender, uint256 tokenId) private view returns (bool) {\n require(_exists(tokenId), \"ERC721: token does not exist\");\n address tokenOwner = _tokenOwner[tokenId];\n return (spender == tokenOwner ||\n _tokenApprovals[tokenId] == spender ||\n _operatorApprovals[tokenOwner][spender] ||\n _sourceApproved(tokenOwner, spender));\n }\n\n function _isApprovedStrict(address spender, uint256 tokenId) private view returns (bool) {\n require(_exists(tokenId), \"ERC721: token does not exist\");\n address tokenOwner = _tokenOwner[tokenId];\n return (spender == tokenOwner || _operatorApprovals[tokenOwner][spender] || _sourceApproved(tokenOwner, spender));\n }\n\n function _isContract(address contractAddress) private view returns (bool) {\n bytes32 codehash;\n assembly {\n codehash := extcodehash(contractAddress)\n }\n return (codehash != 0x0 && codehash != 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470);\n }\n\n /**\n * @dev Get the interfaces contract address.\n */\n function _interfaces() private view returns (address) {\n return _holograph().getInterfaces();\n }\n\n function owner() public view override returns (address) {\n assembly {\n calldatacopy(0, 0, calldatasize())\n mstore(calldatasize(), caller())\n let result := staticcall(gas(), sload(_sourceContractSlot), 0, add(calldatasize(), 0x20), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n function _holograph() private view returns (HolographInterface holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n /**\n * @dev Get the bridge contract address.\n */\n function _royalties() private view returns (address) {\n return\n HolographRegistryInterface(_holograph().getRegistry()).getContractTypeAddress(\n // \"HolographRoyalties\" front zero padded to be 32 bytes\n 0x0000000000000000000000000000486f6c6f6772617068526f79616c74696573\n );\n }\n\n function _registryTransfer(address _from, address _to, uint256 _tokenId) private {\n emit Transfer(_from, _to, _tokenId);\n HolographRegistryInterface(_holograph().getRegistry()).holographableEvent(\n abi.encode(\n // keccak256(\"TransferERC721(address,address,uint256)\")\n bytes32(0x351b8d13789e4d8d2717631559251955685881a31494dd0b8b19b4ef8530bb6d),\n _from,\n _to,\n _tokenId\n )\n );\n }\n\n /**\n * @dev Purposefully left empty, to prevent running out of gas errors when receiving native token payments.\n */\n event FundsReceived(address indexed source, uint256 amount);\n\n receive() external payable {\n emit FundsReceived(msg.sender, msg.value);\n }\n\n /**\n * @notice Fallback to the source contract.\n * @dev Any function call that is not covered here, will automatically be sent over to the source contract.\n */\n fallback() external payable {\n // Check if royalties support the function, send there, otherwise revert to source\n address _target;\n if (HolographInterfacesInterface(_interfaces()).supportsInterface(InterfaceType.ROYALTIES, msg.sig)) {\n _target = _royalties();\n assembly {\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), _target, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n } else {\n assembly {\n calldatacopy(0, 0, calldatasize())\n mstore(calldatasize(), caller())\n let result := call(gas(), sload(_sourceContractSlot), callvalue(), 0, add(calldatasize(), 0x20), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n }\n\n /*\n * @dev all calls to source contract go through this function in order to inject original msg.sender in calldata\n */\n function _sourceCall(bytes memory payload) private returns (bool output) {\n assembly {\n mstore(add(payload, add(mload(payload), 0x20)), caller())\n // offset memory position by 32 bytes to skip the 32 bytes where bytes length is stored\n // add 32 bytes to bytes length to include the appended msg.sender to calldata\n let result := call(\n gas(),\n sload(_sourceContractSlot),\n callvalue(),\n add(payload, 0x20),\n add(mload(payload), 0x20),\n 0,\n 0\n )\n let pos := mload(0x40)\n // reserve memory space for return data\n mstore(0x40, add(pos, returndatasize()))\n returndatacopy(pos, 0, returndatasize())\n switch result\n case 0 {\n revert(pos, returndatasize())\n }\n output := mload(pos)\n }\n }\n\n function _isEventRegistered(HolographERC721Event _eventName) private view returns (bool) {\n return ((_eventConfig >> uint256(_eventName)) & uint256(1) == 1 ? true : false);\n }\n}\n" + }, + "contracts/enforcer/HolographGeneric.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\nimport \"../abstract/Owner.sol\";\n\nimport \"../enum/HolographGenericEvent.sol\";\nimport \"../enum/InterfaceType.sol\";\n\nimport \"../interface/HolographGenericInterface.sol\";\nimport \"../interface/ERC165.sol\";\nimport \"../interface/Holographable.sol\";\nimport \"../interface/HolographedGeneric.sol\";\nimport \"../interface/HolographInterface.sol\";\nimport \"../interface/InitializableInterface.sol\";\nimport \"../interface/HolographInterfacesInterface.sol\";\nimport \"../interface/Ownable.sol\";\n\n/**\n * @title Holograph Bridgeable Generic Contract\n * @author Holograph Foundation\n * @notice A smart contract for creating custom bridgeable logic.\n * @dev The entire logic and functionality of the smart contract is self-contained.\n */\ncontract HolographGeneric is Admin, Owner, Initializable, HolographGenericInterface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\n */\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.sourceContract')) - 1)\n */\n bytes32 constant _sourceContractSlot = 0x27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b074;\n\n /**\n * @dev Configuration for events to trigger for source smart contract.\n */\n uint256 private _eventConfig;\n\n /**\n * @notice Only allow calls from bridge smart contract.\n */\n modifier onlyBridge() {\n require(msg.sender == _holograph().getBridge(), \"GENERIC: bridge only call\");\n _;\n }\n\n /**\n * @notice Only allow calls from source smart contract.\n */\n modifier onlySource() {\n address sourceContract;\n assembly {\n sourceContract := sload(_sourceContractSlot)\n }\n require(msg.sender == sourceContract, \"GENERIC: source only call\");\n _;\n }\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"GENERIC: already initialized\");\n InitializableInterface sourceContract;\n assembly {\n sstore(_ownerSlot, caller())\n sourceContract := sload(_sourceContractSlot)\n }\n (uint256 eventConfig, bool skipInit, bytes memory initCode) = abi.decode(initPayload, (uint256, bool, bytes));\n _eventConfig = eventConfig;\n if (!skipInit) {\n require(sourceContract.init(initCode) == InitializableInterface.init.selector, \"GENERIC: could not init source\");\n }\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @dev Allows for source smart contract to withdraw contract balance.\n */\n function sourceTransfer(address payable destination, uint256 amount) external onlySource {\n destination.transfer(amount);\n }\n\n /**\n * @dev Allows for source smart contract to make calls to external contracts\n */\n function sourceExternalCall(address target, bytes calldata data) external onlySource {\n assembly {\n calldatacopy(0, data.offset, data.length)\n let result := call(gas(), target, callvalue(), 0, data.length, 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @dev Purposefully left empty, to prevent running out of gas errors when receiving native token payments.\n */\n receive() external payable {}\n\n /**\n * @notice Fallback to the source contract.\n * @dev Any function call that is not covered here, will automatically be sent over to the source contract.\n */\n fallback() external payable {\n assembly {\n calldatacopy(0, 0, calldatasize())\n mstore(calldatasize(), caller())\n let result := call(gas(), sload(_sourceContractSlot), callvalue(), 0, add(calldatasize(), 0x20), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n function _sourceCall(bytes memory payload) private returns (bool output) {\n assembly {\n let pos := mload(0x40)\n mstore(0x40, add(pos, 0x20))\n mstore(add(payload, add(mload(payload), 0x20)), caller())\n // offset memory position by 32 bytes to skip the 32 bytes where bytes length is stored\n // add 32 bytes to bytes length to include the appended msg.sender to calldata\n let result := call(\n gas(),\n sload(_sourceContractSlot),\n callvalue(),\n add(payload, 0x20),\n add(mload(payload), 0x20),\n 0,\n 0\n )\n returndatacopy(pos, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n output := mload(pos)\n }\n }\n\n /**\n * @dev Although EIP-165 is not required for ERC20 contracts, we still decided to implement it.\n *\n * This makes it easier for external smart contracts to easily identify a valid ERC20 token contract.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool) {\n HolographInterfacesInterface interfaces = HolographInterfacesInterface(_interfaces());\n ERC165 erc165Contract;\n assembly {\n erc165Contract := sload(_sourceContractSlot)\n }\n if (\n interfaces.supportsInterface(InterfaceType.GENERIC, interfaceId) || erc165Contract.supportsInterface(interfaceId) // check global interfaces // check if source supports interface\n ) {\n return true;\n } else {\n return false;\n }\n }\n\n function bridgeIn(uint32 fromChain, bytes calldata payload) external onlyBridge returns (bytes4) {\n if (_isEventRegistered(HolographGenericEvent.bridgeIn)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedGeneric.bridgeIn.selector, fromChain, payload)),\n \"HOLOGRAPH: bridge in failed\"\n );\n }\n return Holographable.bridgeIn.selector;\n }\n\n function bridgeOut(\n uint32 toChain,\n address sender,\n bytes calldata payload\n ) external onlyBridge returns (bytes4 selector, bytes memory data) {\n if (_isEventRegistered(HolographGenericEvent.bridgeOut)) {\n bytes memory sourcePayload = abi.encodeWithSelector(\n HolographedGeneric.bridgeOut.selector,\n toChain,\n sender,\n payload\n );\n assembly {\n // it is important to add 32 bytes in order to accommodate the first 32 bytes being used for storing length of bytes\n mstore(add(sourcePayload, add(mload(sourcePayload), 0x20)), caller())\n let result := call(\n gas(),\n sload(_sourceContractSlot),\n callvalue(),\n // start reading data from memory position, plus 32 bytes, to skip bytes length indicator\n add(sourcePayload, 0x20),\n // add an additional 32 bytes to bytes length to include the appended caller address\n add(mload(sourcePayload), 0x20),\n 0,\n 0\n )\n // when reading back data, skip the first 32 bytes which is used to indicate bytes position in calldata\n // also subtract 32 bytes from returndatasize to accomodate the skipped first 32 bytes\n returndatacopy(data, 0x20, sub(returndatasize(), 0x20))\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n }\n }\n return (Holographable.bridgeOut.selector, data);\n }\n\n /**\n * @dev Allows for source smart contract to emit events.\n */\n function sourceEmit(bytes calldata eventData) external onlySource {\n assembly {\n calldatacopy(0, eventData.offset, eventData.length)\n log0(0, eventData.length)\n }\n }\n\n function sourceEmit(bytes32 eventId, bytes calldata eventData) external onlySource {\n assembly {\n calldatacopy(0, eventData.offset, eventData.length)\n log1(0, eventData.length, eventId)\n }\n }\n\n function sourceEmit(bytes32 eventId, bytes32 topic1, bytes calldata eventData) external onlySource {\n assembly {\n calldatacopy(0, eventData.offset, eventData.length)\n log2(0, eventData.length, eventId, topic1)\n }\n }\n\n function sourceEmit(bytes32 eventId, bytes32 topic1, bytes32 topic2, bytes calldata eventData) external onlySource {\n assembly {\n calldatacopy(0, eventData.offset, eventData.length)\n log3(0, eventData.length, eventId, topic1, topic2)\n }\n }\n\n function sourceEmit(\n bytes32 eventId,\n bytes32 topic1,\n bytes32 topic2,\n bytes32 topic3,\n bytes calldata eventData\n ) external onlySource {\n assembly {\n calldatacopy(0, eventData.offset, eventData.length)\n log4(0, eventData.length, eventId, topic1, topic2, topic3)\n }\n }\n\n /**\n * @dev Get the source smart contract as bridgeable interface.\n */\n function SourceGeneric() private view returns (HolographedGeneric sourceContract) {\n assembly {\n sourceContract := sload(_sourceContractSlot)\n }\n }\n\n /**\n * @dev Get the interfaces contract address.\n */\n function _interfaces() private view returns (address) {\n return _holograph().getInterfaces();\n }\n\n function owner() public view override returns (address) {\n Ownable ownableContract;\n assembly {\n ownableContract := sload(_sourceContractSlot)\n }\n return ownableContract.owner();\n }\n\n function _holograph() private view returns (HolographInterface holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n function _isEventRegistered(HolographGenericEvent _eventName) private view returns (bool) {\n return ((_eventConfig >> uint256(_eventName)) & uint256(1) == 1 ? true : false);\n }\n}\n" + }, + "contracts/enforcer/HolographRoyalties.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\nimport \"../abstract/Owner.sol\";\n\nimport \"../interface/ERC20.sol\";\nimport \"../interface/HolographerInterface.sol\";\nimport \"../interface/InitializableInterface.sol\";\nimport \"../interface/HolographRoyaltiesInterface.sol\";\n\nimport \"../struct/ZoraBidShares.sol\";\n\n/**\n * @title HolographRoyalties\n * @author Holograph Foundation\n * @notice A smart contract for providing royalty info, collecting royalties, and distributing it to configured payout wallets.\n * @dev This smart contract is not intended to be used directly. Apply it to any of your ERC721 or ERC1155 smart contracts through a delegatecall fallback.\n */\ncontract HolographRoyalties is Admin, Owner, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.ROYALTIES.defaultBp')) - 1)\n */\n bytes32 constant _defaultBpSlot = 0xff29fcf645501423fd56e0287670f6813a1e5db5cf706428bc8516381e7ffe81;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.ROYALTIES.defaultReceiver')) - 1)\n */\n bytes32 constant _defaultReceiverSlot = 0x00b381815b89a20a37ee91e8a0119be5e16f6d1668377e7ae457213a74a415bb;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.ROYALTIES.initialized')) - 1)\n */\n bytes32 constant _initializedPaidSlot = 0x91428d26cb4818e4e627ebb64c06b5a67b82f313516b5c903cf07a00681c95f6;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.ROYALTIES.payout.addresses')) - 1)\n */\n bytes32 constant _payoutAddressesSlot = 0xf31f2a3a453a7aa2f3054423a8c5474ac9817ea457b458152967bbcb12ed6a43;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.ROYALTIES.payout.bps')) - 1)\n */\n bytes32 constant _payoutBpsSlot = 0xa4023567d5b5f01c63e00d90785d7cd4ff057a237ad185c5ecade8f4059fb61a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.ROYALTIES.extendedCall')) - 1)\n * @dev extendedCall is an init config used to determine if payouts should be sent via a call or a transfer.\n */\n bytes32 constant _extendedCallSlot = 0x254926eafdecb56f669f96a3a752fbca17becd902481431df613768b1f903fa3;\n\n string constant _bpString = \"eip1967.Holograph.ROYALTIES.bp\";\n string constant _receiverString = \"eip1967.Holograph.ROYALTIES.receiver\";\n string constant _tokenAddressString = \"eip1967.Holograph.ROYALTIES.tokenAddress\";\n\n /**\n * @notice Event emitted when setting/updating royalty info/fees. This is used by Rarible V1.\n * @dev Emits event in order to comply with Rarible V1 royalty spec.\n * @param tokenId Specific token id for which royalty info is being set, set as 0 for all tokens inside of the smart contract.\n * @param recipients Address array of wallets that will receive tha royalties.\n * @param bps Uint256 array of base points(percentages) that each wallet(specified in recipients) will receive from the royalty payouts.\n * Make sure that all the base points add up to a total of 10000.\n */\n event SecondarySaleFees(uint256 tokenId, address[] recipients, uint256[] bps);\n\n /**\n * @dev Use this modifier to lock public functions that should not be accesible to non-owners.\n */\n modifier onlyOwner() override {\n require(isOwner(), \"ROYALTIES: caller not an owner\");\n _;\n }\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"ROYALTIES: already initialized\");\n assembly {\n sstore(_adminSlot, caller())\n sstore(_ownerSlot, caller())\n }\n uint256 bp = abi.decode(initPayload, (uint256));\n setRoyalties(0, payable(address(this)), bp);\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n function initHolographRoyalties(bytes memory initPayload) external returns (bytes4) {\n uint256 initialized;\n assembly {\n initialized := sload(_initializedPaidSlot)\n }\n require(initialized == 0, \"ROYALTIES: already initialized\");\n (uint256 bp, uint256 useExtenededCall) = abi.decode(initPayload, (uint256, uint256));\n if (useExtenededCall > 0) {\n useExtenededCall = 1;\n }\n assembly {\n sstore(_extendedCallSlot, useExtenededCall)\n }\n setRoyalties(0, payable(address(this)), bp);\n address payable[] memory addresses = new address payable[](1);\n addresses[0] = payable(Owner(HolographerInterface(address(this)).getSourceContract()).owner());\n uint256[] memory bps = new uint256[](1);\n bps[0] = 10000;\n _setPayoutAddresses(addresses);\n _setPayoutBps(bps);\n initialized = 1;\n assembly {\n sstore(_initializedPaidSlot, initialized)\n }\n return InitializableInterface.init.selector;\n }\n\n /**\n * @notice Check if message sender is a legitimate owner of the smart contract\n * @dev We check owner, admin, and identity for a more comprehensive coverage.\n * @return Returns true is message sender is an owner.\n */\n function isOwner() private view returns (bool) {\n return (msg.sender == getOwner() ||\n msg.sender == getAdmin() ||\n msg.sender == Owner(HolographerInterface(address(this)).getSourceContract()).owner());\n }\n\n /**\n * @dev This is here in place to prevent reverts in case contract is used outside of the protocol.\n */\n function getSourceContract() external view returns (address sourceContract) {\n sourceContract = address(this);\n }\n\n /**\n * @dev Gets the default royalty payment receiver address from storage slot.\n * @return receiver Wallet or smart contract that will receive the initial royalty payouts.\n */\n function _getDefaultReceiver() private view returns (address payable receiver) {\n assembly {\n receiver := sload(_defaultReceiverSlot)\n }\n }\n\n /**\n * @dev Sets the default royalty payment receiver address to storage slot.\n * @param receiver Wallet or smart contract that will receive the initial royalty payouts.\n */\n function _setDefaultReceiver(address receiver) private {\n assembly {\n sstore(_defaultReceiverSlot, receiver)\n }\n }\n\n /**\n * @dev Gets the default royalty base points(percentage) from storage slot.\n * @return bp Royalty base points(percentage) for royalty payouts.\n */\n function _getDefaultBp() private view returns (uint256 bp) {\n assembly {\n bp := sload(_defaultBpSlot)\n }\n }\n\n /**\n * @dev Sets the default royalty base points(percentage) to storage slot.\n * @param bp Uint256 of royalty percentage, provided in base points format.\n */\n function _setDefaultBp(uint256 bp) private {\n assembly {\n sstore(_defaultBpSlot, bp)\n }\n }\n\n /**\n * @dev Gets the royalty payment receiver address, for a particular token id, from storage slot.\n * @return receiver Wallet or smart contract that will receive the royalty payouts for a particular token id.\n */\n function _getReceiver(uint256 tokenId) private view returns (address payable receiver) {\n bytes32 slot = bytes32(uint256(keccak256(abi.encodePacked(_receiverString, tokenId))) - 1);\n assembly {\n receiver := sload(slot)\n }\n }\n\n /**\n * @dev Sets the royalty payment receiver address, for a particular token id, to storage slot.\n * @param tokenId Uint256 of the token id to set the receiver for.\n * @param receiver Wallet or smart contract that will receive the royalty payouts for a particular token id.\n */\n function _setReceiver(uint256 tokenId, address receiver) private {\n bytes32 slot = bytes32(uint256(keccak256(abi.encodePacked(_receiverString, tokenId))) - 1);\n assembly {\n sstore(slot, receiver)\n }\n }\n\n /**\n * @dev Gets the royalty base points(percentage), for a particular token id, from storage slot.\n * @return bp Royalty base points(percentage) for the royalty payouts of a specific token id.\n */\n function _getBp(uint256 tokenId) private view returns (uint256 bp) {\n bytes32 slot = bytes32(uint256(keccak256(abi.encodePacked(_bpString, tokenId))) - 1);\n assembly {\n bp := sload(slot)\n }\n }\n\n /**\n * @dev Sets the royalty base points(percentage), for a particular token id, to storage slot.\n * @param tokenId Uint256 of the token id to set the base points for.\n * @param bp Uint256 of royalty percentage, provided in base points format, for a particular token id.\n */\n function _setBp(uint256 tokenId, uint256 bp) private {\n bytes32 slot = bytes32(uint256(keccak256(abi.encodePacked(_bpString, tokenId))) - 1);\n assembly {\n sstore(slot, bp)\n }\n }\n\n function _getPayoutAddresses() private view returns (address payable[] memory addresses) {\n // The slot hash has been precomputed for gas optimizaion\n bytes32 slot = _payoutAddressesSlot;\n uint256 length;\n assembly {\n length := sload(slot)\n }\n addresses = new address payable[](length);\n address payable value;\n for (uint256 i = 0; i < length; i++) {\n slot = keccak256(abi.encodePacked(i, slot));\n assembly {\n value := sload(slot)\n }\n addresses[i] = value;\n }\n }\n\n function _setPayoutAddresses(address payable[] memory addresses) private {\n bytes32 slot = _payoutAddressesSlot;\n uint256 length = addresses.length;\n assembly {\n sstore(slot, length)\n }\n address payable value;\n for (uint256 i = 0; i < length; i++) {\n slot = keccak256(abi.encodePacked(i, slot));\n value = addresses[i];\n assembly {\n sstore(slot, value)\n }\n }\n }\n\n function _getPayoutBps() private view returns (uint256[] memory bps) {\n bytes32 slot = _payoutBpsSlot;\n uint256 length;\n assembly {\n length := sload(slot)\n }\n bps = new uint256[](length);\n uint256 value;\n for (uint256 i = 0; i < length; i++) {\n slot = keccak256(abi.encodePacked(i, slot));\n assembly {\n value := sload(slot)\n }\n bps[i] = value;\n }\n }\n\n function _setPayoutBps(uint256[] memory bps) private {\n bytes32 slot = _payoutBpsSlot;\n uint256 length = bps.length;\n assembly {\n sstore(slot, length)\n }\n uint256 value;\n for (uint256 i = 0; i < length; i++) {\n slot = keccak256(abi.encodePacked(i, slot));\n value = bps[i];\n assembly {\n sstore(slot, value)\n }\n }\n }\n\n function _getTokenAddress(string memory tokenName) private view returns (address tokenAddress) {\n bytes32 slot = bytes32(uint256(keccak256(abi.encodePacked(_tokenAddressString, tokenName))) - 1);\n assembly {\n tokenAddress := sload(slot)\n }\n }\n\n function _setTokenAddress(string memory tokenName, address tokenAddress) private {\n bytes32 slot = bytes32(uint256(keccak256(abi.encodePacked(_tokenAddressString, tokenName))) - 1);\n assembly {\n sstore(slot, tokenAddress)\n }\n }\n\n /**\n * @dev Private function that transfers ETH to all payout recipients.\n * @dev This contract is designed primarily to capture royalties, but is limited in payout logic.\n * @dev This function uses a push payment model, where the contract pushes the ETH to the recipients.\n * @dev The design is intended so that royalty distribution logic can be handled externally via payment distribution contracts.\n * @dev The recommended usage for royalty structures that require more complex payout logic to multiple recipients is to\n * set 100% ownership payout with the recipient being the payment distribution contract.\n */\n function _payoutEth() private {\n address payable[] memory addresses = _getPayoutAddresses();\n uint256[] memory bps = _getPayoutBps();\n uint256 length = addresses.length;\n uint256 balance = address(this).balance;\n uint256 sending;\n bool extendedCall;\n assembly {\n extendedCall := sload(_extendedCallSlot)\n }\n for (uint256 i = 0; i < length; i++) {\n sending = ((bps[i] * balance) / 10000);\n // only send value if it is greater than 0\n if (sending > 0) {\n // If the contract enabled extended call on init then use call to transfer, otherwise use transfer\n if (extendedCall == true) {\n (bool success, ) = addresses[i].call{value: sending}(\"\");\n require(success, \"ROYALTIES: Transfer failed\");\n } else {\n addresses[i].transfer(sending);\n }\n }\n }\n }\n\n /**\n * @dev Private function that transfers tokens to all payout recipients.\n * @dev ERC20 tokens that use fee on transfer are not supported.\n * @dev This contract is designed primarily to capture royalties, but is limited in payout logic.\n * @dev This function uses a push payment model, where the contract pushes the ETH to the recipients.\n * @dev The design is intended so that royalty distribution logic can be handled externally via payment distribution contracts.\n * @dev The recommended usage for royalty structures that require more complex payout logic to multiple recipients is to\n * set 100% ownership payout with the recipient being the payment distribution contract.\n *\n * @param tokenAddress Smart contract address of ERC20 token.\n */\n function _payoutToken(address tokenAddress) private {\n address payable[] memory addresses = _getPayoutAddresses();\n uint256[] memory bps = _getPayoutBps();\n uint256 length = addresses.length;\n ERC20 erc20 = ERC20(tokenAddress);\n uint256 balance = erc20.balanceOf(address(this));\n uint256 sending;\n for (uint256 i = 0; i < length; i++) {\n sending = ((bps[i] * balance) / 10000);\n // Some tokens revert when transferring a zero value amount this check ensures if one recipient's\n // amount is zero, the transfer will still succeed for the other recipients.\n if (sending > 0) {\n require(\n _callOptionalReturn(\n tokenAddress,\n erc20.transfer.selector,\n abi.encode(address(addresses[i]), uint256(sending))\n ),\n \"ROYALTIES: ERC20 transfer failed\"\n );\n }\n }\n }\n\n /**\n * @dev Private function that transfers multiple tokens to all payout recipients.\n * @dev Try to use _payoutToken and handle each token individually.\n * @dev ERC20 tokens that use fee on transfer are not supported.\n * @dev This contract is designed primarily to capture royalties, but is limited in payout logic.\n * @dev This function uses a push payment model, where the contract pushes the ETH to the recipients.\n * @dev The design is intended so that royalty distribution logic can be handled externally via payment distribution contracts.\n * @dev The recommended usage for royalty structures that require more complex payout logic to multiple recipients is to\n * set 100% ownership payout with the recipient being the payment distribution contract.\n *\n * @param tokenAddresses Array of smart contract addresses of ERC20 tokens.\n */\n function _payoutTokens(address[] memory tokenAddresses) private {\n address payable[] memory addresses = _getPayoutAddresses();\n uint256[] memory bps = _getPayoutBps();\n ERC20 erc20;\n uint256 balance;\n uint256 sending;\n for (uint256 t = 0; t < tokenAddresses.length; t++) {\n erc20 = ERC20(tokenAddresses[t]);\n balance = erc20.balanceOf(address(this));\n for (uint256 i = 0; i < addresses.length; i++) {\n sending = ((bps[i] * balance) / 10000);\n // Some tokens revert when transferring a zero value amount this check ensures if one recipient's\n // amount is zero, the transfer will still succeed for the other recipients.\n if (sending > 0) {\n require(\n _callOptionalReturn(\n tokenAddresses[t],\n erc20.transfer.selector,\n abi.encode(address(addresses[i]), uint256(sending))\n ),\n \"ROYALTIES: ERC20 transfer failed\"\n );\n }\n }\n }\n }\n\n /**\n * @dev This function validates that the call is being made by an authorised wallet.\n * @dev Will revert entire tranaction if it fails.\n */\n function _validatePayoutRequestor() private view {\n if (!isOwner()) {\n bool matched;\n address payable[] memory addresses = _getPayoutAddresses();\n address payable sender = payable(msg.sender);\n for (uint256 i = 0; i < addresses.length; i++) {\n if (addresses[i] == sender) {\n matched = true;\n break;\n }\n }\n require(matched, \"ROYALTIES: sender not authorized\");\n }\n }\n\n /**\n * @notice Set the wallets and percentages for royalty payouts.\n * Limited to 10 wallets to prevent out of gas errors.\n * For more complex royalty structures, set 100% ownership payout with the recipient being the payment distribution contract.\n * @dev Function can only we called by owner, admin, or identity wallet.\n * @dev Addresses and bps arrays must be equal length. Bps values added together must equal 10000 exactly.\n * @param addresses An array of all the addresses that will be receiving royalty payouts.\n * @param bps An array of the percentages that each address will receive from the royalty payouts.\n */\n function configurePayouts(address payable[] memory addresses, uint256[] memory bps) public onlyOwner {\n require(addresses.length == bps.length, \"ROYALTIES: missmatched lenghts\");\n require(addresses.length <= 10, \"ROYALTIES: max 10 addresses\");\n uint256 totalBp;\n for (uint256 i = 0; i < addresses.length; i++) {\n require(addresses[i] != address(0), \"ROYALTIES: payee is zero address\");\n require(bps[i] > 0, \"ROYALTIES: bp is zero\");\n totalBp = totalBp + bps[i];\n }\n require(totalBp == 10000, \"ROYALTIES: bps must equal 10000\");\n _setPayoutAddresses(addresses);\n _setPayoutBps(bps);\n }\n\n /**\n * @notice Show the wallets and percentages of payout recipients.\n * @dev These are the recipients that will be getting royalty payouts.\n * @return addresses An array of all the addresses that will be receiving royalty payouts.\n * @return bps An array of the percentages that each address will receive from the royalty payouts.\n */\n function getPayoutInfo() public view returns (address payable[] memory addresses, uint256[] memory bps) {\n addresses = _getPayoutAddresses();\n bps = _getPayoutBps();\n }\n\n /**\n * @notice Get payout of all ETH in smart contract.\n * @dev Distribute all the ETH(minus gas fees) to payout recipients.\n */\n function getEthPayout() public {\n _validatePayoutRequestor();\n _payoutEth();\n }\n\n /**\n * @notice Get payout for a specific token address. Token must have a positive balance!\n * @dev Contract owner, admin, identity wallet, and payout recipients can call this function.\n * @param tokenAddress An address of the token for which to issue payouts for.\n */\n function getTokenPayout(address tokenAddress) public {\n _validatePayoutRequestor();\n _payoutToken(tokenAddress);\n }\n\n /**\n * @notice Get payouts for tokens listed by address. Tokens must have a positive balance!\n * @dev Each token balance must be equal or greater than 10000. Otherwise calculating BP is difficult.\n * @param tokenAddresses An address array of tokens to issue payouts for.\n */\n function getTokensPayout(address[] memory tokenAddresses) public {\n _validatePayoutRequestor();\n _payoutTokens(tokenAddresses);\n }\n\n /**\n * @notice Set the royalty information for entire contract, or a specific token.\n * @dev Take great care to not make this function accessible by other public functions in your overlying smart contract.\n * @param tokenId Set a specific token id, or leave at 0 to set as default parameters.\n * @param receiver Wallet or smart contract that will receive the royalty payouts.\n * @param bp Uint256 of royalty percentage, provided in base points format.\n */\n function setRoyalties(uint256 tokenId, address payable receiver, uint256 bp) public onlyOwner {\n require(receiver != address(0), \"ROYALTIES: receiver is zero address\");\n require(bp <= 10000, \"ROYALTIES: base points over 100%\");\n if (tokenId == 0) {\n _setDefaultReceiver(receiver);\n _setDefaultBp(bp);\n } else {\n _setReceiver(tokenId, receiver);\n _setBp(tokenId, bp);\n }\n address[] memory receivers = new address[](1);\n receivers[0] = address(receiver);\n uint256[] memory bps = new uint256[](1);\n bps[0] = bp;\n emit SecondarySaleFees(tokenId, receivers, bps);\n }\n\n // IEIP2981\n function royaltyInfo(uint256 tokenId, uint256 value) public view returns (address, uint256) {\n if (_getReceiver(tokenId) == address(0)) {\n return (_getDefaultReceiver(), (_getDefaultBp() * value) / 10000);\n } else {\n return (_getReceiver(tokenId), (_getBp(tokenId) * value) / 10000);\n }\n }\n\n // Rarible V1\n function getFeeBps(uint256 tokenId) public view returns (uint256[] memory) {\n uint256[] memory bps = new uint256[](1);\n if (_getReceiver(tokenId) == address(0)) {\n bps[0] = _getDefaultBp();\n } else {\n bps[0] = _getBp(tokenId);\n }\n return bps;\n }\n\n // Rarible V1\n function getFeeRecipients(uint256 tokenId) public view returns (address payable[] memory) {\n address payable[] memory receivers = new address payable[](1);\n if (_getReceiver(tokenId) == address(0)) {\n receivers[0] = _getDefaultReceiver();\n } else {\n receivers[0] = _getReceiver(tokenId);\n }\n return receivers;\n }\n\n // Rarible V2(not being used since it creates a conflict with Manifold royalties)\n // struct Part {\n // address payable account;\n // uint96 value;\n // }\n\n // function getRoyalties(uint256 tokenId) public view returns (Part[] memory) {\n // return royalties[id];\n // }\n\n // Manifold\n function getRoyalties(uint256 tokenId) public view returns (address payable[] memory, uint256[] memory) {\n address payable[] memory receivers = new address payable[](1);\n uint256[] memory bps = new uint256[](1);\n if (_getReceiver(tokenId) == address(0)) {\n receivers[0] = _getDefaultReceiver();\n bps[0] = _getDefaultBp();\n } else {\n receivers[0] = _getReceiver(tokenId);\n bps[0] = _getBp(tokenId);\n }\n return (receivers, bps);\n }\n\n // Foundation\n function getFees(uint256 tokenId) public view returns (address payable[] memory, uint256[] memory) {\n address payable[] memory receivers = new address payable[](1);\n uint256[] memory bps = new uint256[](1);\n if (_getReceiver(tokenId) == address(0)) {\n receivers[0] = _getDefaultReceiver();\n bps[0] = _getDefaultBp();\n } else {\n receivers[0] = _getReceiver(tokenId);\n bps[0] = _getBp(tokenId);\n }\n return (receivers, bps);\n }\n\n // SuperRare\n // Hint taken from Manifold's RoyaltyEngine(https://github.com/manifoldxyz/royalty-registry-solidity/blob/main/contracts/RoyaltyEngineV1.sol)\n // To be quite honest, SuperRare is a closed marketplace. They're working on opening it up but looks like they want to use private smart contracts.\n // We'll just leave this here for just in case they open the flood gates.\n function tokenCreator(\n address,\n /* contractAddress*/\n uint256 tokenId\n ) public view returns (address) {\n address receiver = _getReceiver(tokenId);\n if (receiver == address(0)) {\n return _getDefaultReceiver();\n }\n return receiver;\n }\n\n // SuperRare\n function calculateRoyaltyFee(\n address,\n /* contractAddress */\n uint256 tokenId,\n uint256 amount\n ) public view returns (uint256) {\n if (_getReceiver(tokenId) == address(0)) {\n return (_getDefaultBp() * amount) / 10000;\n } else {\n return (_getBp(tokenId) * amount) / 10000;\n }\n }\n\n // Holograph\n // we indicate that this contract operates market functions\n function marketContract() public view returns (address) {\n return address(this);\n }\n\n // Holograph\n // we indicate that the receiver is the creator, to convince the smart contract to pay\n function tokenCreators(uint256 tokenId) public view returns (address) {\n address receiver = _getReceiver(tokenId);\n if (receiver == address(0)) {\n return _getDefaultReceiver();\n }\n return receiver;\n }\n\n // Holograph\n // we provide the percentage that needs to be paid out from the sale\n function bidSharesForToken(uint256 tokenId) public view returns (HolographBidShares memory bidShares) {\n // this information is outside of the scope of our\n bidShares.prevOwner.value = 0;\n bidShares.owner.value = 0;\n if (_getReceiver(tokenId) == address(0)) {\n bidShares.creator.value = _getDefaultBp() * (10 ** 16);\n } else {\n bidShares.creator.value = _getBp(tokenId) * (10 ** 16);\n }\n return bidShares;\n }\n\n /**\n * @notice Get the smart contract address of a token by common name.\n * @dev Used only to identify really major/common tokens. Avoid using due to gas usages.\n * @param tokenName The ticker symbol of the token. For example \"USDC\" or \"DAI\".\n * @return The smart contract address of the token ticker symbol. Or zero address if not found.\n */\n function getTokenAddress(string memory tokenName) public view returns (address) {\n return _getTokenAddress(tokenName);\n }\n\n /**\n * @notice Used to wrap function calls to check if they return without revert regardless of return type.\n * @dev Checks if wrapped function opcode is a revert, if it is then it reverts as well, if it's not then\n * it checks for return data, if return data exists, it is returned as a bool,\n * if return data does not exist (0 length) then success is expected and returns true\n * @return Returns true if the wrapped function call returns without a revert even if it doesn't return true.\n */\n function _callOptionalReturn(address target, bytes4 functionSignature, bytes memory payload) internal returns (bool) {\n bytes memory data = abi.encodePacked(functionSignature, payload);\n bool success = true;\n assembly {\n let result := call(gas(), target, callvalue(), add(data, 0x20), mload(data), 0, 0)\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n if gt(returndatasize(), 0) {\n returndatacopy(success, 0, 0x20)\n }\n }\n }\n return success;\n }\n}\n" + }, + "contracts/enum/ChainIdType.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nenum ChainIdType {\n UNDEFINED, // 0\n EVM, // 1\n HOLOGRAPH, // 2\n LAYERZERO, // 3\n HYPERLANE // 4\n}\n" + }, + "contracts/enum/HolographERC20Event.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nenum HolographERC20Event {\n UNDEFINED, // 0\n bridgeIn, // 1\n bridgeOut, // 2\n afterApprove, // 3\n beforeApprove, // 4\n afterOnERC20Received, // 5\n beforeOnERC20Received, // 6\n afterBurn, // 7\n beforeBurn, // 8\n afterMint, // 9\n beforeMint, // 10\n afterSafeTransfer, // 11\n beforeSafeTransfer, // 12\n afterTransfer, // 13\n beforeTransfer, // 14\n onAllowance // 15\n}\n" + }, + "contracts/enum/HolographERC721Event.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nenum HolographERC721Event {\n UNDEFINED, // 0\n bridgeIn, // 1\n bridgeOut, // 2\n afterApprove, // 3\n beforeApprove, // 4\n afterApprovalAll, // 5\n beforeApprovalAll, // 6\n afterBurn, // 7\n beforeBurn, // 8\n afterMint, // 9\n beforeMint, // 10\n afterSafeTransfer, // 11\n beforeSafeTransfer, // 12\n afterTransfer, // 13\n beforeTransfer, // 14\n beforeOnERC721Received, // 15\n afterOnERC721Received, // 16\n onIsApprovedForAll, // 17\n customContractURI // 18\n}\n" + }, + "contracts/enum/HolographGenericEvent.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nenum HolographGenericEvent {\n UNDEFINED, // 0\n bridgeIn, // 1\n bridgeOut // 2\n}\n" + }, + "contracts/enum/InterfaceType.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nenum InterfaceType {\n UNDEFINED, // 0\n ERC20, // 1\n ERC721, // 2\n ERC1155, // 3\n ROYALTIES, // 4\n GENERIC // 5\n}\n" + }, + "contracts/enum/TokenUriType.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nenum TokenUriType {\n UNDEFINED, // 0\n IPFS, // 1\n HTTPS, // 2\n ARWEAVE // 3\n}\n" + }, + "contracts/faucet/Faucet.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Initializable.sol\";\nimport \"../interface/HolographERC20Interface.sol\";\nimport \"../interface/InitializableInterface.sol\";\n\ncontract Faucet is Initializable {\n address public owner;\n HolographERC20Interface public token;\n\n uint256 public faucetDripAmount = 100 ether;\n uint256 public faucetCooldown = 24 hours;\n\n mapping(address => uint256) lastAccessTime;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"Faucet contract is already initialized\");\n (address _contractOwner, address _tokenInstance) = abi.decode(initPayload, (address, address));\n token = HolographERC20Interface(_tokenInstance);\n owner = _contractOwner;\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /// @notice Get tokens from faucet's own balance. Rate limited.\n function requestTokens() external {\n require(isAllowedToWithdraw(msg.sender), \"Come back later\");\n require(token.balanceOf(address(this)) >= faucetDripAmount, \"Faucet is empty\");\n lastAccessTime[msg.sender] = block.timestamp;\n token.transfer(msg.sender, faucetDripAmount);\n }\n\n /// @notice Update token address\n function setToken(address tokenAddress) external onlyOwner {\n token = HolographERC20Interface(tokenAddress);\n }\n\n /// @notice Grant tokens to receiver from faucet's own balance. Not rate limited.\n function grantTokens(address _address) external onlyOwner {\n require(token.balanceOf(address(this)) >= faucetDripAmount, \"Faucet is empty\");\n token.transfer(_address, faucetDripAmount);\n }\n\n function grantTokens(address _address, uint256 _amountWei) external onlyOwner {\n require(token.balanceOf(address(this)) >= _amountWei, \"Insufficient funds\");\n token.transfer(_address, _amountWei);\n }\n\n /// @notice Withdraw all funds from the faucet.\n function withdrawAllTokens(address _receiver) external onlyOwner {\n token.transfer(_receiver, token.balanceOf(address(this)));\n }\n\n /// @notice Withdraw amount of funds from the faucet. Amount is in wei.\n function withdrawTokens(address _receiver, uint256 _amountWei) external onlyOwner {\n require(token.balanceOf(address(this)) >= _amountWei, \"Insufficient funds\");\n token.transfer(_receiver, _amountWei);\n }\n\n /// @notice Configure the time between two drip requests. Time is in seconds.\n function setWithdrawCooldown(uint256 _waitTimeSeconds) external onlyOwner {\n faucetCooldown = _waitTimeSeconds;\n }\n\n /// @notice Configure the drip request amount. Amount is in wei.\n function setWithdrawAmount(uint256 _amountWei) external onlyOwner {\n faucetDripAmount = _amountWei;\n }\n\n /// @notice Check whether an address can request drip and is not on cooldown.\n function isAllowedToWithdraw(address _address) public view returns (bool) {\n if (lastAccessTime[_address] == 0) {\n return true;\n } else if (block.timestamp >= lastAccessTime[_address] + faucetCooldown) {\n return true;\n }\n return false;\n }\n\n /// @notice Get the last time the address withdrew tokens.\n function getLastAccessTime(address _address) public view returns (uint256) {\n return lastAccessTime[_address];\n }\n\n modifier onlyOwner() {\n require(msg.sender == owner, \"Caller is not the owner\");\n _;\n }\n}\n" + }, + "contracts/Holograph.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./abstract/Admin.sol\";\nimport \"./abstract/Initializable.sol\";\n\nimport \"./interface/InitializableInterface.sol\";\nimport \"./interface/HolographInterface.sol\";\n\n/**\n * @title Holograph Protocol\n * @author https://github.com/holographxyz\n * @notice This is the primary Holograph Protocol smart contract\n * @dev This contract stores a reference to all the primary modules and variables of the protocol\n */\ncontract Holograph is Admin, Initializable, HolographInterface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.bridge')) - 1)\n */\n bytes32 constant _bridgeSlot = 0xeb87cbb21687feb327e3d58c6c16d552231d12c7a0e8115042a4165fac8a77f9;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.chainId')) - 1)\n */\n bytes32 constant _chainIdSlot = 0x7651bfc11f7485d07ab2b41c1312e2007c8cb7efb0f7352a6dee4a1153eebab2;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.factory')) - 1)\n */\n bytes32 constant _factorySlot = 0xa49f20855ba576e09d13c8041c8039fa655356ea27f6c40f1ec46a4301cd5b23;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holographChainId')) - 1)\n */\n bytes32 constant _holographChainIdSlot = 0xd840a780c26e07edc6e1ee2eaa6f134ed5488dbd762614116653cee8542a3844;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.interfaces')) - 1)\n */\n bytes32 constant _interfacesSlot = 0xbd3084b8c09da87ad159c247a60e209784196be2530cecbbd8f337fdd1848827;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.operator')) - 1)\n */\n bytes32 constant _operatorSlot = 0x7caba557ad34138fa3b7e43fb574e0e6cc10481c3073e0dffbc560db81b5c60f;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\n */\n bytes32 constant _registrySlot = 0xce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.treasury')) - 1)\n */\n bytes32 constant _treasurySlot = 0x4215e7a38d75164ca078bbd61d0992cdeb1ba16f3b3ead5944966d3e4080e8b6;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.utilityToken')) - 1)\n */\n bytes32 constant _utilityTokenSlot = 0xbf76518d46db472b71aa7677a0908b8016f3dee568415ffa24055f9a670f9c37;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (\n uint32 holographChainId,\n address bridge,\n address factory,\n address interfaces,\n address operator,\n address registry,\n address treasury,\n address utilityToken\n ) = abi.decode(initPayload, (uint32, address, address, address, address, address, address, address));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_chainIdSlot, chainid())\n sstore(_holographChainIdSlot, holographChainId)\n sstore(_bridgeSlot, bridge)\n sstore(_factorySlot, factory)\n sstore(_interfacesSlot, interfaces)\n sstore(_operatorSlot, operator)\n sstore(_registrySlot, registry)\n sstore(_treasurySlot, treasury)\n sstore(_utilityTokenSlot, utilityToken)\n }\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @notice Get the address of the Holograph Bridge module\n * @dev Used for beaming holographable assets cross-chain\n */\n function getBridge() external view returns (address bridge) {\n assembly {\n bridge := sload(_bridgeSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Bridge module address\n * @param bridge address of the Holograph Bridge smart contract to use\n */\n function setBridge(address bridge) external onlyAdmin {\n assembly {\n sstore(_bridgeSlot, bridge)\n }\n }\n\n /**\n * @notice Get the chain ID that the Protocol was deployed on\n * @dev Useful for checking if/when a hard fork occurs\n */\n function getChainId() external view returns (uint256 chainId) {\n assembly {\n chainId := sload(_chainIdSlot)\n }\n }\n\n /**\n * @notice Update the chain ID\n * @dev Useful for updating once a hard fork has been mitigated\n * @param chainId EVM chain ID to use\n */\n function setChainId(uint256 chainId) external onlyAdmin {\n assembly {\n sstore(_chainIdSlot, chainId)\n }\n }\n\n /**\n * @notice Get the address of the Holograph Factory module\n * @dev Used for deploying holographable smart contracts\n */\n function getFactory() external view returns (address factory) {\n assembly {\n factory := sload(_factorySlot)\n }\n }\n\n /**\n * @notice Update the Holograph Factory module address\n * @param factory address of the Holograph Factory smart contract to use\n */\n function setFactory(address factory) external onlyAdmin {\n assembly {\n sstore(_factorySlot, factory)\n }\n }\n\n /**\n * @notice Get the Holograph chain Id\n * @dev Holograph uses an internal chain id mapping\n */\n function getHolographChainId() external view returns (uint32 holographChainId) {\n assembly {\n holographChainId := sload(_holographChainIdSlot)\n }\n }\n\n /**\n * @notice Update the Holograph chain ID\n * @dev Useful for updating once a hard fork was mitigated\n * @param holographChainId Holograph chain ID to use\n */\n function setHolographChainId(uint32 holographChainId) external onlyAdmin {\n assembly {\n sstore(_holographChainIdSlot, holographChainId)\n }\n }\n\n /**\n * @notice Get the address of the Holograph Interfaces module\n * @dev Holograph uses this contract to store data that needs to be accessed by a large portion of the modules\n */\n function getInterfaces() external view returns (address interfaces) {\n assembly {\n interfaces := sload(_interfacesSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Interfaces module address\n * @param interfaces address of the Holograph Interfaces smart contract to use\n */\n function setInterfaces(address interfaces) external onlyAdmin {\n assembly {\n sstore(_interfacesSlot, interfaces)\n }\n }\n\n /**\n * @notice Get the address of the Holograph Operator module\n * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module\n */\n function getOperator() external view returns (address operator) {\n assembly {\n operator := sload(_operatorSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Operator module address\n * @param operator address of the Holograph Operator smart contract to use\n */\n function setOperator(address operator) external onlyAdmin {\n assembly {\n sstore(_operatorSlot, operator)\n }\n }\n\n /**\n * @notice Get the Holograph Registry module\n * @dev This module stores a reference for all deployed holographable smart contracts\n */\n function getRegistry() external view returns (address registry) {\n assembly {\n registry := sload(_registrySlot)\n }\n }\n\n /**\n * @notice Update the Holograph Registry module address\n * @param registry address of the Holograph Registry smart contract to use\n */\n function setRegistry(address registry) external onlyAdmin {\n assembly {\n sstore(_registrySlot, registry)\n }\n }\n\n /**\n * @notice Get the Holograph Treasury module\n * @dev All of the Holograph Protocol assets are stored and managed by this module\n */\n function getTreasury() external view returns (address treasury) {\n assembly {\n treasury := sload(_treasurySlot)\n }\n }\n\n /**\n * @notice Update the Holograph Treasury module address\n * @param treasury address of the Holograph Treasury smart contract to use\n */\n function setTreasury(address treasury) external onlyAdmin {\n assembly {\n sstore(_treasurySlot, treasury)\n }\n }\n\n /**\n * @notice Get the Holograph Utility Token address\n * @dev This is the official utility token of the Holograph Protocol\n */\n function getUtilityToken() external view returns (address utilityToken) {\n assembly {\n utilityToken := sload(_utilityTokenSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Utility Token address\n * @param utilityToken address of the Holograph Utility Token smart contract to use\n */\n function setUtilityToken(address utilityToken) external onlyAdmin {\n assembly {\n sstore(_utilityTokenSlot, utilityToken)\n }\n }\n\n /**\n * @dev Purposefully reverts to prevent having any type of ether transfered into the contract\n */\n receive() external payable {\n revert();\n }\n\n /**\n * @dev Purposefully reverts to prevent any calls to undefined functions\n */\n fallback() external payable {\n revert();\n }\n}\n" + }, + "contracts/HolographBridge.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./abstract/Admin.sol\";\nimport \"./abstract/Initializable.sol\";\n\nimport \"./interface/HolographERC20Interface.sol\";\nimport \"./interface/Holographable.sol\";\nimport \"./interface/HolographInterface.sol\";\nimport \"./interface/HolographBridgeInterface.sol\";\nimport \"./interface/HolographFactoryInterface.sol\";\nimport \"./interface/HolographOperatorInterface.sol\";\nimport \"./interface/HolographRegistryInterface.sol\";\nimport \"./interface/InitializableInterface.sol\";\n\n/**\n * @title Holograph Bridge\n * @author https://github.com/holographxyz\n * @notice Beam any holographable contracts and assets across blockchains\n * @dev The contract abstracts all the complexities of making bridge requests and uses a universal interface to bridge any type of holographable assets\n */\ncontract HolographBridge is Admin, Initializable, HolographBridgeInterface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.factory')) - 1)\n */\n bytes32 constant _factorySlot = 0xa49f20855ba576e09d13c8041c8039fa655356ea27f6c40f1ec46a4301cd5b23;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\n */\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.jobNonce')) - 1)\n */\n bytes32 constant _jobNonceSlot = 0x1cda64803f3b43503042e00863791e8d996666552d5855a78d53ee1dd4b3286d;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.operator')) - 1)\n */\n bytes32 constant _operatorSlot = 0x7caba557ad34138fa3b7e43fb574e0e6cc10481c3073e0dffbc560db81b5c60f;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\n */\n bytes32 constant _registrySlot = 0xce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7;\n\n /**\n * @dev Allow calls only from Holograph Operator contract\n */\n modifier onlyOperator() {\n require(msg.sender == address(_operator()), \"HOLOGRAPH: operator only call\");\n _;\n }\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address factory, address holograph, address operator, address registry) = abi.decode(\n initPayload,\n (address, address, address, address)\n );\n assembly {\n sstore(_adminSlot, origin())\n sstore(_factorySlot, factory)\n sstore(_holographSlot, holograph)\n sstore(_operatorSlot, operator)\n sstore(_registrySlot, registry)\n }\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @notice Receive a beam from another chain\n * @dev This function can only be called by the Holograph Operator module\n * @param fromChain Holograph Chain ID where the brigeOutRequest was created\n * @param holographableContract address of the destination contract that the bridgeInRequest is targeted for\n * @param hToken address of the hToken contract that wrapped the origin chain native gas token\n * @param hTokenRecipient address of recipient for the hToken reward\n * @param hTokenValue exact amount of hToken reward in wei\n * @param doNotRevert boolean used to specify if the call should revert\n * @param bridgeInPayload actual abi encoded bytes of the data that the holographable contract bridgeIn function will receive\n */\n function bridgeInRequest(\n uint256 /* nonce*/,\n uint32 fromChain,\n address holographableContract,\n address hToken,\n address hTokenRecipient,\n uint256 hTokenValue,\n bool doNotRevert,\n bytes calldata bridgeInPayload\n ) external payable onlyOperator {\n /**\n * @dev check that the target contract is either Holograph Factory or a deployed holographable contract\n */\n require(\n _registry().isHolographedContract(holographableContract) || address(_factory()) == holographableContract,\n \"HOLOGRAPH: not holographed\"\n );\n /**\n * @dev make a bridgeIn function call to the holographable contract\n */\n bytes4 selector = Holographable(holographableContract).bridgeIn(fromChain, bridgeInPayload);\n /**\n * @dev ensure returned selector is bridgeIn function signature, to guarantee that the function was called and succeeded\n */\n require(selector == Holographable.bridgeIn.selector, \"HOLOGRAPH: bridge in failed\");\n /**\n * @dev check if a specific reward amount was assigned to this request\n */\n if (hTokenValue > 0 && hTokenRecipient != address(0)) {\n /**\n * @dev mint the specific hToken amount for hToken recipient\n * this value is equivalent to amount that is deposited on origin chain's hToken contract\n * recipient can beam the asset to origin chain and unwrap for native gas token at any time\n */\n require(\n HolographERC20Interface(hToken).holographBridgeMint(hTokenRecipient, hTokenValue) ==\n HolographERC20Interface.holographBridgeMint.selector,\n \"HOLOGRAPH: hToken mint failed\"\n );\n }\n /**\n * @dev allow the call to revert on demand, for example use case, look into the Holograph Operator's jobEstimator function\n */\n require(doNotRevert, \"HOLOGRAPH: reverted\");\n }\n\n /**\n * @notice Create a beam request for a destination chain\n * @dev This function works for deploying contracts and beaming supported holographable assets across chains\n * @param toChain Holograph Chain ID where the beam is being sent to\n * @param holographableContract address of the contract for which the bridge request is being made\n * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain\n * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\n */\n function bridgeOutRequest(\n uint32 toChain,\n address holographableContract,\n uint256 gasLimit,\n uint256 gasPrice,\n bytes calldata bridgeOutPayload\n ) external payable {\n /**\n * @dev check that the target contract is either Holograph Factory or a deployed holographable contract\n */\n require(\n _registry().isHolographedContract(holographableContract) || address(_factory()) == holographableContract,\n \"HOLOGRAPH: not holographed\"\n );\n /**\n * @dev make a bridgeOut function call to the holographable contract\n */\n (bytes4 selector, bytes memory returnedPayload) = Holographable(holographableContract).bridgeOut(\n toChain,\n msg.sender,\n bridgeOutPayload\n );\n /**\n * @dev ensure returned selector is bridgeOut function signature, to guarantee that the function was called and succeeded\n */\n require(selector == Holographable.bridgeOut.selector, \"HOLOGRAPH: bridge out failed\");\n /**\n * @dev pass the request, along with all data, to Holograph Operator, to handle the cross-chain messaging logic\n */\n _operator().send{value: msg.value}(\n gasLimit,\n gasPrice,\n toChain,\n msg.sender,\n _jobNonce(),\n holographableContract,\n returnedPayload\n );\n }\n\n /**\n * @notice Do not call this function, it will always revert\n * @dev Used by getBridgeOutRequestPayload function\n * It is purposefully inverted to always revert on a successful call\n * Marked as external and not private to allow use inside try/catch of getBridgeOutRequestPayload function\n * If this function does not revert and returns a string, it is the actual revert reason\n * @param sender address of actual sender that is planning to make a bridgeOutRequest call\n * @param toChain holograph chain id of destination chain\n * @param holographableContract address of the contract for which the bridge request is being made\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\n */\n function revertedBridgeOutRequest(\n address sender,\n uint32 toChain,\n address holographableContract,\n bytes calldata bridgeOutPayload\n ) external returns (string memory revertReason) {\n /**\n * @dev make a bridgeOut function call to the holographable contract inside of a try/catch\n */\n try Holographable(holographableContract).bridgeOut(toChain, sender, bridgeOutPayload) returns (\n bytes4 selector,\n bytes memory payload\n ) {\n /**\n * @dev ensure returned selector is bridgeOut function signature, to guarantee that the function was called and succeeded\n */\n if (selector != Holographable.bridgeOut.selector) {\n /**\n * @dev if selector does not match, then it means the request failed\n */\n return \"HOLOGRAPH: bridge out failed\";\n }\n assembly {\n /**\n * @dev the entire payload is sent back in a revert\n */\n revert(add(payload, 0x20), mload(payload))\n }\n } catch Error(string memory reason) {\n return reason;\n } catch {\n return \"HOLOGRAPH: unknown error\";\n }\n }\n\n /**\n * @notice Get the payload created by the bridgeOutRequest function\n * @dev Use this function to get the payload that will be generated by a bridgeOutRequest\n * Only use this with a static call\n * @param toChain Holograph Chain ID where the beam is being sent to\n * @param holographableContract address of the contract for which the bridge request is being made\n * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain\n * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\n * @return samplePayload bytes made up of the bridgeOutRequest payload\n */\n function getBridgeOutRequestPayload(\n uint32 toChain,\n address holographableContract,\n uint256 gasLimit,\n uint256 gasPrice,\n bytes calldata bridgeOutPayload\n ) external returns (bytes memory samplePayload) {\n /**\n * @dev check that the target contract is either Holograph Factory or a deployed holographable contract\n */\n require(\n _registry().isHolographedContract(holographableContract) || address(_factory()) == holographableContract,\n \"HOLOGRAPH: not holographed\"\n );\n bytes memory payload;\n /**\n * @dev the revertedBridgeOutRequest function is wrapped into a try/catch function\n */\n try this.revertedBridgeOutRequest(msg.sender, toChain, holographableContract, bridgeOutPayload) returns (\n string memory revertReason\n ) {\n /**\n * @dev a non reverted result is actually a revert\n */\n revert(revertReason);\n } catch (bytes memory realResponse) {\n /**\n * @dev a revert is actually success, so the return data is stored as payload\n */\n payload = realResponse;\n }\n uint256 jobNonce;\n assembly {\n jobNonce := sload(_jobNonceSlot)\n }\n /**\n * @dev extract hlgFee from operator\n */\n uint256 fee = 0;\n if (gasPrice < type(uint256).max && gasLimit < type(uint256).max) {\n (uint256 hlgFee, , uint256 dstGasPrice) = _operator().getMessageFee(\n toChain,\n gasLimit,\n gasPrice,\n bridgeOutPayload\n );\n if (gasPrice == 0) {\n gasPrice = dstGasPrice;\n }\n fee = hlgFee;\n }\n /**\n * @dev the data is abi encoded into actual bridgeOutRequest payload bytes\n */\n bytes memory encodedData = abi.encodeWithSelector(\n HolographBridgeInterface.bridgeInRequest.selector,\n /**\n * @dev the latest job nonce is incremented by one\n */\n jobNonce + 1,\n _holograph().getHolographChainId(),\n holographableContract,\n _registry().getHToken(_holograph().getHolographChainId()),\n address(0),\n fee,\n true,\n payload\n );\n /**\n * @dev this abi encodes the data just like in Holograph Operator\n */\n samplePayload = abi.encodePacked(encodedData, gasLimit, gasPrice);\n }\n\n /**\n * @notice Get the fees associated with sending specific payload\n * @dev Will provide exact costs on protocol and message side, combine the two to get total\n * @dev @param toChain holograph chain id of destination chain for payload\n * @dev @param gasLimit amount of gas to provide for executing payload on destination chain\n * @dev @param gasPrice maximum amount to pay for gas price, can be set to 0 and will be chose automatically\n * @dev @param crossChainPayload the entire packet being sent cross-chain\n * @return hlgFee the amount (in wei) of native gas token that will cost for finalizing job on destiantion chain\n * @return msgFee the amount (in wei) of native gas token that will cost for sending message to destiantion chain\n * @return dstGasPrice the amount (in wei) that destination message maximum gas price will be\n */\n function getMessageFee(uint32, uint256, uint256, bytes calldata) external view returns (uint256, uint256, uint256) {\n assembly {\n calldatacopy(0, 0, calldatasize())\n let result := staticcall(gas(), sload(_operatorSlot), 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @notice Get the address of the Holograph Factory module\n * @dev Used for deploying holographable smart contracts\n */\n function getFactory() external view returns (address factory) {\n assembly {\n factory := sload(_factorySlot)\n }\n }\n\n /**\n * @notice Update the Holograph Factory module address\n * @param factory address of the Holograph Factory smart contract to use\n */\n function setFactory(address factory) external onlyAdmin {\n assembly {\n sstore(_factorySlot, factory)\n }\n }\n\n /**\n * @notice Get the Holograph Protocol contract\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\n */\n function getHolograph() external view returns (address holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Protocol contract address\n * @param holograph address of the Holograph Protocol smart contract to use\n */\n function setHolograph(address holograph) external onlyAdmin {\n assembly {\n sstore(_holographSlot, holograph)\n }\n }\n\n /**\n * @notice Get the latest job nonce\n * @dev You can use the job nonce as a way to calculate total amount of bridge requests that have been made\n */\n function getJobNonce() external view returns (uint256 jobNonce) {\n assembly {\n jobNonce := sload(_jobNonceSlot)\n }\n }\n\n /**\n * @notice Get the address of the Holograph Operator module\n * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module\n */\n function getOperator() external view returns (address operator) {\n assembly {\n operator := sload(_operatorSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Operator module address\n * @param operator address of the Holograph Operator smart contract to use\n */\n function setOperator(address operator) external onlyAdmin {\n assembly {\n sstore(_operatorSlot, operator)\n }\n }\n\n /**\n * @notice Get the Holograph Registry module\n * @dev This module stores a reference for all deployed holographable smart contracts\n */\n function getRegistry() external view returns (address registry) {\n assembly {\n registry := sload(_registrySlot)\n }\n }\n\n /**\n * @notice Update the Holograph Registry module address\n * @param registry address of the Holograph Registry smart contract to use\n */\n function setRegistry(address registry) external onlyAdmin {\n assembly {\n sstore(_registrySlot, registry)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Factory Interface\n */\n function _factory() private view returns (HolographFactoryInterface factory) {\n assembly {\n factory := sload(_factorySlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Interface\n */\n function _holograph() private view returns (HolographInterface holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n /**\n * @dev Internal nonce, that increments on each call, used for randomness\n */\n function _jobNonce() private returns (uint256 jobNonce) {\n assembly {\n jobNonce := add(sload(_jobNonceSlot), 0x0000000000000000000000000000000000000000000000000000000000000001)\n sstore(_jobNonceSlot, jobNonce)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Operator Interface\n */\n function _operator() private view returns (HolographOperatorInterface operator) {\n assembly {\n operator := sload(_operatorSlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Registry Interface\n */\n function _registry() private view returns (HolographRegistryInterface registry) {\n assembly {\n registry := sload(_registrySlot)\n }\n }\n\n /**\n * @dev Purposefully reverts to prevent having any type of ether transfered into the contract\n */\n receive() external payable {\n revert();\n }\n\n /**\n * @dev Purposefully reverts to prevent any calls to undefined functions\n */\n fallback() external payable {\n revert();\n }\n}\n" + }, + "contracts/HolographFactory.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./abstract/Admin.sol\";\nimport \"./abstract/Initializable.sol\";\n\nimport \"./enforcer/Holographer.sol\";\n\nimport \"./interface/Holographable.sol\";\nimport \"./interface/HolographBridgeInterface.sol\";\nimport \"./interface/HolographFactoryInterface.sol\";\nimport \"./interface/HolographInterface.sol\";\nimport \"./interface/HolographRegistryInterface.sol\";\nimport \"./interface/InitializableInterface.sol\";\n\nimport \"./struct/BridgeSettings.sol\";\nimport \"./struct/DeploymentConfig.sol\";\nimport \"./struct/Verification.sol\";\n\nimport \"./library/Strings.sol\";\n\n/**\n * @title Holograph Factory\n * @author https://github.com/holographxyz\n * @notice Deploy holographable contracts\n * @dev The contract provides methods that allow for the creation of Holograph Protocol compliant smart contracts, that are capable of minting holographable assets\n */\ncontract HolographFactory is Admin, Initializable, Holographable, HolographFactoryInterface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\n */\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\n */\n bytes32 constant _registrySlot = 0xce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address holograph, address registry) = abi.decode(initPayload, (address, address));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_holographSlot, holograph)\n sstore(_registrySlot, registry)\n }\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @notice Deploy holographable contract via bridge request\n * @dev This function directly forwards the calldata to the deployHolographableContract function\n * It is used to allow for Holograph Bridge to make cross-chain deployments\n */\n function bridgeIn(uint32 /* fromChain*/, bytes calldata payload) external returns (bytes4) {\n (DeploymentConfig memory config, Verification memory signature, address signer) = abi.decode(\n payload,\n (DeploymentConfig, Verification, address)\n );\n HolographFactoryInterface(address(this)).deployHolographableContract(config, signature, signer);\n return Holographable.bridgeIn.selector;\n }\n\n /**\n * @notice Deploy holographable contract via bridge request\n * @dev This function directly returns the calldata\n * It is used to allow for Holograph Bridge to make cross-chain deployments\n */\n function bridgeOut(\n uint32 /* toChain*/,\n address /* sender*/,\n bytes calldata payload\n ) external pure returns (bytes4 selector, bytes memory data) {\n return (Holographable.bridgeOut.selector, payload);\n }\n\n function deployHolographableContractMultiChain(\n DeploymentConfig memory config,\n Verification memory signature,\n address signer,\n bool deployOnCurrentChain,\n BridgeSettings[] memory bridgeSettings\n ) external payable {\n if (deployOnCurrentChain) {\n deployHolographableContract(config, signature, signer);\n }\n bytes memory payload = abi.encode(config, signature, signer);\n HolographInterface holograph;\n assembly {\n holograph := sload(_holographSlot)\n }\n HolographBridgeInterface bridge = HolographBridgeInterface(holograph.getBridge());\n uint256 l = bridgeSettings.length;\n for (uint256 i = 0; i < l; i++) {\n bridge.bridgeOutRequest{value: bridgeSettings[i].value}(\n bridgeSettings[i].toChain,\n address(this),\n bridgeSettings[i].gasLimit,\n bridgeSettings[i].gasPrice,\n payload\n );\n }\n }\n\n /**\n * @notice Deploy a holographable smart contract\n * @dev Using this function allows to deploy smart contracts that have the same address across all EVM chains\n * @param config contract deployement configurations\n * @param signature that was created by the wallet that created the original payload\n * @param signer address of wallet that created the payload\n */\n function deployHolographableContract(\n DeploymentConfig memory config,\n Verification memory signature,\n address signer\n ) public {\n address registry;\n address holograph;\n assembly {\n holograph := sload(_holographSlot)\n registry := sload(_registrySlot)\n }\n /**\n * @dev the configuration is encoded and hashed along with signer address\n */\n bytes32 hash = keccak256(\n abi.encodePacked(\n config.contractType,\n config.chainType,\n config.salt,\n keccak256(config.byteCode),\n keccak256(config.initCode),\n signer\n )\n );\n /**\n * @dev the hash is validated against signature\n * this is to guarantee that the original creator's configuration has not been altered\n */\n require(_verifySigner(signature.r, signature.s, signature.v, hash, signer), \"HOLOGRAPH: invalid signature\");\n /**\n * @dev check that this contract has not already been deployed on this chain\n */\n bytes memory holographerBytecode = type(Holographer).creationCode;\n address holographerAddress = address(\n uint160(uint256(keccak256(abi.encodePacked(bytes1(0xff), address(this), hash, keccak256(holographerBytecode)))))\n );\n require(!_isContract(holographerAddress), \"HOLOGRAPH: already deployed\");\n /**\n * @dev convert hash into uint256 which will be used as the salt for create2\n */\n uint256 saltInt = uint256(hash);\n address sourceContractAddress;\n bytes memory sourceByteCode = config.byteCode;\n assembly {\n /**\n * @dev deploy the user created smart contract first\n */\n sourceContractAddress := create2(0, add(sourceByteCode, 0x20), mload(sourceByteCode), saltInt)\n }\n assembly {\n /**\n * @dev deploy the Holographer contract\n */\n holographerAddress := create2(0, add(holographerBytecode, 0x20), mload(holographerBytecode), saltInt)\n }\n /**\n * @dev initialize the Holographer contract\n */\n require(\n InitializableInterface(holographerAddress).init(\n abi.encode(abi.encode(config.chainType, holograph, config.contractType, sourceContractAddress), config.initCode)\n ) == InitializableInterface.init.selector,\n \"initialization failed\"\n );\n /**\n * @dev update the Holograph Registry with deployed contract address\n */\n HolographRegistryInterface(registry).setHolographedHashAddress(hash, holographerAddress);\n /**\n * @dev emit an event that on-chain indexers can easily read\n */\n emit BridgeableContractDeployed(holographerAddress, hash);\n }\n\n /**\n * @notice Get the Holograph Protocol contract\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\n */\n function getHolograph() external view returns (address holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Protocol contract address\n * @param holograph address of the Holograph Protocol smart contract to use\n */\n function setHolograph(address holograph) external onlyAdmin {\n assembly {\n sstore(_holographSlot, holograph)\n }\n }\n\n /**\n * @notice Get the Holograph Registry module\n * @dev This module stores a reference for all deployed holographable smart contracts\n */\n function getRegistry() external view returns (address registry) {\n assembly {\n registry := sload(_registrySlot)\n }\n }\n\n /**\n * @notice Update the Holograph Registry module address\n * @param registry address of the Holograph Registry smart contract to use\n */\n function setRegistry(address registry) external onlyAdmin {\n assembly {\n sstore(_registrySlot, registry)\n }\n }\n\n /**\n * @dev Internal function used for checking if a contract has been deployed at address\n */\n function _isContract(address contractAddress) private view returns (bool) {\n bytes32 codehash;\n assembly {\n codehash := extcodehash(contractAddress)\n }\n return (codehash != 0x0 && codehash != 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470);\n }\n\n /**\n * @dev Internal function used for verifying a signature\n */\n function _verifySigner(bytes32 r, bytes32 s, uint8 v, bytes32 hash, address signer) private pure returns (bool) {\n if (v < 27) {\n v += 27;\n }\n if (v != 27 && v != 28) {\n return false;\n }\n // prevent signature malleability by checking if s-value is in the upper range\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n // if s-value is in upper range, calculate a new s-value\n s = bytes32(0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - uint256(s));\n // flip the v-value\n if (v == 27) {\n v = 28;\n } else {\n v = 27;\n }\n // check if s-value is still in upper range\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return false;\n }\n }\n /**\n * @dev signature is checked against EIP-191 first, then directly, to support legacy wallets\n */\n return (signer != address(0) &&\n (ecrecover(keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", hash)), v, r, s) == signer ||\n (\n ecrecover(\n keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n66\", Strings.toHexString(uint256(hash), 32))),\n v,\n r,\n s\n )\n ) ==\n signer ||\n ecrecover(hash, v, r, s) == signer));\n }\n\n /**\n * @dev Purposefully reverts to prevent having any type of ether transfered into the contract\n */\n receive() external payable {\n revert();\n }\n\n /**\n * @dev Purposefully reverts to prevent any calls to undefined functions\n */\n fallback() external payable {\n revert();\n }\n}\n" + }, + "contracts/HolographGenesis.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./interface/InitializableInterface.sol\";\n\n/**\n * @dev In the beginning there was a smart contract...\n */\ncontract HolographGenesis {\n mapping(address => bool) private _approvedDeployers;\n\n event Message(string message);\n\n modifier onlyDeployer() {\n require(_approvedDeployers[msg.sender], \"HOLOGRAPH: deployer not approved\");\n _;\n }\n\n constructor() {\n _approvedDeployers[tx.origin] = true;\n emit Message(\"The future of NFTs is Holograph.\");\n }\n\n function deploy(\n uint256 chainId,\n bytes12 saltHash,\n bytes memory sourceCode,\n bytes memory initCode\n ) external onlyDeployer {\n require(chainId == block.chainid, \"HOLOGRAPH: incorrect chain id\");\n bytes32 salt = bytes32(abi.encodePacked(msg.sender, saltHash));\n address contractAddress = address(\n uint160(uint256(keccak256(abi.encodePacked(bytes1(0xff), address(this), salt, keccak256(sourceCode)))))\n );\n require(!_isContract(contractAddress), \"HOLOGRAPH: already deployed\");\n assembly {\n contractAddress := create2(0, add(sourceCode, 0x20), mload(sourceCode), salt)\n }\n require(_isContract(contractAddress), \"HOLOGRAPH: deployment failed\");\n require(\n InitializableInterface(contractAddress).init(initCode) == InitializableInterface.init.selector,\n \"HOLOGRAPH: initialization failed\"\n );\n }\n\n function approveDeployer(address newDeployer, bool approve) external onlyDeployer {\n _approvedDeployers[newDeployer] = approve;\n }\n\n function isApprovedDeployer(address deployer) external view returns (bool) {\n return _approvedDeployers[deployer];\n }\n\n function _isContract(address contractAddress) internal view returns (bool) {\n bytes32 codehash;\n assembly {\n codehash := extcodehash(contractAddress)\n }\n return (codehash != 0x0 && codehash != 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470);\n }\n}\n" + }, + "contracts/HolographInterfaces.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./abstract/Admin.sol\";\nimport \"./abstract/Initializable.sol\";\n\nimport \"./enum/ChainIdType.sol\";\nimport \"./enum/InterfaceType.sol\";\nimport \"./enum/TokenUriType.sol\";\n\nimport \"./interface/InitializableInterface.sol\";\n\nimport \"./library/Base64.sol\";\nimport \"./library/Strings.sol\";\n\n/**\n * @title Holograph Interfaces\n * @author https://github.com/holographxyz\n * @notice Get universal Holograph Protocol variables\n * @dev The contract stores a reference of all supported: chains, interfaces, functions, etc.\n */\ncontract HolographInterfaces is Admin, Initializable {\n /**\n * @dev Internal mapping of all InterfaceType interfaces\n */\n mapping(InterfaceType => mapping(bytes4 => bool)) private _supportedInterfaces;\n\n /**\n * @dev Internal mapping of all ChainIdType conversions\n */\n mapping(ChainIdType => mapping(uint256 => mapping(ChainIdType => uint256))) private _chainIdMap;\n\n /**\n * @dev Internal mapping of all TokenUriType prepends\n */\n mapping(TokenUriType => string) private _prependURI;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n address contractAdmin = abi.decode(initPayload, (address));\n assembly {\n sstore(_adminSlot, contractAdmin)\n }\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @notice Get a base64 encoded contract URI JSON string\n * @dev Used to dynamically generate contract JSON payload\n * @param name the name of the smart contract\n * @param imageURL string pointing to the primary contract image, can be: https, ipfs, or ar (arweave)\n * @param externalLink url to website/page related to smart contract\n * @param bps basis points used for specifying royalties percentage\n * @param contractAddress address of the smart contract\n * @return a base64 encoded json string representing the smart contract\n */\n function contractURI(\n string calldata name,\n string calldata imageURL,\n string calldata externalLink,\n uint16 bps,\n address contractAddress\n ) external pure returns (string memory) {\n return\n string(\n abi.encodePacked(\n \"data:application/json;base64,\",\n Base64.encode(\n abi.encodePacked(\n '{\"name\":\"',\n name,\n '\",\"description\":\"',\n name,\n '\",\"image\":\"',\n imageURL,\n '\",\"external_link\":\"',\n externalLink,\n '\",\"seller_fee_basis_points\":',\n Strings.uint2str(bps),\n ',\"fee_recipient\":\"0x',\n Strings.toAsciiString(contractAddress),\n '\"}'\n )\n )\n )\n );\n }\n\n /**\n * @notice Get the prepend to use for tokenURI\n * @dev Provides the prepend to use with TokenUriType URI\n */\n function getUriPrepend(TokenUriType uriType) external view returns (string memory prepend) {\n prepend = _prependURI[uriType];\n }\n\n /**\n * @notice Update the tokenURI prepend\n * @param uriType specify which TokenUriType to set for\n * @param prepend the string to use for the prepend\n */\n function updateUriPrepend(TokenUriType uriType, string calldata prepend) external onlyAdmin {\n _prependURI[uriType] = prepend;\n }\n\n /**\n * @notice Update the tokenURI prepends\n * @param uriTypes specify array of TokenUriTypes to set for\n * @param prepends array string to use for the prepends\n */\n function updateUriPrepends(TokenUriType[] calldata uriTypes, string[] calldata prepends) external onlyAdmin {\n for (uint256 i = 0; i < uriTypes.length; i++) {\n _prependURI[uriTypes[i]] = prepends[i];\n }\n }\n\n function getChainId(\n ChainIdType fromChainType,\n uint256 fromChainId,\n ChainIdType toChainType\n ) external view returns (uint256 toChainId) {\n return _chainIdMap[fromChainType][fromChainId][toChainType];\n }\n\n function updateChainIdMap(\n ChainIdType fromChainType,\n uint256 fromChainId,\n ChainIdType toChainType,\n uint256 toChainId\n ) external onlyAdmin {\n _chainIdMap[fromChainType][fromChainId][toChainType] = toChainId;\n }\n\n function updateChainIdMaps(\n ChainIdType[] calldata fromChainType,\n uint256[] calldata fromChainId,\n ChainIdType[] calldata toChainType,\n uint256[] calldata toChainId\n ) external onlyAdmin {\n uint256 length = fromChainType.length;\n for (uint256 i = 0; i < length; i++) {\n _chainIdMap[fromChainType[i]][fromChainId[i]][toChainType[i]] = toChainId[i];\n }\n }\n\n function supportsInterface(InterfaceType interfaceType, bytes4 interfaceId) external view returns (bool) {\n return _supportedInterfaces[interfaceType][interfaceId];\n }\n\n function updateInterface(InterfaceType interfaceType, bytes4 interfaceId, bool supported) external onlyAdmin {\n _supportedInterfaces[interfaceType][interfaceId] = supported;\n }\n\n function updateInterfaces(\n InterfaceType interfaceType,\n bytes4[] calldata interfaceIds,\n bool supported\n ) external onlyAdmin {\n for (uint256 i = 0; i < interfaceIds.length; i++) {\n _supportedInterfaces[interfaceType][interfaceIds[i]] = supported;\n }\n }\n\n /**\n * @dev Purposefully reverts to prevent having any type of ether transfered into the contract\n */\n receive() external payable {\n revert();\n }\n\n /**\n * @dev Purposefully reverts to prevent any calls to undefined functions\n */\n fallback() external payable {\n revert();\n }\n}\n" + }, + "contracts/HolographOperator.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./abstract/Admin.sol\";\nimport \"./abstract/Initializable.sol\";\n\nimport \"./interface/CrossChainMessageInterface.sol\";\nimport \"./interface/HolographBridgeInterface.sol\";\nimport \"./interface/HolographERC20Interface.sol\";\nimport \"./interface/HolographInterface.sol\";\nimport \"./interface/HolographOperatorInterface.sol\";\nimport \"./interface/HolographRegistryInterface.sol\";\nimport \"./interface/InitializableInterface.sol\";\nimport \"./interface/HolographInterfacesInterface.sol\";\nimport \"./interface/Ownable.sol\";\n\nimport \"./struct/OperatorJob.sol\";\n\n/**\n * @title Holograph Operator\n * @author https://github.com/holographxyz\n * @notice Participate in the Holograph Protocol by becoming an Operator\n * @dev This contract allows operators to bond utility tokens and help execute operator jobs\n */\ncontract HolographOperator is Admin, Initializable, HolographOperatorInterface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.bridge')) - 1)\n */\n bytes32 constant _bridgeSlot = 0xeb87cbb21687feb327e3d58c6c16d552231d12c7a0e8115042a4165fac8a77f9;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\n */\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.interfaces')) - 1)\n */\n bytes32 constant _interfacesSlot = 0xbd3084b8c09da87ad159c247a60e209784196be2530cecbbd8f337fdd1848827;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.jobNonce')) - 1)\n */\n bytes32 constant _jobNonceSlot = 0x1cda64803f3b43503042e00863791e8d996666552d5855a78d53ee1dd4b3286d;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.messagingModule')) - 1)\n */\n bytes32 constant _messagingModuleSlot = 0x54176250282e65985d205704ffce44a59efe61f7afd99e29fda50f55b48c061a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\n */\n bytes32 constant _registrySlot = 0xce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.utilityToken')) - 1)\n */\n bytes32 constant _utilityTokenSlot = 0xbf76518d46db472b71aa7677a0908b8016f3dee568415ffa24055f9a670f9c37;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.minGasPrice')) - 1)\n */\n bytes32 constant _minGasPriceSlot = 0x264d744422f7427cd080572c35c848b6cd3a36da6b47519af89ef13098b12fc0;\n\n /**\n * @dev Internal number (in seconds), used for defining a window for operator to execute the job\n */\n uint256 private _blockTime;\n\n /**\n * @dev Minimum amount of tokens needed for bonding\n */\n uint256 private _baseBondAmount;\n\n /**\n * @dev The multiplier used for calculating bonding amount for pods\n */\n uint256 private _podMultiplier;\n\n /**\n * @dev The threshold used for limiting number of operators in a pod\n */\n uint256 private _operatorThreshold;\n\n /**\n * @dev The threshold step used for increasing bond amount once threshold is reached\n */\n uint256 private _operatorThresholdStep;\n\n /**\n * @dev The threshold divisor used for increasing bond amount once threshold is reached\n */\n uint256 private _operatorThresholdDivisor;\n\n /**\n * @dev Internal counter of all cross-chain messages received\n */\n uint256 private _inboundMessageCounter;\n\n /**\n * @dev Internal mapping of operator job details for a specific job hash\n */\n mapping(bytes32 => uint256) private _operatorJobs;\n\n /**\n * @dev Internal mapping of operator job details for a specific job hash\n */\n mapping(bytes32 => bool) private _failedJobs;\n\n /**\n * @dev Internal mapping of operator addresses, used for temp storage when defining an operator job\n */\n mapping(uint256 => address) private _operatorTempStorage;\n\n /**\n * @dev Internal index used for storing/referencing operator temp storage\n */\n uint32 private _operatorTempStorageCounter;\n\n /**\n * @dev Multi-dimensional array of available operators\n */\n address[][] private _operatorPods;\n\n /**\n * @dev Internal mapping of bonded operators, to prevent double bonding\n */\n mapping(address => uint256) private _bondedOperators;\n\n /**\n * @dev Internal mapping of bonded operators, to prevent double bonding\n */\n mapping(address => uint256) private _operatorPodIndex;\n\n /**\n * @dev Internal mapping of bonded operator amounts\n */\n mapping(address => uint256) private _bondedAmounts;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (\n address bridge,\n address holograph,\n address interfaces,\n address registry,\n address utilityToken,\n uint256 minGasPrice\n ) = abi.decode(initPayload, (address, address, address, address, address, uint256));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_bridgeSlot, bridge)\n sstore(_holographSlot, holograph)\n sstore(_interfacesSlot, interfaces)\n sstore(_registrySlot, registry)\n sstore(_utilityTokenSlot, utilityToken)\n sstore(_minGasPriceSlot, minGasPrice)\n }\n _blockTime = 60; // 60 seconds allowed for execution\n unchecked {\n _baseBondAmount = 100 * (10 ** 18); // one single token unit * 100\n }\n // how much to increase bond amount per pod\n _podMultiplier = 2; // 1, 4, 16, 64\n // starting pod max amount\n _operatorThreshold = 1000;\n // how often to increase price per each operator\n _operatorThresholdStep = 10;\n // we want to multiply by decimals, but instead will have to divide\n _operatorThresholdDivisor = 100; // == * 0.01\n // set first operator for each pod as zero address\n _operatorPods = [[address(0)]];\n // mark zero address as bonded operator, to prevent abuse\n _bondedOperators[address(0)] = 1;\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @notice Recover failed job\n * @dev If a job fails, it can be manually recovered\n * @param bridgeInRequestPayload the entire cross chain message payload\n */\n function recoverJob(bytes calldata bridgeInRequestPayload) external payable {\n bytes32 hash = keccak256(bridgeInRequestPayload);\n require(_failedJobs[hash], \"HOLOGRAPH: invalid recovery job\");\n (bool success, ) = _bridge().call{value: msg.value}(bridgeInRequestPayload);\n require(success, \"HOLOGRAPH: recovery failed\");\n delete (_failedJobs[hash]);\n }\n\n /**\n * @notice Execute an available operator job\n * @dev When making this call, if operating criteria is not met, the call will revert\n * @param bridgeInRequestPayload the entire cross chain message payload\n */\n function executeJob(bytes calldata bridgeInRequestPayload) external payable {\n /**\n * @dev derive the payload hash for use in mappings\n */\n bytes32 hash = keccak256(bridgeInRequestPayload);\n /**\n * @dev check that job exists\n */\n require(_operatorJobs[hash] > 0, \"HOLOGRAPH: invalid job\");\n uint256 gasLimit = 0;\n uint256 gasPrice = 0;\n assembly {\n /**\n * @dev extract gasLimit\n */\n gasLimit := calldataload(sub(add(bridgeInRequestPayload.offset, bridgeInRequestPayload.length), 0x40))\n /**\n * @dev extract gasPrice\n */\n gasPrice := calldataload(sub(add(bridgeInRequestPayload.offset, bridgeInRequestPayload.length), 0x20))\n }\n /**\n * @dev unpack bitwise packed operator job details\n */\n OperatorJob memory job = getJobDetails(hash);\n /**\n * @dev to prevent replay attacks, remove job from mapping\n */\n delete _operatorJobs[hash];\n /**\n * @dev operators of last resort are allowed, but they will not receive HLG rewards of any sort\n */\n bool isBonded = _bondedAmounts[msg.sender] != 0;\n /**\n * @dev check that a specific operator was selected for the job\n */\n if (job.operator != address(0)) {\n /**\n * @dev switch pod to index based value\n */\n uint256 pod = job.pod - 1;\n /**\n * @dev check if sender is not the selected primary operator\n */\n if (job.operator != msg.sender) {\n /**\n * @dev sender is not selected operator, need to check if allowed to do job\n */\n uint256 elapsedTime = block.timestamp - uint256(job.startTimestamp);\n uint256 timeDifference = elapsedTime / job.blockTimes;\n /**\n * @dev validate that initial selected operator time slot is still active\n */\n require(timeDifference > 0, \"HOLOGRAPH: operator has time\");\n /**\n * @dev check that the selected missed the time slot due to a gas spike\n */\n require(gasPrice >= tx.gasprice, \"HOLOGRAPH: gas spike detected\");\n /**\n * @dev check if time is within fallback operator slots\n */\n if (timeDifference < 6) {\n uint256 podIndex = uint256(job.fallbackOperators[timeDifference - 1]);\n /**\n * @dev do a quick sanity check to make sure operator did not leave from index or is a zero address\n */\n if (podIndex > 0 && podIndex < _operatorPods[pod].length) {\n address fallbackOperator = _operatorPods[pod][podIndex];\n /**\n * @dev ensure that sender is currently valid backup operator\n */\n require(fallbackOperator == msg.sender, \"HOLOGRAPH: invalid fallback\");\n } else {\n require(_bondedOperators[msg.sender] == job.pod, \"HOLOGRAPH: pod only fallback\");\n }\n }\n /**\n * @dev time to reward the current operator\n */\n uint256 amount = _getBaseBondAmount(pod);\n /**\n * @dev select operator that failed to do the job, is slashed the pod base fee\n */\n _bondedAmounts[job.operator] -= amount;\n /**\n * @dev only allow HLG rewards to go to bonded operators\n * if operator is bonded, the slashed amount is sent to current operator\n * otherwise it's sent to HolographTreasury, can be burned or distributed from there\n */\n _utilityToken().transfer((isBonded ? msg.sender : address(_holograph().getTreasury())), amount);\n /**\n * @dev check if slashed operator has enough tokens bonded to stay\n */\n if (_bondedAmounts[job.operator] >= amount) {\n /**\n * @dev enough bond amount leftover, put operator back in\n */\n _operatorPods[pod].push(job.operator);\n _operatorPodIndex[job.operator] = _operatorPods[pod].length - 1;\n _bondedOperators[job.operator] = job.pod;\n } else {\n /**\n * @dev slashed operator does not have enough tokens bonded, return remaining tokens only\n */\n uint256 leftovers = _bondedAmounts[job.operator];\n if (leftovers > 0) {\n _bondedAmounts[job.operator] = 0;\n _utilityToken().transfer(job.operator, leftovers);\n }\n }\n } else {\n /**\n * @dev the selected operator is executing the job\n */\n _operatorPods[pod].push(msg.sender);\n _operatorPodIndex[job.operator] = _operatorPods[pod].length - 1;\n _bondedOperators[msg.sender] = job.pod;\n }\n }\n /**\n * @dev every executed job (even if failed) increments total message counter by one\n */\n ++_inboundMessageCounter;\n /**\n * @dev reward operator (with HLG) for executing the job\n * this is out of scope and is purposefully omitted from code\n * currently no rewards are issued\n */\n //_utilityToken().transfer((isBonded ? msg.sender : address(_utilityToken())), (10**18));\n /**\n * @dev always emit an event at end of job, this helps other operators keep track of job status\n */\n emit FinishedOperatorJob(hash, msg.sender);\n /**\n * @dev ensure that there is enough has left for the job\n */\n require(gasleft() > gasLimit, \"HOLOGRAPH: not enough gas left\");\n /**\n * @dev execute the job\n */\n try\n HolographOperatorInterface(address(this)).nonRevertingBridgeCall{value: msg.value}(\n msg.sender,\n bridgeInRequestPayload\n )\n {\n /// @dev do nothing\n } catch {\n /// @dev return any payed funds in case of revert\n payable(msg.sender).transfer(msg.value);\n _failedJobs[hash] = true;\n emit FailedOperatorJob(hash);\n }\n }\n\n /*\n * @dev Purposefully made to be external so that Operator can call it during executeJob function\n * Check the executeJob function to understand it's implementation\n */\n function nonRevertingBridgeCall(address msgSender, bytes calldata payload) external payable {\n require(msg.sender == address(this), \"HOLOGRAPH: operator only call\");\n assembly {\n /**\n * @dev remove gas price from end\n */\n calldatacopy(0, payload.offset, sub(payload.length, 0x20))\n /**\n * @dev hToken recipient is injected right before making the call\n */\n mstore(0x84, msgSender)\n /**\n * @dev make non-reverting call\n */\n let result := call(\n /// @dev gas limit is retrieved from last 32 bytes of payload in-memory value\n mload(sub(payload.length, 0x40)),\n /// @dev destination is bridge contract\n sload(_bridgeSlot),\n /// @dev any value is passed along\n callvalue(),\n /// @dev data is retrieved from 0 index memory position\n 0,\n /// @dev everything except for last 32 bytes (gas limit) is sent\n sub(payload.length, 0x40),\n 0,\n 0\n )\n if eq(result, 0) {\n revert(0, 0)\n }\n return(0, 0)\n }\n }\n\n /**\n * @notice Receive a cross-chain message\n * @dev This function is restricted for use by Holograph Messaging Module only\n */\n function crossChainMessage(bytes calldata bridgeInRequestPayload) external payable {\n require(\n msg.sender == address(_messagingModule()) || msg.sender == 0xE9e30A0aD0d8Af5cF2606ea720052E28D6fcbAAF,\n \"HOLOGRAPH: messaging only call\"\n ); // TODO: Schedule time to remove deprecated LayerZeroModule address after all in-flight LZ messages propagate\n uint256 gasPrice = 0;\n assembly {\n /**\n * @dev extract gasPrice\n */\n gasPrice := calldataload(sub(add(bridgeInRequestPayload.offset, bridgeInRequestPayload.length), 0x20))\n }\n bool underpriced = gasPrice < _minGasPrice();\n unchecked {\n bytes32 jobHash = keccak256(bridgeInRequestPayload);\n /**\n * @dev load and increment operator temp storage in one call\n */\n ++_operatorTempStorageCounter;\n /**\n * @dev use job hash, job nonce, block number, and block timestamp for generating a random number\n */\n uint256 random = uint256(keccak256(abi.encodePacked(jobHash, _jobNonce(), block.number, block.timestamp)));\n // use the left 128 bits of random number\n uint256 random1 = uint256(random >> 128);\n // use the right 128 bits of random number\n uint256 random2 = uint256(uint128(random));\n // combine the two new random numbers for use in additional pod operator selection logic\n random = uint256(keccak256(abi.encodePacked(random1 + random2)));\n /**\n * @dev divide by total number of pods, use modulus/remainder\n */\n uint256 pod = random1 % _operatorPods.length;\n /**\n * @dev identify the total number of available operators in pod\n */\n uint256 podSize = _operatorPods[pod].length;\n /**\n * @dev select a primary operator\n */\n uint256 operatorIndex = underpriced ? 0 : random2 % podSize;\n /**\n * @dev If operator index is 0, then it's open season! Anyone can execute this job. First come first serve\n * pop operator to ensure that they cannot be selected for any other job until this one completes\n * decrease pod size to accomodate popped operator\n */\n _operatorTempStorage[_operatorTempStorageCounter] = _operatorPods[pod][operatorIndex];\n _popOperator(pod, operatorIndex);\n if (podSize > 1) {\n podSize--;\n }\n _operatorJobs[jobHash] = uint256(\n ((pod + 1) << 248) |\n (uint256(_operatorTempStorageCounter) << 216) |\n (block.number << 176) |\n ((underpriced ? 0 : _randomBlockHash(random, podSize, 1)) << 160) |\n ((underpriced ? 0 : _randomBlockHash(random, podSize, 2)) << 144) |\n ((underpriced ? 0 : _randomBlockHash(random, podSize, 3)) << 128) |\n ((underpriced ? 0 : _randomBlockHash(random, podSize, 4)) << 112) |\n ((underpriced ? 0 : _randomBlockHash(random, podSize, 5)) << 96) |\n (block.timestamp << 16) |\n 0\n ); // 80 next available bit position && so far 176 bits used with only 128 left\n /**\n * @dev emit event to signal to operators that a job has become available\n */\n emit AvailableOperatorJob(jobHash, bridgeInRequestPayload);\n }\n }\n\n /**\n * @notice Calculate the amount of gas needed to execute a bridgeInRequest\n * @dev Use this function to estimate the amount of gas that will be used by the bridgeInRequest function\n * Set a specific gas limit when making this call, subtract return value, to get total gas used\n * Only use this with a static call\n * @param bridgeInRequestPayload abi encoded bytes making up the bridgeInRequest payload\n * @return the gas amount remaining after the static call is returned\n */\n function jobEstimator(bytes calldata bridgeInRequestPayload) external payable returns (uint256) {\n assembly {\n calldatacopy(0, bridgeInRequestPayload.offset, sub(bridgeInRequestPayload.length, 0x40))\n /**\n * @dev bridgeInRequest doNotRevert is purposefully set to false so a rever would happen\n */\n mstore8(0xE3, 0x00)\n let result := call(gas(), sload(_bridgeSlot), callvalue(), 0, sub(bridgeInRequestPayload.length, 0x40), 0, 0)\n /**\n * @dev if for some reason the call does not revert, it is force reverted\n */\n if eq(result, 1) {\n returndatacopy(0, 0, returndatasize())\n revert(0, returndatasize())\n }\n /**\n * @dev remaining gas is set as the return value\n */\n mstore(0x00, gas())\n return(0x00, 0x20)\n }\n }\n\n /**\n * @notice Send cross chain bridge request message\n * @dev This function is restricted to only be callable by Holograph Bridge\n * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain\n * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain\n * @param toChain Holograph Chain ID where the beam is being sent to\n * @param nonce incremented number used to ensure job hashes are unique\n * @param holographableContract address of the contract for which the bridge request is being made\n * @param bridgeOutPayload bytes made up of the bridgeOutRequest payload\n */\n function send(\n uint256 gasLimit,\n uint256 gasPrice,\n uint32 toChain,\n address msgSender,\n uint256 nonce,\n address holographableContract,\n bytes calldata bridgeOutPayload\n ) external payable {\n require(msg.sender == _bridge(), \"HOLOGRAPH: bridge only call\");\n CrossChainMessageInterface messagingModule = _messagingModule();\n uint256 hlgFee = messagingModule.getHlgFee(toChain, gasLimit, gasPrice, bridgeOutPayload);\n address hToken = _registry().getHToken(_holograph().getHolographChainId());\n require(hlgFee < msg.value, \"HOLOGRAPH: not enough value\");\n payable(hToken).transfer(hlgFee);\n bytes memory encodedData = abi.encodeWithSelector(\n HolographBridgeInterface.bridgeInRequest.selector,\n /**\n * @dev job nonce is an incremented value that is assigned to each bridge request to guarantee unique hashes\n */\n nonce,\n /**\n * @dev including the current holograph chain id (origin chain)\n */\n _holograph().getHolographChainId(),\n /**\n * @dev holographable contract have the same address across all chains, so our destination address will be the same\n */\n holographableContract,\n /**\n * @dev get the current chain's hToken for native gas token\n */\n hToken,\n /**\n * @dev recipient will be defined when operator picks up the job\n */\n address(0),\n /**\n * @dev value is set to zero for now\n */\n hlgFee,\n /**\n * @dev specify that function call should not revert\n */\n true,\n /**\n * @dev attach actual holographableContract function call\n */\n bridgeOutPayload\n );\n /**\n * @dev add gas variables to the back for later extraction\n */\n encodedData = abi.encodePacked(encodedData, gasLimit, gasPrice);\n /**\n * @dev Send the data to the current Holograph Messaging Module\n * This will be changed to dynamically select which messaging module to use based on destination network\n */\n messagingModule.send{value: msg.value - hlgFee}(\n gasLimit,\n gasPrice,\n toChain,\n msgSender,\n msg.value - hlgFee,\n encodedData\n );\n /**\n * @dev for easy indexing, an event is emitted with the payload hash for status tracking\n */\n emit CrossChainMessageSent(keccak256(encodedData));\n }\n\n /**\n * @notice Get the fees associated with sending specific payload\n * @dev Will provide exact costs on protocol and message side, combine the two to get total\n * @dev @param toChain holograph chain id of destination chain for payload\n * @dev @param gasLimit amount of gas to provide for executing payload on destination chain\n * @dev @param gasPrice maximum amount to pay for gas price, can be set to 0 and will be chose automatically\n * @dev @param crossChainPayload the entire packet being sent cross-chain\n * @return hlgFee the amount (in wei) of native gas token that will cost for finalizing job on destiantion chain\n * @return msgFee the amount (in wei) of native gas token that will cost for sending message to destiantion chain\n * @return dstGasPrice the amount (in wei) that destination message maximum gas price will be\n */\n function getMessageFee(uint32, uint256, uint256, bytes calldata) external view returns (uint256, uint256, uint256) {\n assembly {\n calldatacopy(0, 0, calldatasize())\n let result := staticcall(gas(), sload(_messagingModuleSlot), 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @notice Get the details for an available operator job\n * @dev The job hash is a keccak256 hash of the entire job payload\n * @param jobHash keccak256 hash of the job\n * @return an OperatorJob struct with details about a specific job\n */\n function getJobDetails(bytes32 jobHash) public view returns (OperatorJob memory) {\n uint256 packed = _operatorJobs[jobHash];\n /**\n * @dev The job is bitwise packed into a single 32 byte slot, this unpacks it before returning the struct\n */\n return\n OperatorJob(\n uint8(packed >> 248),\n uint16(_blockTime),\n _operatorTempStorage[uint32(packed >> 216)],\n uint40(packed >> 176),\n // TODO: move the bit-shifting around to have it be sequential\n uint64(packed >> 16),\n [\n uint16(packed >> 160),\n uint16(packed >> 144),\n uint16(packed >> 128),\n uint16(packed >> 112),\n uint16(packed >> 96)\n ]\n );\n }\n\n /**\n * @notice Get number of pods available\n * @dev This returns number of pods that have been opened via bonding\n */\n function getTotalPods() external view returns (uint256 totalPods) {\n return _operatorPods.length;\n }\n\n /**\n * @notice Get total number of operators in a pod\n * @dev Use in conjunction with paginated getPodOperators function\n * @param pod the pod to query\n * @return total operators in a pod\n */\n function getPodOperatorsLength(uint256 pod) external view returns (uint256) {\n require(_operatorPods.length >= pod, \"HOLOGRAPH: pod does not exist\");\n return _operatorPods[pod - 1].length;\n }\n\n /**\n * @notice Get list of operators in a pod\n * @dev Use paginated getPodOperators function instead if list gets too long\n * @param pod the pod to query\n * @return operators array list of operators in a pod\n */\n function getPodOperators(uint256 pod) external view returns (address[] memory operators) {\n require(_operatorPods.length >= pod, \"HOLOGRAPH: pod does not exist\");\n operators = _operatorPods[pod - 1];\n }\n\n /**\n * @notice Get paginated list of operators in a pod\n * @dev Use in conjunction with getPodOperatorsLength to know the total length of results\n * @param pod the pod to query\n * @param index the array index to start from\n * @param length the length of result set to be (will be shorter if reached end of array)\n * @return operators a paginated array of operators\n */\n function getPodOperators(\n uint256 pod,\n uint256 index,\n uint256 length\n ) external view returns (address[] memory operators) {\n require(_operatorPods.length >= pod, \"HOLOGRAPH: pod does not exist\");\n /**\n * @dev if pod 0 is selected, this will create a revert\n */\n pod--;\n /**\n * @dev get total length of pod operators\n */\n uint256 supply = _operatorPods[pod].length;\n /**\n * @dev check if length is out of bounds for this result set\n */\n if (index + length > supply) {\n /**\n * @dev adjust length to return remainder of the results\n */\n length = supply - index;\n }\n /**\n * @dev create in-memory array\n */\n operators = new address[](length);\n /**\n * @dev add operators to result set\n */\n for (uint256 i = 0; i < length; i++) {\n operators[i] = _operatorPods[pod][index + i];\n }\n }\n\n /**\n * @notice Check the base and current price for bonding to a particular pod\n * @dev Useful for understanding what is required for bonding to a pod\n * @param pod the pod to get bonding amounts for\n * @return base the base bond amount required for a pod\n * @return current the current bond amount required for a pod\n */\n function getPodBondAmounts(uint256 pod) external view returns (uint256 base, uint256 current) {\n base = _getBaseBondAmount(pod - 1);\n current = _getCurrentBondAmount(pod - 1);\n }\n\n /**\n * @notice Get an operator's currently bonded amount\n * @dev Useful for checking how much an operator has bonded\n * @param operator address of operator to check\n * @return amount total number of utility token bonded\n */\n function getBondedAmount(address operator) external view returns (uint256 amount) {\n return _bondedAmounts[operator];\n }\n\n /**\n * @notice Get an operator's currently bonded pod\n * @dev Useful for checking if an operator is currently bonded\n * @param operator address of operator to check\n * @return pod number that operator is bonded on, returns zero if not bonded or selected for job\n */\n function getBondedPod(address operator) external view returns (uint256 pod) {\n return _bondedOperators[operator];\n }\n\n /**\n * @notice Get an operator's currently bonded pod index\n * @dev Useful for checking if an operator is a fallback for active job\n * @param operator address of operator to check\n * @return index currently bonded pod's operator index, returns zero if not in pod or moved out for active job\n */\n function getBondedPodIndex(address operator) external view returns (uint256 index) {\n return _operatorPodIndex[operator];\n }\n\n /**\n * @notice Topup a bonded operator with more utility tokens\n * @dev Useful function if an operator got slashed and wants to add a safety buffer to not get unbonded\n * This function will not work if operator has currently been selected for a job\n * @param operator address of operator to topup\n * @param amount utility token amount to add\n */\n function topupUtilityToken(address operator, uint256 amount) external {\n /**\n * @dev check that an operator is currently bonded\n */\n require(_bondedOperators[operator] != 0, \"HOLOGRAPH: operator not bonded\");\n unchecked {\n /**\n * @dev add the additional amount to operator\n */\n _bondedAmounts[operator] += amount;\n }\n /**\n * @dev transfer tokens last, to prevent reentrancy attacks\n */\n require(_utilityToken().transferFrom(msg.sender, address(this), amount), \"HOLOGRAPH: token transfer failed\");\n }\n\n /**\n * @notice Bond utility tokens and become an operator\n * @dev An operator can only bond to one pod at a time, per network\n * @param operator address of operator to bond (can be an ownable smart contract)\n * @param amount utility token amount to bond (can be greater than minimum)\n * @param pod number of pod to bond to (can be for one that does not exist yet)\n */\n function bondUtilityToken(address operator, uint256 amount, uint256 pod) external {\n /**\n * @dev an operator can only bond to one pod at any give time per network\n */\n require(_bondedOperators[operator] == 0 && _bondedAmounts[operator] == 0, \"HOLOGRAPH: operator is bonded\");\n if (_isContract(operator)) {\n require(Ownable(operator).owner() != address(0), \"HOLOGRAPH: contract not ownable\");\n }\n unchecked {\n /**\n * @dev get the current bonding minimum for selected pod\n */\n uint256 current = _getCurrentBondAmount(pod - 1);\n require(current <= amount, \"HOLOGRAPH: bond amount too small\");\n /**\n * @dev check if selected pod is greater than currently existing pods\n */\n if (_operatorPods.length < pod) {\n /**\n * @dev activate pod(s) up until the selected pod\n */\n for (uint256 i = _operatorPods.length; i < pod; i++) {\n /**\n * @dev add zero address into pod to mitigate empty pod issues\n */\n _operatorPods.push([address(0)]);\n }\n }\n /**\n * @dev prevent bonding to a pod with more than uint16 max value\n */\n require(_operatorPods[pod - 1].length < type(uint16).max, \"HOLOGRAPH: too many operators\");\n _operatorPods[pod - 1].push(operator);\n _operatorPodIndex[operator] = _operatorPods[pod - 1].length - 1;\n _bondedOperators[operator] = pod;\n _bondedAmounts[operator] = amount;\n /**\n * @dev transfer tokens last, to prevent reentrancy attacks\n */\n require(_utilityToken().transferFrom(msg.sender, address(this), amount), \"HOLOGRAPH: token transfer failed\");\n }\n }\n\n /**\n * @notice Unbond HLG utility tokens and stop being an operator\n * @dev A bonded operator selected for a job cannot unbond until they complete the job, or are slashed\n * @param operator address of operator to unbond\n * @param recipient address where to send the bonded tokens\n */\n function unbondUtilityToken(address operator, address recipient) external {\n /**\n * @dev validate that operator is currently bonded\n */\n require(_bondedOperators[operator] != 0, \"HOLOGRAPH: operator not bonded\");\n /**\n * @dev check if sender is not actual operator\n */\n if (msg.sender != operator) {\n /**\n * @dev check if operator is a smart contract\n */\n require(_isContract(operator), \"HOLOGRAPH: operator not contract\");\n /**\n * @dev check if smart contract is owned by sender\n */\n require(Ownable(operator).owner() == msg.sender, \"HOLOGRAPH: sender not owner\");\n }\n /**\n * @dev get current bonded amount by operator\n */\n uint256 amount = _bondedAmounts[operator];\n /**\n * @dev unset operator bond amount before making a transfer\n */\n _bondedAmounts[operator] = 0;\n /**\n * @dev remove all operator references\n */\n _popOperator(_bondedOperators[operator] - 1, _operatorPodIndex[operator]);\n /**\n * @dev transfer tokens to recipient\n */\n require(_utilityToken().transfer(recipient, amount), \"HOLOGRAPH: token transfer failed\");\n }\n\n /**\n * @notice Get the address of the Holograph Bridge module\n * @dev Used for beaming holographable assets cross-chain\n */\n function getBridge() external view returns (address bridge) {\n assembly {\n bridge := sload(_bridgeSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Bridge module address\n * @param bridge address of the Holograph Bridge smart contract to use\n */\n function setBridge(address bridge) external onlyAdmin {\n assembly {\n sstore(_bridgeSlot, bridge)\n }\n }\n\n /**\n * @notice Get the Holograph Protocol contract\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\n */\n function getHolograph() external view returns (address holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Protocol contract address\n * @param holograph address of the Holograph Protocol smart contract to use\n */\n function setHolograph(address holograph) external onlyAdmin {\n assembly {\n sstore(_holographSlot, holograph)\n }\n }\n\n /**\n * @notice Get the address of the Holograph Interfaces module\n * @dev Holograph uses this contract to store data that needs to be accessed by a large portion of the modules\n */\n function getInterfaces() external view returns (address interfaces) {\n assembly {\n interfaces := sload(_interfacesSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Interfaces module address\n * @param interfaces address of the Holograph Interfaces smart contract to use\n */\n function setInterfaces(address interfaces) external onlyAdmin {\n assembly {\n sstore(_interfacesSlot, interfaces)\n }\n }\n\n /**\n * @notice Get the address of the Holograph Messaging Module\n * @dev All cross-chain message requests will get forwarded to this adress\n */\n function getMessagingModule() external view returns (address messagingModule) {\n assembly {\n messagingModule := sload(_messagingModuleSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Messaging Module address\n * @param messagingModule address of the LayerZero Endpoint to use\n */\n function setMessagingModule(address messagingModule) external onlyAdmin {\n assembly {\n sstore(_messagingModuleSlot, messagingModule)\n }\n }\n\n /**\n * @notice Get the Holograph Registry module\n * @dev This module stores a reference for all deployed holographable smart contracts\n */\n function getRegistry() external view returns (address registry) {\n assembly {\n registry := sload(_registrySlot)\n }\n }\n\n /**\n * @notice Update the Holograph Registry module address\n * @param registry address of the Holograph Registry smart contract to use\n */\n function setRegistry(address registry) external onlyAdmin {\n assembly {\n sstore(_registrySlot, registry)\n }\n }\n\n /**\n * @notice Get the Holograph Utility Token address\n * @dev This is the official utility token of the Holograph Protocol\n */\n function getUtilityToken() external view returns (address utilityToken) {\n assembly {\n utilityToken := sload(_utilityTokenSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Utility Token address\n * @param utilityToken address of the Holograph Utility Token smart contract to use\n */\n function setUtilityToken(address utilityToken) external onlyAdmin {\n assembly {\n sstore(_utilityTokenSlot, utilityToken)\n }\n }\n\n /**\n * @notice Get the Minimum Gas Price\n * @dev The minimum value required to execute a job without it being marked as under priced\n */\n function getMinGasPrice() external view returns (uint256 minGasPrice) {\n assembly {\n minGasPrice := sload(_minGasPriceSlot)\n }\n }\n\n /**\n * @notice Update the Minimum Gas Price\n * @param minGasPrice amount to set for minimum gas price\n */\n function setMinGasPrice(uint256 minGasPrice) external onlyAdmin {\n assembly {\n sstore(_minGasPriceSlot, minGasPrice)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Bridge Interface\n */\n function _bridge() private view returns (address bridge) {\n assembly {\n bridge := sload(_bridgeSlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Interface\n */\n function _holograph() private view returns (HolographInterface holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Interfaces Interface\n */\n function _interfaces() private view returns (HolographInterfacesInterface interfaces) {\n assembly {\n interfaces := sload(_interfacesSlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Messaging Module Interface\n */\n function _messagingModule() private view returns (CrossChainMessageInterface messagingModule) {\n assembly {\n messagingModule := sload(_messagingModuleSlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Registry Interface\n */\n function _registry() private view returns (HolographRegistryInterface registry) {\n assembly {\n registry := sload(_registrySlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Utility Token Interface\n */\n function _utilityToken() private view returns (HolographERC20Interface utilityToken) {\n assembly {\n utilityToken := sload(_utilityTokenSlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the minimum gas price allowed\n */\n function _minGasPrice() private view returns (uint256 minGasPrice) {\n assembly {\n minGasPrice := sload(_minGasPriceSlot)\n }\n }\n\n /**\n * @dev Internal nonce, that increments on each call, used for randomness\n */\n function _jobNonce() private returns (uint256 jobNonce) {\n assembly {\n jobNonce := add(sload(_jobNonceSlot), 0x0000000000000000000000000000000000000000000000000000000000000001)\n sstore(_jobNonceSlot, jobNonce)\n }\n }\n\n /**\n * @dev Internal function used to remove an operator from a particular pod\n */\n function _popOperator(uint256 pod, uint256 operatorIndex) private {\n /**\n * @dev only pop the operator if it's not a zero address\n */\n if (operatorIndex > 0) {\n unchecked {\n address operator = _operatorPods[pod][operatorIndex];\n /**\n * @dev mark operator as no longer bonded\n */\n _bondedOperators[operator] = 0;\n /**\n * @dev remove pod reference for operator\n */\n _operatorPodIndex[operator] = 0;\n uint256 lastIndex = _operatorPods[pod].length - 1;\n if (lastIndex != operatorIndex) {\n /**\n * @dev if operator is not last index, move last index to operator's current index\n */\n _operatorPods[pod][operatorIndex] = _operatorPods[pod][lastIndex];\n _operatorPodIndex[_operatorPods[pod][operatorIndex]] = operatorIndex;\n }\n /**\n * @dev delete last index\n */\n delete _operatorPods[pod][lastIndex];\n /**\n * @dev shorten array length\n */\n _operatorPods[pod].pop();\n }\n }\n }\n\n /**\n * @dev Internal function used for calculating the base bonding amount for a pod\n */\n function _getBaseBondAmount(uint256 pod) private view returns (uint256) {\n return (_podMultiplier ** pod) * _baseBondAmount;\n }\n\n /**\n * @dev Internal function used for calculating the current bonding amount for a pod\n */\n function _getCurrentBondAmount(uint256 pod) private view returns (uint256) {\n uint256 current = (_podMultiplier ** pod) * _baseBondAmount;\n if (pod >= _operatorPods.length) {\n return current;\n }\n uint256 threshold = _operatorThreshold / (2 ** pod);\n uint256 position = _operatorPods[pod].length;\n if (position > threshold) {\n position -= threshold;\n // current += (current / _operatorThresholdDivisor) * position;\n current += (current / _operatorThresholdDivisor) * (position / _operatorThresholdStep);\n }\n return current;\n }\n\n /**\n * @dev Internal function used for generating a random pod operator selection by using previously mined blocks\n */\n function _randomBlockHash(uint256 random, uint256 podSize, uint256 n) private view returns (uint256) {\n unchecked {\n return (random + uint256(blockhash(block.number - n))) % podSize;\n }\n }\n\n /**\n * @dev Internal function used for checking if a contract has been deployed at address\n */\n function _isContract(address contractAddress) private view returns (bool) {\n bytes32 codehash;\n assembly {\n codehash := extcodehash(contractAddress)\n }\n return (codehash != 0x0 && codehash != 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470);\n }\n\n /**\n * @dev Purposefully left empty to ensure ether transfers use least amount of gas possible\n */\n receive() external payable {}\n\n /**\n * @dev Purposefully reverts to prevent any calls to undefined functions\n */\n fallback() external payable {\n revert();\n }\n}\n" + }, + "contracts/HolographRegistry.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./abstract/Admin.sol\";\nimport \"./abstract/Initializable.sol\";\n\nimport \"./interface/HolographInterface.sol\";\nimport \"./interface/HolographRegistryInterface.sol\";\nimport \"./interface/InitializableInterface.sol\";\n\n/**\n * @title Holograph Registry\n * @author https://github.com/holographxyz\n * @notice View and validate all deployed holographable contracts\n * @dev Use this to: validate that contracts are Holograph Protocol compliant, get source code for supported standards, and interact with hTokens\n */\ncontract HolographRegistry is Admin, Initializable, HolographRegistryInterface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\n */\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.utilityToken')) - 1)\n */\n bytes32 constant _utilityTokenSlot = 0xbf76518d46db472b71aa7677a0908b8016f3dee568415ffa24055f9a670f9c37;\n\n /**\n * @dev Array of all Holographable contracts that were ever deployed on this chain\n */\n address[] private _holographableContracts;\n\n /**\n * @dev A mapping of hashes to contract addresses\n */\n mapping(bytes32 => address) private _holographedContractsHashMap;\n\n /**\n * @dev Storage slot for saving contract type to contract address references\n */\n mapping(bytes32 => address) private _contractTypeAddresses;\n\n /**\n * @dev Reserved type addresses for Admin\n * Note: this is used for defining default contracts\n */\n mapping(bytes32 => bool) private _reservedTypes;\n\n /**\n * @dev A list of smart contracts that are guaranteed secure and holographable\n */\n mapping(address => bool) private _holographedContracts;\n\n /**\n * @dev Mapping of all hTokens available for the different EVM chains\n */\n mapping(uint32 => address) private _hTokens;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address holograph, bytes32[] memory reservedTypes) = abi.decode(initPayload, (address, bytes32[]));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_holographSlot, holograph)\n }\n for (uint256 i = 0; i < reservedTypes.length; i++) {\n _reservedTypes[reservedTypes[i]] = true;\n }\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n function isHolographedContract(address smartContract) external view returns (bool) {\n return _holographedContracts[smartContract];\n }\n\n function isHolographedHashDeployed(bytes32 hash) external view returns (bool) {\n return _holographedContractsHashMap[hash] != address(0);\n }\n\n function holographableEvent(bytes calldata payload) external {\n if (_holographedContracts[msg.sender]) {\n emit HolographableContractEvent(msg.sender, payload);\n }\n }\n\n /**\n * @dev Allows to reference a deployed smart contract, and use it's code as reference inside of Holographers\n */\n function referenceContractTypeAddress(address contractAddress) external returns (bytes32) {\n bytes32 contractType;\n assembly {\n contractType := extcodehash(contractAddress)\n }\n require(\n (// check that bytecode is not empty\n contractType != 0x0 &&\n // check that hash is not for empty bytes\n contractType != 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470),\n \"HOLOGRAPH: empty contract\"\n );\n require(_contractTypeAddresses[contractType] == address(0), \"HOLOGRAPH: contract already set\");\n require(!_reservedTypes[contractType], \"HOLOGRAPH: reserved address type\");\n _contractTypeAddresses[contractType] = contractAddress;\n return contractType;\n }\n\n /**\n * @dev Returns the contract address for a contract type\n */\n function getContractTypeAddress(bytes32 contractType) external view returns (address) {\n return _contractTypeAddresses[contractType];\n }\n\n /**\n * @dev Sets the contract address for a contract type\n */\n function setContractTypeAddress(bytes32 contractType, address contractAddress) external onlyAdmin {\n require(_reservedTypes[contractType], \"HOLOGRAPH: not reserved type\");\n _contractTypeAddresses[contractType] = contractAddress;\n }\n\n /**\n * @notice Get the Holograph Protocol contract\n * @dev This contract stores a reference to all the primary modules and variables of the protocol\n */\n function getHolograph() external view returns (address holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Protocol contract address\n * @param holograph address of the Holograph Protocol smart contract to use\n */\n function setHolograph(address holograph) external onlyAdmin {\n assembly {\n sstore(_holographSlot, holograph)\n }\n }\n\n /**\n * @notice Get set length list, starting from index, for all holographable contracts\n * @param index The index to start enumeration from\n * @param length The length of returned results\n * @return contracts address[] Returns a set length array of holographable contracts deployed\n */\n function getHolographableContracts(uint256 index, uint256 length) external view returns (address[] memory contracts) {\n uint256 supply = _holographableContracts.length;\n if (index + length > supply) {\n length = supply - index;\n }\n contracts = new address[](length);\n for (uint256 i = 0; i < length; i++) {\n contracts[i] = _holographableContracts[index + i];\n }\n }\n\n /**\n * @notice Get total number of deployed holographable contracts\n */\n function getHolographableContractsLength() external view returns (uint256) {\n return _holographableContracts.length;\n }\n\n /**\n * @dev Returns the address for a holographed hash\n */\n function getHolographedHashAddress(bytes32 hash) external view returns (address) {\n return _holographedContractsHashMap[hash];\n }\n\n /**\n * @dev Allows Holograph Factory to register a deployed contract, referenced with deployment hash\n */\n function setHolographedHashAddress(bytes32 hash, address contractAddress) external {\n address holograph;\n assembly {\n holograph := sload(_holographSlot)\n }\n require(msg.sender == HolographInterface(holograph).getFactory(), \"HOLOGRAPH: factory only function\");\n _holographedContractsHashMap[hash] = contractAddress;\n _holographedContracts[contractAddress] = true;\n _holographableContracts.push(contractAddress);\n }\n\n /**\n * @dev Returns the hToken address for a given chain id\n */\n function getHToken(uint32 chainId) external view returns (address) {\n return _hTokens[chainId];\n }\n\n /**\n * @dev Sets the hToken address for a specific chain id\n */\n function setHToken(uint32 chainId, address hToken) external onlyAdmin {\n _hTokens[chainId] = hToken;\n }\n\n /**\n * @dev Returns the reserved contract address for a contract type\n */\n function getReservedContractTypeAddress(bytes32 contractType) external view returns (address contractTypeAddress) {\n if (_reservedTypes[contractType]) {\n contractTypeAddress = _contractTypeAddresses[contractType];\n }\n }\n\n /**\n * @dev Allows admin to update or toggle reserved type\n */\n function setReservedContractTypeAddress(bytes32 hash, bool reserved) external onlyAdmin {\n _reservedTypes[hash] = reserved;\n }\n\n /**\n * @dev Allows admin to update or toggle reserved types\n */\n function setReservedContractTypeAddresses(bytes32[] calldata hashes, bool[] calldata reserved) external onlyAdmin {\n for (uint256 i = 0; i < hashes.length; i++) {\n _reservedTypes[hashes[i]] = reserved[i];\n }\n }\n\n /**\n * @notice Get the Holograph Utility Token address\n * @dev This is the official utility token of the Holograph Protocol\n */\n function getUtilityToken() external view returns (address utilityToken) {\n assembly {\n utilityToken := sload(_utilityTokenSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Utility Token address\n * @param utilityToken address of the Holograph Utility Token smart contract to use\n */\n function setUtilityToken(address utilityToken) external onlyAdmin {\n assembly {\n sstore(_utilityTokenSlot, utilityToken)\n }\n }\n\n /**\n * @dev Purposefully reverts to prevent having any type of ether transfered into the contract\n */\n receive() external payable {\n revert();\n }\n\n /**\n * @dev Purposefully reverts to prevent any calls to undefined functions\n */\n fallback() external payable {\n revert();\n }\n}\n" + }, + "contracts/HolographTreasury.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./abstract/Admin.sol\";\nimport \"./abstract/Initializable.sol\";\n\nimport \"./interface/HolographERC20Interface.sol\";\nimport \"./interface/HolographERC721Interface.sol\";\nimport \"./interface/HolographInterface.sol\";\nimport \"./interface/HolographTreasuryInterface.sol\";\nimport \"./interface/HolographFactoryInterface.sol\";\nimport \"./interface/HolographOperatorInterface.sol\";\nimport \"./interface/HolographRegistryInterface.sol\";\nimport \"./interface/InitializableInterface.sol\";\n\nimport \"./struct/DeploymentConfig.sol\";\nimport \"./struct/Verification.sol\";\n\n/**\n * @title Holograph Treasury\n * @author https://github.com/holographxyz\n * @notice This contract holds and manages the protocol treasury\n * @dev As of now this is an empty zero logic contract and is still a work in progress\n */\ncontract HolographTreasury is Admin, Initializable, HolographTreasuryInterface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.bridge')) - 1)\n */\n bytes32 constant _bridgeSlot = 0xeb87cbb21687feb327e3d58c6c16d552231d12c7a0e8115042a4165fac8a77f9;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\n */\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.operator')) - 1)\n */\n bytes32 constant _operatorSlot = 0x7caba557ad34138fa3b7e43fb574e0e6cc10481c3073e0dffbc560db81b5c60f;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\n */\n bytes32 constant _registrySlot = 0xce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address bridge, address holograph, address operator, address registry) = abi.decode(\n initPayload,\n (address, address, address, address)\n );\n assembly {\n sstore(_adminSlot, origin())\n\n sstore(_bridgeSlot, bridge)\n sstore(_holographSlot, holograph)\n sstore(_operatorSlot, operator)\n sstore(_registrySlot, registry)\n }\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @notice Get the address of the Holograph Bridge module\n * @dev Used for beaming holographable assets cross-chain\n */\n function getBridge() external view returns (address bridge) {\n assembly {\n bridge := sload(_bridgeSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Bridge module address\n * @param bridge address of the Holograph Bridge smart contract to use\n */\n function setBridge(address bridge) external onlyAdmin {\n assembly {\n sstore(_bridgeSlot, bridge)\n }\n }\n\n /**\n * @notice Get the Holograph Protocol contract\n * @dev This contract stores a reference to all the primary modules and variables of the protocol\n */\n function getHolograph() external view returns (address holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Protocol contract address\n * @param holograph address of the Holograph Protocol smart contract to use\n */\n function setHolograph(address holograph) external onlyAdmin {\n assembly {\n sstore(_holographSlot, holograph)\n }\n }\n\n /**\n * @notice Get the address of the Holograph Operator module\n * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module\n */\n function getOperator() external view returns (address operator) {\n assembly {\n operator := sload(_operatorSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Operator module address\n * @param operator address of the Holograph Operator smart contract to use\n */\n function setOperator(address operator) external onlyAdmin {\n assembly {\n sstore(_operatorSlot, operator)\n }\n }\n\n /**\n * @notice Get the Holograph Registry module\n * @dev This module stores a reference for all deployed holographable smart contracts\n */\n function getRegistry() external view returns (address registry) {\n assembly {\n registry := sload(_registrySlot)\n }\n }\n\n /**\n * @notice Update the Holograph Registry module address\n * @param registry address of the Holograph Registry smart contract to use\n */\n function setRegistry(address registry) external onlyAdmin {\n assembly {\n sstore(_registrySlot, registry)\n }\n }\n\n function _bridge() private view returns (address bridge) {\n assembly {\n bridge := sload(_bridgeSlot)\n }\n }\n\n function _holograph() private view returns (address holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n function _operator() private view returns (address operator) {\n assembly {\n operator := sload(_operatorSlot)\n }\n }\n\n function _registry() private view returns (address registry) {\n assembly {\n registry := sload(_registrySlot)\n }\n }\n\n /**\n * @dev Purposefully left empty to ensure ether transfers use least amount of gas possible\n */\n receive() external payable {}\n\n /**\n * @dev Purposefully reverts to prevent any calls to undefined functions\n */\n fallback() external payable {\n revert();\n }\n}\n" + }, + "contracts/interface/CollectionURI.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\ninterface CollectionURI {\n function contractURI() external view returns (string memory);\n}\n" + }, + "contracts/interface/CrossChainMessageInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\ninterface CrossChainMessageInterface {\n function send(\n uint256 gasLimit,\n uint256 gasPrice,\n uint32 toChain,\n address msgSender,\n uint256 msgValue,\n bytes calldata crossChainPayload\n ) external payable;\n\n function getMessageFee(\n uint32 toChain,\n uint256 gasLimit,\n uint256 gasPrice,\n bytes calldata crossChainPayload\n ) external view returns (uint256 hlgFee, uint256 msgFee, uint256 dstGasPrice);\n\n function getHlgFee(\n uint32 toChain,\n uint256 gasLimit,\n uint256 gasPrice,\n bytes calldata crossChainPayload\n ) external view returns (uint256 hlgFee);\n}\n" + }, + "contracts/interface/ERC1271.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1271.sol)\n\npragma solidity 0.8.13;\n\n/**\n * @dev Interface of the ERC1271 standard signature validation method for\n * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271].\n *\n * _Available since v4.1._\n */\ninterface ERC1271 {\n /**\n * @dev Should return whether the signature provided is valid for the provided data\n * @param hash Hash of the data to be signed\n * @param signature Signature byte array associated with _data\n */\n function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue);\n}\n" + }, + "contracts/interface/ERC165.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity 0.8.13;\n\ninterface ERC165 {\n /// @notice Query if a contract implements an interface\n /// @param interfaceID The interface identifier, as specified in ERC-165\n /// @dev Interface identification is specified in ERC-165. This function\n /// uses less than 30,000 gas.\n /// @return `true` if the contract implements `interfaceID` and\n /// `interfaceID` is not 0xffffffff, `false` otherwise\n function supportsInterface(bytes4 interfaceID) external view returns (bool);\n}\n" + }, + "contracts/interface/ERC20.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity 0.8.13;\n\ninterface ERC20 {\n function totalSupply() external view returns (uint256);\n\n function balanceOf(address _owner) external view returns (uint256 balance);\n\n function transfer(address _to, uint256 _value) external returns (bool success);\n\n function transferFrom(address _from, address _to, uint256 _value) external returns (bool success);\n\n function approve(address _spender, uint256 _value) external returns (bool success);\n\n function allowance(address _owner, address _spender) external view returns (uint256 remaining);\n\n event Transfer(address indexed _from, address indexed _to, uint256 _value);\n\n event Approval(address indexed _owner, address indexed _spender, uint256 _value);\n}\n" + }, + "contracts/interface/ERC20Burnable.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity 0.8.13;\n\ninterface ERC20Burnable {\n function burn(uint256 amount) external;\n\n function burnFrom(address account, uint256 amount) external returns (bool);\n}\n" + }, + "contracts/interface/ERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity 0.8.13;\n\ninterface ERC20Metadata {\n function decimals() external view returns (uint8);\n\n function name() external view returns (string memory);\n\n function symbol() external view returns (string memory);\n}\n" + }, + "contracts/interface/ERC20Permit.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)\n\npragma solidity 0.8.13;\n\n/**\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n */\ninterface ERC20Permit {\n /**\n * @dev Sets `value` as the allowance of `spender` over ``account``'s tokens,\n * given ``account``'s signed approval.\n *\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n * ordering also apply here.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `deadline` must be a timestamp in the future.\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `account`\n * over the EIP712-formatted function arguments.\n * - the signature must use ``account``'s current nonce (see {nonces}).\n *\n * For more information on the signature format, see the\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n * section].\n */\n function permit(\n address account,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n /**\n * @dev Returns the current nonce for `account`. This value must be\n * included whenever a signature is generated for {permit}.\n *\n * Every successful call to {permit} increases ``account``'s nonce by one. This\n * prevents a signature from being used multiple times.\n */\n function nonces(address account) external view returns (uint256);\n\n /**\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n" + }, + "contracts/interface/ERC20Receiver.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity 0.8.13;\n\ninterface ERC20Receiver {\n function onERC20Received(\n address account,\n address recipient,\n uint256 amount,\n bytes memory data\n ) external returns (bytes4);\n}\n" + }, + "contracts/interface/ERC20Safer.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity 0.8.13;\n\ninterface ERC20Safer {\n function safeTransfer(address recipient, uint256 amount) external returns (bool);\n\n function safeTransfer(address recipient, uint256 amount, bytes memory data) external returns (bool);\n\n function safeTransferFrom(address account, address recipient, uint256 amount) external returns (bool);\n\n function safeTransferFrom(\n address account,\n address recipient,\n uint256 amount,\n bytes memory data\n ) external returns (bool);\n}\n" + }, + "contracts/interface/ERC721.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity 0.8.13;\n\n/// @title ERC-721 Non-Fungible Token Standard\n/// @dev See https://eips.ethereum.org/EIPS/eip-721\n/// Note: the ERC-165 identifier for this interface is 0x80ac58cd.\n/* is ERC165 */\ninterface ERC721 {\n /// @dev This emits when ownership of any NFT changes by any mechanism.\n /// This event emits when NFTs are created (`from` == 0) and destroyed\n /// (`to` == 0). Exception: during contract creation, any number of NFTs\n /// may be created and assigned without emitting Transfer. At the time of\n /// any transfer, the approved address for that NFT (if any) is reset to none.\n event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId);\n\n /// @dev This emits when the approved address for an NFT is changed or\n /// reaffirmed. The zero address indicates there is no approved address.\n /// When a Transfer event emits, this also indicates that the approved\n /// address for that NFT (if any) is reset to none.\n event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId);\n\n /// @dev This emits when an operator is enabled or disabled for an owner.\n /// The operator can manage all NFTs of the owner.\n event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved);\n\n /// @notice Count all NFTs assigned to an owner\n /// @dev NFTs assigned to the zero address are considered invalid, and this\n /// function throws for queries about the zero address.\n /// @param _owner An address for whom to query the balance\n /// @return The number of NFTs owned by `_owner`, possibly zero\n function balanceOf(address _owner) external view returns (uint256);\n\n /// @notice Find the owner of an NFT\n /// @dev NFTs assigned to zero address are considered invalid, and queries\n /// about them do throw.\n /// @param _tokenId The identifier for an NFT\n /// @return The address of the owner of the NFT\n function ownerOf(uint256 _tokenId) external view returns (address);\n\n /// @notice Transfers the ownership of an NFT from one address to another address\n /// @dev Throws unless `msg.sender` is the current owner, an authorized\n /// operator, or the approved address for this NFT. Throws if `_from` is\n /// not the current owner. Throws if `_to` is the zero address. Throws if\n /// `_tokenId` is not a valid NFT. When transfer is complete, this function\n /// checks if `_to` is a smart contract (code size > 0). If so, it calls\n /// `onERC721Received` on `_to` and throws if the return value is not\n /// `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`.\n /// @param _from The current owner of the NFT\n /// @param _to The new owner\n /// @param _tokenId The NFT to transfer\n /// @param data Additional data with no specified format, sent in call to `_to`\n function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes calldata data) external payable;\n\n /// @notice Transfers the ownership of an NFT from one address to another address\n /// @dev This works identically to the other function with an extra data parameter,\n /// except this function just sets data to \"\".\n /// @param _from The current owner of the NFT\n /// @param _to The new owner\n /// @param _tokenId The NFT to transfer\n function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable;\n\n /// @notice Transfer ownership of an NFT -- THE CALLER IS RESPONSIBLE\n /// TO CONFIRM THAT `_to` IS CAPABLE OF RECEIVING NFTS OR ELSE\n /// THEY MAY BE PERMANENTLY LOST\n /// @dev Throws unless `msg.sender` is the current owner, an authorized\n /// operator, or the approved address for this NFT. Throws if `_from` is\n /// not the current owner. Throws if `_to` is the zero address. Throws if\n /// `_tokenId` is not a valid NFT.\n /// @param _from The current owner of the NFT\n /// @param _to The new owner\n /// @param _tokenId The NFT to transfer\n function transferFrom(address _from, address _to, uint256 _tokenId) external payable;\n\n /// @notice Change or reaffirm the approved address for an NFT\n /// @dev The zero address indicates there is no approved address.\n /// Throws unless `msg.sender` is the current NFT owner, or an authorized\n /// operator of the current owner.\n /// @param _approved The new approved NFT controller\n /// @param _tokenId The NFT to approve\n function approve(address _approved, uint256 _tokenId) external payable;\n\n /// @notice Enable or disable approval for a third party (\"operator\") to manage\n /// all of `msg.sender`'s assets\n /// @dev Emits the ApprovalForAll event. The contract MUST allow\n /// multiple operators per owner.\n /// @param _operator Address to add to the set of authorized operators\n /// @param _approved True if the operator is approved, false to revoke approval\n function setApprovalForAll(address _operator, bool _approved) external;\n\n /// @notice Get the approved address for a single NFT\n /// @dev Throws if `_tokenId` is not a valid NFT.\n /// @param _tokenId The NFT to find the approved address for\n /// @return The approved address for this NFT, or the zero address if there is none\n function getApproved(uint256 _tokenId) external view returns (address);\n\n /// @notice Query if an address is an authorized operator for another address\n /// @param _owner The address that owns the NFTs\n /// @param _operator The address that acts on behalf of the owner\n /// @return True if `_operator` is an approved operator for `_owner`, false otherwise\n function isApprovedForAll(address _owner, address _operator) external view returns (bool);\n}\n" + }, + "contracts/interface/ERC721Enumerable.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity 0.8.13;\n\n/// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension\n/// @dev See https://eips.ethereum.org/EIPS/eip-721\n/// Note: the ERC-165 identifier for this interface is 0x780e9d63.\n/* is ERC721 */\ninterface ERC721Enumerable {\n /// @notice Count NFTs tracked by this contract\n /// @return A count of valid NFTs tracked by this contract, where each one of\n /// them has an assigned and queryable owner not equal to the zero address\n function totalSupply() external view returns (uint256);\n\n /// @notice Enumerate valid NFTs\n /// @dev Throws if `_index` >= `totalSupply()`.\n /// @param _index A counter less than `totalSupply()`\n /// @return The token identifier for the `_index`th NFT,\n /// (sort order not specified)\n function tokenByIndex(uint256 _index) external view returns (uint256);\n\n /// @notice Enumerate NFTs assigned to an owner\n /// @dev Throws if `_index` >= `balanceOf(_owner)` or if\n /// `_owner` is the zero address, representing invalid NFTs.\n /// @param _owner An address where we are interested in NFTs owned by them\n /// @param _index A counter less than `balanceOf(_owner)`\n /// @return The token identifier for the `_index`th NFT assigned to `_owner`,\n /// (sort order not specified)\n function tokenOfOwnerByIndex(address _owner, uint256 _index) external view returns (uint256);\n}\n" + }, + "contracts/interface/ERC721Metadata.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity 0.8.13;\n\n/// @title ERC-721 Non-Fungible Token Standard, optional metadata extension\n/// @dev See https://eips.ethereum.org/EIPS/eip-721\n/// Note: the ERC-165 identifier for this interface is 0x5b5e139f.\n/* is ERC721 */\ninterface ERC721Metadata {\n /// @notice A descriptive name for a collection of NFTs in this contract\n function name() external view returns (string memory _name);\n\n /// @notice An abbreviated name for NFTs in this contract\n function symbol() external view returns (string memory _symbol);\n\n /// @notice A distinct Uniform Resource Identifier (URI) for a given asset.\n /// @dev Throws if `_tokenId` is not a valid NFT. URIs are defined in RFC\n /// 3986. The URI may point to a JSON file that conforms to the \"ERC721\n /// Metadata JSON Schema\".\n function tokenURI(uint256 _tokenId) external view returns (string memory);\n}\n" + }, + "contracts/interface/ERC721TokenReceiver.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\n/// @dev Note: the ERC-165 identifier for this interface is 0x150b7a02.\ninterface ERC721TokenReceiver {\n /// @notice Handle the receipt of an NFT\n /// @dev The ERC721 smart contract calls this function on the recipient\n /// after a `transfer`. This function MAY throw to revert and reject the\n /// transfer. Return of other than the magic value MUST result in the\n /// transaction being reverted.\n /// Note: the contract address is always the message sender.\n /// @param _operator The address which called `safeTransferFrom` function\n /// @param _from The address which previously owned the token\n /// @param _tokenId The NFT identifier which is being transferred\n /// @param _data Additional data with no specified format\n /// @return `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`\n /// unless throwing\n function onERC721Received(\n address _operator,\n address _from,\n uint256 _tokenId,\n bytes calldata _data\n ) external returns (bytes4);\n}\n" + }, + "contracts/interface/Holographable.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\ninterface Holographable {\n function bridgeIn(uint32 fromChain, bytes calldata payload) external returns (bytes4);\n\n function bridgeOut(\n uint32 toChain,\n address sender,\n bytes calldata payload\n ) external returns (bytes4 selector, bytes memory data);\n}\n" + }, + "contracts/interface/HolographBridgeInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\n/**\n * @title Holograph Bridge\n * @author https://github.com/holographxyz\n * @notice Beam any holographable contracts and assets across blockchains\n * @dev The contract abstracts all the complexities of making bridge requests and uses a universal interface to bridge any type of holographable assets\n */\ninterface HolographBridgeInterface {\n /**\n * @notice Receive a beam from another chain\n * @dev This function can only be called by the Holograph Operator module\n * @param fromChain Holograph Chain ID where the brigeOutRequest was created\n * @param holographableContract address of the destination contract that the bridgeInRequest is targeted for\n * @param hToken address of the hToken contract that wrapped the origin chain native gas token\n * @param hTokenRecipient address of recipient for the hToken reward\n * @param hTokenValue exact amount of hToken reward in wei\n * @param doNotRevert boolean used to specify if the call should revert\n * @param bridgeInPayload actual abi encoded bytes of the data that the holographable contract bridgeIn function will receive\n */\n function bridgeInRequest(\n uint256 nonce,\n uint32 fromChain,\n address holographableContract,\n address hToken,\n address hTokenRecipient,\n uint256 hTokenValue,\n bool doNotRevert,\n bytes calldata bridgeInPayload\n ) external payable;\n\n /**\n * @notice Create a beam request for a destination chain\n * @dev This function works for deploying contracts and beaming supported holographable assets across chains\n * @param toChain Holograph Chain ID where the beam is being sent to\n * @param holographableContract address of the contract for which the bridge request is being made\n * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain\n * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\n */\n function bridgeOutRequest(\n uint32 toChain,\n address holographableContract,\n uint256 gasLimit,\n uint256 gasPrice,\n bytes calldata bridgeOutPayload\n ) external payable;\n\n /**\n * @notice Do not call this function, it will always revert\n * @dev Used by getBridgeOutRequestPayload function\n * It is purposefully inverted to always revert on a successful call\n * Marked as external and not private to allow use inside try/catch of getBridgeOutRequestPayload function\n * If this function does not revert and returns a string, it is the actual revert reason\n * @param sender address of actual sender that is planning to make a bridgeOutRequest call\n * @param toChain holograph chain id of destination chain\n * @param holographableContract address of the contract for which the bridge request is being made\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\n */\n function revertedBridgeOutRequest(\n address sender,\n uint32 toChain,\n address holographableContract,\n bytes calldata bridgeOutPayload\n ) external returns (string memory revertReason);\n\n /**\n * @notice Get the payload created by the bridgeOutRequest function\n * @dev Use this function to get the payload that will be generated by a bridgeOutRequest\n * Only use this with a static call\n * @param toChain Holograph Chain ID where the beam is being sent to\n * @param holographableContract address of the contract for which the bridge request is being made\n * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain\n * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\n * @return samplePayload bytes made up of the bridgeOutRequest payload\n */\n function getBridgeOutRequestPayload(\n uint32 toChain,\n address holographableContract,\n uint256 gasLimit,\n uint256 gasPrice,\n bytes calldata bridgeOutPayload\n ) external returns (bytes memory samplePayload);\n\n /**\n * @notice Get the fees associated with sending specific payload\n * @dev Will provide exact costs on protocol and message side, combine the two to get total\n * @param toChain holograph chain id of destination chain for payload\n * @param gasLimit amount of gas to provide for executing payload on destination chain\n * @param gasPrice maximum amount to pay for gas price, can be set to 0 and will be chose automatically\n * @param crossChainPayload the entire packet being sent cross-chain\n * @return hlgFee the amount (in wei) of native gas token that will cost for finalizing job on destiantion chain\n * @return msgFee the amount (in wei) of native gas token that will cost for sending message to destiantion chain\n * @return dstGasPrice the amount (in wei) that destination message maximum gas price will be\n */\n function getMessageFee(\n uint32 toChain,\n uint256 gasLimit,\n uint256 gasPrice,\n bytes calldata crossChainPayload\n ) external view returns (uint256 hlgFee, uint256 msgFee, uint256 dstGasPrice);\n\n /**\n * @notice Get the address of the Holograph Factory module\n * @dev Used for deploying holographable smart contracts\n */\n function getFactory() external view returns (address factory);\n\n /**\n * @notice Update the Holograph Factory module address\n * @param factory address of the Holograph Factory smart contract to use\n */\n function setFactory(address factory) external;\n\n /**\n * @notice Get the Holograph Protocol contract\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\n */\n function getHolograph() external view returns (address holograph);\n\n /**\n * @notice Update the Holograph Protocol contract address\n * @param holograph address of the Holograph Protocol smart contract to use\n */\n function setHolograph(address holograph) external;\n\n /**\n * @notice Get the latest job nonce\n * @dev You can use the job nonce as a way to calculate total amount of bridge requests that have been made\n */\n function getJobNonce() external view returns (uint256 jobNonce);\n\n /**\n * @notice Get the address of the Holograph Operator module\n * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module\n */\n function getOperator() external view returns (address operator);\n\n /**\n * @notice Update the Holograph Operator module address\n * @param operator address of the Holograph Operator smart contract to use\n */\n function setOperator(address operator) external;\n\n /**\n * @notice Get the Holograph Registry module\n * @dev This module stores a reference for all deployed holographable smart contracts\n */\n function getRegistry() external view returns (address registry);\n\n /**\n * @notice Update the Holograph Registry module address\n * @param registry address of the Holograph Registry smart contract to use\n */\n function setRegistry(address registry) external;\n}\n" + }, + "contracts/interface/HolographedERC1155.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\n/// @title Holograph ERC-1155 Non-Fungible Token Standard\n/// @dev See https://holograph.network/standard/ERC-1155\n/// Note: the ERC-165 identifier for this interface is 0xFFFFFFFF.\ninterface HolographedERC1155 {\n // event id = 1\n function bridgeIn(\n uint32 _chainId,\n address _from,\n address _to,\n uint256 _tokenId,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 2\n function bridgeOut(\n uint32 _chainId,\n address _from,\n address _to,\n uint256 _tokenId,\n uint256 _amount\n ) external returns (bytes memory _data);\n\n // event id = 3\n function afterApprove(address _owner, address _to, uint256 _tokenId, uint256 _amount) external returns (bool success);\n\n // event id = 4\n function beforeApprove(\n address _owner,\n address _to,\n uint256 _tokenId,\n uint256 _amount\n ) external returns (bool success);\n\n // event id = 5\n function afterApprovalAll(address _to, bool _approved) external returns (bool success);\n\n // event id = 6\n function beforeApprovalAll(address _to, bool _approved) external returns (bool success);\n\n // event id = 7\n function afterBurn(address _owner, uint256 _tokenId, uint256 _amount) external returns (bool success);\n\n // event id = 8\n function beforeBurn(address _owner, uint256 _tokenId, uint256 _amount) external returns (bool success);\n\n // event id = 9\n function afterMint(address _owner, uint256 _tokenId, uint256 _amount) external returns (bool success);\n\n // event id = 10\n function beforeMint(address _owner, uint256 _tokenId, uint256 _amount) external returns (bool success);\n\n // event id = 11\n function afterSafeTransfer(\n address _from,\n address _to,\n uint256 _tokenId,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 12\n function beforeSafeTransfer(\n address _from,\n address _to,\n uint256 _tokenId,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 13\n function afterTransfer(\n address _from,\n address _to,\n uint256 _tokenId,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 14\n function beforeTransfer(\n address _from,\n address _to,\n uint256 _tokenId,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 15\n function afterOnERC1155Received(\n address _operator,\n address _from,\n address _to,\n uint256 _tokenId,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 16\n function beforeOnERC1155Received(\n address _operator,\n address _from,\n address _to,\n uint256 _tokenId,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n}\n" + }, + "contracts/interface/HolographedERC20.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\n/// @title Holograph ERC-20 Fungible Token Standard\n/// @dev See https://holograph.network/standard/ERC-20\n/// Note: the ERC-165 identifier for this interface is 0xFFFFFFFF.\ninterface HolographedERC20 {\n // event id = 1\n function bridgeIn(\n uint32 _chainId,\n address _from,\n address _to,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 2\n function bridgeOut(\n uint32 _chainId,\n address _from,\n address _to,\n uint256 _amount\n ) external returns (bytes memory _data);\n\n // event id = 3\n function afterApprove(address _owner, address _to, uint256 _amount) external returns (bool success);\n\n // event id = 4\n function beforeApprove(address _owner, address _to, uint256 _amount) external returns (bool success);\n\n // event id = 5\n function afterOnERC20Received(\n address _token,\n address _from,\n address _to,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 6\n function beforeOnERC20Received(\n address _token,\n address _from,\n address _to,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 7\n function afterBurn(address _owner, uint256 _amount) external returns (bool success);\n\n // event id = 8\n function beforeBurn(address _owner, uint256 _amount) external returns (bool success);\n\n // event id = 9\n function afterMint(address _owner, uint256 _amount) external returns (bool success);\n\n // event id = 10\n function beforeMint(address _owner, uint256 _amount) external returns (bool success);\n\n // event id = 11\n function afterSafeTransfer(\n address _from,\n address _to,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 12\n function beforeSafeTransfer(\n address _from,\n address _to,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 13\n function afterTransfer(address _from, address _to, uint256 _amount) external returns (bool success);\n\n // event id = 14\n function beforeTransfer(address _from, address _to, uint256 _amount) external returns (bool success);\n\n // event id = 15\n function onAllowance(address _owner, address _to, uint256 _amount) external returns (bool success);\n}\n" + }, + "contracts/interface/HolographedERC721.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\n/// @title Holograph ERC-721 Non-Fungible Token Standard\n/// @dev See https://holograph.network/standard/ERC-721\n/// Note: the ERC-165 identifier for this interface is 0xFFFFFFFF.\ninterface HolographedERC721 {\n // event id = 1\n function bridgeIn(\n uint32 _chainId,\n address _from,\n address _to,\n uint256 _tokenId,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 2\n function bridgeOut(\n uint32 _chainId,\n address _from,\n address _to,\n uint256 _tokenId\n ) external returns (bytes memory _data);\n\n // event id = 3\n function afterApprove(address _owner, address _to, uint256 _tokenId) external returns (bool success);\n\n // event id = 4\n function beforeApprove(address _owner, address _to, uint256 _tokenId) external returns (bool success);\n\n // event id = 5\n function afterApprovalAll(address _sender, address _to, bool _approved) external returns (bool success);\n\n // event id = 6\n function beforeApprovalAll(address _sender, address _to, bool _approved) external returns (bool success);\n\n // event id = 7\n function afterBurn(address _owner, uint256 _tokenId) external returns (bool success);\n\n // event id = 8\n function beforeBurn(address _owner, uint256 _tokenId) external returns (bool success);\n\n // event id = 9\n function afterMint(address _owner, uint256 _tokenId) external returns (bool success);\n\n // event id = 10\n function beforeMint(address _owner, uint256 _tokenId) external returns (bool success);\n\n // event id = 11\n function afterSafeTransfer(\n address _from,\n address _to,\n uint256 _tokenId,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 12\n function beforeSafeTransfer(\n address _from,\n address _to,\n uint256 _tokenId,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 13\n function afterTransfer(\n address _from,\n address _to,\n uint256 _tokenId,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 14\n function beforeTransfer(\n address _from,\n address _to,\n uint256 _tokenId,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 15\n function afterOnERC721Received(\n address _operator,\n address _from,\n address _to,\n uint256 _tokenId,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 16\n function beforeOnERC721Received(\n address _operator,\n address _from,\n address _to,\n uint256 _tokenId,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 17\n function onIsApprovedForAll(address _wallet, address _operator) external view returns (bool approved);\n\n // event id = 18\n function contractURI() external view returns (string memory contractJSON);\n}\n" + }, + "contracts/interface/HolographedGeneric.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\n/// @title Holograph Generic Standard\ninterface HolographedGeneric {\n // event id = 1\n function bridgeIn(uint32 _chainId, bytes calldata _data) external returns (bool success);\n\n // event id = 2\n function bridgeOut(uint32 _chainId, address _sender, bytes calldata _payload) external returns (bytes memory _data);\n}\n" + }, + "contracts/interface/HolographERC20Interface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./ERC20.sol\";\nimport \"./ERC20Burnable.sol\";\nimport \"./ERC20Metadata.sol\";\nimport \"./ERC20Permit.sol\";\nimport \"./ERC20Receiver.sol\";\nimport \"./ERC20Safer.sol\";\nimport \"./ERC165.sol\";\nimport \"./Holographable.sol\";\n\ninterface HolographERC20Interface is\n ERC165,\n ERC20,\n ERC20Burnable,\n ERC20Metadata,\n ERC20Receiver,\n ERC20Safer,\n ERC20Permit,\n Holographable\n{\n function holographBridgeMint(address to, uint256 amount) external returns (bytes4);\n\n function sourceBurn(address from, uint256 amount) external;\n\n function sourceMint(address to, uint256 amount) external;\n\n function sourceMintBatch(address[] calldata wallets, uint256[] calldata amounts) external;\n\n function sourceTransfer(address from, address to, uint256 amount) external;\n\n function sourceTransfer(address payable destination, uint256 amount) external;\n\n function sourceExternalCall(address target, bytes calldata data) external;\n}\n" + }, + "contracts/interface/HolographERC721Interface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./CollectionURI.sol\";\nimport \"./ERC165.sol\";\nimport \"./ERC721.sol\";\nimport \"./ERC721Enumerable.sol\";\nimport \"./ERC721Metadata.sol\";\nimport \"./ERC721TokenReceiver.sol\";\nimport \"./Holographable.sol\";\n\ninterface HolographERC721Interface is\n ERC165,\n ERC721,\n ERC721Enumerable,\n ERC721Metadata,\n ERC721TokenReceiver,\n CollectionURI,\n Holographable\n{\n function approve(address to, uint256 tokenId) external payable;\n\n function burn(uint256 tokenId) external;\n\n function safeTransferFrom(address from, address to, uint256 tokenId) external payable;\n\n function setApprovalForAll(address to, bool approved) external;\n\n function sourceBurn(uint256 tokenId) external;\n\n function sourceMint(address to, uint224 tokenId) external;\n\n function sourceGetChainPrepend() external view returns (uint256);\n\n function sourceTransfer(address to, uint256 tokenId) external;\n\n function sourceExternalCall(address target, bytes calldata data) external;\n\n function transfer(address to, uint256 tokenId) external payable;\n\n function contractURI() external view returns (string memory);\n\n function getApproved(uint256 tokenId) external view returns (address);\n\n function isApprovedForAll(address wallet, address operator) external view returns (bool);\n\n function name() external view returns (string memory);\n\n function burned(uint256 tokenId) external view returns (bool);\n\n function decimals() external pure returns (uint256);\n\n function exists(uint256 tokenId) external view returns (bool);\n\n function ownerOf(uint256 tokenId) external view returns (address);\n\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n\n function symbol() external view returns (string memory);\n\n function tokenByIndex(uint256 index) external view returns (uint256);\n\n function tokenOfOwnerByIndex(address wallet, uint256 index) external view returns (uint256);\n\n function tokensOfOwner(address wallet) external view returns (uint256[] memory);\n\n function tokenURI(uint256 tokenId) external view returns (string memory);\n\n function totalSupply() external view returns (uint256);\n}\n" + }, + "contracts/interface/HolographerInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\ninterface HolographerInterface {\n function getContractType() external view returns (bytes32 contractType);\n\n function getDeploymentBlock() external view returns (uint256 deploymentBlock);\n\n function getHolograph() external view returns (address holograph);\n\n function getHolographEnforcer() external view returns (address);\n\n function getOriginChain() external view returns (uint32 originChain);\n\n function getSourceContract() external view returns (address sourceContract);\n}\n" + }, + "contracts/interface/HolographFactoryInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../struct/DeploymentConfig.sol\";\nimport \"../struct/Verification.sol\";\n\n/**\n * @title Holograph Factory\n * @author https://github.com/holographxyz\n * @notice Deploy holographable contracts\n * @dev The contract provides methods that allow for the creation of Holograph Protocol compliant smart contracts, that are capable of minting holographable assets\n */\ninterface HolographFactoryInterface {\n /**\n * @dev This event is fired every time that a bridgeable contract is deployed.\n */\n event BridgeableContractDeployed(address indexed contractAddress, bytes32 indexed hash);\n\n /**\n * @notice Deploy a holographable smart contract\n * @dev Using this function allows to deploy smart contracts that have the same address across all EVM chains\n * @param config contract deployement configurations\n * @param signature that was created by the wallet that created the original payload\n * @param signer address of wallet that created the payload\n */\n function deployHolographableContract(\n DeploymentConfig memory config,\n Verification memory signature,\n address signer\n ) external;\n\n /**\n * @notice Get the Holograph Protocol contract\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\n */\n function getHolograph() external view returns (address holograph);\n\n /**\n * @notice Update the Holograph Protocol contract address\n * @param holograph address of the Holograph Protocol smart contract to use\n */\n function setHolograph(address holograph) external;\n\n /**\n * @notice Get the Holograph Registry module\n * @dev This module stores a reference for all deployed holographable smart contracts\n */\n function getRegistry() external view returns (address registry);\n\n /**\n * @notice Update the Holograph Registry module address\n * @param registry address of the Holograph Registry smart contract to use\n */\n function setRegistry(address registry) external;\n}\n" + }, + "contracts/interface/HolographGenericInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./ERC165.sol\";\nimport \"./Holographable.sol\";\n\ninterface HolographGenericInterface is ERC165, Holographable {\n function sourceEmit(bytes calldata eventData) external;\n\n function sourceEmit(bytes32 eventId, bytes calldata eventData) external;\n\n function sourceEmit(bytes32 eventId, bytes32 topic1, bytes calldata eventData) external;\n\n function sourceEmit(bytes32 eventId, bytes32 topic1, bytes32 topic2, bytes calldata eventData) external;\n\n function sourceEmit(\n bytes32 eventId,\n bytes32 topic1,\n bytes32 topic2,\n bytes32 topic3,\n bytes calldata eventData\n ) external;\n}\n" + }, + "contracts/interface/HolographInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\n/**\n * @title Holograph Protocol\n * @author https://github.com/holographxyz\n * @notice This is the primary Holograph Protocol smart contract\n * @dev This contract stores a reference to all the primary modules and variables of the protocol\n */\ninterface HolographInterface {\n /**\n * @notice Get the address of the Holograph Bridge module\n * @dev Used for beaming holographable assets cross-chain\n */\n function getBridge() external view returns (address bridge);\n\n /**\n * @notice Update the Holograph Bridge module address\n * @param bridge address of the Holograph Bridge smart contract to use\n */\n function setBridge(address bridge) external;\n\n /**\n * @notice Get the chain ID that the Protocol was deployed on\n * @dev Useful for checking if/when a hard fork occurs\n */\n function getChainId() external view returns (uint256 chainId);\n\n /**\n * @notice Update the chain ID\n * @dev Useful for updating once a hard fork has been mitigated\n * @param chainId EVM chain ID to use\n */\n function setChainId(uint256 chainId) external;\n\n /**\n * @notice Get the address of the Holograph Factory module\n * @dev Used for deploying holographable smart contracts\n */\n function getFactory() external view returns (address factory);\n\n /**\n * @notice Update the Holograph Factory module address\n * @param factory address of the Holograph Factory smart contract to use\n */\n function setFactory(address factory) external;\n\n /**\n * @notice Get the Holograph chain Id\n * @dev Holograph uses an internal chain id mapping\n */\n function getHolographChainId() external view returns (uint32 holographChainId);\n\n /**\n * @notice Update the Holograph chain ID\n * @dev Useful for updating once a hard fork was mitigated\n * @param holographChainId Holograph chain ID to use\n */\n function setHolographChainId(uint32 holographChainId) external;\n\n /**\n * @notice Get the address of the Holograph Interfaces module\n * @dev Holograph uses this contract to store data that needs to be accessed by a large portion of the modules\n */\n function getInterfaces() external view returns (address interfaces);\n\n /**\n * @notice Update the Holograph Interfaces module address\n * @param interfaces address of the Holograph Interfaces smart contract to use\n */\n function setInterfaces(address interfaces) external;\n\n /**\n * @notice Get the address of the Holograph Operator module\n * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module\n */\n function getOperator() external view returns (address operator);\n\n /**\n * @notice Update the Holograph Operator module address\n * @param operator address of the Holograph Operator smart contract to use\n */\n function setOperator(address operator) external;\n\n /**\n * @notice Get the Holograph Registry module\n * @dev This module stores a reference for all deployed holographable smart contracts\n */\n function getRegistry() external view returns (address registry);\n\n /**\n * @notice Update the Holograph Registry module address\n * @param registry address of the Holograph Registry smart contract to use\n */\n function setRegistry(address registry) external;\n\n /**\n * @notice Get the Holograph Treasury module\n * @dev All of the Holograph Protocol assets are stored and managed by this module\n */\n function getTreasury() external view returns (address treasury);\n\n /**\n * @notice Update the Holograph Treasury module address\n * @param treasury address of the Holograph Treasury smart contract to use\n */\n function setTreasury(address treasury) external;\n\n /**\n * @notice Get the Holograph Utility Token address\n * @dev This is the official utility token of the Holograph Protocol\n */\n function getUtilityToken() external view returns (address utilityToken);\n\n /**\n * @notice Update the Holograph Utility Token address\n * @param utilityToken address of the Holograph Utility Token smart contract to use\n */\n function setUtilityToken(address utilityToken) external;\n}\n" + }, + "contracts/interface/HolographInterfacesInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../enum/ChainIdType.sol\";\nimport \"../enum/InterfaceType.sol\";\nimport \"../enum/TokenUriType.sol\";\n\ninterface HolographInterfacesInterface {\n function contractURI(\n string calldata name,\n string calldata imageURL,\n string calldata externalLink,\n uint16 bps,\n address contractAddress\n ) external pure returns (string memory);\n\n function getUriPrepend(TokenUriType uriType) external view returns (string memory prepend);\n\n function updateUriPrepend(TokenUriType uriType, string calldata prepend) external;\n\n function updateUriPrepends(TokenUriType[] calldata uriTypes, string[] calldata prepends) external;\n\n function getChainId(\n ChainIdType fromChainType,\n uint256 fromChainId,\n ChainIdType toChainType\n ) external view returns (uint256 toChainId);\n\n function updateChainIdMap(\n ChainIdType fromChainType,\n uint256 fromChainId,\n ChainIdType toChainType,\n uint256 toChainId\n ) external;\n\n function updateChainIdMaps(\n ChainIdType[] calldata fromChainType,\n uint256[] calldata fromChainId,\n ChainIdType[] calldata toChainType,\n uint256[] calldata toChainId\n ) external;\n\n function supportsInterface(InterfaceType interfaceType, bytes4 interfaceId) external view returns (bool);\n\n function updateInterface(InterfaceType interfaceType, bytes4 interfaceId, bool supported) external;\n\n function updateInterfaces(InterfaceType interfaceType, bytes4[] calldata interfaceIds, bool supported) external;\n}\n" + }, + "contracts/interface/HolographOperatorInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../struct/OperatorJob.sol\";\n\ninterface HolographOperatorInterface {\n /**\n * @dev Event is emitted for every time that a valid job is available.\n */\n event AvailableOperatorJob(bytes32 jobHash, bytes payload);\n\n /**\n * @dev Event is emitted for every time that a job is completed.\n */\n event FinishedOperatorJob(bytes32 jobHash, address operator);\n\n /**\n * @dev Event is emitted every time a cross-chain message is sent\n */\n event CrossChainMessageSent(bytes32 messageHash);\n\n /**\n * @dev Event is emitted if an operator job execution fails\n */\n event FailedOperatorJob(bytes32 jobHash);\n\n /**\n * @notice Execute an available operator job\n * @dev When making this call, if operating criteria is not met, the call will revert\n * @param bridgeInRequestPayload the entire cross chain message payload\n */\n function executeJob(bytes calldata bridgeInRequestPayload) external payable;\n\n function nonRevertingBridgeCall(address msgSender, bytes calldata payload) external payable;\n\n /**\n * @notice Receive a cross-chain message\n * @dev This function is restricted for use by Holograph Messaging Module only\n */\n function crossChainMessage(bytes calldata bridgeInRequestPayload) external payable;\n\n /**\n * @notice Calculate the amount of gas needed to execute a bridgeInRequest\n * @dev Use this function to estimate the amount of gas that will be used by the bridgeInRequest function\n * Set a specific gas limit when making this call, subtract return value, to get total gas used\n * Only use this with a static call\n * @param bridgeInRequestPayload abi encoded bytes making up the bridgeInRequest payload\n * @return the gas amount remaining after the static call is returned\n */\n function jobEstimator(bytes calldata bridgeInRequestPayload) external payable returns (uint256);\n\n /**\n * @notice Send cross chain bridge request message\n * @dev This function is restricted to only be callable by Holograph Bridge\n * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain\n * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain\n * @param toChain Holograph Chain ID where the beam is being sent to\n * @param nonce incremented number used to ensure job hashes are unique\n * @param holographableContract address of the contract for which the bridge request is being made\n * @param bridgeOutPayload bytes made up of the bridgeOutRequest payload\n */\n function send(\n uint256 gasLimit,\n uint256 gasPrice,\n uint32 toChain,\n address msgSender,\n uint256 nonce,\n address holographableContract,\n bytes calldata bridgeOutPayload\n ) external payable;\n\n /**\n * @notice Get the fees associated with sending specific payload\n * @dev Will provide exact costs on protocol and message side, combine the two to get total\n * @param toChain holograph chain id of destination chain for payload\n * @param gasLimit amount of gas to provide for executing payload on destination chain\n * @param gasPrice maximum amount to pay for gas price, can be set to 0 and will be chose automatically\n * @param crossChainPayload the entire packet being sent cross-chain\n * @return hlgFee the amount (in wei) of native gas token that will cost for finalizing job on destiantion chain\n * @return msgFee the amount (in wei) of native gas token that will cost for sending message to destiantion chain\n * @return dstGasPrice the amount (in wei) that destination message maximum gas price will be\n */\n function getMessageFee(\n uint32 toChain,\n uint256 gasLimit,\n uint256 gasPrice,\n bytes calldata crossChainPayload\n ) external view returns (uint256 hlgFee, uint256 msgFee, uint256 dstGasPrice);\n\n /**\n * @notice Get the details for an available operator job\n * @dev The job hash is a keccak256 hash of the entire job payload\n * @param jobHash keccak256 hash of the job\n * @return an OperatorJob struct with details about a specific job\n */\n function getJobDetails(bytes32 jobHash) external view returns (OperatorJob memory);\n\n /**\n * @notice Get number of pods available\n * @dev This returns number of pods that have been opened via bonding\n */\n function getTotalPods() external view returns (uint256 totalPods);\n\n /**\n * @notice Get total number of operators in a pod\n * @dev Use in conjunction with paginated getPodOperators function\n * @param pod the pod to query\n * @return total operators in a pod\n */\n function getPodOperatorsLength(uint256 pod) external view returns (uint256);\n\n /**\n * @notice Get list of operators in a pod\n * @dev Use paginated getPodOperators function instead if list gets too long\n * @param pod the pod to query\n * @return operators array list of operators in a pod\n */\n function getPodOperators(uint256 pod) external view returns (address[] memory operators);\n\n /**\n * @notice Get paginated list of operators in a pod\n * @dev Use in conjunction with getPodOperatorsLength to know the total length of results\n * @param pod the pod to query\n * @param index the array index to start from\n * @param length the length of result set to be (will be shorter if reached end of array)\n * @return operators a paginated array of operators\n */\n function getPodOperators(\n uint256 pod,\n uint256 index,\n uint256 length\n ) external view returns (address[] memory operators);\n\n /**\n * @notice Check the base and current price for bonding to a particular pod\n * @dev Useful for understanding what is required for bonding to a pod\n * @param pod the pod to get bonding amounts for\n * @return base the base bond amount required for a pod\n * @return current the current bond amount required for a pod\n */\n function getPodBondAmounts(uint256 pod) external view returns (uint256 base, uint256 current);\n\n /**\n * @notice Get an operator's currently bonded amount\n * @dev Useful for checking how much an operator has bonded\n * @param operator address of operator to check\n * @return amount total number of utility token bonded\n */\n function getBondedAmount(address operator) external view returns (uint256 amount);\n\n /**\n * @notice Get an operator's currently bonded pod\n * @dev Useful for checking if an operator is currently bonded\n * @param operator address of operator to check\n * @return pod number that operator is bonded on, returns zero if not bonded or selected for job\n */\n function getBondedPod(address operator) external view returns (uint256 pod);\n\n /**\n * @notice Get an operator's currently bonded pod index\n * @dev Useful for checking if an operator is a fallback for active job\n * @param operator address of operator to check\n * @return index currently bonded pod's operator index, returns zero if not in pod or moved out for active job\n */\n function getBondedPodIndex(address operator) external view returns (uint256 index);\n\n /**\n * @notice Topup a bonded operator with more utility tokens\n * @dev Useful function if an operator got slashed and wants to add a safety buffer to not get unbonded\n * @param operator address of operator to topup\n * @param amount utility token amount to add\n */\n function topupUtilityToken(address operator, uint256 amount) external;\n\n /**\n * @notice Bond utility tokens and become an operator\n * @dev An operator can only bond to one pod at a time, per network\n * @param operator address of operator to bond (can be an ownable smart contract)\n * @param amount utility token amount to bond (can be greater than minimum)\n * @param pod number of pod to bond to (can be for one that does not exist yet)\n */\n function bondUtilityToken(address operator, uint256 amount, uint256 pod) external;\n\n /**\n * @notice Unbond HLG utility tokens and stop being an operator\n * @dev A bonded operator selected for a job cannot unbond until they complete the job, or are slashed\n * @param operator address of operator to unbond\n * @param recipient address where to send the bonded tokens\n */\n function unbondUtilityToken(address operator, address recipient) external;\n\n /**\n * @notice Get the address of the Holograph Bridge module\n * @dev Used for beaming holographable assets cross-chain\n */\n function getBridge() external view returns (address bridge);\n\n /**\n * @notice Update the Holograph Bridge module address\n * @param bridge address of the Holograph Bridge smart contract to use\n */\n function setBridge(address bridge) external;\n\n /**\n * @notice Get the Holograph Protocol contract\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\n */\n function getHolograph() external view returns (address holograph);\n\n /**\n * @notice Update the Holograph Protocol contract address\n * @param holograph address of the Holograph Protocol smart contract to use\n */\n function setHolograph(address holograph) external;\n\n /**\n * @notice Get the address of the Holograph Interfaces module\n * @dev Holograph uses this contract to store data that needs to be accessed by a large portion of the modules\n */\n function getInterfaces() external view returns (address interfaces);\n\n /**\n * @notice Update the Holograph Interfaces module address\n * @param interfaces address of the Holograph Interfaces smart contract to use\n */\n function setInterfaces(address interfaces) external;\n\n /**\n * @notice Get the address of the Holograph Messaging Module\n * @dev All cross-chain message requests will get forwarded to this adress\n */\n function getMessagingModule() external view returns (address messagingModule);\n\n /**\n * @notice Update the Holograph Messaging Module address\n * @param messagingModule address of the LayerZero Endpoint to use\n */\n function setMessagingModule(address messagingModule) external;\n\n /**\n * @notice Get the Holograph Registry module\n * @dev This module stores a reference for all deployed holographable smart contracts\n */\n function getRegistry() external view returns (address registry);\n\n /**\n * @notice Update the Holograph Registry module address\n * @param registry address of the Holograph Registry smart contract to use\n */\n function setRegistry(address registry) external;\n\n /**\n * @notice Get the Holograph Utility Token address\n * @dev This is the official utility token of the Holograph Protocol\n */\n function getUtilityToken() external view returns (address utilityToken);\n\n /**\n * @notice Update the Holograph Utility Token address\n * @param utilityToken address of the Holograph Utility Token smart contract to use\n */\n function setUtilityToken(address utilityToken) external;\n\n /**\n * @notice Get the Minimum Gas Price\n * @dev This amount is used as the value that will define a job as underpriced is lower than\n */\n function getMinGasPrice() external view returns (uint256 minGasPrice);\n\n /**\n * @notice Update the Minimum Gas Price\n * @param minGasPrice amount to set for minimum gas price\n */\n function setMinGasPrice(uint256 minGasPrice) external;\n}\n" + }, + "contracts/interface/HolographRegistryInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\ninterface HolographRegistryInterface {\n event HolographableContractEvent(address indexed _holographableContract, bytes _payload);\n\n function isHolographedContract(address smartContract) external view returns (bool);\n\n function isHolographedHashDeployed(bytes32 hash) external view returns (bool);\n\n function referenceContractTypeAddress(address contractAddress) external returns (bytes32);\n\n function getContractTypeAddress(bytes32 contractType) external view returns (address);\n\n function setContractTypeAddress(bytes32 contractType, address contractAddress) external;\n\n function getHolograph() external view returns (address holograph);\n\n function setHolograph(address holograph) external;\n\n function getHolographableContracts(uint256 index, uint256 length) external view returns (address[] memory contracts);\n\n function getHolographableContractsLength() external view returns (uint256);\n\n function getHolographedHashAddress(bytes32 hash) external view returns (address);\n\n function setHolographedHashAddress(bytes32 hash, address contractAddress) external;\n\n function getHToken(uint32 chainId) external view returns (address);\n\n function setHToken(uint32 chainId, address hToken) external;\n\n function getReservedContractTypeAddress(bytes32 contractType) external view returns (address contractTypeAddress);\n\n function setReservedContractTypeAddress(bytes32 hash, bool reserved) external;\n\n function setReservedContractTypeAddresses(bytes32[] calldata hashes, bool[] calldata reserved) external;\n\n function getUtilityToken() external view returns (address utilityToken);\n\n function setUtilityToken(address utilityToken) external;\n\n function holographableEvent(bytes calldata payload) external;\n}\n" + }, + "contracts/interface/HolographRoyaltiesInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../struct/ZoraBidShares.sol\";\n\ninterface HolographRoyaltiesInterface {\n function initHolographRoyalties(bytes memory data) external returns (bytes4);\n\n function configurePayouts(address payable[] memory addresses, uint256[] memory bps) external;\n\n function getPayoutInfo() external view returns (address payable[] memory addresses, uint256[] memory bps);\n\n function getEthPayout() external;\n\n function getTokenPayout(address tokenAddress) external;\n\n function getTokensPayout(address[] memory tokenAddresses) external;\n\n function supportsInterface(bytes4 interfaceId) external pure returns (bool);\n\n function setRoyalties(uint256 tokenId, address payable receiver, uint256 bp) external;\n\n function royaltyInfo(uint256 tokenId, uint256 value) external view returns (address, uint256);\n\n function getFeeBps(uint256 tokenId) external view returns (uint256[] memory);\n\n function getFeeRecipients(uint256 tokenId) external view returns (address payable[] memory);\n\n function getRoyalties(uint256 tokenId) external view returns (address payable[] memory, uint256[] memory);\n\n function getFees(uint256 tokenId) external view returns (address payable[] memory, uint256[] memory);\n\n function tokenCreator(address /* contractAddress*/, uint256 tokenId) external view returns (address);\n\n function calculateRoyaltyFee(\n address /* contractAddress */,\n uint256 tokenId,\n uint256 amount\n ) external view returns (uint256);\n\n function marketContract() external view returns (address);\n\n function tokenCreators(uint256 tokenId) external view returns (address);\n\n function bidSharesForToken(uint256 tokenId) external view returns (HolographBidShares memory bidShares);\n\n function getStorageSlot(string calldata slot) external pure returns (bytes32);\n\n function getTokenAddress(string memory tokenName) external view returns (address);\n}\n" + }, + "contracts/interface/HolographTreasuryInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\ninterface HolographTreasuryInterface {\n // purposefully left blank\n}\n" + }, + "contracts/interface/InitializableInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\n/**\n * @title Initializable\n * @author https://github.com/holographxyz\n * @notice Use init instead of constructor\n * @dev This allows for use of init function to make one time initializations without the need of a constructor\n */\ninterface InitializableInterface {\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external returns (bytes4);\n}\n" + }, + "contracts/interface/LayerZeroEndpointInterface.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport \"./LayerZeroUserApplicationConfigInterface.sol\";\n\ninterface LayerZeroEndpointInterface is LayerZeroUserApplicationConfigInterface {\n // @notice send a LayerZero message to the specified address at a LayerZero endpoint.\n // @param _dstChainId - the destination chain identifier\n // @param _destination - the address on destination chain (in bytes). address length/format may vary by chains\n // @param _payload - a custom bytes payload to send to the destination contract\n // @param _refundAddress - if the source transaction is cheaper than the amount of value passed, refund the additional amount to this address\n // @param _zroPaymentAddress - the address of the ZRO token holder who would pay for the transaction\n // @param _adapterParams - parameters for custom functionality. e.g. receive airdropped native gas from the relayer on destination\n function send(\n uint16 _dstChainId,\n bytes calldata _destination,\n bytes calldata _payload,\n address payable _refundAddress,\n address _zroPaymentAddress,\n bytes calldata _adapterParams\n ) external payable;\n\n // @notice used by the messaging library to publish verified payload\n // @param _srcChainId - the source chain identifier\n // @param _srcAddress - the source contract (as bytes) at the source chain\n // @param _dstAddress - the address on destination chain\n // @param _nonce - the unbound message ordering nonce\n // @param _gasLimit - the gas limit for external contract execution\n // @param _payload - verified payload to send to the destination contract\n function receivePayload(\n uint16 _srcChainId,\n bytes calldata _srcAddress,\n address _dstAddress,\n uint64 _nonce,\n uint256 _gasLimit,\n bytes calldata _payload\n ) external;\n\n // @notice get the inboundNonce of a lzApp from a source chain which could be EVM or non-EVM chain\n // @param _srcChainId - the source chain identifier\n // @param _srcAddress - the source chain contract address\n function getInboundNonce(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (uint64);\n\n // @notice get the outboundNonce from this source chain which, consequently, is always an EVM\n // @param _srcAddress - the source chain contract address\n function getOutboundNonce(uint16 _dstChainId, address _srcAddress) external view returns (uint64);\n\n // @notice gets a quote in source native gas, for the amount that send() requires to pay for message delivery\n // @param _dstChainId - the destination chain identifier\n // @param _userApplication - the user app address on this EVM chain\n // @param _payload - the custom message to send over LayerZero\n // @param _payInZRO - if false, user app pays the protocol fee in native token\n // @param _adapterParam - parameters for the adapter service, e.g. send some dust native token to dstChain\n function estimateFees(\n uint16 _dstChainId,\n address _userApplication,\n bytes calldata _payload,\n bool _payInZRO,\n bytes calldata _adapterParam\n ) external view returns (uint256 nativeFee, uint256 zroFee);\n\n // @notice get this Endpoint's immutable source identifier\n function getChainId() external view returns (uint16);\n\n // @notice the interface to retry failed message on this Endpoint destination\n // @param _srcChainId - the source chain identifier\n // @param _srcAddress - the source chain contract address\n // @param _payload - the payload to be retried\n function retryPayload(uint16 _srcChainId, bytes calldata _srcAddress, bytes calldata _payload) external;\n\n // @notice query if any STORED payload (message blocking) at the endpoint.\n // @param _srcChainId - the source chain identifier\n // @param _srcAddress - the source chain contract address\n function hasStoredPayload(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool);\n\n // @notice query if the _libraryAddress is valid for sending msgs.\n // @param _userApplication - the user app address on this EVM chain\n function getSendLibraryAddress(address _userApplication) external view returns (address);\n\n // @notice query if the _libraryAddress is valid for receiving msgs.\n // @param _userApplication - the user app address on this EVM chain\n function getReceiveLibraryAddress(address _userApplication) external view returns (address);\n\n // @notice query if the non-reentrancy guard for send() is on\n // @return true if the guard is on. false otherwise\n function isSendingPayload() external view returns (bool);\n\n // @notice query if the non-reentrancy guard for receive() is on\n // @return true if the guard is on. false otherwise\n function isReceivingPayload() external view returns (bool);\n\n // @notice get the configuration of the LayerZero messaging library of the specified version\n // @param _version - messaging library version\n // @param _chainId - the chainId for the pending config change\n // @param _userApplication - the contract address of the user application\n // @param _configType - type of configuration. every messaging library has its own convention.\n function getConfig(\n uint16 _version,\n uint16 _chainId,\n address _userApplication,\n uint256 _configType\n ) external view returns (bytes memory);\n\n // @notice get the send() LayerZero messaging library version\n // @param _userApplication - the contract address of the user application\n function getSendVersion(address _userApplication) external view returns (uint16);\n\n // @notice get the lzReceive() LayerZero messaging library version\n // @param _userApplication - the contract address of the user application\n function getReceiveVersion(address _userApplication) external view returns (uint16);\n}\n" + }, + "contracts/interface/LayerZeroModuleInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\ninterface LayerZeroModuleInterface {\n function lzReceive(\n uint16 _srcChainId,\n bytes calldata _srcAddress,\n uint64 _nonce,\n bytes calldata _payload\n ) external payable;\n\n function getInterfaces() external view returns (address interfaces);\n\n function setInterfaces(address interfaces) external;\n\n function getLZEndpoint() external view returns (address lZEndpoint);\n\n function setLZEndpoint(address lZEndpoint) external;\n\n function getOperator() external view returns (address operator);\n\n function setOperator(address operator) external;\n}\n" + }, + "contracts/interface/LayerZeroOverrides.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\ninterface LayerZeroOverrides {\n // @dev defaultAppConfig struct\n struct ApplicationConfiguration {\n uint16 inboundProofLibraryVersion;\n uint64 inboundBlockConfirmations;\n address relayer;\n uint16 outboundProofType;\n uint64 outboundBlockConfirmations;\n address oracle;\n }\n\n struct DstPrice {\n uint128 dstPriceRatio; // 10^10\n uint128 dstGasPriceInWei;\n }\n\n struct DstConfig {\n uint128 dstNativeAmtCap;\n uint64 baseGas;\n uint64 gasPerByte;\n }\n\n // @dev using this to retrieve UltraLightNodeV2 address\n function defaultSendLibrary() external view returns (address);\n\n // @dev using this to extract defaultAppConfig\n function getAppConfig(\n uint16 destinationChainId,\n address userApplicationAddress\n ) external view returns (ApplicationConfiguration memory);\n\n // @dev using this to extract defaultAppConfig directly from storage slot\n function defaultAppConfig(\n uint16 destinationChainId\n )\n external\n view\n returns (\n uint16 inboundProofLibraryVersion,\n uint64 inboundBlockConfirmations,\n address relayer,\n uint16 outboundProofType,\n uint64 outboundBlockConfirmations,\n address oracle\n );\n\n // @dev access the mapping to get base price fee\n function dstPriceLookup(\n uint16 destinationChainId\n ) external view returns (uint128 dstPriceRatio, uint128 dstGasPriceInWei);\n\n // @dev access the mapping to get base gas and gas per byte\n function dstConfigLookup(\n uint16 destinationChainId,\n uint16 outboundProofType\n ) external view returns (uint128 dstNativeAmtCap, uint64 baseGas, uint64 gasPerByte);\n\n // @dev send message to LayerZero Endpoint\n function send(\n uint16 _dstChainId,\n bytes calldata _destination,\n bytes calldata _payload,\n address payable _refundAddress,\n address _zroPaymentAddress,\n bytes calldata _adapterParams\n ) external payable;\n\n // @dev estimate LayerZero message cost\n function estimateFees(\n uint16 _dstChainId,\n address _userApplication,\n bytes calldata _payload,\n bool _payInZRO,\n bytes calldata _adapterParam\n ) external view returns (uint256 nativeFee, uint256 zroFee);\n}\n" + }, + "contracts/interface/LayerZeroReceiverInterface.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\ninterface LayerZeroReceiverInterface {\n // @notice LayerZero endpoint will invoke this function to deliver the message on the destination\n // @param _srcChainId - the source endpoint identifier\n // @param _srcAddress - the source sending contract address from the source chain\n // @param _nonce - the ordered message nonce\n // @param _payload - the signed payload is the UA bytes has encoded to be sent\n function lzReceive(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes calldata _payload) external;\n}\n" + }, + "contracts/interface/LayerZeroUserApplicationConfigInterface.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\ninterface LayerZeroUserApplicationConfigInterface {\n // @notice set the configuration of the LayerZero messaging library of the specified version\n // @param _version - messaging library version\n // @param _chainId - the chainId for the pending config change\n // @param _configType - type of configuration. every messaging library has its own convention.\n // @param _config - configuration in the bytes. can encode arbitrary content.\n function setConfig(uint16 _version, uint16 _chainId, uint256 _configType, bytes calldata _config) external;\n\n // @notice set the send() LayerZero messaging library version to _version\n // @param _version - new messaging library version\n function setSendVersion(uint16 _version) external;\n\n // @notice set the lzReceive() LayerZero messaging library version to _version\n // @param _version - new messaging library version\n function setReceiveVersion(uint16 _version) external;\n\n // @notice Only when the UA needs to resume the message flow in blocking mode and clear the stored payload\n // @param _srcChainId - the chainId of the source chain\n // @param _srcAddress - the contract address of the source contract at the source chain\n function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external;\n}\n" + }, + "contracts/interface/Ownable.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\ninterface Ownable {\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n function owner() external view returns (address);\n\n function transferOwnership(address _newOwner) external;\n\n function isOwner() external view returns (bool);\n\n function isOwner(address wallet) external view returns (bool);\n}\n" + }, + "contracts/library/Base64.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nlibrary Base64 {\n bytes private constant base64stdchars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\n bytes private constant base64urlchars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_\";\n\n function encode(string memory _str) internal pure returns (string memory) {\n bytes memory _bs = bytes(_str);\n return encode(_bs);\n }\n\n function encode(bytes memory _bs) internal pure returns (string memory) {\n uint256 rem = _bs.length % 3;\n\n uint256 res_length = ((_bs.length + 2) / 3) * 4 - ((3 - rem) % 3);\n bytes memory res = new bytes(res_length);\n\n uint256 i = 0;\n uint256 j = 0;\n\n for (; i + 3 <= _bs.length; i += 3) {\n (res[j], res[j + 1], res[j + 2], res[j + 3]) = encode3(uint8(_bs[i]), uint8(_bs[i + 1]), uint8(_bs[i + 2]));\n\n j += 4;\n }\n\n if (rem != 0) {\n uint8 la0 = uint8(_bs[_bs.length - rem]);\n uint8 la1 = 0;\n\n if (rem == 2) {\n la1 = uint8(_bs[_bs.length - 1]);\n }\n\n (bytes1 b0, bytes1 b1, bytes1 b2 /* bytes1 b3*/, ) = encode3(la0, la1, 0);\n res[j] = b0;\n res[j + 1] = b1;\n if (rem == 2) {\n res[j + 2] = b2;\n }\n }\n\n return string(res);\n }\n\n function encode3(\n uint256 a0,\n uint256 a1,\n uint256 a2\n ) private pure returns (bytes1 b0, bytes1 b1, bytes1 b2, bytes1 b3) {\n uint256 n = (a0 << 16) | (a1 << 8) | a2;\n\n uint256 c0 = (n >> 18) & 63;\n uint256 c1 = (n >> 12) & 63;\n uint256 c2 = (n >> 6) & 63;\n uint256 c3 = (n) & 63;\n\n b0 = base64urlchars[c0];\n b1 = base64urlchars[c1];\n b2 = base64urlchars[c2];\n b3 = base64urlchars[c3];\n }\n}\n" + }, + "contracts/library/Bytes.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nlibrary Bytes {\n function getBoolean(uint192 _packedBools, uint192 _boolNumber) internal pure returns (bool) {\n uint192 flag = (_packedBools >> _boolNumber) & uint192(1);\n return (flag == 1 ? true : false);\n }\n\n function setBoolean(uint192 _packedBools, uint192 _boolNumber, bool _value) internal pure returns (uint192) {\n if (_value) {\n return _packedBools | (uint192(1) << _boolNumber);\n } else {\n return _packedBools & ~(uint192(1) << _boolNumber);\n }\n }\n\n function slice(bytes memory _bytes, uint256 _start, uint256 _length) internal pure returns (bytes memory) {\n require(_length + 31 >= _length, \"slice_overflow\");\n require(_bytes.length >= _start + _length, \"slice_outOfBounds\");\n bytes memory tempBytes;\n assembly {\n switch iszero(_length)\n case 0 {\n tempBytes := mload(0x40)\n let lengthmod := and(_length, 31)\n let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod)))\n let end := add(mc, _length)\n for {\n let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start)\n } lt(mc, end) {\n mc := add(mc, 0x20)\n cc := add(cc, 0x20)\n } {\n mstore(mc, mload(cc))\n }\n mstore(tempBytes, _length)\n mstore(0x40, and(add(mc, 31), not(31)))\n }\n default {\n tempBytes := mload(0x40)\n mstore(tempBytes, 0)\n mstore(0x40, add(tempBytes, 0x20))\n }\n }\n return tempBytes;\n }\n\n function trim(bytes32 source) internal pure returns (bytes memory) {\n uint256 temp = uint256(source);\n uint256 length = 0;\n while (temp != 0) {\n length++;\n temp >>= 8;\n }\n return slice(abi.encodePacked(source), 32 - length, length);\n }\n}\n" + }, + "contracts/library/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/cryptography/ECDSA.sol)\n\npragma solidity 0.8.13;\n\nimport \"./Strings.sol\";\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSA {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS,\n InvalidSignatureV\n }\n\n function _throwError(RecoverError error) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert(\"ECDSA: invalid signature\");\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert(\"ECDSA: invalid signature length\");\n } else if (error == RecoverError.InvalidSignatureS) {\n revert(\"ECDSA: invalid signature 's' value\");\n } else if (error == RecoverError.InvalidSignatureV) {\n revert(\"ECDSA: invalid signature 'v' value\");\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature` or error string. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\n // Check the signature length\n // - case 65: r,s,v signature (standard)\n // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._\n if (signature.length == 65) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n assembly {\n r := mload(add(signature, 0x20))\n s := mload(add(signature, 0x40))\n v := byte(0, mload(add(signature, 0x60)))\n }\n return tryRecover(hash, v, r, s);\n } else if (signature.length == 64) {\n bytes32 r;\n bytes32 vs;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n assembly {\n r := mload(add(signature, 0x20))\n vs := mload(add(signature, 0x40))\n }\n return tryRecover(hash, r, vs);\n } else {\n return (address(0), RecoverError.InvalidSignatureLength);\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, signature);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n *\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n *\n * _Available since v4.2._\n */\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n * `r` and `s` signature fields separately.\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS);\n }\n if (v != 27 && v != 28) {\n return (address(0), RecoverError.InvalidSignatureV);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature);\n }\n\n return (signer, RecoverError.NoError);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\n // 32 is the length in bytes of hash,\n // enforced by the type signature above\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", hash));\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from `s`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n\", Strings.toString(s.length), s));\n }\n\n /**\n * @dev Returns an Ethereum Signed Typed Data, created from a\n * `domainSeparator` and a `structHash`. This produces hash corresponding\n * to the one signed with the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\n * JSON-RPC method as part of EIP-712.\n *\n * See {recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n }\n}\n" + }, + "contracts/library/Strings.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nlibrary Strings {\n function toHexString(address account) internal pure returns (string memory) {\n return toHexString(uint256(uint160(account)));\n }\n\n function toHexString(uint256 value) internal pure returns (string memory) {\n if (value == 0) {\n return \"0x00\";\n }\n uint256 temp = value;\n uint256 length = 0;\n while (temp != 0) {\n length++;\n temp >>= 8;\n }\n return toHexString(value, length);\n }\n\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = bytes16(\"0123456789abcdef\")[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n\n function toAsciiString(address x) internal pure returns (string memory) {\n bytes memory s = new bytes(40);\n for (uint256 i = 0; i < 20; i++) {\n bytes1 b = bytes1(uint8(uint256(uint160(x)) / (2 ** (8 * (19 - i)))));\n bytes1 hi = bytes1(uint8(b) / 16);\n bytes1 lo = bytes1(uint8(b) - 16 * uint8(hi));\n s[2 * i] = char(hi);\n s[2 * i + 1] = char(lo);\n }\n return string(s);\n }\n\n function char(bytes1 b) internal pure returns (bytes1 c) {\n if (uint8(b) < 10) {\n return bytes1(uint8(b) + 0x30);\n } else {\n return bytes1(uint8(b) + 0x57);\n }\n }\n\n function uint2str(uint256 _i) internal pure returns (string memory _uint256AsString) {\n if (_i == 0) {\n return \"0\";\n }\n uint256 j = _i;\n uint256 len;\n while (j != 0) {\n len++;\n j /= 10;\n }\n bytes memory bstr = new bytes(len);\n uint256 k = len;\n while (_i != 0) {\n k = k - 1;\n uint8 temp = (48 + uint8(_i - (_i / 10) * 10));\n bytes1 b1 = bytes1(temp);\n bstr[k] = b1;\n _i /= 10;\n }\n return string(bstr);\n }\n\n function toString(uint256 value) internal pure returns (string memory) {\n if (value == 0) {\n return \"0\";\n }\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n bytes memory buffer = new bytes(digits);\n while (value != 0) {\n digits -= 1;\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n value /= 10;\n }\n return string(buffer);\n }\n}\n" + }, + "contracts/mock/ERC20Mock.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/EIP712.sol\";\nimport \"../abstract/NonReentrant.sol\";\n\nimport \"../interface/ERC20.sol\";\nimport \"../interface/ERC20Burnable.sol\";\nimport \"../interface/HolographERC20Interface.sol\";\nimport \"../interface/ERC20Metadata.sol\";\nimport \"../interface/ERC20Permit.sol\";\nimport \"../interface/ERC20Receiver.sol\";\nimport \"../interface/ERC20Safer.sol\";\nimport \"../interface/ERC165.sol\";\nimport \"../interface/ERC165.sol\";\n\nimport \"../library/ECDSA.sol\";\n\n/**\n * @title Mock ERC20 Token\n * @author Holograph Foundation\n * @notice Used for imitating the likes of WETH and WMATIC tokens.\n * @dev The entire logic and functionality of the smart contract is self-contained.\n */\ncontract ERC20Mock is\n ERC165,\n ERC20,\n ERC20Burnable,\n ERC20Metadata,\n ERC20Receiver,\n ERC20Safer,\n ERC20Permit,\n NonReentrant,\n EIP712\n{\n bool private _works;\n\n /**\n * @dev Mapping of all the addresse's balances.\n */\n mapping(address => uint256) private _balances;\n\n /**\n * @dev Mapping of all authorized operators, and capped amounts.\n */\n mapping(address => mapping(address => uint256)) private _allowances;\n\n /**\n * @dev Total number of token in circulation.\n */\n uint256 private _totalSupply;\n\n /**\n * @dev Token name.\n */\n string private _name;\n\n /**\n * @dev Token ticker symbol.\n */\n string private _symbol;\n\n /**\n * @dev Token number of decimal places.\n */\n uint8 private _decimals;\n\n /**\n * @dev List of all supported ERC165 interfaces.\n */\n mapping(bytes4 => bool) private _supportedInterfaces;\n\n /**\n * @dev List of used up nonces. Used in the ERC20Permit interface functionality.\n */\n mapping(address => uint256) private _nonces;\n\n /**\n * @dev Constructor does not accept any parameters.\n */\n constructor(\n string memory contractName,\n string memory contractSymbol,\n uint8 contractDecimals,\n string memory domainSeperator,\n string memory domainVersion\n ) {\n _works = true;\n _name = contractName;\n _symbol = contractSymbol;\n _decimals = contractDecimals;\n\n // ERC165\n _supportedInterfaces[ERC165.supportsInterface.selector] = true;\n\n // ERC20\n _supportedInterfaces[ERC20.allowance.selector] = true;\n _supportedInterfaces[ERC20.approve.selector] = true;\n _supportedInterfaces[ERC20.balanceOf.selector] = true;\n _supportedInterfaces[ERC20.totalSupply.selector] = true;\n _supportedInterfaces[ERC20.transfer.selector] = true;\n _supportedInterfaces[ERC20.transferFrom.selector] = true;\n _supportedInterfaces[\n ERC20.allowance.selector ^\n ERC20.approve.selector ^\n ERC20.balanceOf.selector ^\n ERC20.totalSupply.selector ^\n ERC20.transfer.selector ^\n ERC20.transferFrom.selector\n ] = true;\n\n // ERC20Metadata\n _supportedInterfaces[ERC20Metadata.name.selector] = true;\n _supportedInterfaces[ERC20Metadata.symbol.selector] = true;\n _supportedInterfaces[ERC20Metadata.decimals.selector] = true;\n _supportedInterfaces[\n ERC20Metadata.name.selector ^ ERC20Metadata.symbol.selector ^ ERC20Metadata.decimals.selector\n ] = true;\n\n // ERC20Burnable\n _supportedInterfaces[ERC20Burnable.burn.selector] = true;\n _supportedInterfaces[ERC20Burnable.burnFrom.selector] = true;\n _supportedInterfaces[ERC20Burnable.burn.selector ^ ERC20Burnable.burnFrom.selector] = true;\n\n // ERC20Safer\n // bytes4(keccak256(abi.encodePacked('safeTransfer(address,uint256)'))) == 0x423f6cef\n _supportedInterfaces[0x423f6cef] = true;\n // bytes4(keccak256(abi.encodePacked('safeTransfer(address,uint256,bytes)'))) == 0xeb795549\n _supportedInterfaces[0xeb795549] = true;\n // bytes4(keccak256(abi.encodePacked('safeTransferFrom(address,address,uint256)'))) == 0x42842e0e\n _supportedInterfaces[0x42842e0e] = true;\n // bytes4(keccak256(abi.encodePacked('safeTransferFrom(address,address,uint256,bytes)'))) == 0xb88d4fde\n _supportedInterfaces[0xb88d4fde] = true;\n _supportedInterfaces[bytes4(0x423f6cef) ^ bytes4(0xeb795549) ^ bytes4(0x42842e0e) ^ bytes4(0xb88d4fde)] = true;\n\n // ERC20Receiver\n _supportedInterfaces[ERC20Receiver.onERC20Received.selector] = true;\n\n // ERC20Permit\n _supportedInterfaces[ERC20Permit.permit.selector] = true;\n _supportedInterfaces[ERC20Permit.nonces.selector] = true;\n _supportedInterfaces[ERC20Permit.DOMAIN_SEPARATOR.selector] = true;\n _supportedInterfaces[\n ERC20Permit.permit.selector ^ ERC20Permit.nonces.selector ^ ERC20Permit.DOMAIN_SEPARATOR.selector\n ] = true;\n _eip712_init(domainSeperator, domainVersion);\n }\n\n function toggleWorks(bool active) external {\n _works = active;\n }\n\n function transferTokens(address payable token, address to, uint256 amount) external {\n ERC20(token).transfer(to, amount);\n }\n\n /**\n * @dev Purposefully left empty, to prevent running out of gas errors when receiving native token payments.\n */\n receive() external payable {}\n\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n /**\n * @dev Although EIP-165 is not required for ERC20 contracts, we still decided to implement it.\n *\n * This makes it easier for external smart contracts to easily identify a valid ERC20 token contract.\n */\n function supportsInterface(bytes4 interfaceId) public view returns (bool) {\n return _supportedInterfaces[interfaceId];\n }\n\n function allowance(address account, address spender) public view returns (uint256) {\n return _allowances[account][spender];\n }\n\n function balanceOf(address account) public view returns (uint256) {\n return _balances[account];\n }\n\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() public view returns (bytes32) {\n return _domainSeparatorV4();\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function nonces(address account) public view returns (uint256) {\n return _nonces[account];\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function totalSupply() public view returns (uint256) {\n return _totalSupply;\n }\n\n function approve(address spender, uint256 amount) public returns (bool) {\n _approve(msg.sender, spender, amount);\n return true;\n }\n\n function burn(uint256 amount) public {\n _burn(msg.sender, amount);\n }\n\n function burnFrom(address account, uint256 amount) public returns (bool) {\n uint256 currentAllowance = _allowances[account][msg.sender];\n require(currentAllowance >= amount, \"ERC20: amount exceeds allowance\");\n unchecked {\n _allowances[account][msg.sender] = currentAllowance - amount;\n }\n _burn(account, amount);\n return true;\n }\n\n function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {\n uint256 currentAllowance = _allowances[msg.sender][spender];\n require(currentAllowance >= subtractedValue, \"ERC20: decreased below zero\");\n uint256 newAllowance;\n unchecked {\n newAllowance = currentAllowance - subtractedValue;\n }\n _approve(msg.sender, spender, newAllowance);\n return true;\n }\n\n function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {\n uint256 currentAllowance = _allowances[msg.sender][spender];\n uint256 newAllowance;\n unchecked {\n newAllowance = currentAllowance + addedValue;\n }\n unchecked {\n require(newAllowance >= currentAllowance, \"ERC20: increased above max value\");\n }\n _approve(msg.sender, spender, newAllowance);\n return true;\n }\n\n function mint(address account, uint256 amount) external {\n _mint(account, amount);\n }\n\n function onERC20Received(\n address account,\n address /* sender*/,\n uint256 amount,\n bytes calldata /* data*/\n ) public returns (bytes4) {\n assembly {\n // used to drop \"change function to view\" compiler warning\n sstore(0x17fb676f92438402d8ef92193dd096c59ee1f4ba1bb57f67f3e6d2eef8aeed5e, amount)\n }\n if (_works) {\n require(_isContract(account), \"ERC20: operator not contract\");\n try ERC20(account).balanceOf(address(this)) returns (uint256 balance) {\n require(balance >= amount, \"ERC20: balance check failed\");\n } catch {\n revert(\"ERC20: failed getting balance\");\n }\n return ERC20Receiver.onERC20Received.selector;\n } else {\n return 0x00000000;\n }\n }\n\n function permit(\n address account,\n address spender,\n uint256 amount,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) public {\n require(block.timestamp <= deadline, \"ERC20: expired deadline\");\n // keccak256(\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\")\n // == 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9\n bytes32 structHash = keccak256(\n abi.encode(\n 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9,\n account,\n spender,\n amount,\n _useNonce(account),\n deadline\n )\n );\n bytes32 hash = _hashTypedDataV4(structHash);\n address signer = ECDSA.recover(hash, v, r, s);\n require(signer == account, \"ERC20: invalid signature\");\n _approve(account, spender, amount);\n }\n\n function safeTransfer(address recipient, uint256 amount) public returns (bool) {\n return safeTransfer(recipient, amount, \"\");\n }\n\n function safeTransfer(address recipient, uint256 amount, bytes memory data) public returns (bool) {\n _transfer(msg.sender, recipient, amount);\n require(_checkOnERC20Received(msg.sender, recipient, amount, data), \"ERC20: non ERC20Receiver\");\n return true;\n }\n\n function safeTransferFrom(address account, address recipient, uint256 amount) public returns (bool) {\n return safeTransferFrom(account, recipient, amount, \"\");\n }\n\n function safeTransferFrom(\n address account,\n address recipient,\n uint256 amount,\n bytes memory data\n ) public returns (bool) {\n if (account != msg.sender) {\n uint256 currentAllowance = _allowances[account][msg.sender];\n require(currentAllowance >= amount, \"ERC20: amount exceeds allowance\");\n unchecked {\n _allowances[account][msg.sender] = currentAllowance - amount;\n }\n }\n _transfer(account, recipient, amount);\n require(_checkOnERC20Received(account, recipient, amount, data), \"ERC20: non ERC20Receiver\");\n return true;\n }\n\n function transfer(address recipient, uint256 amount) public returns (bool) {\n _transfer(msg.sender, recipient, amount);\n return true;\n }\n\n function transferFrom(address account, address recipient, uint256 amount) public returns (bool) {\n if (account != msg.sender) {\n uint256 currentAllowance = _allowances[account][msg.sender];\n require(currentAllowance >= amount, \"ERC20: amount exceeds allowance\");\n unchecked {\n _allowances[account][msg.sender] = currentAllowance - amount;\n }\n }\n _transfer(account, recipient, amount);\n return true;\n }\n\n function _approve(address account, address spender, uint256 amount) internal {\n require(account != address(0), \"ERC20: account is zero address\");\n require(spender != address(0), \"ERC20: spender is zero address\");\n _allowances[account][spender] = amount;\n emit Approval(account, spender, amount);\n }\n\n function _burn(address account, uint256 amount) internal {\n require(account != address(0), \"ERC20: account is zero address\");\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n }\n _totalSupply -= amount;\n emit Transfer(account, address(0), amount);\n }\n\n function _checkOnERC20Received(\n address account,\n address recipient,\n uint256 amount,\n bytes memory data\n ) internal nonReentrant returns (bool) {\n if (_isContract(recipient)) {\n try ERC165(recipient).supportsInterface(0x01ffc9a7) returns (bool erc165support) {\n require(erc165support, \"ERC20: no ERC165 support\");\n // we have erc165 support\n if (ERC165(recipient).supportsInterface(0x534f5876)) {\n // we have eip-4524 support\n try ERC20Receiver(recipient).onERC20Received(msg.sender, account, amount, data) returns (bytes4 retval) {\n return retval == ERC20Receiver.onERC20Received.selector;\n } catch (bytes memory reason) {\n if (reason.length == 0) {\n revert(\"ERC20: non ERC20Receiver\");\n } else {\n assembly {\n revert(add(32, reason), mload(reason))\n }\n }\n }\n } else {\n revert(\"ERC20: eip-4524 not supported\");\n }\n } catch (bytes memory reason) {\n if (reason.length == 0) {\n revert(\"ERC20: no ERC165 support\");\n } else {\n assembly {\n revert(add(32, reason), mload(reason))\n }\n }\n }\n } else {\n return true;\n }\n }\n\n /**\n * @notice Mints tokens.\n * @dev Mint a specific amount of tokens to a specific address.\n * @param to Address to mint to.\n * @param amount Amount of tokens to mint.\n */\n function _mint(address to, uint256 amount) internal {\n require(to != address(0), \"ERC20: minting to burn address\");\n _totalSupply += amount;\n _balances[to] += amount;\n emit Transfer(address(0), to, amount);\n }\n\n function _transfer(address account, address recipient, uint256 amount) internal {\n require(account != address(0), \"ERC20: account is zero address\");\n require(recipient != address(0), \"ERC20: recipient is zero address\");\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n }\n _balances[recipient] += amount;\n emit Transfer(account, recipient, amount);\n }\n\n /**\n * @dev \"Consume a nonce\": return the current value and increment.\n *\n * _Available since v4.1._\n */\n function _useNonce(address account) internal returns (uint256 current) {\n current = _nonces[account];\n _nonces[account]++;\n }\n\n function _isContract(address contractAddress) private view returns (bool) {\n bytes32 codehash;\n assembly {\n codehash := extcodehash(contractAddress)\n }\n return (codehash != 0x0 && codehash != 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470);\n }\n}\n" + }, + "contracts/mock/LZEndpointMock.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../interface/LayerZeroReceiverInterface.sol\";\nimport \"../interface/LayerZeroEndpointInterface.sol\";\n\n/**\nmocking multi endpoint connection.\n- send() will short circuit to lzReceive() directly\n- no reentrancy guard. the real LayerZero endpoint on main net has a send and receive guard, respectively.\nif we run a ping-pong-like application, the recursive call might use all gas limit in the block.\n- not using any messaging library, hence all messaging library func, e.g. estimateFees, version, will not work\n*/\ncontract LZEndpointMock is LayerZeroEndpointInterface {\n mapping(address => address) public lzEndpointLookup;\n\n uint16 public mockChainId;\n address payable public mockOracle;\n address payable public mockRelayer;\n uint256 public mockBlockConfirmations;\n uint16 public mockLibraryVersion;\n uint256 public mockStaticNativeFee;\n uint16 public mockLayerZeroVersion;\n uint256 public nativeFee;\n uint256 public zroFee;\n bool nextMsgBLocked;\n\n struct StoredPayload {\n uint64 payloadLength;\n address dstAddress;\n bytes32 payloadHash;\n }\n\n struct QueuedPayload {\n address dstAddress;\n uint64 nonce;\n bytes payload;\n }\n\n // inboundNonce = [srcChainId][srcAddress].\n mapping(uint16 => mapping(bytes => uint64)) public inboundNonce;\n // outboundNonce = [dstChainId][srcAddress].\n mapping(uint16 => mapping(address => uint64)) public outboundNonce;\n // storedPayload = [srcChainId][srcAddress]\n mapping(uint16 => mapping(bytes => StoredPayload)) public storedPayload;\n // msgToDeliver = [srcChainId][srcAddress]\n mapping(uint16 => mapping(bytes => QueuedPayload[])) public msgsToDeliver;\n\n event UaForceResumeReceive(uint16 chainId, bytes srcAddress);\n event PayloadCleared(uint16 srcChainId, bytes srcAddress, uint64 nonce, address dstAddress);\n event PayloadStored(\n uint16 srcChainId,\n bytes srcAddress,\n address dstAddress,\n uint64 nonce,\n bytes payload,\n bytes reason\n );\n\n constructor(uint16 _chainId) {\n mockStaticNativeFee = 42;\n mockLayerZeroVersion = 1;\n mockChainId = _chainId;\n }\n\n // mock helper to set the value returned by `estimateNativeFees`\n function setEstimatedFees(uint256 _nativeFee, uint256 _zroFee) public {\n nativeFee = _nativeFee;\n zroFee = _zroFee;\n }\n\n function getChainId() external view override returns (uint16) {\n return mockChainId;\n }\n\n function setDestLzEndpoint(address destAddr, address lzEndpointAddr) external {\n lzEndpointLookup[destAddr] = lzEndpointAddr;\n }\n\n function send(\n uint16 _chainId,\n bytes calldata _destination,\n bytes calldata _payload,\n address payable, // _refundAddress\n address, // _zroPaymentAddress\n bytes memory _adapterParams\n ) external payable override {\n address destAddr = packedBytesToAddr(_destination);\n address lzEndpoint = lzEndpointLookup[destAddr];\n\n require(lzEndpoint != address(0), \"LayerZeroMock: destination LayerZero Endpoint not found\");\n\n uint64 nonce;\n {\n nonce = ++outboundNonce[_chainId][msg.sender];\n }\n\n // Mock the relayer paying the dstNativeAddr the amount of extra native token\n {\n uint256 extraGas;\n uint256 dstNative;\n address dstNativeAddr;\n assembly {\n extraGas := mload(add(_adapterParams, 34))\n dstNative := mload(add(_adapterParams, 66))\n dstNativeAddr := mload(add(_adapterParams, 86))\n }\n\n // to simulate actually sending the ether, add a transfer call and ensure the LZEndpointMock contract has an ether balance\n }\n\n bytes memory bytesSourceUserApplicationAddr = addrToPackedBytes(address(msg.sender)); // cast this address to bytes\n\n // not using the extra gas parameter because this is a single tx call, not split between different chains\n // LZEndpointMock(lzEndpoint).receivePayload(mockChainId, bytesSourceUserApplicationAddr, destAddr, nonce, extraGas, _payload);\n LZEndpointMock(lzEndpoint).receivePayload(\n mockChainId,\n bytesSourceUserApplicationAddr,\n destAddr,\n nonce,\n 0,\n _payload\n );\n }\n\n function receivePayload(\n uint16 _srcChainId,\n bytes calldata _srcAddress,\n address _dstAddress,\n uint64 _nonce,\n uint256 /*_gasLimit*/,\n bytes calldata _payload\n ) external override {\n StoredPayload storage sp = storedPayload[_srcChainId][_srcAddress];\n\n // assert and increment the nonce. no message shuffling\n require(_nonce == ++inboundNonce[_srcChainId][_srcAddress], \"LayerZero: wrong nonce\");\n\n // queue the following msgs inside of a stack to simulate a successful send on src, but not fully delivered on dst\n if (sp.payloadHash != bytes32(0)) {\n QueuedPayload[] storage msgs = msgsToDeliver[_srcChainId][_srcAddress];\n QueuedPayload memory newMsg = QueuedPayload(_dstAddress, _nonce, _payload);\n\n // warning, might run into gas issues trying to forward through a bunch of queued msgs\n // shift all the msgs over so we can treat this like a fifo via array.pop()\n if (msgs.length > 0) {\n // extend the array\n msgs.push(newMsg);\n\n // shift all the indexes up for pop()\n for (uint256 i = 0; i < msgs.length - 1; i++) {\n msgs[i + 1] = msgs[i];\n }\n\n // put the newMsg at the bottom of the stack\n msgs[0] = newMsg;\n } else {\n msgs.push(newMsg);\n }\n } else if (nextMsgBLocked) {\n storedPayload[_srcChainId][_srcAddress] = StoredPayload(\n uint64(_payload.length),\n _dstAddress,\n keccak256(_payload)\n );\n emit PayloadStored(_srcChainId, _srcAddress, _dstAddress, _nonce, _payload, bytes(\"\"));\n // ensure the next msgs that go through are no longer blocked\n nextMsgBLocked = false;\n } else {\n // we ignore the gas limit because this call is made in one tx due to being \"same chain\"\n // LayerZeroReceiverInterface(_dstAddress).lzReceive{gas: _gasLimit}(_srcChainId, _srcAddress, _nonce, _payload); // invoke lzReceive\n LayerZeroReceiverInterface(_dstAddress).lzReceive(_srcChainId, _srcAddress, _nonce, _payload); // invoke lzReceive\n }\n }\n\n // used to simulate messages received get stored as a payload\n function blockNextMsg() external {\n nextMsgBLocked = true;\n }\n\n function getLengthOfQueue(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (uint256) {\n return msgsToDeliver[_srcChainId][_srcAddress].length;\n }\n\n // @notice gets a quote in source native gas, for the amount that send() requires to pay for message delivery\n // @param _dstChainId - the destination chain identifier\n // @param _userApplication - the user app address on this EVM chain\n // @param _payload - the custom message to send over LayerZero\n // @param _payInZRO - if false, user app pays the protocol fee in native token\n // @param _adapterParam - parameters for the adapter service, e.g. send some dust native token to dstChain\n function estimateFees(\n uint16,\n address,\n bytes memory,\n bool,\n bytes memory\n ) external view override returns (uint256 _nativeFee, uint256 _zroFee) {\n _nativeFee = nativeFee;\n _zroFee = zroFee;\n }\n\n // give 20 bytes, return the decoded address\n function packedBytesToAddr(bytes calldata _b) public pure returns (address) {\n address addr;\n assembly {\n let ptr := mload(0x40)\n calldatacopy(ptr, sub(_b.offset, 2), add(_b.length, 2))\n addr := mload(sub(ptr, 10))\n }\n return addr;\n }\n\n // given an address, return the 20 bytes\n function addrToPackedBytes(address _a) public pure returns (bytes memory) {\n bytes memory data = abi.encodePacked(_a);\n return data;\n }\n\n function setConfig(\n uint16 /*_version*/,\n uint16 /*_chainId*/,\n uint256 /*_configType*/,\n bytes memory /*_config*/\n ) external override {}\n\n function getConfig(\n uint16 /*_version*/,\n uint16 /*_chainId*/,\n address /*_ua*/,\n uint256 /*_configType*/\n ) external pure override returns (bytes memory) {\n return \"\";\n }\n\n function setSendVersion(uint16 /*version*/) external override {}\n\n function setReceiveVersion(uint16 /*version*/) external override {}\n\n function getSendVersion(address /*_userApplication*/) external pure override returns (uint16) {\n return 1;\n }\n\n function getReceiveVersion(address /*_userApplication*/) external pure override returns (uint16) {\n return 1;\n }\n\n function getInboundNonce(uint16 _chainID, bytes calldata _srcAddress) external view override returns (uint64) {\n return inboundNonce[_chainID][_srcAddress];\n }\n\n function getOutboundNonce(uint16 _chainID, address _srcAddress) external view override returns (uint64) {\n return outboundNonce[_chainID][_srcAddress];\n }\n\n // simulates the relayer pushing through the rest of the msgs that got delayed due to the stored payload\n function _clearMsgQue(uint16 _srcChainId, bytes calldata _srcAddress) internal {\n QueuedPayload[] storage msgs = msgsToDeliver[_srcChainId][_srcAddress];\n\n // warning, might run into gas issues trying to forward through a bunch of queued msgs\n while (msgs.length > 0) {\n QueuedPayload memory payload = msgs[msgs.length - 1];\n LayerZeroReceiverInterface(payload.dstAddress).lzReceive(\n _srcChainId,\n _srcAddress,\n payload.nonce,\n payload.payload\n );\n msgs.pop();\n }\n }\n\n function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external override {\n StoredPayload storage sp = storedPayload[_srcChainId][_srcAddress];\n // revert if no messages are cached. safeguard malicious UA behaviour\n require(sp.payloadHash != bytes32(0), \"LayerZero: no stored payload\");\n require(sp.dstAddress == msg.sender, \"LayerZero: invalid caller\");\n\n // empty the storedPayload\n sp.payloadLength = 0;\n sp.dstAddress = address(0);\n sp.payloadHash = bytes32(0);\n\n emit UaForceResumeReceive(_srcChainId, _srcAddress);\n\n // resume the receiving of msgs after we force clear the \"stuck\" msg\n _clearMsgQue(_srcChainId, _srcAddress);\n }\n\n function retryPayload(uint16 _srcChainId, bytes calldata _srcAddress, bytes calldata _payload) external override {\n StoredPayload storage sp = storedPayload[_srcChainId][_srcAddress];\n require(sp.payloadHash != bytes32(0), \"LayerZero: no stored payload\");\n require(_payload.length == sp.payloadLength && keccak256(_payload) == sp.payloadHash, \"LayerZero: invalid payload\");\n\n address dstAddress = sp.dstAddress;\n // empty the storedPayload\n sp.payloadLength = 0;\n sp.dstAddress = address(0);\n sp.payloadHash = bytes32(0);\n\n uint64 nonce = inboundNonce[_srcChainId][_srcAddress];\n\n LayerZeroReceiverInterface(dstAddress).lzReceive(_srcChainId, _srcAddress, nonce, _payload);\n emit PayloadCleared(_srcChainId, _srcAddress, nonce, dstAddress);\n }\n\n function hasStoredPayload(uint16 _srcChainId, bytes calldata _srcAddress) external view override returns (bool) {\n StoredPayload storage sp = storedPayload[_srcChainId][_srcAddress];\n return sp.payloadHash != bytes32(0);\n }\n\n function isSendingPayload() external pure override returns (bool) {\n return false;\n }\n\n function isReceivingPayload() external pure override returns (bool) {\n return false;\n }\n\n function getSendLibraryAddress(address) external view override returns (address) {\n return address(this);\n }\n\n function getReceiveLibraryAddress(address) external view override returns (address) {\n return address(this);\n }\n}\n" + }, + "contracts/mock/Mock.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Initializable.sol\";\nimport \"../abstract/Owner.sol\";\n\nimport \"../interface/InitializableInterface.sol\";\n\ncontract Mock is Initializable, Owner {\n constructor() {}\n\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"MOCK: already initialized\");\n bytes32 arbitraryData = abi.decode(initPayload, (bytes32));\n bool shouldFail = false;\n assembly {\n // we leave slot 0 available for fallback calls\n sstore(0x01, arbitraryData)\n switch arbitraryData\n case 0 {\n shouldFail := 0x01\n }\n sstore(_ownerSlot, caller())\n }\n _setInitialized();\n if (shouldFail) {\n return bytes4(0x12345678);\n } else {\n return InitializableInterface.init.selector;\n }\n }\n\n function getStorage(uint256 slot) public view returns (bytes32 data) {\n assembly {\n data := sload(slot)\n }\n }\n\n function setStorage(uint256 slot, bytes32 data) public {\n assembly {\n sstore(slot, data)\n }\n }\n\n function mockCall(address target, bytes calldata data) public payable {\n assembly {\n calldatacopy(0, data.offset, data.length)\n let result := call(gas(), target, callvalue(), 0, data.length, 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n function mockStaticCall(address target, bytes calldata data) public view returns (bytes memory) {\n assembly {\n calldatacopy(0, data.offset, data.length)\n let result := staticcall(gas(), target, 0, data.length, 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n function mockDelegateCall(address target, bytes calldata data) public returns (bytes memory) {\n assembly {\n calldatacopy(0, data.offset, data.length)\n let result := delegatecall(gas(), target, 0, data.length, 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n receive() external payable {}\n\n fallback() external payable {\n assembly {\n calldatacopy(0, 0, calldatasize())\n let result := call(gas(), sload(0), callvalue(), 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/mock/MockERC721Receiver.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../interface/ERC721.sol\";\nimport \"../interface/ERC165.sol\";\nimport \"../interface/ERC721TokenReceiver.sol\";\n\ncontract MockERC721Receiver is ERC165, ERC721TokenReceiver {\n bool private _works;\n\n constructor() {\n _works = true;\n }\n\n function toggleWorks(bool active) external {\n _works = active;\n }\n\n function supportsInterface(bytes4 interfaceID) external pure returns (bool) {\n if (interfaceID == 0x01ffc9a7 || interfaceID == 0x150b7a02) {\n return true;\n } else {\n return false;\n }\n }\n\n function onERC721Received(\n address /*operator*/,\n address /*from*/,\n uint256 /*tokenId*/,\n bytes calldata /*data*/\n ) external view returns (bytes4) {\n if (_works) {\n return 0x150b7a02;\n } else {\n return 0x00000000;\n }\n }\n\n function transferNFT(address payable token, uint256 tokenId, address to) external {\n ERC721(token).safeTransferFrom(address(this), to, tokenId);\n }\n}\n" + }, + "contracts/mock/MockExternalCall.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\ncontract MockExternalCall {\n function callExternalFn(address contractAddress, bytes calldata encodedSignature) public {\n (bool success, ) = address(contractAddress).call(encodedSignature);\n require(success, \"Failed\");\n }\n}\n" + }, + "contracts/mock/MockHolographChild.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../Holograph.sol\";\n\ncontract MockHolographChild is Holograph {\n constructor() {}\n\n function emptyFunction() external pure returns (string memory) {\n return \"on purpose to remove verification conflict\";\n }\n}\n" + }, + "contracts/mock/MockHolographGenesisChild.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../HolographGenesis.sol\";\n\ncontract MockHolographGenesisChild is HolographGenesis {\n constructor() {}\n\n function approveDeployerMock(address newDeployer, bool approve) external onlyDeployer {\n return this.approveDeployer(newDeployer, approve);\n }\n\n function isApprovedDeployerMock(address deployer) external view returns (bool) {\n return this.isApprovedDeployer(deployer);\n }\n}\n" + }, + "contracts/mock/MockLZEndpoint.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\n\nimport \"../interface/HolographOperatorInterface.sol\";\nimport \"../interface/LayerZeroOverrides.sol\";\n\ncontract MockLZEndpoint is Admin {\n event LzEvent(uint16 _dstChainId, bytes _destination, bytes _payload);\n\n constructor() {\n assembly {\n sstore(_adminSlot, origin())\n }\n }\n\n function send(\n uint16 _dstChainId,\n bytes calldata _destination,\n bytes calldata _payload,\n address payable /* _refundAddress*/,\n address /* _zroPaymentAddress*/,\n bytes calldata /* _adapterParams*/\n ) external payable {\n // we really don't care about anything and just emit an event that we can leverage for multichain replication\n emit LzEvent(_dstChainId, _destination, _payload);\n }\n\n function estimateFees(\n uint16,\n address,\n bytes calldata,\n bool,\n bytes calldata\n ) external pure returns (uint256 nativeFee, uint256 zroFee) {\n nativeFee = 10 ** 15;\n zroFee = 10 ** 7;\n }\n\n function defaultSendLibrary() external view returns (address) {\n return address(this);\n }\n\n function getAppConfig(uint16, address) external view returns (LayerZeroOverrides.ApplicationConfiguration memory) {\n return LayerZeroOverrides.ApplicationConfiguration(0, 0, address(this), 0, 0, address(this));\n }\n\n function dstPriceLookup(uint16) external pure returns (uint128 dstPriceRatio, uint128 dstGasPriceInWei) {\n dstPriceRatio = 10 ** 10;\n dstGasPriceInWei = 1000000000;\n }\n\n function dstConfigLookup(\n uint16,\n uint16\n ) external pure returns (uint128 dstNativeAmtCap, uint64 baseGas, uint64 gasPerByte) {\n dstNativeAmtCap = 10 ** 18;\n baseGas = 50000;\n gasPerByte = 25;\n }\n\n function crossChainMessage(address target, uint256 gasLimit, bytes calldata payload) external {\n HolographOperatorInterface(target).crossChainMessage{gas: gasLimit}(payload);\n }\n}\n" + }, + "contracts/module/LayerZeroModule.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\n\nimport \"../enum/ChainIdType.sol\";\n\nimport \"../interface/CrossChainMessageInterface.sol\";\nimport \"../interface/HolographOperatorInterface.sol\";\nimport \"../interface/InitializableInterface.sol\";\nimport \"../interface/HolographInterfacesInterface.sol\";\nimport \"../interface/LayerZeroModuleInterface.sol\";\nimport \"../interface/LayerZeroOverrides.sol\";\n\nimport \"../struct/GasParameters.sol\";\n\nimport \"./OVM_GasPriceOracle.sol\";\n\n/**\n * @title Holograph LayerZero Module\n * @author https://github.com/holographxyz\n * @notice Holograph module for enabling LayerZero cross-chain messaging\n * @dev This contract abstracts all of the LayerZero specific logic into an isolated module\n */\ncontract LayerZeroModule is Admin, Initializable, CrossChainMessageInterface, LayerZeroModuleInterface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.bridge')) - 1)\n */\n bytes32 constant _bridgeSlot = 0xeb87cbb21687feb327e3d58c6c16d552231d12c7a0e8115042a4165fac8a77f9;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.interfaces')) - 1)\n */\n bytes32 constant _interfacesSlot = 0xbd3084b8c09da87ad159c247a60e209784196be2530cecbbd8f337fdd1848827;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.lZEndpoint')) - 1)\n */\n bytes32 constant _lZEndpointSlot = 0x56825e447adf54cdde5f04815fcf9b1dd26ef9d5c053625147c18b7c13091686;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.operator')) - 1)\n */\n bytes32 constant _operatorSlot = 0x7caba557ad34138fa3b7e43fb574e0e6cc10481c3073e0dffbc560db81b5c60f;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.gasParameters')) - 1)\n */\n bytes32 constant _gasParametersSlot = 0x15eee82a0af3c04e4b65c3842105c973a6b0fb2a68728bf035809e13b38ce8cf;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.gasParameters')) - 1)\n */\n bytes32 constant _optimismGasPriceOracleSlot = 0x46043c284a96474ab4a54c741ea0d0fce54e98eea878b99d4b85808fa6f71a5f;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (\n address bridge,\n address interfaces,\n address operator,\n address optimismGasPriceOracle,\n uint32[] memory chainIds,\n GasParameters[] memory gasParameters\n ) = abi.decode(initPayload, (address, address, address, address, uint32[], GasParameters[]));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_bridgeSlot, bridge)\n sstore(_interfacesSlot, interfaces)\n sstore(_operatorSlot, operator)\n sstore(_optimismGasPriceOracleSlot, optimismGasPriceOracle)\n }\n require(chainIds.length == gasParameters.length, \"HOLOGRAPH: wrong array lengths\");\n for (uint256 i = 0; i < chainIds.length; i++) {\n _setGasParameters(chainIds[i], gasParameters[i]);\n }\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @notice Receive cross-chain message from LayerZero\n * @dev This function only allows calls from the configured LayerZero endpoint address\n */\n function lzReceive(\n uint16 /* _srcChainId*/,\n bytes calldata _srcAddress,\n uint64 /* _nonce*/,\n bytes calldata _payload\n ) external payable {\n assembly {\n /**\n * @dev check if msg.sender is LayerZero Endpoint\n */\n switch eq(sload(_lZEndpointSlot), caller())\n case 0 {\n /**\n * @dev this is the assembly version of -> revert(\"HOLOGRAPH: LZ only endpoint\");\n */\n mstore(0x80, 0x08c379a000000000000000000000000000000000000000000000000000000000)\n mstore(0xa0, 0x0000002000000000000000000000000000000000000000000000000000000000)\n mstore(0xc0, 0x0000001b484f4c4f47524150483a204c5a206f6e6c7920656e64706f696e7400)\n mstore(0xe0, 0x0000000000000000000000000000000000000000000000000000000000000000)\n revert(0x80, 0xc4)\n }\n let ptr := mload(0x40)\n calldatacopy(add(ptr, 0x0c), _srcAddress.offset, _srcAddress.length)\n /**\n * @dev check if LZ from address is same as address(this)\n */\n switch eq(mload(ptr), address())\n case 0 {\n /**\n * @dev this is the assembly version of -> revert(\"HOLOGRAPH: unauthorized sender\");\n */\n mstore(0x80, 0x08c379a000000000000000000000000000000000000000000000000000000000)\n mstore(0xa0, 0x0000002000000000000000000000000000000000000000000000000000000000)\n mstore(0xc0, 0x0000001e484f4c4f47524150483a20756e617574686f72697a65642073656e64)\n mstore(0xe0, 0x6572000000000000000000000000000000000000000000000000000000000000)\n revert(0x80, 0xc4)\n }\n }\n /**\n * @dev if validation has passed, submit payload to Holograph Operator for converting into an operator job\n */\n _operator().crossChainMessage(_payload);\n }\n\n /**\n * @dev Need to add an extra function to get LZ gas amount needed for their internal cross-chain message verification\n */\n function send(\n uint256 /* gasLimit*/,\n uint256 /* gasPrice*/,\n uint32 toChain,\n address msgSender,\n uint256 msgValue,\n bytes calldata crossChainPayload\n ) external payable {\n require(msg.sender == address(_operator()), \"HOLOGRAPH: operator only call\");\n LayerZeroOverrides lZEndpoint;\n assembly {\n lZEndpoint := sload(_lZEndpointSlot)\n }\n GasParameters memory gasParameters = _gasParameters(toChain);\n // need to recalculate the gas amounts for LZ to deliver message\n lZEndpoint.send{value: msgValue}(\n uint16(_interfaces().getChainId(ChainIdType.HOLOGRAPH, uint256(toChain), ChainIdType.LAYERZERO)),\n abi.encodePacked(address(this), address(this)),\n crossChainPayload,\n payable(msgSender),\n address(this),\n abi.encodePacked(\n uint16(1),\n uint256(gasParameters.msgBaseGas + (crossChainPayload.length * gasParameters.msgGasPerByte))\n )\n );\n }\n\n function getMessageFee(\n uint32 toChain,\n uint256 gasLimit,\n uint256 gasPrice,\n bytes calldata crossChainPayload\n ) external view returns (uint256 hlgFee, uint256 msgFee, uint256 dstGasPrice) {\n uint16 lzDestChain = uint16(\n _interfaces().getChainId(ChainIdType.HOLOGRAPH, uint256(toChain), ChainIdType.LAYERZERO)\n );\n LayerZeroOverrides lz;\n assembly {\n lz := sload(_lZEndpointSlot)\n }\n // convert holograph chain id to lz chain id\n (uint128 dstPriceRatio, uint128 dstGasPriceInWei) = _getPricing(lz, lzDestChain);\n if (gasPrice == 0) {\n gasPrice = dstGasPriceInWei;\n }\n GasParameters memory gasParameters = _gasParameters(toChain);\n require(gasPrice > gasParameters.minGasPrice, \"HOLOGRAPH: gas price too low\");\n bytes memory adapterParams = abi.encodePacked(\n uint16(1),\n uint256(gasParameters.msgBaseGas + (crossChainPayload.length * gasParameters.msgGasPerByte))\n );\n gasLimit = gasLimit + gasParameters.jobBaseGas + (crossChainPayload.length * gasParameters.jobGasPerByte);\n gasLimit = gasLimit + (gasLimit / 10);\n require(gasLimit < gasParameters.maxGasLimit, \"HOLOGRAPH: gas limit over max\");\n (uint256 nativeFee, ) = lz.estimateFees(lzDestChain, address(this), crossChainPayload, false, adapterParams);\n hlgFee = ((gasPrice * gasLimit) * dstPriceRatio) / (10 ** 20);\n /*\n * @dev toChain is a ChainIdType.HOLOGRAPH, which can be found at https://github.com/holographxyz/networks/blob/main/src/networks.ts\n * chainId 7 == optimism\n * chainId 4000000015 == optimismTestnetGoerli\n */\n if (toChain == uint32(7) || toChain == uint32(4000000015)) {\n hlgFee += (_optimismGasPriceOracle().getL1Fee(crossChainPayload) * dstPriceRatio) / (10 ** 20);\n }\n msgFee = nativeFee;\n dstGasPrice = (dstGasPriceInWei * dstPriceRatio) / (10 ** 20);\n }\n\n function getHlgFee(\n uint32 toChain,\n uint256 gasLimit,\n uint256 gasPrice,\n bytes calldata crossChainPayload\n ) external view returns (uint256 hlgFee) {\n LayerZeroOverrides lz;\n assembly {\n lz := sload(_lZEndpointSlot)\n }\n uint16 lzDestChain = uint16(\n _interfaces().getChainId(ChainIdType.HOLOGRAPH, uint256(toChain), ChainIdType.LAYERZERO)\n );\n (uint128 dstPriceRatio, uint128 dstGasPriceInWei) = _getPricing(lz, lzDestChain);\n if (gasPrice == 0) {\n gasPrice = dstGasPriceInWei;\n }\n GasParameters memory gasParameters = _gasParameters(toChain);\n require(gasPrice > gasParameters.minGasPrice, \"HOLOGRAPH: gas price too low\");\n gasLimit = gasLimit + gasParameters.jobBaseGas + (crossChainPayload.length * gasParameters.jobGasPerByte);\n gasLimit = gasLimit + (gasLimit / 10);\n require(gasLimit < gasParameters.maxGasLimit, \"HOLOGRAPH: gas limit over max\");\n hlgFee = ((gasPrice * gasLimit) * dstPriceRatio) / (10 ** 20);\n /*\n * @dev toChain is a ChainIdType.HOLOGRAPH, which can be found at https://github.com/holographxyz/networks/blob/main/src/networks.ts\n * chainId 7 == optimism\n * chainId 4000000015 == optimismTestnetGoerli\n */\n if (toChain == uint32(7) || toChain == uint32(4000000015)) {\n hlgFee += (_optimismGasPriceOracle().getL1Fee(crossChainPayload) * dstPriceRatio) / (10 ** 20);\n }\n }\n\n function _getPricing(\n LayerZeroOverrides lz,\n uint16 lzDestChain\n ) private view returns (uint128 dstPriceRatio, uint128 dstGasPriceInWei) {\n return\n LayerZeroOverrides(LayerZeroOverrides(lz.defaultSendLibrary()).getAppConfig(lzDestChain, address(this)).relayer)\n .dstPriceLookup(lzDestChain);\n }\n\n /**\n * @notice Get the address of the Holograph Bridge module\n * @dev Used for beaming holographable assets cross-chain\n */\n function getBridge() external view returns (address bridge) {\n assembly {\n bridge := sload(_bridgeSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Bridge module address\n * @param bridge address of the Holograph Bridge smart contract to use\n */\n function setBridge(address bridge) external onlyAdmin {\n assembly {\n sstore(_bridgeSlot, bridge)\n }\n }\n\n /**\n * @notice Get the address of the Holograph Interfaces module\n * @dev Holograph uses this contract to store data that needs to be accessed by a large portion of the modules\n */\n function getInterfaces() external view returns (address interfaces) {\n assembly {\n interfaces := sload(_interfacesSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Interfaces module address\n * @param interfaces address of the Holograph Interfaces smart contract to use\n */\n function setInterfaces(address interfaces) external onlyAdmin {\n assembly {\n sstore(_interfacesSlot, interfaces)\n }\n }\n\n /**\n * @notice Get the address of the approved LayerZero Endpoint\n * @dev All lzReceive function calls allow only requests from this address\n */\n function getLZEndpoint() external view returns (address lZEndpoint) {\n assembly {\n lZEndpoint := sload(_lZEndpointSlot)\n }\n }\n\n /**\n * @notice Update the approved LayerZero Endpoint address\n * @param lZEndpoint address of the LayerZero Endpoint to use\n */\n function setLZEndpoint(address lZEndpoint) external onlyAdmin {\n assembly {\n sstore(_lZEndpointSlot, lZEndpoint)\n }\n }\n\n /**\n * @notice Get the address of the Holograph Operator module\n * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module\n */\n function getOperator() external view returns (address operator) {\n assembly {\n operator := sload(_operatorSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Operator module address\n * @param operator address of the Holograph Operator smart contract to use\n */\n function setOperator(address operator) external onlyAdmin {\n assembly {\n sstore(_operatorSlot, operator)\n }\n }\n\n /**\n * @notice Get the address of the Optimism Gas Price Oracle module\n * @dev Allows to properly calculate the L1 security fee for Optimism bridge transactions\n */\n function getOptimismGasPriceOracle() external view returns (address optimismGasPriceOracle) {\n assembly {\n optimismGasPriceOracle := sload(_optimismGasPriceOracleSlot)\n }\n }\n\n /**\n * @notice Update the Optimism Gas Price Oracle module address\n * @param optimismGasPriceOracle address of the Optimism Gas Price Oracle smart contract to use\n */\n function setOptimismGasPriceOracle(address optimismGasPriceOracle) external onlyAdmin {\n assembly {\n sstore(_optimismGasPriceOracleSlot, optimismGasPriceOracle)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Bridge Interface\n */\n function _bridge() private view returns (address bridge) {\n assembly {\n bridge := sload(_bridgeSlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Interfaces Interface\n */\n function _interfaces() private view returns (HolographInterfacesInterface interfaces) {\n assembly {\n interfaces := sload(_interfacesSlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Operator Interface\n */\n function _operator() private view returns (HolographOperatorInterface operator) {\n assembly {\n operator := sload(_operatorSlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the Optimism Gas Price Oracle Interface\n */\n function _optimismGasPriceOracle() private view returns (OVM_GasPriceOracle optimismGasPriceOracle) {\n assembly {\n optimismGasPriceOracle := sload(_optimismGasPriceOracleSlot)\n }\n }\n\n /**\n * @dev Purposefully reverts to prevent having any type of ether transfered into the contract\n */\n receive() external payable {\n revert();\n }\n\n /**\n * @dev Purposefully reverts to prevent any calls to undefined functions\n */\n fallback() external payable {\n revert();\n }\n\n /**\n * @notice Get the default or chain-specific GasParameters\n * @param chainId the Holograph ChainId to get gas parameters for, set to 0 for default\n */\n function getGasParameters(uint32 chainId) external view returns (GasParameters memory gasParameters) {\n return _gasParameters(chainId);\n }\n\n /**\n * @notice Update the default or chain-specific GasParameters\n * @param chainId the Holograph ChainId to set gas parameters for, set to 0 for default\n * @param gasParameters struct of all the gas parameters to set\n */\n function setGasParameters(uint32 chainId, GasParameters memory gasParameters) external onlyAdmin {\n _setGasParameters(chainId, gasParameters);\n }\n\n /**\n * @notice Update the default or chain-specific GasParameters\n * @param chainIds array of Holograph ChainId to set gas parameters for\n * @param gasParameters array of all the gas parameters to set\n */\n function setGasParameters(uint32[] memory chainIds, GasParameters[] memory gasParameters) external onlyAdmin {\n require(chainIds.length == gasParameters.length, \"HOLOGRAPH: wrong array lengths\");\n for (uint256 i = 0; i < chainIds.length; i++) {\n _setGasParameters(chainIds[i], gasParameters[i]);\n }\n }\n\n /**\n * @notice Internal function for setting the default or chain-specific GasParameters\n * @param chainId the Holograph ChainId to set gas parameters for, set to 0 for default\n * @param gasParameters struct of all the gas parameters to set\n */\n function _setGasParameters(uint32 chainId, GasParameters memory gasParameters) private {\n bytes32 slot = chainId == 0 ? _gasParametersSlot : keccak256(abi.encode(chainId, _gasParametersSlot));\n assembly {\n let pos := gasParameters\n for {\n let i := 0\n } lt(i, 6) {\n i := add(i, 1)\n } {\n sstore(add(slot, i), mload(pos))\n pos := add(pos, 32)\n }\n }\n }\n\n /**\n * @dev Internal function used for getting the default or chain-specific GasParameters\n * @param chainId the Holograph ChainId to get gas parameters for, set to 0 for default\n */\n function _gasParameters(uint32 chainId) private view returns (GasParameters memory gasParameters) {\n bytes32 slot = chainId == 0 ? _gasParametersSlot : keccak256(abi.encode(chainId, _gasParametersSlot));\n assembly {\n let pos := gasParameters\n for {\n let i := 0\n } lt(i, 6) {\n i := add(i, 1)\n } {\n mstore(pos, sload(add(slot, i)))\n pos := add(pos, 32)\n }\n }\n }\n}\n" + }, + "contracts/module/OVM_GasPriceOracle.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\n\n/**\n * @title OVM_GasPriceOracle\n * @dev This contract exposes the current l2 gas price, a measure of how congested the network\n * currently is. This measure is used by the Sequencer to determine what fee to charge for\n * transactions. When the system is more congested, the l2 gas price will increase and fees\n * will also increase as a result.\n *\n * All public variables are set while generating the initial L2 state. The\n * constructor doesn't run in practice as the L2 state generation script uses\n * the deployed bytecode instead of running the initcode.\n */\ncontract OVM_GasPriceOracle is Admin, Initializable {\n // Current L2 gas price\n uint256 public gasPrice;\n // Current L1 base fee\n uint256 public l1BaseFee;\n // Amortized cost of batch submission per transaction\n uint256 public overhead;\n // Value to scale the fee up by\n uint256 public scalar;\n // Number of decimals of the scalar\n uint256 public decimals;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (uint256 _gasPrice, uint256 _l1BaseFee, uint256 _overhead, uint256 _scalar, uint256 _decimals) = abi.decode(\n initPayload,\n (uint256, uint256, uint256, uint256, uint256)\n );\n gasPrice = _gasPrice;\n l1BaseFee = _l1BaseFee;\n overhead = _overhead;\n scalar = _scalar;\n decimals = _decimals;\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n event GasPriceUpdated(uint256);\n event L1BaseFeeUpdated(uint256);\n event OverheadUpdated(uint256);\n event ScalarUpdated(uint256);\n event DecimalsUpdated(uint256);\n\n /**\n * Allows the owner to modify the l2 gas price.\n * @param _gasPrice New l2 gas price.\n */\n function setGasPrice(uint256 _gasPrice) external onlyAdmin {\n gasPrice = _gasPrice;\n emit GasPriceUpdated(_gasPrice);\n }\n\n /**\n * Allows the owner to modify the l1 base fee.\n * @param _baseFee New l1 base fee\n */\n function setL1BaseFee(uint256 _baseFee) external onlyAdmin {\n l1BaseFee = _baseFee;\n emit L1BaseFeeUpdated(_baseFee);\n }\n\n /**\n * Allows the owner to modify the overhead.\n * @param _overhead New overhead\n */\n function setOverhead(uint256 _overhead) external onlyAdmin {\n overhead = _overhead;\n emit OverheadUpdated(_overhead);\n }\n\n /**\n * Allows the owner to modify the scalar.\n * @param _scalar New scalar\n */\n function setScalar(uint256 _scalar) external onlyAdmin {\n scalar = _scalar;\n emit ScalarUpdated(_scalar);\n }\n\n /**\n * Allows the owner to modify the decimals.\n * @param _decimals New decimals\n */\n function setDecimals(uint256 _decimals) external onlyAdmin {\n decimals = _decimals;\n emit DecimalsUpdated(_decimals);\n }\n\n /**\n * Computes the L1 portion of the fee\n * based on the size of the RLP encoded tx\n * and the current l1BaseFee\n * @param _data Unsigned RLP encoded tx, 6 elements\n * @return L1 fee that should be paid for the tx\n */\n function getL1Fee(bytes memory _data) external view returns (uint256) {\n uint256 l1GasUsed = getL1GasUsed(_data);\n uint256 l1Fee = l1GasUsed * l1BaseFee;\n uint256 divisor = 10 ** decimals;\n uint256 unscaled = l1Fee * scalar;\n uint256 scaled = unscaled / divisor;\n return scaled;\n }\n\n /**\n * Computes the amount of L1 gas used for a transaction\n * The overhead represents the per batch gas overhead of\n * posting both transaction and state roots to L1 given larger\n * batch sizes.\n * 4 gas for 0 byte\n * https://github.com/ethereum/go-ethereum/blob/9ada4a2e2c415e6b0b51c50e901336872e028872/params/protocol_params.go#L33\n * 16 gas for non zero byte\n * https://github.com/ethereum/go-ethereum/blob/9ada4a2e2c415e6b0b51c50e901336872e028872/params/protocol_params.go#L87\n * This will need to be updated if calldata gas prices change\n * Account for the transaction being unsigned\n * Padding is added to account for lack of signature on transaction\n * 1 byte for RLP V prefix\n * 1 byte for V\n * 1 byte for RLP R prefix\n * 32 bytes for R\n * 1 byte for RLP S prefix\n * 32 bytes for S\n * Total: 68 bytes of padding\n * @param _data Unsigned RLP encoded tx, 6 elements\n * @return Amount of L1 gas used for a transaction\n */\n function getL1GasUsed(bytes memory _data) public view returns (uint256) {\n uint256 total = 0;\n for (uint256 i = 0; i < _data.length; i++) {\n if (_data[i] == 0) {\n total += 4;\n } else {\n total += 16;\n }\n }\n uint256 unsigned = total + overhead;\n return unsigned + (68 * 16);\n }\n}\n" + }, + "contracts/proxy/CxipERC721Proxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\n\nimport \"../interface/InitializableInterface.sol\";\nimport \"../interface/HolographRegistryInterface.sol\";\n\ncontract CxipERC721Proxy is Admin, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.contractType')) - 1)\n */\n bytes32 constant _contractTypeSlot = 0x0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c7;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\n */\n bytes32 constant _registrySlot = 0xce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7;\n\n constructor() {}\n\n function init(bytes memory data) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (bytes32 contractType, address registry, bytes memory initCode) = abi.decode(data, (bytes32, address, bytes));\n assembly {\n sstore(_contractTypeSlot, contractType)\n sstore(_registrySlot, registry)\n }\n (bool success, bytes memory returnData) = getCxipERC721Source().delegatecall(\n abi.encodeWithSignature(\"init(bytes)\", initCode)\n );\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == InitializableInterface.init.selector, \"initialization failed\");\n\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n function getCxipERC721Source() public view returns (address) {\n HolographRegistryInterface registry;\n bytes32 contractType;\n assembly {\n registry := sload(_registrySlot)\n contractType := sload(_contractTypeSlot)\n }\n return registry.getContractTypeAddress(contractType);\n }\n\n receive() external payable {}\n\n fallback() external payable {\n address cxipErc721Source = getCxipERC721Source();\n assembly {\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), cxipErc721Source, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/proxy/HolographBridgeProxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\n\nimport \"../interface/InitializableInterface.sol\";\n\ncontract HolographBridgeProxy is Admin, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.bridge')) - 1)\n */\n bytes32 constant _bridgeSlot = 0xeb87cbb21687feb327e3d58c6c16d552231d12c7a0e8115042a4165fac8a77f9;\n\n constructor() {}\n\n function init(bytes memory data) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address bridge, bytes memory initCode) = abi.decode(data, (address, bytes));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_bridgeSlot, bridge)\n }\n (bool success, bytes memory returnData) = bridge.delegatecall(abi.encodeWithSignature(\"init(bytes)\", initCode));\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == InitializableInterface.init.selector, \"initialization failed\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n function getBridge() external view returns (address bridge) {\n assembly {\n bridge := sload(_bridgeSlot)\n }\n }\n\n function setBridge(address bridge) external onlyAdmin {\n assembly {\n sstore(_bridgeSlot, bridge)\n }\n }\n\n receive() external payable {}\n\n fallback() external payable {\n assembly {\n let bridge := sload(_bridgeSlot)\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), bridge, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/proxy/HolographFactoryProxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\n\nimport \"../interface/InitializableInterface.sol\";\n\ncontract HolographFactoryProxy is Admin, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.factory')) - 1)\n */\n bytes32 constant _factorySlot = 0xa49f20855ba576e09d13c8041c8039fa655356ea27f6c40f1ec46a4301cd5b23;\n\n constructor() {}\n\n function init(bytes memory data) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address factory, bytes memory initCode) = abi.decode(data, (address, bytes));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_factorySlot, factory)\n }\n (bool success, bytes memory returnData) = factory.delegatecall(abi.encodeWithSignature(\"init(bytes)\", initCode));\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == InitializableInterface.init.selector, \"initialization failed\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n function getFactory() external view returns (address factory) {\n assembly {\n factory := sload(_factorySlot)\n }\n }\n\n function setFactory(address factory) external onlyAdmin {\n assembly {\n sstore(_factorySlot, factory)\n }\n }\n\n receive() external payable {}\n\n fallback() external payable {\n assembly {\n let factory := sload(_factorySlot)\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), factory, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/proxy/HolographOperatorProxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\n\nimport \"../interface/InitializableInterface.sol\";\n\ncontract HolographOperatorProxy is Admin, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.operator')) - 1)\n */\n bytes32 constant _operatorSlot = 0x7caba557ad34138fa3b7e43fb574e0e6cc10481c3073e0dffbc560db81b5c60f;\n\n constructor() {}\n\n function init(bytes memory data) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address operator, bytes memory initCode) = abi.decode(data, (address, bytes));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_operatorSlot, operator)\n }\n (bool success, bytes memory returnData) = operator.delegatecall(abi.encodeWithSignature(\"init(bytes)\", initCode));\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == InitializableInterface.init.selector, \"initialization failed\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n function getOperator() external view returns (address operator) {\n assembly {\n operator := sload(_operatorSlot)\n }\n }\n\n function setOperator(address operator) external onlyAdmin {\n assembly {\n sstore(_operatorSlot, operator)\n }\n }\n\n receive() external payable {}\n\n fallback() external payable {\n assembly {\n let operator := sload(_operatorSlot)\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), operator, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/proxy/HolographRegistryProxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\n\nimport \"../interface/InitializableInterface.sol\";\n\ncontract HolographRegistryProxy is Admin, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\n */\n bytes32 constant _registrySlot = 0xce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7;\n\n constructor() {}\n\n function init(bytes memory data) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address registry, bytes memory initCode) = abi.decode(data, (address, bytes));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_registrySlot, registry)\n }\n (bool success, bytes memory returnData) = registry.delegatecall(abi.encodeWithSignature(\"init(bytes)\", initCode));\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == InitializableInterface.init.selector, \"initialization failed\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n function getRegistry() external view returns (address registry) {\n assembly {\n registry := sload(_registrySlot)\n }\n }\n\n function setRegistry(address registry) external onlyAdmin {\n assembly {\n sstore(_registrySlot, registry)\n }\n }\n\n receive() external payable {}\n\n fallback() external payable {\n assembly {\n let registry := sload(_registrySlot)\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), registry, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/proxy/HolographTreasuryProxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\n\nimport \"../interface/InitializableInterface.sol\";\n\ncontract HolographTreasuryProxy is Admin, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.treasury')) - 1)\n */\n bytes32 constant _treasurySlot = 0x4215e7a38d75164ca078bbd61d0992cdeb1ba16f3b3ead5944966d3e4080e8b6;\n\n constructor() {}\n\n function init(bytes memory data) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address treasury, bytes memory initCode) = abi.decode(data, (address, bytes));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_treasurySlot, treasury)\n }\n (bool success, bytes memory returnData) = treasury.delegatecall(abi.encodeWithSignature(\"init(bytes)\", initCode));\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == InitializableInterface.init.selector, \"initialization failed\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n function getTreasury() external view returns (address treasury) {\n assembly {\n treasury := sload(_treasurySlot)\n }\n }\n\n function setTreasury(address treasury) external onlyAdmin {\n assembly {\n sstore(_treasurySlot, treasury)\n }\n }\n\n receive() external payable {}\n\n fallback() external payable {\n assembly {\n let treasury := sload(_treasurySlot)\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), treasury, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/struct/BridgeSettings.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nstruct BridgeSettings {\n uint256 value;\n uint256 gasLimit;\n uint256 gasPrice;\n uint32 toChain;\n}\n" + }, + "contracts/struct/DeploymentConfig.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nstruct DeploymentConfig {\n bytes32 contractType;\n uint32 chainType;\n bytes32 salt;\n bytes byteCode;\n bytes initCode;\n}\n" + }, + "contracts/struct/GasParameters.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nstruct GasParameters {\n uint256 msgBaseGas;\n uint256 msgGasPerByte;\n uint256 jobBaseGas;\n uint256 jobGasPerByte;\n uint256 minGasPrice;\n uint256 maxGasLimit;\n}\n" + }, + "contracts/struct/OperatorJob.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nstruct OperatorJob {\n uint8 pod;\n uint16 blockTimes;\n address operator;\n uint40 startBlock;\n uint64 startTimestamp;\n uint16[5] fallbackOperators;\n}\n\n/*\n\nuint\t\tDigits\tMax value\n-----------------------------\nuint8\t\t3\t\t255\nuint16\t\t5\t\t65,535\nuint24\t\t8\t\t16,777,215\nuint32\t\t10\t\t4,294,967,295\nuint40\t\t13\t\t1,099,511,627,775\nuint48\t\t15\t\t281,474,976,710,655\nuint56\t\t17\t\t72,057,594,037,927,935\nuint64\t\t20\t\t18,446,744,073,709,551,615\nuint72\t\t22\t\t4,722,366,482,869,645,213,695\nuint80\t\t25\t\t1,208,925,819,614,629,174,706,175\nuint88\t\t27\t\t309,485,009,821,345,068,724,781,055\nuint96\t\t29\t\t79,228,162,514,264,337,593,543,950,335\n...\nuint128\t\t39\t\t340,282,366,920,938,463,463,374,607,431,768,211,455\n...\nuint256\t\t78\t\t115,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\n\n*/\n" + }, + "contracts/struct/Verification.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nstruct Verification {\n bytes32 r;\n bytes32 s;\n uint8 v;\n}\n" + }, + "contracts/struct/ZoraBidShares.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./ZoraDecimal.sol\";\n\nstruct HolographBidShares {\n // % of sale value that goes to the _previous_ owner of the nft\n HolographDecimal prevOwner;\n // % of sale value that goes to the original creator of the nft\n HolographDecimal creator;\n // % of sale value that goes to the seller (current owner) of the nft\n HolographDecimal owner;\n}\n" + }, + "contracts/struct/ZoraDecimal.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nstruct HolographDecimal {\n uint256 value;\n}\n" + }, + "contracts/token/CxipERC721.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/ERC721H.sol\";\n\nimport \"../enum/TokenUriType.sol\";\n\nimport \"../interface/HolographERC721Interface.sol\";\nimport \"../interface/HolographInterfacesInterface.sol\";\nimport \"../interface/HolographInterface.sol\";\nimport \"../interface/HolographerInterface.sol\";\n\n/**\n * @title CXIP ERC-721 Collection that is bridgeable via Holograph\n * @author Holograph Foundation\n * @notice A smart contract for minting and managing Holograph Bridgeable ERC721 NFTs.\n * @dev The entire logic and functionality of the smart contract is self-contained.\n */\ncontract CxipERC721 is ERC721H {\n /**\n * @dev Internal reference used for minting incremental token ids.\n */\n uint224 private _currentTokenId;\n\n /**\n * @dev Enum of type of token URI to use globally for the entire contract.\n */\n TokenUriType private _uriType;\n\n /**\n * @dev Enum mapping of type of token URI to use for specific tokenId.\n */\n mapping(uint256 => TokenUriType) private _tokenUriType;\n\n /**\n * @dev Mapping of IPFS URIs for tokenIds.\n */\n mapping(uint256 => mapping(TokenUriType => string)) private _tokenURIs;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n // we set this as default type since that's what Mint is currently using\n _uriType = TokenUriType.IPFS;\n address owner = abi.decode(initPayload, (address));\n _setOwner(owner);\n // run underlying initializer logic\n return _init(initPayload);\n }\n\n /**\n * @notice Get's the URI of the token.\n * @return string The URI.\n */\n function tokenURI(uint256 _tokenId) external view onlyHolographer returns (string memory) {\n TokenUriType uriType = _tokenUriType[_tokenId];\n if (uriType == TokenUriType.UNDEFINED) {\n uriType = _uriType;\n }\n return\n string(\n abi.encodePacked(\n HolographInterfacesInterface(\n HolographInterface(HolographerInterface(holographer()).getHolograph()).getInterfaces()\n ).getUriPrepend(uriType),\n _tokenURIs[_tokenId][uriType]\n )\n );\n }\n\n function cxipMint(\n uint224 tokenId,\n TokenUriType uriType,\n string calldata tokenUri\n ) external onlyHolographer onlyOwner {\n HolographERC721Interface H721 = HolographERC721Interface(holographer());\n uint256 chainPrepend = H721.sourceGetChainPrepend();\n if (tokenId == 0) {\n _currentTokenId += 1;\n while (\n H721.exists(chainPrepend + uint256(_currentTokenId)) || H721.burned(chainPrepend + uint256(_currentTokenId))\n ) {\n _currentTokenId += 1;\n }\n tokenId = _currentTokenId;\n }\n H721.sourceMint(msgSender(), tokenId);\n uint256 id = chainPrepend + uint256(tokenId);\n if (uriType == TokenUriType.UNDEFINED) {\n uriType = _uriType;\n }\n _tokenUriType[id] = uriType;\n _tokenURIs[id][uriType] = tokenUri;\n }\n\n function bridgeIn(\n uint32 /* _chainId*/,\n address /* _from*/,\n address /* _to*/,\n uint256 _tokenId,\n bytes calldata _data\n ) external onlyHolographer returns (bool) {\n (TokenUriType uriType, string memory tokenUri) = abi.decode(_data, (TokenUriType, string));\n _tokenUriType[_tokenId] = uriType;\n _tokenURIs[_tokenId][uriType] = tokenUri;\n return true;\n }\n\n function bridgeOut(\n uint32 /* _chainId*/,\n address /* _from*/,\n address /* _to*/,\n uint256 _tokenId\n ) external view onlyHolographer returns (bytes memory _data) {\n TokenUriType uriType = _tokenUriType[_tokenId];\n if (uriType == TokenUriType.UNDEFINED) {\n uriType = _uriType;\n }\n _data = abi.encode(uriType, _tokenURIs[_tokenId][uriType]);\n }\n\n function afterBurn(address /* _owner*/, uint256 _tokenId) external onlyHolographer returns (bool) {\n TokenUriType uriType = _tokenUriType[_tokenId];\n if (uriType == TokenUriType.UNDEFINED) {\n uriType = _uriType;\n }\n delete _tokenURIs[_tokenId][uriType];\n return true;\n }\n}\n" + }, + "contracts/token/HolographUtilityToken.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/HLGERC20H.sol\";\n\nimport \"../interface/ERC20.sol\";\nimport \"../interface/HolographERC20Interface.sol\";\nimport \"../interface/HolographInterface.sol\";\nimport \"../interface/HolographerInterface.sol\";\n\n/**\n * @title Holograph Utility Token.\n * @author Holograph Foundation\n * @notice A smart contract for minting and managing Holograph's ERC20 Utility Tokens.\n * @dev The entire logic and functionality of the smart contract is self-contained.\n */\ncontract HolographUtilityToken is HLGERC20H {\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n (address contractOwner, uint256 tokenAmount, uint256 targetChain, address tokenRecipient) = abi.decode(\n initPayload,\n (address, uint256, uint256, address)\n );\n _setOwner(contractOwner);\n /*\n * @dev Mint token only if target chain matches current chain. Or if no target chain has been selected.\n * Goal of this is to restrict minting on Ethereum only for mainnet deployment.\n */\n if (block.chainid == targetChain || targetChain == 0) {\n if (tokenAmount > 0) {\n HolographERC20Interface(msg.sender).sourceMint(tokenRecipient, tokenAmount);\n }\n }\n // run underlying initializer logic\n return _init(initPayload);\n }\n\n /**\n * @dev Temporarily placed to bypass bytecode conflicts\n */\n function isHLG() external pure returns (bool) {\n return true;\n }\n}\n" + }, + "contracts/token/hToken.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/HLGERC20H.sol\";\n\nimport \"../interface/ERC20.sol\";\nimport \"../interface/HolographERC20Interface.sol\";\nimport \"../interface/HolographInterface.sol\";\nimport \"../interface/HolographerInterface.sol\";\n\n/**\n * @title Holograph token (aka hToken), used to wrap and bridge native tokens across blockchains.\n * @author Holograph Foundation\n * @notice A smart contract for minting and managing Holograph's Bridgeable ERC20 Tokens.\n * @dev The entire logic and functionality of the smart contract is self-contained.\n */\ncontract hToken is HLGERC20H {\n /**\n * @dev Sample fee for unwrapping.\n */\n uint16 private _feeBp; // 10000 == 100.00%\n\n /**\n * @dev List of supported Wrapped Tokens (equivalent), on current-chain.\n */\n mapping(address => bool) private _supportedWrappers;\n\n /**\n * @dev Event that is triggered when native token is converted into hToken.\n */\n event Deposit(address indexed from, uint256 amount);\n\n /**\n * @dev Event that is triggered when ERC20 token is converted into hToken.\n */\n event TokenDeposit(address indexed token, address indexed from, uint256 amount);\n\n /**\n * @dev Event that is triggered when hToken is converted into native token.\n */\n event Withdrawal(address indexed to, uint256 amount);\n\n /**\n * @dev Event that is triggered when hToken is converted into ERC20 token.\n */\n event TokenWithdrawal(address indexed token, address indexed to, uint256 amount);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n (address contractOwner, uint16 fee) = abi.decode(initPayload, (address, uint16));\n _setOwner(contractOwner);\n _feeBp = fee;\n // run underlying initializer logic\n return _init(initPayload);\n }\n\n /**\n * @dev Send native token value, get back hToken equivalent.\n * @param recipient Address of where to send the hToken(s) to.\n */\n function holographNativeToken(address recipient) external payable onlyHolographer {\n require(\n (HolographerInterface(holographer()).getOriginChain() ==\n HolographInterface(HolographerInterface(holographer()).getHolograph()).getHolographChainId()),\n \"hToken: not native token\"\n );\n require(msg.value > 0, \"hToken: no value received\");\n address sender = msgSender();\n if (recipient == address(0)) {\n recipient = sender;\n }\n HolographERC20Interface(holographer()).sourceMint(recipient, msg.value);\n emit Deposit(sender, msg.value);\n }\n\n /**\n * @dev Send hToken, get back native token value equivalent.\n * @param recipient Address of where to send the native token(s) to.\n */\n function extractNativeToken(address payable recipient, uint256 amount) external onlyHolographer {\n address sender = msgSender();\n require(ERC20(address(this)).balanceOf(sender) >= amount, \"hToken: not enough hToken(s)\");\n require(\n (HolographerInterface(holographer()).getOriginChain() ==\n HolographInterface(HolographerInterface(holographer()).getHolograph()).getHolographChainId()),\n \"hToken: not on native chain\"\n );\n require(address(this).balance >= amount, \"hToken: not enough native tokens\");\n HolographERC20Interface(holographer()).sourceBurn(sender, amount);\n // HERE WE NEED TO ADD FEE MECHANISM TO EXTRACT xx.xxxx% FROM NATIVE TOKEN AMOUNT\n // THIS SHOULD GO SOMEWHERE TO REWARD CAPITAL PROVIDERS\n uint256 fee = (amount / 10000) * _feeBp;\n // for now we just leave fee in contract balance\n //\n // amount is updated to reflect fee subtraction\n amount = amount - fee;\n recipient.transfer(amount);\n emit Withdrawal(recipient, amount);\n }\n\n /**\n * @dev Send supported wrapped token, get back hToken equivalent.\n * @param recipient Address of where to send the hToken(s) to.\n */\n function holographWrappedToken(address token, address recipient, uint256 amount) external onlyHolographer {\n require(_supportedWrappers[token], \"hToken: unsupported token type\");\n ERC20 erc20 = ERC20(token);\n address sender = msgSender();\n require(erc20.allowance(sender, address(this)) >= amount, \"hToken: allowance too low\");\n uint256 previousBalance = erc20.balanceOf(address(this));\n require(erc20.transferFrom(sender, address(this), amount), \"hToken: ERC20 transfer failed\");\n uint256 currentBalance = erc20.balanceOf(address(this));\n uint256 difference = currentBalance - previousBalance;\n require(difference >= 0, \"hToken: no tokens transferred\");\n if (difference < amount) {\n // adjust for fee-based mechanisms\n // this allows for discrepancies to not fail the entire operation\n amount = difference;\n }\n if (recipient == address(0)) {\n recipient = sender;\n }\n HolographERC20Interface(holographer()).sourceMint(recipient, amount);\n emit TokenDeposit(token, sender, amount);\n }\n\n /**\n * @dev Send hToken, get back native token value equivalent.\n * @param recipient Address of where to send the native token(s) to.\n */\n function extractWrappedToken(address token, address payable recipient, uint256 amount) external onlyHolographer {\n require(_supportedWrappers[token], \"hToken: unsupported token type\");\n address sender = msgSender();\n require(ERC20(address(this)).balanceOf(sender) >= amount, \"hToken: not enough hToken(s)\");\n ERC20 erc20 = ERC20(token);\n uint256 previousBalance = erc20.balanceOf(address(this));\n require(previousBalance >= amount, \"hToken: not enough ERC20 tokens\");\n if (recipient == address(0)) {\n recipient = payable(sender);\n }\n // HERE WE NEED TO ADD FEE MECHANISM TO EXTRACT xx.xxxx% FROM NATIVE TOKEN AMOUNT\n // THIS SHOULD GO SOMEWHERE TO REWARD CAPITAL PROVIDERS\n uint256 fee = (amount / 10000) * _feeBp;\n uint256 adjustedAmount = amount - fee;\n // for now we just leave fee in contract balance\n erc20.transfer(recipient, adjustedAmount);\n uint256 currentBalance = erc20.balanceOf(address(this));\n uint256 difference = currentBalance - previousBalance;\n require(difference == adjustedAmount, \"hToken: incorrect new balance\");\n HolographERC20Interface(holographer()).sourceBurn(sender, amount);\n emit TokenWithdrawal(token, recipient, adjustedAmount);\n }\n\n function availableNativeTokens() external view onlyHolographer returns (uint256) {\n if (\n HolographerInterface(holographer()).getOriginChain() ==\n HolographInterface(HolographerInterface(holographer()).getHolograph()).getHolographChainId()\n ) {\n return address(this).balance;\n } else {\n return 0;\n }\n }\n\n function availableWrappedTokens(address token) external view onlyHolographer returns (uint256) {\n require(_supportedWrappers[token], \"hToken: unsupported token type\");\n return ERC20(token).balanceOf(address(this));\n }\n\n function updateSupportedWrapper(address token, bool supported) external onlyHolographer onlyOwner {\n _supportedWrappers[token] = supported;\n }\n\n /**\n * @dev Temporarily placed to bypass bytecode conflicts\n */\n function isHToken() external pure returns (bool) {\n return true;\n }\n}\n" + }, + "contracts/token/SampleERC20.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/StrictERC20H.sol\";\n\nimport \"../interface/HolographERC20Interface.sol\";\n\n/**\n * @title Sample ERC-20 token that is bridgeable via Holograph\n * @author Holograph Foundation\n * @notice A smart contract for minting and managing Holograph Bridgeable ERC20 Tokens.\n * @dev The entire logic and functionality of the smart contract is self-contained.\n */\ncontract SampleERC20 is StrictERC20H {\n /**\n * @dev Just a dummy value for now to test transferring of data.\n */\n mapping(address => bytes32) private _walletSalts;\n\n /**\n * @dev Temporary implementation to suppress compiler state mutability warnings.\n */\n bool private _dummy;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n // do your own custom logic here\n address contractOwner = abi.decode(initPayload, (address));\n _setOwner(contractOwner);\n // run underlying initializer logic\n return _init(initPayload);\n }\n\n /**\n * @dev Sample mint where anyone can mint any amounts of tokens.\n */\n function mint(address to, uint256 amount) external onlyHolographer onlyOwner {\n HolographERC20Interface(holographer()).sourceMint(to, amount);\n if (_walletSalts[to] == bytes32(0)) {\n _walletSalts[to] = keccak256(\n abi.encodePacked(to, amount, block.timestamp, block.number, blockhash(block.number - 1))\n );\n }\n }\n\n function bridgeIn(\n uint32 /* _chainId*/,\n address /* _from*/,\n address _to,\n uint256 /* _amount*/,\n bytes calldata _data\n ) external override onlyHolographer returns (bool) {\n bytes32 salt = abi.decode(_data, (bytes32));\n _walletSalts[_to] = salt;\n return true;\n }\n\n function bridgeOut(\n uint32 /* _chainId*/,\n address /* _from*/,\n address _to,\n uint256 /* _amount*/\n ) external override onlyHolographer returns (bytes memory _data) {\n _dummy = false;\n _data = abi.encode(_walletSalts[_to]);\n }\n}\n" + }, + "contracts/token/SampleERC721.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/StrictERC721H.sol\";\n\nimport \"../interface/HolographERC721Interface.sol\";\n\n/**\n * @title Sample ERC-721 Collection that is bridgeable via Holograph\n * @author Holograph Foundation\n * @notice A smart contract for minting and managing Holograph Bridgeable ERC721 NFTs.\n * @dev The entire logic and functionality of the smart contract is self-contained.\n */\ncontract SampleERC721 is StrictERC721H {\n /**\n * @dev Mapping of all token URIs.\n */\n mapping(uint256 => string) private _tokenURIs;\n\n /**\n * @dev Internal reference used for minting incremental token ids.\n */\n uint224 private _currentTokenId;\n\n /**\n * @dev Temporary implementation to suppress compiler state mutability warnings.\n */\n bool private _dummy;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n // do your own custom logic here\n address contractOwner = abi.decode(initPayload, (address));\n _setOwner(contractOwner);\n // run underlying initializer logic\n return _init(initPayload);\n }\n\n /**\n * @notice Get's the URI of the token.\n * @dev Defaults the the Arweave URI\n * @return string The URI.\n */\n function tokenURI(uint256 _tokenId) external view onlyHolographer returns (string memory) {\n return _tokenURIs[_tokenId];\n }\n\n /**\n * @dev Sample mint where anyone can mint specific token, with a custom URI\n */\n function mint(address to, uint224 tokenId, string calldata URI) external onlyHolographer onlyOwner {\n HolographERC721Interface H721 = HolographERC721Interface(holographer());\n if (tokenId == 0) {\n _currentTokenId += 1;\n while (H721.exists(uint256(_currentTokenId)) || H721.burned(uint256(_currentTokenId))) {\n _currentTokenId += 1;\n }\n tokenId = _currentTokenId;\n }\n H721.sourceMint(to, tokenId);\n uint256 id = H721.sourceGetChainPrepend() + uint256(tokenId);\n _tokenURIs[id] = URI;\n }\n\n function bridgeIn(\n uint32 /* _chainId*/,\n address /* _from*/,\n address /* _to*/,\n uint256 _tokenId,\n bytes calldata _data\n ) external override onlyHolographer returns (bool) {\n string memory URI = abi.decode(_data, (string));\n _tokenURIs[_tokenId] = URI;\n return true;\n }\n\n function bridgeOut(\n uint32 /* _chainId*/,\n address /* _from*/,\n address /* _to*/,\n uint256 _tokenId\n ) external override onlyHolographer returns (bytes memory _data) {\n _dummy = false;\n _data = abi.encode(_tokenURIs[_tokenId]);\n }\n\n function afterBurn(address /* _owner*/, uint256 _tokenId) external override onlyHolographer returns (bool) {\n delete _tokenURIs[_tokenId];\n return true;\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 999999 + }, + "metadata": { + "bytecodeHash": "none", + "useLiteralContent": true + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": ["ast"] + } + }, + "remappings": [ + "ds-test/=lib/forge-std/lib/ds-test/src/", + "erc721a-upgradeable/=erc721a-upgradeable/", + "forge-std/=lib/forge-std/src/" + ] + } +} diff --git a/deployments/develop/ethereumTestnetGoerli/HolographFactory.json b/deployments/develop/ethereumTestnetGoerli/HolographFactory.json index c69080c2f..b5ad7608e 100644 --- a/deployments/develop/ethereumTestnetGoerli/HolographFactory.json +++ b/deployments/develop/ethereumTestnetGoerli/HolographFactory.json @@ -1,5 +1,5 @@ { - "address": "0xE70F94ED069Cca85c040Cd79FC7Ee0121690dE35", + "address": "0xaF27d972B6Ad681F72bB9acAe5382e829DAe61C5", "abi": [ { "inputs": [], @@ -386,28 +386,28 @@ "type": "receive" } ], - "transactionHash": "0xe8c67836a0a142d903d9c2f825f36c658d04fde9b16195eb9797f43b45a8d939", + "transactionHash": "0x35f8260bcaff7b6eb2348816c8be7228763e973b5b55a7f326944b15e1fffb6d", "receipt": { "to": "0x0C8aF56F7650a6E3685188d212044338c21d3F73", "from": "0xd078E391cBAEAa6C5785124a7207ff57d64604b7", "contractAddress": null, - "transactionIndex": 35, - "gasUsed": "2506731", + "transactionIndex": 31, + "gasUsed": "2725869", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x7188e3fcddb692923cd916e0d63e80db8b9f0e037bb363125349c362af4071ba", - "transactionHash": "0xe8c67836a0a142d903d9c2f825f36c658d04fde9b16195eb9797f43b45a8d939", + "blockHash": "0xefcef7e74cca3566fc6ea64b3f7faccd4435b8150cf2cfe9faf4129b5e7b3448", + "transactionHash": "0x35f8260bcaff7b6eb2348816c8be7228763e973b5b55a7f326944b15e1fffb6d", "logs": [], - "blockNumber": 8830203, - "cumulativeGasUsed": "12218730", + "blockNumber": 9302841, + "cumulativeGasUsed": "8539624", "status": 1, "byzantium": true }, "args": [], - "numDeployments": 4, - "solcInputHash": "c2684ac7ef00452775c6a94fe449842d", - "metadata": "{\"compiler\":{\"version\":\"0.8.13+commit.abaa5c0e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"BridgeableContractDeployed\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"adminCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"bridgeIn\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"bridgeOut\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"selector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"contractType\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"chainType\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"salt\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"byteCode\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"initCode\",\"type\":\"bytes\"}],\"internalType\":\"struct DeploymentConfig\",\"name\":\"config\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"}],\"internalType\":\"struct Verification\",\"name\":\"signature\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"}],\"name\":\"deployHolographableContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"contractType\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"chainType\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"salt\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"byteCode\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"initCode\",\"type\":\"bytes\"}],\"internalType\":\"struct DeploymentConfig\",\"name\":\"config\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"}],\"internalType\":\"struct Verification\",\"name\":\"signature\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"deployOnCurrentChain\",\"type\":\"bool\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"toChain\",\"type\":\"uint32\"}],\"internalType\":\"struct BridgeSettings[]\",\"name\":\"bridgeSettings\",\"type\":\"tuple[]\"}],\"name\":\"deployHolographableContractMultiChain\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"adminAddress\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getHolograph\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"holograph\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRegistry\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"registry\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"initPayload\",\"type\":\"bytes\"}],\"name\":\"init\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"adminAddress\",\"type\":\"address\"}],\"name\":\"setAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"holograph\",\"type\":\"address\"}],\"name\":\"setHolograph\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"registry\",\"type\":\"address\"}],\"name\":\"setRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"author\":\"https://github.com/holographxyz\",\"details\":\"The contract provides methods that allow for the creation of Holograph Protocol compliant smart contracts, that are capable of minting holographable assets\",\"kind\":\"dev\",\"methods\":{\"bridgeIn(uint32,bytes)\":{\"details\":\"This function directly forwards the calldata to the deployHolographableContract function It is used to allow for Holograph Bridge to make cross-chain deployments\"},\"bridgeOut(uint32,address,bytes)\":{\"details\":\"This function directly returns the calldata It is used to allow for Holograph Bridge to make cross-chain deployments\"},\"constructor\":{\"details\":\"Constructor is left empty and init is used instead\"},\"deployHolographableContract((bytes32,uint32,bytes32,bytes,bytes),(bytes32,bytes32,uint8),address)\":{\"details\":\"Using this function allows to deploy smart contracts that have the same address across all EVM chains\",\"params\":{\"config\":\"contract deployement configurations\",\"signature\":\"that was created by the wallet that created the original payload\",\"signer\":\"address of wallet that created the payload\"}},\"getHolograph()\":{\"details\":\"Used for storing a reference to all the primary modules and variables of the protocol\"},\"getRegistry()\":{\"details\":\"This module stores a reference for all deployed holographable smart contracts\"},\"init(bytes)\":{\"details\":\"This function is called by the deployer/factory when creating a contract\",\"params\":{\"initPayload\":\"abi encoded payload to use for contract initilaization\"}},\"setHolograph(address)\":{\"params\":{\"holograph\":\"address of the Holograph Protocol smart contract to use\"}},\"setRegistry(address)\":{\"params\":{\"registry\":\"address of the Holograph Registry smart contract to use\"}}},\"stateVariables\":{\"_holographSlot\":{\"details\":\"bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\"},\"_registrySlot\":{\"details\":\"bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\"}},\"title\":\"Holograph Factory\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"bridgeIn(uint32,bytes)\":{\"notice\":\"Deploy holographable contract via bridge request\"},\"bridgeOut(uint32,address,bytes)\":{\"notice\":\"Deploy holographable contract via bridge request\"},\"deployHolographableContract((bytes32,uint32,bytes32,bytes,bytes),(bytes32,bytes32,uint8),address)\":{\"notice\":\"Deploy a holographable smart contract\"},\"getHolograph()\":{\"notice\":\"Get the Holograph Protocol contract\"},\"getRegistry()\":{\"notice\":\"Get the Holograph Registry module\"},\"init(bytes)\":{\"notice\":\"Used internally to initialize the contract instead of through a constructor\"},\"setHolograph(address)\":{\"notice\":\"Update the Holograph Protocol contract address\"},\"setRegistry(address)\":{\"notice\":\"Update the Holograph Registry module address\"}},\"notice\":\"Deploy holographable contracts\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/HolographFactory.sol\":\"HolographFactory\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc721a-upgradeable/=erc721a-upgradeable/\",\":forge-std/=lib/forge-std/src/\"]},\"sources\":{\"contracts/HolographFactory.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nimport \\\"./abstract/Admin.sol\\\";\\nimport \\\"./abstract/Initializable.sol\\\";\\n\\nimport \\\"./enforcer/Holographer.sol\\\";\\n\\nimport \\\"./interface/Holographable.sol\\\";\\nimport \\\"./interface/HolographBridgeInterface.sol\\\";\\nimport \\\"./interface/HolographFactoryInterface.sol\\\";\\nimport \\\"./interface/HolographInterface.sol\\\";\\nimport \\\"./interface/HolographRegistryInterface.sol\\\";\\nimport \\\"./interface/InitializableInterface.sol\\\";\\n\\nimport \\\"./struct/BridgeSettings.sol\\\";\\nimport \\\"./struct/DeploymentConfig.sol\\\";\\nimport \\\"./struct/Verification.sol\\\";\\n\\n/**\\n * @title Holograph Factory\\n * @author https://github.com/holographxyz\\n * @notice Deploy holographable contracts\\n * @dev The contract provides methods that allow for the creation of Holograph Protocol compliant smart contracts, that are capable of minting holographable assets\\n */\\ncontract HolographFactory is Admin, Initializable, Holographable, HolographFactoryInterface {\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\\n */\\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\\n */\\n bytes32 constant _registrySlot = 0xce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7;\\n\\n /**\\n * @dev Constructor is left empty and init is used instead\\n */\\n constructor() {}\\n\\n /**\\n * @notice Used internally to initialize the contract instead of through a constructor\\n * @dev This function is called by the deployer/factory when creating a contract\\n * @param initPayload abi encoded payload to use for contract initilaization\\n */\\n function init(bytes memory initPayload) external override returns (bytes4) {\\n require(!_isInitialized(), \\\"HOLOGRAPH: already initialized\\\");\\n (address holograph, address registry) = abi.decode(initPayload, (address, address));\\n assembly {\\n sstore(_adminSlot, origin())\\n sstore(_holographSlot, holograph)\\n sstore(_registrySlot, registry)\\n }\\n _setInitialized();\\n return InitializableInterface.init.selector;\\n }\\n\\n /**\\n * @notice Deploy holographable contract via bridge request\\n * @dev This function directly forwards the calldata to the deployHolographableContract function\\n * It is used to allow for Holograph Bridge to make cross-chain deployments\\n */\\n function bridgeIn(\\n uint32, /* fromChain*/\\n bytes calldata payload\\n ) external returns (bytes4) {\\n (DeploymentConfig memory config, Verification memory signature, address signer) = abi.decode(\\n payload,\\n (DeploymentConfig, Verification, address)\\n );\\n HolographFactoryInterface(address(this)).deployHolographableContract(config, signature, signer);\\n return Holographable.bridgeIn.selector;\\n }\\n\\n /**\\n * @notice Deploy holographable contract via bridge request\\n * @dev This function directly returns the calldata\\n * It is used to allow for Holograph Bridge to make cross-chain deployments\\n */\\n function bridgeOut(\\n uint32, /* toChain*/\\n address, /* sender*/\\n bytes calldata payload\\n ) external pure returns (bytes4 selector, bytes memory data) {\\n return (Holographable.bridgeOut.selector, payload);\\n }\\n\\n function deployHolographableContractMultiChain(\\n DeploymentConfig memory config,\\n Verification memory signature,\\n address signer,\\n bool deployOnCurrentChain,\\n BridgeSettings[] memory bridgeSettings\\n ) external payable {\\n if (deployOnCurrentChain) {\\n deployHolographableContract(config, signature, signer);\\n }\\n bytes memory payload = abi.encode(config, signature, signer);\\n HolographInterface holograph;\\n assembly {\\n holograph := sload(_holographSlot)\\n }\\n HolographBridgeInterface bridge = HolographBridgeInterface(holograph.getBridge());\\n uint256 l = bridgeSettings.length;\\n for (uint256 i = 0; i < l; i++) {\\n bridge.bridgeOutRequest{value: bridgeSettings[i].value}(\\n bridgeSettings[i].toChain,\\n address(this),\\n bridgeSettings[i].gasLimit,\\n bridgeSettings[i].gasPrice,\\n payload\\n );\\n }\\n }\\n\\n /**\\n * @notice Deploy a holographable smart contract\\n * @dev Using this function allows to deploy smart contracts that have the same address across all EVM chains\\n * @param config contract deployement configurations\\n * @param signature that was created by the wallet that created the original payload\\n * @param signer address of wallet that created the payload\\n */\\n function deployHolographableContract(\\n DeploymentConfig memory config,\\n Verification memory signature,\\n address signer\\n ) public {\\n address registry;\\n address holograph;\\n assembly {\\n holograph := sload(_holographSlot)\\n registry := sload(_registrySlot)\\n }\\n /**\\n * @dev the configuration is encoded and hashed along with signer address\\n */\\n bytes32 hash = keccak256(\\n abi.encodePacked(\\n config.contractType,\\n config.chainType,\\n config.salt,\\n keccak256(config.byteCode),\\n keccak256(config.initCode),\\n signer\\n )\\n );\\n /**\\n * @dev the hash is validated against signature\\n * this is to guarantee that the original creator's configuration has not been altered\\n */\\n require(_verifySigner(signature.r, signature.s, signature.v, hash, signer), \\\"HOLOGRAPH: invalid signature\\\");\\n /**\\n * @dev check that this contract has not already been deployed on this chain\\n */\\n bytes memory holographerBytecode = type(Holographer).creationCode;\\n address holographerAddress = address(\\n uint160(uint256(keccak256(abi.encodePacked(bytes1(0xff), address(this), hash, keccak256(holographerBytecode)))))\\n );\\n require(!_isContract(holographerAddress), \\\"HOLOGRAPH: already deployed\\\");\\n /**\\n * @dev convert hash into uint256 which will be used as the salt for create2\\n */\\n uint256 saltInt = uint256(hash);\\n address sourceContractAddress;\\n bytes memory sourceByteCode = config.byteCode;\\n assembly {\\n /**\\n * @dev deploy the user created smart contract first\\n */\\n sourceContractAddress := create2(0, add(sourceByteCode, 0x20), mload(sourceByteCode), saltInt)\\n }\\n assembly {\\n /**\\n * @dev deploy the Holographer contract\\n */\\n holographerAddress := create2(0, add(holographerBytecode, 0x20), mload(holographerBytecode), saltInt)\\n }\\n /**\\n * @dev initialize the Holographer contract\\n */\\n require(\\n InitializableInterface(holographerAddress).init(\\n abi.encode(abi.encode(config.chainType, holograph, config.contractType, sourceContractAddress), config.initCode)\\n ) == InitializableInterface.init.selector,\\n \\\"initialization failed\\\"\\n );\\n /**\\n * @dev update the Holograph Registry with deployed contract address\\n */\\n HolographRegistryInterface(registry).setHolographedHashAddress(hash, holographerAddress);\\n /**\\n * @dev emit an event that on-chain indexers can easily read\\n */\\n emit BridgeableContractDeployed(holographerAddress, hash);\\n }\\n\\n /**\\n * @notice Get the Holograph Protocol contract\\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\\n */\\n function getHolograph() external view returns (address holograph) {\\n assembly {\\n holograph := sload(_holographSlot)\\n }\\n }\\n\\n /**\\n * @notice Update the Holograph Protocol contract address\\n * @param holograph address of the Holograph Protocol smart contract to use\\n */\\n function setHolograph(address holograph) external onlyAdmin {\\n assembly {\\n sstore(_holographSlot, holograph)\\n }\\n }\\n\\n /**\\n * @notice Get the Holograph Registry module\\n * @dev This module stores a reference for all deployed holographable smart contracts\\n */\\n function getRegistry() external view returns (address registry) {\\n assembly {\\n registry := sload(_registrySlot)\\n }\\n }\\n\\n /**\\n * @notice Update the Holograph Registry module address\\n * @param registry address of the Holograph Registry smart contract to use\\n */\\n function setRegistry(address registry) external onlyAdmin {\\n assembly {\\n sstore(_registrySlot, registry)\\n }\\n }\\n\\n /**\\n * @dev Internal function used for checking if a contract has been deployed at address\\n */\\n function _isContract(address contractAddress) private view returns (bool) {\\n bytes32 codehash;\\n assembly {\\n codehash := extcodehash(contractAddress)\\n }\\n return (codehash != 0x0 && codehash != 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470);\\n }\\n\\n /**\\n * @dev Internal function used for verifying a signature\\n */\\n function _verifySigner(\\n bytes32 r,\\n bytes32 s,\\n uint8 v,\\n bytes32 hash,\\n address signer\\n ) private pure returns (bool) {\\n if (v < 27) {\\n v += 27;\\n }\\n if (v != 27 && v != 28) {\\n return false;\\n }\\n // prevent signature malleability by checking if s-value is in the upper range\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n // if s-value is in upper range, calculate a new s-value\\n s = bytes32(0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - uint256(s));\\n // flip the v-value\\n if (v == 27) {\\n v = 28;\\n } else {\\n v = 27;\\n }\\n // check if s-value is still in upper range\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return false;\\n }\\n }\\n /**\\n * @dev signature is checked against EIP-191 first, then directly, to support legacy wallets\\n */\\n return (signer != address(0) &&\\n (ecrecover(keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash)), v, r, s) == signer ||\\n ecrecover(hash, v, r, s) == signer));\\n }\\n\\n /**\\n * @dev Purposefully reverts to prevent having any type of ether transfered into the contract\\n */\\n receive() external payable {\\n revert();\\n }\\n\\n /**\\n * @dev Purposefully reverts to prevent any calls to undefined functions\\n */\\n fallback() external payable {\\n revert();\\n }\\n}\\n\",\"keccak256\":\"0x8daccfb651b96557add6db9f587f21109fb5cf698f5db8566b92d936197c48f3\",\"license\":\"UNLICENSED\"},\"contracts/abstract/Admin.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nabstract contract Admin {\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.admin')) - 1)\\n */\\n bytes32 constant _adminSlot = 0x3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c9;\\n\\n modifier onlyAdmin() {\\n require(msg.sender == getAdmin(), \\\"HOLOGRAPH: admin only function\\\");\\n _;\\n }\\n\\n constructor() {}\\n\\n function admin() public view returns (address) {\\n return getAdmin();\\n }\\n\\n function getAdmin() public view returns (address adminAddress) {\\n assembly {\\n adminAddress := sload(_adminSlot)\\n }\\n }\\n\\n function setAdmin(address adminAddress) public onlyAdmin {\\n assembly {\\n sstore(_adminSlot, adminAddress)\\n }\\n }\\n\\n function adminCall(address target, bytes calldata data) external payable onlyAdmin {\\n assembly {\\n calldatacopy(0, data.offset, data.length)\\n let result := call(gas(), target, callvalue(), 0, data.length, 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n switch result\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x93552c9253b579c45113a150a6a3dfddb997afd939d09b49c34d040525734b1a\",\"license\":\"UNLICENSED\"},\"contracts/abstract/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nimport \\\"../interface/InitializableInterface.sol\\\";\\n\\n/**\\n * @title Initializable\\n * @author https://github.com/holographxyz\\n * @notice Use init instead of constructor\\n * @dev This allows for use of init function to make one time initializations without the need for a constructor\\n */\\nabstract contract Initializable is InitializableInterface {\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.initialized')) - 1)\\n */\\n bytes32 constant _initializedSlot = 0x4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a01;\\n\\n /**\\n * @dev Constructor is left empty and init is used instead\\n */\\n constructor() {}\\n\\n /**\\n * @notice Used internally to initialize the contract instead of through a constructor\\n * @dev This function is called by the deployer/factory when creating a contract\\n * @param initPayload abi encoded payload to use for contract initilaization\\n */\\n function init(bytes memory initPayload) external virtual returns (bytes4);\\n\\n function _isInitialized() internal view returns (bool initialized) {\\n assembly {\\n initialized := sload(_initializedSlot)\\n }\\n }\\n\\n function _setInitialized() internal {\\n assembly {\\n sstore(_initializedSlot, 0x0000000000000000000000000000000000000000000000000000000000000001)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa55dc367285f96952dec56adfbfb48b6a4be31aef9ba0d30ad8c91023a572462\",\"license\":\"UNLICENSED\"},\"contracts/enforcer/Holographer.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nimport \\\"../abstract/Admin.sol\\\";\\nimport \\\"../abstract/Initializable.sol\\\";\\n\\nimport \\\"../interface/HolographInterface.sol\\\";\\nimport \\\"../interface/HolographerInterface.sol\\\";\\nimport \\\"../interface/HolographRegistryInterface.sol\\\";\\nimport \\\"../interface/InitializableInterface.sol\\\";\\n\\n/**\\n * @dev This contract is a binder. It puts together all the variables to make the underlying contracts functional and be bridgeable.\\n */\\ncontract Holographer is Admin, Initializable, HolographerInterface {\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.originChain')) - 1)\\n */\\n bytes32 constant _originChainSlot = 0xd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d;\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\\n */\\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.contractType')) - 1)\\n */\\n bytes32 constant _contractTypeSlot = 0x0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c7;\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.sourceContract')) - 1)\\n */\\n bytes32 constant _sourceContractSlot = 0x27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b074;\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.blockHeight')) - 1)\\n */\\n bytes32 constant _blockHeightSlot = 0x9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de3;\\n\\n /**\\n * @dev Constructor is left empty and init is used instead\\n */\\n constructor() {}\\n\\n /**\\n * @notice Used internally to initialize the contract instead of through a constructor\\n * @dev This function is called by the deployer/factory when creating a contract\\n * @param initPayload abi encoded payload to use for contract initilaization\\n */\\n function init(bytes memory initPayload) external override returns (bytes4) {\\n require(!_isInitialized(), \\\"HOLOGRAPHER: already initialized\\\");\\n (bytes memory encoded, bytes memory initCode) = abi.decode(initPayload, (bytes, bytes));\\n (uint32 originChain, address holograph, bytes32 contractType, address sourceContract) = abi.decode(\\n encoded,\\n (uint32, address, bytes32, address)\\n );\\n assembly {\\n sstore(_adminSlot, caller())\\n sstore(_blockHeightSlot, number())\\n sstore(_contractTypeSlot, contractType)\\n sstore(_holographSlot, holograph)\\n sstore(_originChainSlot, originChain)\\n sstore(_sourceContractSlot, sourceContract)\\n }\\n (bool success, bytes memory returnData) = HolographRegistryInterface(HolographInterface(holograph).getRegistry())\\n .getReservedContractTypeAddress(contractType)\\n .delegatecall(abi.encodeWithSelector(InitializableInterface.init.selector, initCode));\\n bytes4 selector = abi.decode(returnData, (bytes4));\\n require(success && selector == InitializableInterface.init.selector, \\\"HOLOGRAPH: initialization failed\\\");\\n _setInitialized();\\n return InitializableInterface.init.selector;\\n }\\n\\n /**\\n * @dev Returns the contract type that is used for loading the Enforcer\\n */\\n function getContractType() external view returns (bytes32 contractType) {\\n assembly {\\n contractType := sload(_contractTypeSlot)\\n }\\n }\\n\\n /**\\n * @dev Returns the block height of when the smart contract was deployed. Useful for retrieving deployment config for re-deployment on other EVM-compatible chains.\\n */\\n function getDeploymentBlock() external view returns (uint256 deploymentBlock) {\\n assembly {\\n deploymentBlock := sload(_blockHeightSlot)\\n }\\n }\\n\\n /**\\n * @dev Returns a hardcoded address for the Holograph smart contract.\\n */\\n function getHolograph() external view returns (address holograph) {\\n assembly {\\n holograph := sload(_holographSlot)\\n }\\n }\\n\\n /**\\n * @dev Returns a hardcoded address for the Holograph smart contract that controls and enforces the ERC standards.\\n */\\n function getHolographEnforcer() public view returns (address) {\\n HolographInterface holograph;\\n bytes32 contractType;\\n assembly {\\n holograph := sload(_holographSlot)\\n contractType := sload(_contractTypeSlot)\\n }\\n return HolographRegistryInterface(holograph.getRegistry()).getReservedContractTypeAddress(contractType);\\n }\\n\\n /**\\n * @dev Returns the original chain that contract was deployed on.\\n */\\n function getOriginChain() external view returns (uint32 originChain) {\\n assembly {\\n originChain := sload(_originChainSlot)\\n }\\n }\\n\\n /**\\n * @dev Returns a hardcoded address for the custom secure storage contract deployed in parallel with this contract deployment.\\n */\\n function getSourceContract() external view returns (address sourceContract) {\\n assembly {\\n sourceContract := sload(_sourceContractSlot)\\n }\\n }\\n\\n /**\\n * @dev Purposefully left empty, to prevent running out of gas errors when receiving native token payments.\\n */\\n receive() external payable {}\\n\\n /**\\n * @dev This takes the Enforcer's source code, runs it, and uses current address for storage slots.\\n */\\n fallback() external payable {\\n address holographEnforcer = getHolographEnforcer();\\n assembly {\\n calldatacopy(0, 0, calldatasize())\\n let result := delegatecall(gas(), holographEnforcer, 0, calldatasize(), 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n switch result\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc31b575625e84743d9a14f282ef3894becece82a6f47ec945585ac5a0d1895f7\",\"license\":\"UNLICENSED\"},\"contracts/interface/HolographBridgeInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\n/**\\n * @title Holograph Bridge\\n * @author https://github.com/holographxyz\\n * @notice Beam any holographable contracts and assets across blockchains\\n * @dev The contract abstracts all the complexities of making bridge requests and uses a universal interface to bridge any type of holographable assets\\n */\\ninterface HolographBridgeInterface {\\n /**\\n * @notice Receive a beam from another chain\\n * @dev This function can only be called by the Holograph Operator module\\n * @param fromChain Holograph Chain ID where the brigeOutRequest was created\\n * @param holographableContract address of the destination contract that the bridgeInRequest is targeted for\\n * @param hToken address of the hToken contract that wrapped the origin chain native gas token\\n * @param hTokenRecipient address of recipient for the hToken reward\\n * @param hTokenValue exact amount of hToken reward in wei\\n * @param doNotRevert boolean used to specify if the call should revert\\n * @param bridgeInPayload actual abi encoded bytes of the data that the holographable contract bridgeIn function will receive\\n */\\n function bridgeInRequest(\\n uint256 nonce,\\n uint32 fromChain,\\n address holographableContract,\\n address hToken,\\n address hTokenRecipient,\\n uint256 hTokenValue,\\n bool doNotRevert,\\n bytes calldata bridgeInPayload\\n ) external payable;\\n\\n /**\\n * @notice Create a beam request for a destination chain\\n * @dev This function works for deploying contracts and beaming supported holographable assets across chains\\n * @param toChain Holograph Chain ID where the beam is being sent to\\n * @param holographableContract address of the contract for which the bridge request is being made\\n * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain\\n * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain\\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\\n */\\n function bridgeOutRequest(\\n uint32 toChain,\\n address holographableContract,\\n uint256 gasLimit,\\n uint256 gasPrice,\\n bytes calldata bridgeOutPayload\\n ) external payable;\\n\\n /**\\n * @notice Do not call this function, it will always revert\\n * @dev Used by getBridgeOutRequestPayload function\\n * It is purposefully inverted to always revert on a successful call\\n * Marked as external and not private to allow use inside try/catch of getBridgeOutRequestPayload function\\n * If this function does not revert and returns a string, it is the actual revert reason\\n * @param sender address of actual sender that is planning to make a bridgeOutRequest call\\n * @param toChain holograph chain id of destination chain\\n * @param holographableContract address of the contract for which the bridge request is being made\\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\\n */\\n function revertedBridgeOutRequest(\\n address sender,\\n uint32 toChain,\\n address holographableContract,\\n bytes calldata bridgeOutPayload\\n ) external returns (string memory revertReason);\\n\\n /**\\n * @notice Get the payload created by the bridgeOutRequest function\\n * @dev Use this function to get the payload that will be generated by a bridgeOutRequest\\n * Only use this with a static call\\n * @param toChain Holograph Chain ID where the beam is being sent to\\n * @param holographableContract address of the contract for which the bridge request is being made\\n * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain\\n * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain\\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\\n * @return samplePayload bytes made up of the bridgeOutRequest payload\\n */\\n function getBridgeOutRequestPayload(\\n uint32 toChain,\\n address holographableContract,\\n uint256 gasLimit,\\n uint256 gasPrice,\\n bytes calldata bridgeOutPayload\\n ) external returns (bytes memory samplePayload);\\n\\n /**\\n * @notice Get the fees associated with sending specific payload\\n * @dev Will provide exact costs on protocol and message side, combine the two to get total\\n * @param toChain holograph chain id of destination chain for payload\\n * @param gasLimit amount of gas to provide for executing payload on destination chain\\n * @param gasPrice maximum amount to pay for gas price, can be set to 0 and will be chose automatically\\n * @param crossChainPayload the entire packet being sent cross-chain\\n * @return hlgFee the amount (in wei) of native gas token that will cost for finalizing job on destiantion chain\\n * @return msgFee the amount (in wei) of native gas token that will cost for sending message to destiantion chain\\n * @return dstGasPrice the amount (in wei) that destination message maximum gas price will be\\n */\\n function getMessageFee(\\n uint32 toChain,\\n uint256 gasLimit,\\n uint256 gasPrice,\\n bytes calldata crossChainPayload\\n )\\n external\\n view\\n returns (\\n uint256 hlgFee,\\n uint256 msgFee,\\n uint256 dstGasPrice\\n );\\n\\n /**\\n * @notice Get the address of the Holograph Factory module\\n * @dev Used for deploying holographable smart contracts\\n */\\n function getFactory() external view returns (address factory);\\n\\n /**\\n * @notice Update the Holograph Factory module address\\n * @param factory address of the Holograph Factory smart contract to use\\n */\\n function setFactory(address factory) external;\\n\\n /**\\n * @notice Get the Holograph Protocol contract\\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\\n */\\n function getHolograph() external view returns (address holograph);\\n\\n /**\\n * @notice Update the Holograph Protocol contract address\\n * @param holograph address of the Holograph Protocol smart contract to use\\n */\\n function setHolograph(address holograph) external;\\n\\n /**\\n * @notice Get the latest job nonce\\n * @dev You can use the job nonce as a way to calculate total amount of bridge requests that have been made\\n */\\n function getJobNonce() external view returns (uint256 jobNonce);\\n\\n /**\\n * @notice Get the address of the Holograph Operator module\\n * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module\\n */\\n function getOperator() external view returns (address operator);\\n\\n /**\\n * @notice Update the Holograph Operator module address\\n * @param operator address of the Holograph Operator smart contract to use\\n */\\n function setOperator(address operator) external;\\n\\n /**\\n * @notice Get the Holograph Registry module\\n * @dev This module stores a reference for all deployed holographable smart contracts\\n */\\n function getRegistry() external view returns (address registry);\\n\\n /**\\n * @notice Update the Holograph Registry module address\\n * @param registry address of the Holograph Registry smart contract to use\\n */\\n function setRegistry(address registry) external;\\n}\\n\",\"keccak256\":\"0xa8e2efb427f7114bc2cd43d3cefd1e6be3ef10f7dce6b8acb6de66e50668824e\",\"license\":\"UNLICENSED\"},\"contracts/interface/HolographFactoryInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nimport \\\"../struct/DeploymentConfig.sol\\\";\\nimport \\\"../struct/Verification.sol\\\";\\n\\n/**\\n * @title Holograph Factory\\n * @author https://github.com/holographxyz\\n * @notice Deploy holographable contracts\\n * @dev The contract provides methods that allow for the creation of Holograph Protocol compliant smart contracts, that are capable of minting holographable assets\\n */\\ninterface HolographFactoryInterface {\\n /**\\n * @dev This event is fired every time that a bridgeable contract is deployed.\\n */\\n event BridgeableContractDeployed(address indexed contractAddress, bytes32 indexed hash);\\n\\n /**\\n * @notice Deploy a holographable smart contract\\n * @dev Using this function allows to deploy smart contracts that have the same address across all EVM chains\\n * @param config contract deployement configurations\\n * @param signature that was created by the wallet that created the original payload\\n * @param signer address of wallet that created the payload\\n */\\n function deployHolographableContract(\\n DeploymentConfig memory config,\\n Verification memory signature,\\n address signer\\n ) external;\\n\\n /**\\n * @notice Get the Holograph Protocol contract\\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\\n */\\n function getHolograph() external view returns (address holograph);\\n\\n /**\\n * @notice Update the Holograph Protocol contract address\\n * @param holograph address of the Holograph Protocol smart contract to use\\n */\\n function setHolograph(address holograph) external;\\n\\n /**\\n * @notice Get the Holograph Registry module\\n * @dev This module stores a reference for all deployed holographable smart contracts\\n */\\n function getRegistry() external view returns (address registry);\\n\\n /**\\n * @notice Update the Holograph Registry module address\\n * @param registry address of the Holograph Registry smart contract to use\\n */\\n function setRegistry(address registry) external;\\n}\\n\",\"keccak256\":\"0x44cd1db20207337ef6abde2d0f42837778d13fb62fe353b0ee9b293a601a0d71\",\"license\":\"UNLICENSED\"},\"contracts/interface/HolographInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\n/**\\n * @title Holograph Protocol\\n * @author https://github.com/holographxyz\\n * @notice This is the primary Holograph Protocol smart contract\\n * @dev This contract stores a reference to all the primary modules and variables of the protocol\\n */\\ninterface HolographInterface {\\n /**\\n * @notice Get the address of the Holograph Bridge module\\n * @dev Used for beaming holographable assets cross-chain\\n */\\n function getBridge() external view returns (address bridge);\\n\\n /**\\n * @notice Update the Holograph Bridge module address\\n * @param bridge address of the Holograph Bridge smart contract to use\\n */\\n function setBridge(address bridge) external;\\n\\n /**\\n * @notice Get the chain ID that the Protocol was deployed on\\n * @dev Useful for checking if/when a hard fork occurs\\n */\\n function getChainId() external view returns (uint256 chainId);\\n\\n /**\\n * @notice Update the chain ID\\n * @dev Useful for updating once a hard fork has been mitigated\\n * @param chainId EVM chain ID to use\\n */\\n function setChainId(uint256 chainId) external;\\n\\n /**\\n * @notice Get the address of the Holograph Factory module\\n * @dev Used for deploying holographable smart contracts\\n */\\n function getFactory() external view returns (address factory);\\n\\n /**\\n * @notice Update the Holograph Factory module address\\n * @param factory address of the Holograph Factory smart contract to use\\n */\\n function setFactory(address factory) external;\\n\\n /**\\n * @notice Get the Holograph chain Id\\n * @dev Holograph uses an internal chain id mapping\\n */\\n function getHolographChainId() external view returns (uint32 holographChainId);\\n\\n /**\\n * @notice Update the Holograph chain ID\\n * @dev Useful for updating once a hard fork was mitigated\\n * @param holographChainId Holograph chain ID to use\\n */\\n function setHolographChainId(uint32 holographChainId) external;\\n\\n /**\\n * @notice Get the address of the Holograph Interfaces module\\n * @dev Holograph uses this contract to store data that needs to be accessed by a large portion of the modules\\n */\\n function getInterfaces() external view returns (address interfaces);\\n\\n /**\\n * @notice Update the Holograph Interfaces module address\\n * @param interfaces address of the Holograph Interfaces smart contract to use\\n */\\n function setInterfaces(address interfaces) external;\\n\\n /**\\n * @notice Get the address of the Holograph Operator module\\n * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module\\n */\\n function getOperator() external view returns (address operator);\\n\\n /**\\n * @notice Update the Holograph Operator module address\\n * @param operator address of the Holograph Operator smart contract to use\\n */\\n function setOperator(address operator) external;\\n\\n /**\\n * @notice Get the Holograph Registry module\\n * @dev This module stores a reference for all deployed holographable smart contracts\\n */\\n function getRegistry() external view returns (address registry);\\n\\n /**\\n * @notice Update the Holograph Registry module address\\n * @param registry address of the Holograph Registry smart contract to use\\n */\\n function setRegistry(address registry) external;\\n\\n /**\\n * @notice Get the Holograph Treasury module\\n * @dev All of the Holograph Protocol assets are stored and managed by this module\\n */\\n function getTreasury() external view returns (address treasury);\\n\\n /**\\n * @notice Update the Holograph Treasury module address\\n * @param treasury address of the Holograph Treasury smart contract to use\\n */\\n function setTreasury(address treasury) external;\\n\\n /**\\n * @notice Get the Holograph Utility Token address\\n * @dev This is the official utility token of the Holograph Protocol\\n */\\n function getUtilityToken() external view returns (address utilityToken);\\n\\n /**\\n * @notice Update the Holograph Utility Token address\\n * @param utilityToken address of the Holograph Utility Token smart contract to use\\n */\\n function setUtilityToken(address utilityToken) external;\\n}\\n\",\"keccak256\":\"0x90b5643e77e914393c508d59b80f5739debfd72455029c0db041f92374b3f586\",\"license\":\"UNLICENSED\"},\"contracts/interface/HolographRegistryInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\ninterface HolographRegistryInterface {\\n function isHolographedContract(address smartContract) external view returns (bool);\\n\\n function isHolographedHashDeployed(bytes32 hash) external view returns (bool);\\n\\n function referenceContractTypeAddress(address contractAddress) external returns (bytes32);\\n\\n function getContractTypeAddress(bytes32 contractType) external view returns (address);\\n\\n function setContractTypeAddress(bytes32 contractType, address contractAddress) external;\\n\\n function getHolograph() external view returns (address holograph);\\n\\n function setHolograph(address holograph) external;\\n\\n function getHolographableContracts(uint256 index, uint256 length) external view returns (address[] memory contracts);\\n\\n function getHolographableContractsLength() external view returns (uint256);\\n\\n function getHolographedHashAddress(bytes32 hash) external view returns (address);\\n\\n function setHolographedHashAddress(bytes32 hash, address contractAddress) external;\\n\\n function getHToken(uint32 chainId) external view returns (address);\\n\\n function setHToken(uint32 chainId, address hToken) external;\\n\\n function getReservedContractTypeAddress(bytes32 contractType) external view returns (address contractTypeAddress);\\n\\n function setReservedContractTypeAddress(bytes32 hash, bool reserved) external;\\n\\n function setReservedContractTypeAddresses(bytes32[] calldata hashes, bool[] calldata reserved) external;\\n\\n function getUtilityToken() external view returns (address utilityToken);\\n\\n function setUtilityToken(address utilityToken) external;\\n}\\n\",\"keccak256\":\"0xaf69834caeee449c3d3d7c7da9bbd27368b448526d9b147482a319311288ad18\",\"license\":\"UNLICENSED\"},\"contracts/interface/Holographable.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\ninterface Holographable {\\n function bridgeIn(uint32 fromChain, bytes calldata payload) external returns (bytes4);\\n\\n function bridgeOut(\\n uint32 toChain,\\n address sender,\\n bytes calldata payload\\n ) external returns (bytes4 selector, bytes memory data);\\n}\\n\",\"keccak256\":\"0x4dd2fc1af269273c46156df8af5cedeed0dfb83f0bfa5696a8d64c768449285b\",\"license\":\"UNLICENSED\"},\"contracts/interface/HolographerInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\ninterface HolographerInterface {\\n function getContractType() external view returns (bytes32 contractType);\\n\\n function getDeploymentBlock() external view returns (uint256 deploymentBlock);\\n\\n function getHolograph() external view returns (address holograph);\\n\\n function getHolographEnforcer() external view returns (address);\\n\\n function getOriginChain() external view returns (uint32 originChain);\\n\\n function getSourceContract() external view returns (address sourceContract);\\n}\\n\",\"keccak256\":\"0x4274b9180266275a8df16b8e1f0956cc795fb1ab87db1c01264c343be3bea937\",\"license\":\"UNLICENSED\"},\"contracts/interface/InitializableInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\n/**\\n * @title Initializable\\n * @author https://github.com/holographxyz\\n * @notice Use init instead of constructor\\n * @dev This allows for use of init function to make one time initializations without the need of a constructor\\n */\\ninterface InitializableInterface {\\n /**\\n * @notice Used internally to initialize the contract instead of through a constructor\\n * @dev This function is called by the deployer/factory when creating a contract\\n * @param initPayload abi encoded payload to use for contract initilaization\\n */\\n function init(bytes memory initPayload) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0x0a76fae986c5c18110ce2b1818c84ec28b7bf7f8fb00d20b39b8d7225fbd892d\",\"license\":\"UNLICENSED\"},\"contracts/struct/BridgeSettings.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nstruct BridgeSettings {\\n uint256 value;\\n uint256 gasLimit;\\n uint256 gasPrice;\\n uint32 toChain;\\n}\\n\",\"keccak256\":\"0x405f453cf620c5e882cf6d915fd7d14c895877408a7fd7e298d6e751bd4a0ce1\",\"license\":\"UNLICENSED\"},\"contracts/struct/DeploymentConfig.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nstruct DeploymentConfig {\\n bytes32 contractType;\\n uint32 chainType;\\n bytes32 salt;\\n bytes byteCode;\\n bytes initCode;\\n}\\n\",\"keccak256\":\"0x5eb9e83676eb65fa424aa9ca79961e1602a749f264ea4f496a9c359dad0da726\",\"license\":\"UNLICENSED\"},\"contracts/struct/Verification.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nstruct Verification {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n}\\n\",\"keccak256\":\"0xd351869472bcb2497e0a771c6e7f7a0b794d099133c67f5f378a8f7839f9db92\",\"license\":\"UNLICENSED\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50612b68806100206000396000f3fe6080604052600436106100d65760003560e01c8063704b6c021161007f578063b7e0366111610059578063b7e036611461028d578063bf64a82d146102bb578063df6516bd146102ce578063f851a440146102ee57600080fd5b8063704b6c021461023a578063a8935c671461025a578063a91ee0dc1461026d57600080fd5b80634ddf47d4116100b05780634ddf47d4146101b25780635ab1bd53146101d25780636e9960c31461020657600080fd5b806308a1eb20146100e557806325d5cac81461013b5780634827ae0c1461015d57600080fd5b366100e057600080fd5b600080fd5b3480156100f157600080fd5b50610105610100366004611375565b610303565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020015b60405180910390f35b34801561014757600080fd5b5061015b6101563660046113ed565b6103ba565b005b34801561016957600080fd5b507fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a545b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610132565b3480156101be57600080fd5b506101056101cd36600461153f565b610499565b3480156101de57600080fd5b507fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e75461018d565b34801561021257600080fd5b507f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95461018d565b34801561024657600080fd5b5061015b6102553660046113ed565b610600565b61015b610268366004611697565b6106da565b34801561027957600080fd5b5061015b6102883660046113ed565b6108c1565b34801561029957600080fd5b506102ad6102a83660046117de565b61099b565b6040516101329291906118ac565b61015b6102c93660046118e7565b6109ef565b3480156102da57600080fd5b5061015b6102e9366004611907565b610aca565b3480156102fa57600080fd5b5061018d611015565b600080808061031485870187611907565b6040517fdf6516bd0000000000000000000000000000000000000000000000000000000081529295509093509150309063df6516bd9061035c9086908690869060040161196a565b600060405180830381600087803b15801561037657600080fd5b505af115801561038a573d6000803e3d6000fd5b507f08a1eb20000000000000000000000000000000000000000000000000000000009a9950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610475576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064015b60405180910390fd5b7fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55565b60006104c37f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a015490565b1561052a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a20616c726561647920696e697469616c697a65640000604482015260640161046c565b600080838060200190518101906105419190611a2c565b91509150327f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955817fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55807fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7556105d760017f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a0155565b507f4ddf47d4000000000000000000000000000000000000000000000000000000009392505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955565b81156106eb576106eb858585610aca565b60008585856040516020016107029392919061196a565b604051602081830303815290604052905060007fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a54905060008173ffffffffffffffffffffffffffffffffffffffff16630fffbaf36040518163ffffffff1660e01b8152600401602060405180830381865afa158015610786573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107aa9190611a66565b845190915060005b818110156108b5578273ffffffffffffffffffffffffffffffffffffffff1663e55856668783815181106107e8576107e8611a83565b60200260200101516000015188848151811061080657610806611a83565b602002602001015160600151308a868151811061082557610825611a83565b6020026020010151602001518b878151811061084357610843611a83565b6020026020010151604001518b6040518763ffffffff1660e01b8152600401610870959493929190611ab2565b6000604051808303818588803b15801561088957600080fd5b505af115801561089d573d6000803e3d6000fd5b505050505080806108ad90611b33565b9150506107b2565b50505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610977576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b7fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e755565b6000606063b7e0366160e01b848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250959c929b50919950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aa5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b808260003760008082600034875af13d6000803e808015610ac5573d6000f35b3d6000fd5b7fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a547fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e754845160208087015160408089015160608a015180519085012060808b01518051908601209251969796600096610bb796909594918b910195865260e09490941b7fffffffff0000000000000000000000000000000000000000000000000000000016602086015260248501929092526044840152606483015260601b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016608482015260980190565b604051602081830303815290604052805190602001209050610be88560000151866020015187604001518488611044565b610c4e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f484f4c4f47524150483a20696e76616c6964207369676e617475726500000000604482015260640161046c565b600060405180602001610c6090611306565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820381018352601f90910116604081815282516020808501919091207fff00000000000000000000000000000000000000000000000000000000000000828501527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b166021850152603584018790526055808501919091528251808503909101815260759093019091528151910120909150610d21816112cc565b15610d88576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f484f4c4f47524150483a20616c7265616479206465706c6f7965640000000000604482015260640161046c565b60608801518051849160009183906020830184f59150828551602087016000f560208c8101518d516040805163ffffffff9093169383019390935273ffffffffffffffffffffffffffffffffffffffff8b811693830193909352606082015284821660808201529195507f4ddf47d4000000000000000000000000000000000000000000000000000000009190861690634ddf47d49060a0016040516020818303038152906040528e60800151604051602001610e46929190611b6b565b6040516020818303038152906040526040518263ffffffff1660e01b8152600401610e719190611b90565b6020604051808303816000875af1158015610e90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eb49190611ba3565b7fffffffff000000000000000000000000000000000000000000000000000000001614610f3d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f696e697469616c697a6174696f6e206661696c65640000000000000000000000604482015260640161046c565b6040517f725229f60000000000000000000000000000000000000000000000000000000081526004810187905273ffffffffffffffffffffffffffffffffffffffff858116602483015289169063725229f690604401600060405180830381600087803b158015610fad57600080fd5b505af1158015610fc1573d6000803e3d6000fd5b505060405188925073ffffffffffffffffffffffffffffffffffffffff871691507fa802207d4c618b40db3b25b7b90e6f483e16b2c1f8d3610b15b345a718c6b41b90600090a35050505050505050505050565b600061103f7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95490565b905090565b6000601b8460ff1610156110605761105d601b85611be5565b93505b8360ff16601b1415801561107857508360ff16601c14155b15611085575060006112c3565b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0851115611122576110d7857ffffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141611c0a565b945060ff8416601b036110ed57601c93506110f2565b601b93505b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0851115611122575060006112c3565b73ffffffffffffffffffffffffffffffffffffffff8216158015906112c057506040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c810184905273ffffffffffffffffffffffffffffffffffffffff831690600190605c01604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600084529083018083525260ff881690820152606081018990526080810188905260a0016020604051602081039080840390855afa15801561120c573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff1614806112c0575060408051600081526020810180835285905260ff861691810191909152606081018790526080810186905273ffffffffffffffffffffffffffffffffffffffff83169060019060a0016020604051602081039080840390855afa15801561129e573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff16145b90505b95945050505050565b6000813f80158015906112ff57507fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708114155b9392505050565b610f3a80611c2283390190565b803563ffffffff8116811461132757600080fd5b919050565b60008083601f84011261133e57600080fd5b50813567ffffffffffffffff81111561135657600080fd5b60208301915083602082850101111561136e57600080fd5b9250929050565b60008060006040848603121561138a57600080fd5b61139384611313565b9250602084013567ffffffffffffffff8111156113af57600080fd5b6113bb8682870161132c565b9497909650939450505050565b73ffffffffffffffffffffffffffffffffffffffff811681146113ea57600080fd5b50565b6000602082840312156113ff57600080fd5b81356112ff816113c8565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516080810167ffffffffffffffff8111828210171561145c5761145c61140a565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156114a9576114a961140a565b604052919050565b600082601f8301126114c257600080fd5b813567ffffffffffffffff8111156114dc576114dc61140a565b61150d60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601611462565b81815284602083860101111561152257600080fd5b816020850160208301376000918101602001919091529392505050565b60006020828403121561155157600080fd5b813567ffffffffffffffff81111561156857600080fd5b611574848285016114b1565b949350505050565b600060a0828403121561158e57600080fd5b60405160a0810167ffffffffffffffff82821081831117156115b2576115b261140a565b81604052829350843583526115c960208601611313565b60208401526040850135604084015260608501359150808211156115ec57600080fd5b6115f8868387016114b1565b6060840152608085013591508082111561161157600080fd5b5061161e858286016114b1565b6080830152505092915050565b60006060828403121561163d57600080fd5b6040516060810181811067ffffffffffffffff821117156116605761166061140a565b80604052508091508235815260208301356020820152604083013560ff8116811461168a57600080fd5b6040919091015292915050565b600080600080600060e086880312156116af57600080fd5b853567ffffffffffffffff808211156116c757600080fd5b6116d389838a0161157c565b9650602091506116e589838a0161162b565b95506080808901356116f6816113c8565b955060a0890135801515811461170b57600080fd5b945060c08901358281111561171f57600080fd5b8901601f81018b1361173057600080fd5b8035838111156117425761174261140a565b611750858260051b01611462565b818152858101945060079190911b82018501908c82111561177057600080fd5b918501915b818310156117cb5783838e03121561178d5760008081fd5b611795611439565b8335815286840135878201526040808501359082015260606117b8818601611313565b9082015285529385019391830191611775565b8096505050505050509295509295909350565b600080600080606085870312156117f457600080fd5b6117fd85611313565b9350602085013561180d816113c8565b9250604085013567ffffffffffffffff81111561182957600080fd5b6118358782880161132c565b95989497509550505050565b6000815180845260005b818110156118675760208185018101518683018201520161184b565b81811115611879576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b7fffffffff00000000000000000000000000000000000000000000000000000000831681526040602082015260006115746040830184611841565b6000806000604084860312156118fc57600080fd5b8335611393816113c8565b600080600060a0848603121561191c57600080fd5b833567ffffffffffffffff81111561193357600080fd5b61193f8682870161157c565b93505061194f856020860161162b565b9150608084013561195f816113c8565b809150509250925092565b60a08152835160a082015263ffffffff60208501511660c0820152604084015160e08201526000606085015160a06101008401526119ac610140840182611841565b905060808601517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60848303016101208501526119e88282611841565b92505050835160208301526020840151604083015260ff6040850151166060830152611574608083018473ffffffffffffffffffffffffffffffffffffffff169052565b60008060408385031215611a3f57600080fd5b8251611a4a816113c8565b6020840151909250611a5b816113c8565b809150509250929050565b600060208284031215611a7857600080fd5b81516112ff816113c8565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b63ffffffff8616815273ffffffffffffffffffffffffffffffffffffffff8516602082015283604082015282606082015260a060808201526000611af960a0830184611841565b979650505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611b6457611b64611b04565b5060010190565b604081526000611b7e6040830185611841565b82810360208401526112c38185611841565b6020815260006112ff6020830184611841565b600060208284031215611bb557600080fd5b81517fffffffff00000000000000000000000000000000000000000000000000000000811681146112ff57600080fd5b600060ff821660ff84168060ff03821115611c0257611c02611b04565b019392505050565b600082821015611c1c57611c1c611b04565b50039056fe608060405234801561001057600080fd5b50610f1a806100206000396000f3fe6080604052600436106100c05760003560e01c806380d1cb3511610074578063c51a29e01161004e578063c51a29e0146102c1578063c8a4c3d5146102f5578063f851a4401461030a576100c7565b806380d1cb351461022c578063913a0ef21461026a578063bf64a82d146102ae576100c7565b80636e9960c3116100a55780636e9960c3146101a45780636faf275b146101d8578063704b6c021461020c576100c7565b80634827ae0c146100f95780634ddf47d414610153576100c7565b366100c757005b60006100d161031f565b90503660008037600080366000845af43d6000803e8080156100f2573d6000f35b3d6000fd5b005b34801561010557600080fd5b507fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a545b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b34801561015f57600080fd5b5061017361016e366004610bb4565b61045d565b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200161014a565b3480156101b057600080fd5b507f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c954610129565b3480156101e457600080fd5b507f27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b07454610129565b34801561021857600080fd5b506100f7610227366004610c59565b610911565b34801561023857600080fd5b507f9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de3545b60405190815260200161014a565b34801561027657600080fd5b507fd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d5460405163ffffffff909116815260200161014a565b6100f76102bc366004610c7d565b6109eb565b3480156102cd57600080fd5b507f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c75461025c565b34801561030157600080fd5b5061012961031f565b34801561031657600080fd5b50610129610ac1565b60008060007fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a5491507f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c75490508173ffffffffffffffffffffffffffffffffffffffff16635ab1bd536040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103db9190610d02565b73ffffffffffffffffffffffffffffffffffffffff166374b7510c826040518263ffffffff1660e01b815260040161041591815260200190565b602060405180830381865afa158015610432573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104569190610d02565b9250505090565b60006104877f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a015490565b156104f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f484f4c4f475241504845523a20616c726561647920696e697469616c697a656460448201526064015b60405180910390fd5b6000808380602001905181019061050a9190610d9c565b91509150600080600080858060200190518101906105289190610e00565b9350935093509350337f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955437f9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de355817f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c755827fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55837fd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d55807f27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b074556000808473ffffffffffffffffffffffffffffffffffffffff16635ab1bd536040518163ffffffff1660e01b8152600401602060405180830381865afa158015610650573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106749190610d02565b73ffffffffffffffffffffffffffffffffffffffff166374b7510c856040518263ffffffff1660e01b81526004016106ae91815260200190565b602060405180830381865afa1580156106cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ef9190610d02565b73ffffffffffffffffffffffffffffffffffffffff16634ddf47d460e01b8860405160240161071e9190610e5e565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009094169390931790925290516107a79190610eaf565b600060405180830381855af49150503d80600081146107e2576040519150601f19603f3d011682016040523d82523d6000602084013e6107e7565b606091505b50915091506000818060200190518101906108029190610ecb565b905082801561085257507fffffffff0000000000000000000000000000000000000000000000000000000081167f4ddf47d400000000000000000000000000000000000000000000000000000000145b6108b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f484f4c4f47524150483a20696e697469616c697a6174696f6e206661696c656460448201526064016104ea565b6108e160017f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a0155565b507f4ddf47d4000000000000000000000000000000000000000000000000000000009a9950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016104ea565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aa1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016104ea565b808260003760008082600034875af13d6000803e8080156100f2573d6000f35b6000610aeb7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95490565b905090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715610b6657610b66610af0565b604052919050565b600067ffffffffffffffff821115610b8857610b88610af0565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600060208284031215610bc657600080fd5b813567ffffffffffffffff811115610bdd57600080fd5b8201601f81018413610bee57600080fd5b8035610c01610bfc82610b6e565b610b1f565b818152856020838501011115610c1657600080fd5b81602084016020830137600091810160200191909152949350505050565b73ffffffffffffffffffffffffffffffffffffffff81168114610c5657600080fd5b50565b600060208284031215610c6b57600080fd5b8135610c7681610c34565b9392505050565b600080600060408486031215610c9257600080fd5b8335610c9d81610c34565b9250602084013567ffffffffffffffff80821115610cba57600080fd5b818601915086601f830112610cce57600080fd5b813581811115610cdd57600080fd5b876020828501011115610cef57600080fd5b6020830194508093505050509250925092565b600060208284031215610d1457600080fd5b8151610c7681610c34565b60005b83811015610d3a578181015183820152602001610d22565b83811115610d49576000848401525b50505050565b600082601f830112610d6057600080fd5b8151610d6e610bfc82610b6e565b818152846020838601011115610d8357600080fd5b610d94826020830160208701610d1f565b949350505050565b60008060408385031215610daf57600080fd5b825167ffffffffffffffff80821115610dc757600080fd5b610dd386838701610d4f565b93506020850151915080821115610de957600080fd5b50610df685828601610d4f565b9150509250929050565b60008060008060808587031215610e1657600080fd5b845163ffffffff81168114610e2a57600080fd5b6020860151909450610e3b81610c34565b604086015160608701519194509250610e5381610c34565b939692955090935050565b6020815260008251806020840152610e7d816040850160208701610d1f565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60008251610ec1818460208701610d1f565b9190910192915050565b600060208284031215610edd57600080fd5b81517fffffffff0000000000000000000000000000000000000000000000000000000081168114610c7657600080fdfea164736f6c634300080d000aa164736f6c634300080d000a", - "deployedBytecode": "0x6080604052600436106100d65760003560e01c8063704b6c021161007f578063b7e0366111610059578063b7e036611461028d578063bf64a82d146102bb578063df6516bd146102ce578063f851a440146102ee57600080fd5b8063704b6c021461023a578063a8935c671461025a578063a91ee0dc1461026d57600080fd5b80634ddf47d4116100b05780634ddf47d4146101b25780635ab1bd53146101d25780636e9960c31461020657600080fd5b806308a1eb20146100e557806325d5cac81461013b5780634827ae0c1461015d57600080fd5b366100e057600080fd5b600080fd5b3480156100f157600080fd5b50610105610100366004611375565b610303565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020015b60405180910390f35b34801561014757600080fd5b5061015b6101563660046113ed565b6103ba565b005b34801561016957600080fd5b507fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a545b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610132565b3480156101be57600080fd5b506101056101cd36600461153f565b610499565b3480156101de57600080fd5b507fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e75461018d565b34801561021257600080fd5b507f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95461018d565b34801561024657600080fd5b5061015b6102553660046113ed565b610600565b61015b610268366004611697565b6106da565b34801561027957600080fd5b5061015b6102883660046113ed565b6108c1565b34801561029957600080fd5b506102ad6102a83660046117de565b61099b565b6040516101329291906118ac565b61015b6102c93660046118e7565b6109ef565b3480156102da57600080fd5b5061015b6102e9366004611907565b610aca565b3480156102fa57600080fd5b5061018d611015565b600080808061031485870187611907565b6040517fdf6516bd0000000000000000000000000000000000000000000000000000000081529295509093509150309063df6516bd9061035c9086908690869060040161196a565b600060405180830381600087803b15801561037657600080fd5b505af115801561038a573d6000803e3d6000fd5b507f08a1eb20000000000000000000000000000000000000000000000000000000009a9950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610475576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064015b60405180910390fd5b7fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55565b60006104c37f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a015490565b1561052a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a20616c726561647920696e697469616c697a65640000604482015260640161046c565b600080838060200190518101906105419190611a2c565b91509150327f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955817fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55807fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7556105d760017f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a0155565b507f4ddf47d4000000000000000000000000000000000000000000000000000000009392505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955565b81156106eb576106eb858585610aca565b60008585856040516020016107029392919061196a565b604051602081830303815290604052905060007fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a54905060008173ffffffffffffffffffffffffffffffffffffffff16630fffbaf36040518163ffffffff1660e01b8152600401602060405180830381865afa158015610786573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107aa9190611a66565b845190915060005b818110156108b5578273ffffffffffffffffffffffffffffffffffffffff1663e55856668783815181106107e8576107e8611a83565b60200260200101516000015188848151811061080657610806611a83565b602002602001015160600151308a868151811061082557610825611a83565b6020026020010151602001518b878151811061084357610843611a83565b6020026020010151604001518b6040518763ffffffff1660e01b8152600401610870959493929190611ab2565b6000604051808303818588803b15801561088957600080fd5b505af115801561089d573d6000803e3d6000fd5b505050505080806108ad90611b33565b9150506107b2565b50505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610977576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b7fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e755565b6000606063b7e0366160e01b848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250959c929b50919950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aa5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b808260003760008082600034875af13d6000803e808015610ac5573d6000f35b3d6000fd5b7fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a547fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e754845160208087015160408089015160608a015180519085012060808b01518051908601209251969796600096610bb796909594918b910195865260e09490941b7fffffffff0000000000000000000000000000000000000000000000000000000016602086015260248501929092526044840152606483015260601b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016608482015260980190565b604051602081830303815290604052805190602001209050610be88560000151866020015187604001518488611044565b610c4e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f484f4c4f47524150483a20696e76616c6964207369676e617475726500000000604482015260640161046c565b600060405180602001610c6090611306565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820381018352601f90910116604081815282516020808501919091207fff00000000000000000000000000000000000000000000000000000000000000828501527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b166021850152603584018790526055808501919091528251808503909101815260759093019091528151910120909150610d21816112cc565b15610d88576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f484f4c4f47524150483a20616c7265616479206465706c6f7965640000000000604482015260640161046c565b60608801518051849160009183906020830184f59150828551602087016000f560208c8101518d516040805163ffffffff9093169383019390935273ffffffffffffffffffffffffffffffffffffffff8b811693830193909352606082015284821660808201529195507f4ddf47d4000000000000000000000000000000000000000000000000000000009190861690634ddf47d49060a0016040516020818303038152906040528e60800151604051602001610e46929190611b6b565b6040516020818303038152906040526040518263ffffffff1660e01b8152600401610e719190611b90565b6020604051808303816000875af1158015610e90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eb49190611ba3565b7fffffffff000000000000000000000000000000000000000000000000000000001614610f3d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f696e697469616c697a6174696f6e206661696c65640000000000000000000000604482015260640161046c565b6040517f725229f60000000000000000000000000000000000000000000000000000000081526004810187905273ffffffffffffffffffffffffffffffffffffffff858116602483015289169063725229f690604401600060405180830381600087803b158015610fad57600080fd5b505af1158015610fc1573d6000803e3d6000fd5b505060405188925073ffffffffffffffffffffffffffffffffffffffff871691507fa802207d4c618b40db3b25b7b90e6f483e16b2c1f8d3610b15b345a718c6b41b90600090a35050505050505050505050565b600061103f7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95490565b905090565b6000601b8460ff1610156110605761105d601b85611be5565b93505b8360ff16601b1415801561107857508360ff16601c14155b15611085575060006112c3565b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0851115611122576110d7857ffffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141611c0a565b945060ff8416601b036110ed57601c93506110f2565b601b93505b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0851115611122575060006112c3565b73ffffffffffffffffffffffffffffffffffffffff8216158015906112c057506040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c810184905273ffffffffffffffffffffffffffffffffffffffff831690600190605c01604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600084529083018083525260ff881690820152606081018990526080810188905260a0016020604051602081039080840390855afa15801561120c573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff1614806112c0575060408051600081526020810180835285905260ff861691810191909152606081018790526080810186905273ffffffffffffffffffffffffffffffffffffffff83169060019060a0016020604051602081039080840390855afa15801561129e573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff16145b90505b95945050505050565b6000813f80158015906112ff57507fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708114155b9392505050565b610f3a80611c2283390190565b803563ffffffff8116811461132757600080fd5b919050565b60008083601f84011261133e57600080fd5b50813567ffffffffffffffff81111561135657600080fd5b60208301915083602082850101111561136e57600080fd5b9250929050565b60008060006040848603121561138a57600080fd5b61139384611313565b9250602084013567ffffffffffffffff8111156113af57600080fd5b6113bb8682870161132c565b9497909650939450505050565b73ffffffffffffffffffffffffffffffffffffffff811681146113ea57600080fd5b50565b6000602082840312156113ff57600080fd5b81356112ff816113c8565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516080810167ffffffffffffffff8111828210171561145c5761145c61140a565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156114a9576114a961140a565b604052919050565b600082601f8301126114c257600080fd5b813567ffffffffffffffff8111156114dc576114dc61140a565b61150d60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601611462565b81815284602083860101111561152257600080fd5b816020850160208301376000918101602001919091529392505050565b60006020828403121561155157600080fd5b813567ffffffffffffffff81111561156857600080fd5b611574848285016114b1565b949350505050565b600060a0828403121561158e57600080fd5b60405160a0810167ffffffffffffffff82821081831117156115b2576115b261140a565b81604052829350843583526115c960208601611313565b60208401526040850135604084015260608501359150808211156115ec57600080fd5b6115f8868387016114b1565b6060840152608085013591508082111561161157600080fd5b5061161e858286016114b1565b6080830152505092915050565b60006060828403121561163d57600080fd5b6040516060810181811067ffffffffffffffff821117156116605761166061140a565b80604052508091508235815260208301356020820152604083013560ff8116811461168a57600080fd5b6040919091015292915050565b600080600080600060e086880312156116af57600080fd5b853567ffffffffffffffff808211156116c757600080fd5b6116d389838a0161157c565b9650602091506116e589838a0161162b565b95506080808901356116f6816113c8565b955060a0890135801515811461170b57600080fd5b945060c08901358281111561171f57600080fd5b8901601f81018b1361173057600080fd5b8035838111156117425761174261140a565b611750858260051b01611462565b818152858101945060079190911b82018501908c82111561177057600080fd5b918501915b818310156117cb5783838e03121561178d5760008081fd5b611795611439565b8335815286840135878201526040808501359082015260606117b8818601611313565b9082015285529385019391830191611775565b8096505050505050509295509295909350565b600080600080606085870312156117f457600080fd5b6117fd85611313565b9350602085013561180d816113c8565b9250604085013567ffffffffffffffff81111561182957600080fd5b6118358782880161132c565b95989497509550505050565b6000815180845260005b818110156118675760208185018101518683018201520161184b565b81811115611879576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b7fffffffff00000000000000000000000000000000000000000000000000000000831681526040602082015260006115746040830184611841565b6000806000604084860312156118fc57600080fd5b8335611393816113c8565b600080600060a0848603121561191c57600080fd5b833567ffffffffffffffff81111561193357600080fd5b61193f8682870161157c565b93505061194f856020860161162b565b9150608084013561195f816113c8565b809150509250925092565b60a08152835160a082015263ffffffff60208501511660c0820152604084015160e08201526000606085015160a06101008401526119ac610140840182611841565b905060808601517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60848303016101208501526119e88282611841565b92505050835160208301526020840151604083015260ff6040850151166060830152611574608083018473ffffffffffffffffffffffffffffffffffffffff169052565b60008060408385031215611a3f57600080fd5b8251611a4a816113c8565b6020840151909250611a5b816113c8565b809150509250929050565b600060208284031215611a7857600080fd5b81516112ff816113c8565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b63ffffffff8616815273ffffffffffffffffffffffffffffffffffffffff8516602082015283604082015282606082015260a060808201526000611af960a0830184611841565b979650505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611b6457611b64611b04565b5060010190565b604081526000611b7e6040830185611841565b82810360208401526112c38185611841565b6020815260006112ff6020830184611841565b600060208284031215611bb557600080fd5b81517fffffffff00000000000000000000000000000000000000000000000000000000811681146112ff57600080fd5b600060ff821660ff84168060ff03821115611c0257611c02611b04565b019392505050565b600082821015611c1c57611c1c611b04565b50039056fe608060405234801561001057600080fd5b50610f1a806100206000396000f3fe6080604052600436106100c05760003560e01c806380d1cb3511610074578063c51a29e01161004e578063c51a29e0146102c1578063c8a4c3d5146102f5578063f851a4401461030a576100c7565b806380d1cb351461022c578063913a0ef21461026a578063bf64a82d146102ae576100c7565b80636e9960c3116100a55780636e9960c3146101a45780636faf275b146101d8578063704b6c021461020c576100c7565b80634827ae0c146100f95780634ddf47d414610153576100c7565b366100c757005b60006100d161031f565b90503660008037600080366000845af43d6000803e8080156100f2573d6000f35b3d6000fd5b005b34801561010557600080fd5b507fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a545b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b34801561015f57600080fd5b5061017361016e366004610bb4565b61045d565b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200161014a565b3480156101b057600080fd5b507f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c954610129565b3480156101e457600080fd5b507f27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b07454610129565b34801561021857600080fd5b506100f7610227366004610c59565b610911565b34801561023857600080fd5b507f9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de3545b60405190815260200161014a565b34801561027657600080fd5b507fd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d5460405163ffffffff909116815260200161014a565b6100f76102bc366004610c7d565b6109eb565b3480156102cd57600080fd5b507f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c75461025c565b34801561030157600080fd5b5061012961031f565b34801561031657600080fd5b50610129610ac1565b60008060007fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a5491507f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c75490508173ffffffffffffffffffffffffffffffffffffffff16635ab1bd536040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103db9190610d02565b73ffffffffffffffffffffffffffffffffffffffff166374b7510c826040518263ffffffff1660e01b815260040161041591815260200190565b602060405180830381865afa158015610432573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104569190610d02565b9250505090565b60006104877f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a015490565b156104f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f484f4c4f475241504845523a20616c726561647920696e697469616c697a656460448201526064015b60405180910390fd5b6000808380602001905181019061050a9190610d9c565b91509150600080600080858060200190518101906105289190610e00565b9350935093509350337f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955437f9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de355817f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c755827fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55837fd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d55807f27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b074556000808473ffffffffffffffffffffffffffffffffffffffff16635ab1bd536040518163ffffffff1660e01b8152600401602060405180830381865afa158015610650573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106749190610d02565b73ffffffffffffffffffffffffffffffffffffffff166374b7510c856040518263ffffffff1660e01b81526004016106ae91815260200190565b602060405180830381865afa1580156106cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ef9190610d02565b73ffffffffffffffffffffffffffffffffffffffff16634ddf47d460e01b8860405160240161071e9190610e5e565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009094169390931790925290516107a79190610eaf565b600060405180830381855af49150503d80600081146107e2576040519150601f19603f3d011682016040523d82523d6000602084013e6107e7565b606091505b50915091506000818060200190518101906108029190610ecb565b905082801561085257507fffffffff0000000000000000000000000000000000000000000000000000000081167f4ddf47d400000000000000000000000000000000000000000000000000000000145b6108b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f484f4c4f47524150483a20696e697469616c697a6174696f6e206661696c656460448201526064016104ea565b6108e160017f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a0155565b507f4ddf47d4000000000000000000000000000000000000000000000000000000009a9950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016104ea565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aa1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016104ea565b808260003760008082600034875af13d6000803e8080156100f2573d6000f35b6000610aeb7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95490565b905090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715610b6657610b66610af0565b604052919050565b600067ffffffffffffffff821115610b8857610b88610af0565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600060208284031215610bc657600080fd5b813567ffffffffffffffff811115610bdd57600080fd5b8201601f81018413610bee57600080fd5b8035610c01610bfc82610b6e565b610b1f565b818152856020838501011115610c1657600080fd5b81602084016020830137600091810160200191909152949350505050565b73ffffffffffffffffffffffffffffffffffffffff81168114610c5657600080fd5b50565b600060208284031215610c6b57600080fd5b8135610c7681610c34565b9392505050565b600080600060408486031215610c9257600080fd5b8335610c9d81610c34565b9250602084013567ffffffffffffffff80821115610cba57600080fd5b818601915086601f830112610cce57600080fd5b813581811115610cdd57600080fd5b876020828501011115610cef57600080fd5b6020830194508093505050509250925092565b600060208284031215610d1457600080fd5b8151610c7681610c34565b60005b83811015610d3a578181015183820152602001610d22565b83811115610d49576000848401525b50505050565b600082601f830112610d6057600080fd5b8151610d6e610bfc82610b6e565b818152846020838601011115610d8357600080fd5b610d94826020830160208701610d1f565b949350505050565b60008060408385031215610daf57600080fd5b825167ffffffffffffffff80821115610dc757600080fd5b610dd386838701610d4f565b93506020850151915080821115610de957600080fd5b50610df685828601610d4f565b9150509250929050565b60008060008060808587031215610e1657600080fd5b845163ffffffff81168114610e2a57600080fd5b6020860151909450610e3b81610c34565b604086015160608701519194509250610e5381610c34565b939692955090935050565b6020815260008251806020840152610e7d816040850160208701610d1f565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60008251610ec1818460208701610d1f565b9190910192915050565b600060208284031215610edd57600080fd5b81517fffffffff0000000000000000000000000000000000000000000000000000000081168114610c7657600080fdfea164736f6c634300080d000aa164736f6c634300080d000a", + "numDeployments": 5, + "solcInputHash": "c71d96e115e745dd34ef9239c385494d", + "metadata": "{\"compiler\":{\"version\":\"0.8.13+commit.abaa5c0e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"BridgeableContractDeployed\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"adminCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"bridgeIn\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"bridgeOut\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"selector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"contractType\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"chainType\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"salt\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"byteCode\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"initCode\",\"type\":\"bytes\"}],\"internalType\":\"struct DeploymentConfig\",\"name\":\"config\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"}],\"internalType\":\"struct Verification\",\"name\":\"signature\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"}],\"name\":\"deployHolographableContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"contractType\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"chainType\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"salt\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"byteCode\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"initCode\",\"type\":\"bytes\"}],\"internalType\":\"struct DeploymentConfig\",\"name\":\"config\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"}],\"internalType\":\"struct Verification\",\"name\":\"signature\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"deployOnCurrentChain\",\"type\":\"bool\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"toChain\",\"type\":\"uint32\"}],\"internalType\":\"struct BridgeSettings[]\",\"name\":\"bridgeSettings\",\"type\":\"tuple[]\"}],\"name\":\"deployHolographableContractMultiChain\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"adminAddress\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getHolograph\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"holograph\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRegistry\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"registry\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"initPayload\",\"type\":\"bytes\"}],\"name\":\"init\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"adminAddress\",\"type\":\"address\"}],\"name\":\"setAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"holograph\",\"type\":\"address\"}],\"name\":\"setHolograph\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"registry\",\"type\":\"address\"}],\"name\":\"setRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"author\":\"https://github.com/holographxyz\",\"details\":\"The contract provides methods that allow for the creation of Holograph Protocol compliant smart contracts, that are capable of minting holographable assets\",\"kind\":\"dev\",\"methods\":{\"bridgeIn(uint32,bytes)\":{\"details\":\"This function directly forwards the calldata to the deployHolographableContract function It is used to allow for Holograph Bridge to make cross-chain deployments\"},\"bridgeOut(uint32,address,bytes)\":{\"details\":\"This function directly returns the calldata It is used to allow for Holograph Bridge to make cross-chain deployments\"},\"constructor\":{\"details\":\"Constructor is left empty and init is used instead\"},\"deployHolographableContract((bytes32,uint32,bytes32,bytes,bytes),(bytes32,bytes32,uint8),address)\":{\"details\":\"Using this function allows to deploy smart contracts that have the same address across all EVM chains\",\"params\":{\"config\":\"contract deployement configurations\",\"signature\":\"that was created by the wallet that created the original payload\",\"signer\":\"address of wallet that created the payload\"}},\"getHolograph()\":{\"details\":\"Used for storing a reference to all the primary modules and variables of the protocol\"},\"getRegistry()\":{\"details\":\"This module stores a reference for all deployed holographable smart contracts\"},\"init(bytes)\":{\"details\":\"This function is called by the deployer/factory when creating a contract\",\"params\":{\"initPayload\":\"abi encoded payload to use for contract initilaization\"}},\"setHolograph(address)\":{\"params\":{\"holograph\":\"address of the Holograph Protocol smart contract to use\"}},\"setRegistry(address)\":{\"params\":{\"registry\":\"address of the Holograph Registry smart contract to use\"}}},\"stateVariables\":{\"_holographSlot\":{\"details\":\"bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\"},\"_registrySlot\":{\"details\":\"bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\"}},\"title\":\"Holograph Factory\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"bridgeIn(uint32,bytes)\":{\"notice\":\"Deploy holographable contract via bridge request\"},\"bridgeOut(uint32,address,bytes)\":{\"notice\":\"Deploy holographable contract via bridge request\"},\"deployHolographableContract((bytes32,uint32,bytes32,bytes,bytes),(bytes32,bytes32,uint8),address)\":{\"notice\":\"Deploy a holographable smart contract\"},\"getHolograph()\":{\"notice\":\"Get the Holograph Protocol contract\"},\"getRegistry()\":{\"notice\":\"Get the Holograph Registry module\"},\"init(bytes)\":{\"notice\":\"Used internally to initialize the contract instead of through a constructor\"},\"setHolograph(address)\":{\"notice\":\"Update the Holograph Protocol contract address\"},\"setRegistry(address)\":{\"notice\":\"Update the Holograph Registry module address\"}},\"notice\":\"Deploy holographable contracts\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/HolographFactory.sol\":\"HolographFactory\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc721a-upgradeable/=erc721a-upgradeable/\",\":forge-std/=lib/forge-std/src/\"]},\"sources\":{\"contracts/HolographFactory.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nimport \\\"./abstract/Admin.sol\\\";\\nimport \\\"./abstract/Initializable.sol\\\";\\n\\nimport \\\"./enforcer/Holographer.sol\\\";\\n\\nimport \\\"./interface/Holographable.sol\\\";\\nimport \\\"./interface/HolographBridgeInterface.sol\\\";\\nimport \\\"./interface/HolographFactoryInterface.sol\\\";\\nimport \\\"./interface/HolographInterface.sol\\\";\\nimport \\\"./interface/HolographRegistryInterface.sol\\\";\\nimport \\\"./interface/InitializableInterface.sol\\\";\\n\\nimport \\\"./struct/BridgeSettings.sol\\\";\\nimport \\\"./struct/DeploymentConfig.sol\\\";\\nimport \\\"./struct/Verification.sol\\\";\\n\\nimport \\\"./library/Strings.sol\\\";\\n\\n/**\\n * @title Holograph Factory\\n * @author https://github.com/holographxyz\\n * @notice Deploy holographable contracts\\n * @dev The contract provides methods that allow for the creation of Holograph Protocol compliant smart contracts, that are capable of minting holographable assets\\n */\\ncontract HolographFactory is Admin, Initializable, Holographable, HolographFactoryInterface {\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\\n */\\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\\n */\\n bytes32 constant _registrySlot = 0xce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7;\\n\\n /**\\n * @dev Constructor is left empty and init is used instead\\n */\\n constructor() {}\\n\\n /**\\n * @notice Used internally to initialize the contract instead of through a constructor\\n * @dev This function is called by the deployer/factory when creating a contract\\n * @param initPayload abi encoded payload to use for contract initilaization\\n */\\n function init(bytes memory initPayload) external override returns (bytes4) {\\n require(!_isInitialized(), \\\"HOLOGRAPH: already initialized\\\");\\n (address holograph, address registry) = abi.decode(initPayload, (address, address));\\n assembly {\\n sstore(_adminSlot, origin())\\n sstore(_holographSlot, holograph)\\n sstore(_registrySlot, registry)\\n }\\n _setInitialized();\\n return InitializableInterface.init.selector;\\n }\\n\\n /**\\n * @notice Deploy holographable contract via bridge request\\n * @dev This function directly forwards the calldata to the deployHolographableContract function\\n * It is used to allow for Holograph Bridge to make cross-chain deployments\\n */\\n function bridgeIn(uint32 /* fromChain*/, bytes calldata payload) external returns (bytes4) {\\n (DeploymentConfig memory config, Verification memory signature, address signer) = abi.decode(\\n payload,\\n (DeploymentConfig, Verification, address)\\n );\\n HolographFactoryInterface(address(this)).deployHolographableContract(config, signature, signer);\\n return Holographable.bridgeIn.selector;\\n }\\n\\n /**\\n * @notice Deploy holographable contract via bridge request\\n * @dev This function directly returns the calldata\\n * It is used to allow for Holograph Bridge to make cross-chain deployments\\n */\\n function bridgeOut(\\n uint32 /* toChain*/,\\n address /* sender*/,\\n bytes calldata payload\\n ) external pure returns (bytes4 selector, bytes memory data) {\\n return (Holographable.bridgeOut.selector, payload);\\n }\\n\\n function deployHolographableContractMultiChain(\\n DeploymentConfig memory config,\\n Verification memory signature,\\n address signer,\\n bool deployOnCurrentChain,\\n BridgeSettings[] memory bridgeSettings\\n ) external payable {\\n if (deployOnCurrentChain) {\\n deployHolographableContract(config, signature, signer);\\n }\\n bytes memory payload = abi.encode(config, signature, signer);\\n HolographInterface holograph;\\n assembly {\\n holograph := sload(_holographSlot)\\n }\\n HolographBridgeInterface bridge = HolographBridgeInterface(holograph.getBridge());\\n uint256 l = bridgeSettings.length;\\n for (uint256 i = 0; i < l; i++) {\\n bridge.bridgeOutRequest{value: bridgeSettings[i].value}(\\n bridgeSettings[i].toChain,\\n address(this),\\n bridgeSettings[i].gasLimit,\\n bridgeSettings[i].gasPrice,\\n payload\\n );\\n }\\n }\\n\\n /**\\n * @notice Deploy a holographable smart contract\\n * @dev Using this function allows to deploy smart contracts that have the same address across all EVM chains\\n * @param config contract deployement configurations\\n * @param signature that was created by the wallet that created the original payload\\n * @param signer address of wallet that created the payload\\n */\\n function deployHolographableContract(\\n DeploymentConfig memory config,\\n Verification memory signature,\\n address signer\\n ) public {\\n address registry;\\n address holograph;\\n assembly {\\n holograph := sload(_holographSlot)\\n registry := sload(_registrySlot)\\n }\\n /**\\n * @dev the configuration is encoded and hashed along with signer address\\n */\\n bytes32 hash = keccak256(\\n abi.encodePacked(\\n config.contractType,\\n config.chainType,\\n config.salt,\\n keccak256(config.byteCode),\\n keccak256(config.initCode),\\n signer\\n )\\n );\\n /**\\n * @dev the hash is validated against signature\\n * this is to guarantee that the original creator's configuration has not been altered\\n */\\n require(_verifySigner(signature.r, signature.s, signature.v, hash, signer), \\\"HOLOGRAPH: invalid signature\\\");\\n /**\\n * @dev check that this contract has not already been deployed on this chain\\n */\\n bytes memory holographerBytecode = type(Holographer).creationCode;\\n address holographerAddress = address(\\n uint160(uint256(keccak256(abi.encodePacked(bytes1(0xff), address(this), hash, keccak256(holographerBytecode)))))\\n );\\n require(!_isContract(holographerAddress), \\\"HOLOGRAPH: already deployed\\\");\\n /**\\n * @dev convert hash into uint256 which will be used as the salt for create2\\n */\\n uint256 saltInt = uint256(hash);\\n address sourceContractAddress;\\n bytes memory sourceByteCode = config.byteCode;\\n assembly {\\n /**\\n * @dev deploy the user created smart contract first\\n */\\n sourceContractAddress := create2(0, add(sourceByteCode, 0x20), mload(sourceByteCode), saltInt)\\n }\\n assembly {\\n /**\\n * @dev deploy the Holographer contract\\n */\\n holographerAddress := create2(0, add(holographerBytecode, 0x20), mload(holographerBytecode), saltInt)\\n }\\n /**\\n * @dev initialize the Holographer contract\\n */\\n require(\\n InitializableInterface(holographerAddress).init(\\n abi.encode(abi.encode(config.chainType, holograph, config.contractType, sourceContractAddress), config.initCode)\\n ) == InitializableInterface.init.selector,\\n \\\"initialization failed\\\"\\n );\\n /**\\n * @dev update the Holograph Registry with deployed contract address\\n */\\n HolographRegistryInterface(registry).setHolographedHashAddress(hash, holographerAddress);\\n /**\\n * @dev emit an event that on-chain indexers can easily read\\n */\\n emit BridgeableContractDeployed(holographerAddress, hash);\\n }\\n\\n /**\\n * @notice Get the Holograph Protocol contract\\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\\n */\\n function getHolograph() external view returns (address holograph) {\\n assembly {\\n holograph := sload(_holographSlot)\\n }\\n }\\n\\n /**\\n * @notice Update the Holograph Protocol contract address\\n * @param holograph address of the Holograph Protocol smart contract to use\\n */\\n function setHolograph(address holograph) external onlyAdmin {\\n assembly {\\n sstore(_holographSlot, holograph)\\n }\\n }\\n\\n /**\\n * @notice Get the Holograph Registry module\\n * @dev This module stores a reference for all deployed holographable smart contracts\\n */\\n function getRegistry() external view returns (address registry) {\\n assembly {\\n registry := sload(_registrySlot)\\n }\\n }\\n\\n /**\\n * @notice Update the Holograph Registry module address\\n * @param registry address of the Holograph Registry smart contract to use\\n */\\n function setRegistry(address registry) external onlyAdmin {\\n assembly {\\n sstore(_registrySlot, registry)\\n }\\n }\\n\\n /**\\n * @dev Internal function used for checking if a contract has been deployed at address\\n */\\n function _isContract(address contractAddress) private view returns (bool) {\\n bytes32 codehash;\\n assembly {\\n codehash := extcodehash(contractAddress)\\n }\\n return (codehash != 0x0 && codehash != 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470);\\n }\\n\\n /**\\n * @dev Internal function used for verifying a signature\\n */\\n function _verifySigner(bytes32 r, bytes32 s, uint8 v, bytes32 hash, address signer) private pure returns (bool) {\\n if (v < 27) {\\n v += 27;\\n }\\n if (v != 27 && v != 28) {\\n return false;\\n }\\n // prevent signature malleability by checking if s-value is in the upper range\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n // if s-value is in upper range, calculate a new s-value\\n s = bytes32(0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - uint256(s));\\n // flip the v-value\\n if (v == 27) {\\n v = 28;\\n } else {\\n v = 27;\\n }\\n // check if s-value is still in upper range\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return false;\\n }\\n }\\n /**\\n * @dev signature is checked against EIP-191 first, then directly, to support legacy wallets\\n */\\n return (signer != address(0) &&\\n (ecrecover(keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash)), v, r, s) == signer ||\\n (\\n ecrecover(\\n keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n66\\\", Strings.toHexString(uint256(hash), 32))),\\n v,\\n r,\\n s\\n )\\n ) ==\\n signer ||\\n ecrecover(hash, v, r, s) == signer));\\n }\\n\\n /**\\n * @dev Purposefully reverts to prevent having any type of ether transfered into the contract\\n */\\n receive() external payable {\\n revert();\\n }\\n\\n /**\\n * @dev Purposefully reverts to prevent any calls to undefined functions\\n */\\n fallback() external payable {\\n revert();\\n }\\n}\\n\",\"keccak256\":\"0xb18538929ca40465f6762c4a6204f631d4a9844e2af366d46d9c340a4c75757c\",\"license\":\"UNLICENSED\"},\"contracts/abstract/Admin.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nabstract contract Admin {\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.admin')) - 1)\\n */\\n bytes32 constant _adminSlot = 0x3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c9;\\n\\n modifier onlyAdmin() {\\n require(msg.sender == getAdmin(), \\\"HOLOGRAPH: admin only function\\\");\\n _;\\n }\\n\\n constructor() {}\\n\\n function admin() public view returns (address) {\\n return getAdmin();\\n }\\n\\n function getAdmin() public view returns (address adminAddress) {\\n assembly {\\n adminAddress := sload(_adminSlot)\\n }\\n }\\n\\n function setAdmin(address adminAddress) public onlyAdmin {\\n assembly {\\n sstore(_adminSlot, adminAddress)\\n }\\n }\\n\\n function adminCall(address target, bytes calldata data) external payable onlyAdmin {\\n assembly {\\n calldatacopy(0, data.offset, data.length)\\n let result := call(gas(), target, callvalue(), 0, data.length, 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n switch result\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x93552c9253b579c45113a150a6a3dfddb997afd939d09b49c34d040525734b1a\",\"license\":\"UNLICENSED\"},\"contracts/abstract/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nimport \\\"../interface/InitializableInterface.sol\\\";\\n\\n/**\\n * @title Initializable\\n * @author https://github.com/holographxyz\\n * @notice Use init instead of constructor\\n * @dev This allows for use of init function to make one time initializations without the need for a constructor\\n */\\nabstract contract Initializable is InitializableInterface {\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.initialized')) - 1)\\n */\\n bytes32 constant _initializedSlot = 0x4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a01;\\n\\n /**\\n * @dev Constructor is left empty and init is used instead\\n */\\n constructor() {}\\n\\n /**\\n * @notice Used internally to initialize the contract instead of through a constructor\\n * @dev This function is called by the deployer/factory when creating a contract\\n * @param initPayload abi encoded payload to use for contract initilaization\\n */\\n function init(bytes memory initPayload) external virtual returns (bytes4);\\n\\n function _isInitialized() internal view returns (bool initialized) {\\n assembly {\\n initialized := sload(_initializedSlot)\\n }\\n }\\n\\n function _setInitialized() internal {\\n assembly {\\n sstore(_initializedSlot, 0x0000000000000000000000000000000000000000000000000000000000000001)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa55dc367285f96952dec56adfbfb48b6a4be31aef9ba0d30ad8c91023a572462\",\"license\":\"UNLICENSED\"},\"contracts/enforcer/Holographer.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nimport \\\"../abstract/Admin.sol\\\";\\nimport \\\"../abstract/Initializable.sol\\\";\\n\\nimport \\\"../interface/HolographInterface.sol\\\";\\nimport \\\"../interface/HolographerInterface.sol\\\";\\nimport \\\"../interface/HolographRegistryInterface.sol\\\";\\nimport \\\"../interface/InitializableInterface.sol\\\";\\n\\n/**\\n * @dev This contract is a binder. It puts together all the variables to make the underlying contracts functional and be bridgeable.\\n */\\ncontract Holographer is Admin, Initializable, HolographerInterface {\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.originChain')) - 1)\\n */\\n bytes32 constant _originChainSlot = 0xd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d;\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\\n */\\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.contractType')) - 1)\\n */\\n bytes32 constant _contractTypeSlot = 0x0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c7;\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.sourceContract')) - 1)\\n */\\n bytes32 constant _sourceContractSlot = 0x27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b074;\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.blockHeight')) - 1)\\n */\\n bytes32 constant _blockHeightSlot = 0x9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de3;\\n\\n /**\\n * @dev Constructor is left empty and init is used instead\\n */\\n constructor() {}\\n\\n /**\\n * @notice Used internally to initialize the contract instead of through a constructor\\n * @dev This function is called by the deployer/factory when creating a contract\\n * @param initPayload abi encoded payload to use for contract initilaization\\n */\\n function init(bytes memory initPayload) external override returns (bytes4) {\\n require(!_isInitialized(), \\\"HOLOGRAPHER: already initialized\\\");\\n (bytes memory encoded, bytes memory initCode) = abi.decode(initPayload, (bytes, bytes));\\n (uint32 originChain, address holograph, bytes32 contractType, address sourceContract) = abi.decode(\\n encoded,\\n (uint32, address, bytes32, address)\\n );\\n assembly {\\n sstore(_adminSlot, caller())\\n sstore(_blockHeightSlot, number())\\n sstore(_contractTypeSlot, contractType)\\n sstore(_holographSlot, holograph)\\n sstore(_originChainSlot, originChain)\\n sstore(_sourceContractSlot, sourceContract)\\n }\\n (bool success, bytes memory returnData) = HolographRegistryInterface(HolographInterface(holograph).getRegistry())\\n .getReservedContractTypeAddress(contractType)\\n .delegatecall(abi.encodeWithSelector(InitializableInterface.init.selector, initCode));\\n bytes4 selector = abi.decode(returnData, (bytes4));\\n require(success && selector == InitializableInterface.init.selector, \\\"HOLOGRAPH: initialization failed\\\");\\n _setInitialized();\\n return InitializableInterface.init.selector;\\n }\\n\\n /**\\n * @dev Returns the contract type that is used for loading the Enforcer\\n */\\n function getContractType() external view returns (bytes32 contractType) {\\n assembly {\\n contractType := sload(_contractTypeSlot)\\n }\\n }\\n\\n /**\\n * @dev Returns the block height of when the smart contract was deployed. Useful for retrieving deployment config for re-deployment on other EVM-compatible chains.\\n */\\n function getDeploymentBlock() external view returns (uint256 deploymentBlock) {\\n assembly {\\n deploymentBlock := sload(_blockHeightSlot)\\n }\\n }\\n\\n /**\\n * @dev Returns a hardcoded address for the Holograph smart contract.\\n */\\n function getHolograph() external view returns (address holograph) {\\n assembly {\\n holograph := sload(_holographSlot)\\n }\\n }\\n\\n /**\\n * @dev Returns a hardcoded address for the Holograph smart contract that controls and enforces the ERC standards.\\n */\\n function getHolographEnforcer() public view returns (address) {\\n HolographInterface holograph;\\n bytes32 contractType;\\n assembly {\\n holograph := sload(_holographSlot)\\n contractType := sload(_contractTypeSlot)\\n }\\n return HolographRegistryInterface(holograph.getRegistry()).getReservedContractTypeAddress(contractType);\\n }\\n\\n /**\\n * @dev Returns the original chain that contract was deployed on.\\n */\\n function getOriginChain() external view returns (uint32 originChain) {\\n assembly {\\n originChain := sload(_originChainSlot)\\n }\\n }\\n\\n /**\\n * @dev Returns a hardcoded address for the custom secure storage contract deployed in parallel with this contract deployment.\\n */\\n function getSourceContract() external view returns (address sourceContract) {\\n assembly {\\n sourceContract := sload(_sourceContractSlot)\\n }\\n }\\n\\n /**\\n * @dev Purposefully left empty, to prevent running out of gas errors when receiving native token payments.\\n */\\n receive() external payable {}\\n\\n /**\\n * @dev This takes the Enforcer's source code, runs it, and uses current address for storage slots.\\n */\\n fallback() external payable {\\n address holographEnforcer = getHolographEnforcer();\\n assembly {\\n calldatacopy(0, 0, calldatasize())\\n let result := delegatecall(gas(), holographEnforcer, 0, calldatasize(), 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n switch result\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc31b575625e84743d9a14f282ef3894becece82a6f47ec945585ac5a0d1895f7\",\"license\":\"UNLICENSED\"},\"contracts/interface/HolographBridgeInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\n/**\\n * @title Holograph Bridge\\n * @author https://github.com/holographxyz\\n * @notice Beam any holographable contracts and assets across blockchains\\n * @dev The contract abstracts all the complexities of making bridge requests and uses a universal interface to bridge any type of holographable assets\\n */\\ninterface HolographBridgeInterface {\\n /**\\n * @notice Receive a beam from another chain\\n * @dev This function can only be called by the Holograph Operator module\\n * @param fromChain Holograph Chain ID where the brigeOutRequest was created\\n * @param holographableContract address of the destination contract that the bridgeInRequest is targeted for\\n * @param hToken address of the hToken contract that wrapped the origin chain native gas token\\n * @param hTokenRecipient address of recipient for the hToken reward\\n * @param hTokenValue exact amount of hToken reward in wei\\n * @param doNotRevert boolean used to specify if the call should revert\\n * @param bridgeInPayload actual abi encoded bytes of the data that the holographable contract bridgeIn function will receive\\n */\\n function bridgeInRequest(\\n uint256 nonce,\\n uint32 fromChain,\\n address holographableContract,\\n address hToken,\\n address hTokenRecipient,\\n uint256 hTokenValue,\\n bool doNotRevert,\\n bytes calldata bridgeInPayload\\n ) external payable;\\n\\n /**\\n * @notice Create a beam request for a destination chain\\n * @dev This function works for deploying contracts and beaming supported holographable assets across chains\\n * @param toChain Holograph Chain ID where the beam is being sent to\\n * @param holographableContract address of the contract for which the bridge request is being made\\n * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain\\n * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain\\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\\n */\\n function bridgeOutRequest(\\n uint32 toChain,\\n address holographableContract,\\n uint256 gasLimit,\\n uint256 gasPrice,\\n bytes calldata bridgeOutPayload\\n ) external payable;\\n\\n /**\\n * @notice Do not call this function, it will always revert\\n * @dev Used by getBridgeOutRequestPayload function\\n * It is purposefully inverted to always revert on a successful call\\n * Marked as external and not private to allow use inside try/catch of getBridgeOutRequestPayload function\\n * If this function does not revert and returns a string, it is the actual revert reason\\n * @param sender address of actual sender that is planning to make a bridgeOutRequest call\\n * @param toChain holograph chain id of destination chain\\n * @param holographableContract address of the contract for which the bridge request is being made\\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\\n */\\n function revertedBridgeOutRequest(\\n address sender,\\n uint32 toChain,\\n address holographableContract,\\n bytes calldata bridgeOutPayload\\n ) external returns (string memory revertReason);\\n\\n /**\\n * @notice Get the payload created by the bridgeOutRequest function\\n * @dev Use this function to get the payload that will be generated by a bridgeOutRequest\\n * Only use this with a static call\\n * @param toChain Holograph Chain ID where the beam is being sent to\\n * @param holographableContract address of the contract for which the bridge request is being made\\n * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain\\n * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain\\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\\n * @return samplePayload bytes made up of the bridgeOutRequest payload\\n */\\n function getBridgeOutRequestPayload(\\n uint32 toChain,\\n address holographableContract,\\n uint256 gasLimit,\\n uint256 gasPrice,\\n bytes calldata bridgeOutPayload\\n ) external returns (bytes memory samplePayload);\\n\\n /**\\n * @notice Get the fees associated with sending specific payload\\n * @dev Will provide exact costs on protocol and message side, combine the two to get total\\n * @param toChain holograph chain id of destination chain for payload\\n * @param gasLimit amount of gas to provide for executing payload on destination chain\\n * @param gasPrice maximum amount to pay for gas price, can be set to 0 and will be chose automatically\\n * @param crossChainPayload the entire packet being sent cross-chain\\n * @return hlgFee the amount (in wei) of native gas token that will cost for finalizing job on destiantion chain\\n * @return msgFee the amount (in wei) of native gas token that will cost for sending message to destiantion chain\\n * @return dstGasPrice the amount (in wei) that destination message maximum gas price will be\\n */\\n function getMessageFee(\\n uint32 toChain,\\n uint256 gasLimit,\\n uint256 gasPrice,\\n bytes calldata crossChainPayload\\n ) external view returns (uint256 hlgFee, uint256 msgFee, uint256 dstGasPrice);\\n\\n /**\\n * @notice Get the address of the Holograph Factory module\\n * @dev Used for deploying holographable smart contracts\\n */\\n function getFactory() external view returns (address factory);\\n\\n /**\\n * @notice Update the Holograph Factory module address\\n * @param factory address of the Holograph Factory smart contract to use\\n */\\n function setFactory(address factory) external;\\n\\n /**\\n * @notice Get the Holograph Protocol contract\\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\\n */\\n function getHolograph() external view returns (address holograph);\\n\\n /**\\n * @notice Update the Holograph Protocol contract address\\n * @param holograph address of the Holograph Protocol smart contract to use\\n */\\n function setHolograph(address holograph) external;\\n\\n /**\\n * @notice Get the latest job nonce\\n * @dev You can use the job nonce as a way to calculate total amount of bridge requests that have been made\\n */\\n function getJobNonce() external view returns (uint256 jobNonce);\\n\\n /**\\n * @notice Get the address of the Holograph Operator module\\n * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module\\n */\\n function getOperator() external view returns (address operator);\\n\\n /**\\n * @notice Update the Holograph Operator module address\\n * @param operator address of the Holograph Operator smart contract to use\\n */\\n function setOperator(address operator) external;\\n\\n /**\\n * @notice Get the Holograph Registry module\\n * @dev This module stores a reference for all deployed holographable smart contracts\\n */\\n function getRegistry() external view returns (address registry);\\n\\n /**\\n * @notice Update the Holograph Registry module address\\n * @param registry address of the Holograph Registry smart contract to use\\n */\\n function setRegistry(address registry) external;\\n}\\n\",\"keccak256\":\"0x6e49ef7e89b6271241da6df330eb5d5cf48da3be31408bb5d99c48d51c0ef176\",\"license\":\"UNLICENSED\"},\"contracts/interface/HolographFactoryInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nimport \\\"../struct/DeploymentConfig.sol\\\";\\nimport \\\"../struct/Verification.sol\\\";\\n\\n/**\\n * @title Holograph Factory\\n * @author https://github.com/holographxyz\\n * @notice Deploy holographable contracts\\n * @dev The contract provides methods that allow for the creation of Holograph Protocol compliant smart contracts, that are capable of minting holographable assets\\n */\\ninterface HolographFactoryInterface {\\n /**\\n * @dev This event is fired every time that a bridgeable contract is deployed.\\n */\\n event BridgeableContractDeployed(address indexed contractAddress, bytes32 indexed hash);\\n\\n /**\\n * @notice Deploy a holographable smart contract\\n * @dev Using this function allows to deploy smart contracts that have the same address across all EVM chains\\n * @param config contract deployement configurations\\n * @param signature that was created by the wallet that created the original payload\\n * @param signer address of wallet that created the payload\\n */\\n function deployHolographableContract(\\n DeploymentConfig memory config,\\n Verification memory signature,\\n address signer\\n ) external;\\n\\n /**\\n * @notice Get the Holograph Protocol contract\\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\\n */\\n function getHolograph() external view returns (address holograph);\\n\\n /**\\n * @notice Update the Holograph Protocol contract address\\n * @param holograph address of the Holograph Protocol smart contract to use\\n */\\n function setHolograph(address holograph) external;\\n\\n /**\\n * @notice Get the Holograph Registry module\\n * @dev This module stores a reference for all deployed holographable smart contracts\\n */\\n function getRegistry() external view returns (address registry);\\n\\n /**\\n * @notice Update the Holograph Registry module address\\n * @param registry address of the Holograph Registry smart contract to use\\n */\\n function setRegistry(address registry) external;\\n}\\n\",\"keccak256\":\"0x44cd1db20207337ef6abde2d0f42837778d13fb62fe353b0ee9b293a601a0d71\",\"license\":\"UNLICENSED\"},\"contracts/interface/HolographInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\n/**\\n * @title Holograph Protocol\\n * @author https://github.com/holographxyz\\n * @notice This is the primary Holograph Protocol smart contract\\n * @dev This contract stores a reference to all the primary modules and variables of the protocol\\n */\\ninterface HolographInterface {\\n /**\\n * @notice Get the address of the Holograph Bridge module\\n * @dev Used for beaming holographable assets cross-chain\\n */\\n function getBridge() external view returns (address bridge);\\n\\n /**\\n * @notice Update the Holograph Bridge module address\\n * @param bridge address of the Holograph Bridge smart contract to use\\n */\\n function setBridge(address bridge) external;\\n\\n /**\\n * @notice Get the chain ID that the Protocol was deployed on\\n * @dev Useful for checking if/when a hard fork occurs\\n */\\n function getChainId() external view returns (uint256 chainId);\\n\\n /**\\n * @notice Update the chain ID\\n * @dev Useful for updating once a hard fork has been mitigated\\n * @param chainId EVM chain ID to use\\n */\\n function setChainId(uint256 chainId) external;\\n\\n /**\\n * @notice Get the address of the Holograph Factory module\\n * @dev Used for deploying holographable smart contracts\\n */\\n function getFactory() external view returns (address factory);\\n\\n /**\\n * @notice Update the Holograph Factory module address\\n * @param factory address of the Holograph Factory smart contract to use\\n */\\n function setFactory(address factory) external;\\n\\n /**\\n * @notice Get the Holograph chain Id\\n * @dev Holograph uses an internal chain id mapping\\n */\\n function getHolographChainId() external view returns (uint32 holographChainId);\\n\\n /**\\n * @notice Update the Holograph chain ID\\n * @dev Useful for updating once a hard fork was mitigated\\n * @param holographChainId Holograph chain ID to use\\n */\\n function setHolographChainId(uint32 holographChainId) external;\\n\\n /**\\n * @notice Get the address of the Holograph Interfaces module\\n * @dev Holograph uses this contract to store data that needs to be accessed by a large portion of the modules\\n */\\n function getInterfaces() external view returns (address interfaces);\\n\\n /**\\n * @notice Update the Holograph Interfaces module address\\n * @param interfaces address of the Holograph Interfaces smart contract to use\\n */\\n function setInterfaces(address interfaces) external;\\n\\n /**\\n * @notice Get the address of the Holograph Operator module\\n * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module\\n */\\n function getOperator() external view returns (address operator);\\n\\n /**\\n * @notice Update the Holograph Operator module address\\n * @param operator address of the Holograph Operator smart contract to use\\n */\\n function setOperator(address operator) external;\\n\\n /**\\n * @notice Get the Holograph Registry module\\n * @dev This module stores a reference for all deployed holographable smart contracts\\n */\\n function getRegistry() external view returns (address registry);\\n\\n /**\\n * @notice Update the Holograph Registry module address\\n * @param registry address of the Holograph Registry smart contract to use\\n */\\n function setRegistry(address registry) external;\\n\\n /**\\n * @notice Get the Holograph Treasury module\\n * @dev All of the Holograph Protocol assets are stored and managed by this module\\n */\\n function getTreasury() external view returns (address treasury);\\n\\n /**\\n * @notice Update the Holograph Treasury module address\\n * @param treasury address of the Holograph Treasury smart contract to use\\n */\\n function setTreasury(address treasury) external;\\n\\n /**\\n * @notice Get the Holograph Utility Token address\\n * @dev This is the official utility token of the Holograph Protocol\\n */\\n function getUtilityToken() external view returns (address utilityToken);\\n\\n /**\\n * @notice Update the Holograph Utility Token address\\n * @param utilityToken address of the Holograph Utility Token smart contract to use\\n */\\n function setUtilityToken(address utilityToken) external;\\n}\\n\",\"keccak256\":\"0x90b5643e77e914393c508d59b80f5739debfd72455029c0db041f92374b3f586\",\"license\":\"UNLICENSED\"},\"contracts/interface/HolographRegistryInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\ninterface HolographRegistryInterface {\\n event HolographableContractEvent(address indexed _holographableContract, bytes _payload);\\n\\n function isHolographedContract(address smartContract) external view returns (bool);\\n\\n function isHolographedHashDeployed(bytes32 hash) external view returns (bool);\\n\\n function referenceContractTypeAddress(address contractAddress) external returns (bytes32);\\n\\n function getContractTypeAddress(bytes32 contractType) external view returns (address);\\n\\n function setContractTypeAddress(bytes32 contractType, address contractAddress) external;\\n\\n function getHolograph() external view returns (address holograph);\\n\\n function setHolograph(address holograph) external;\\n\\n function getHolographableContracts(uint256 index, uint256 length) external view returns (address[] memory contracts);\\n\\n function getHolographableContractsLength() external view returns (uint256);\\n\\n function getHolographedHashAddress(bytes32 hash) external view returns (address);\\n\\n function setHolographedHashAddress(bytes32 hash, address contractAddress) external;\\n\\n function getHToken(uint32 chainId) external view returns (address);\\n\\n function setHToken(uint32 chainId, address hToken) external;\\n\\n function getReservedContractTypeAddress(bytes32 contractType) external view returns (address contractTypeAddress);\\n\\n function setReservedContractTypeAddress(bytes32 hash, bool reserved) external;\\n\\n function setReservedContractTypeAddresses(bytes32[] calldata hashes, bool[] calldata reserved) external;\\n\\n function getUtilityToken() external view returns (address utilityToken);\\n\\n function setUtilityToken(address utilityToken) external;\\n\\n function holographableEvent(bytes calldata payload) external;\\n}\\n\",\"keccak256\":\"0x5e270e2ec4413f7e49d7bc4dd4d935549d3f5234f786e5a7f435cf77850ba966\",\"license\":\"UNLICENSED\"},\"contracts/interface/Holographable.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\ninterface Holographable {\\n function bridgeIn(uint32 fromChain, bytes calldata payload) external returns (bytes4);\\n\\n function bridgeOut(\\n uint32 toChain,\\n address sender,\\n bytes calldata payload\\n ) external returns (bytes4 selector, bytes memory data);\\n}\\n\",\"keccak256\":\"0x4dd2fc1af269273c46156df8af5cedeed0dfb83f0bfa5696a8d64c768449285b\",\"license\":\"UNLICENSED\"},\"contracts/interface/HolographerInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\ninterface HolographerInterface {\\n function getContractType() external view returns (bytes32 contractType);\\n\\n function getDeploymentBlock() external view returns (uint256 deploymentBlock);\\n\\n function getHolograph() external view returns (address holograph);\\n\\n function getHolographEnforcer() external view returns (address);\\n\\n function getOriginChain() external view returns (uint32 originChain);\\n\\n function getSourceContract() external view returns (address sourceContract);\\n}\\n\",\"keccak256\":\"0x4274b9180266275a8df16b8e1f0956cc795fb1ab87db1c01264c343be3bea937\",\"license\":\"UNLICENSED\"},\"contracts/interface/InitializableInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\n/**\\n * @title Initializable\\n * @author https://github.com/holographxyz\\n * @notice Use init instead of constructor\\n * @dev This allows for use of init function to make one time initializations without the need of a constructor\\n */\\ninterface InitializableInterface {\\n /**\\n * @notice Used internally to initialize the contract instead of through a constructor\\n * @dev This function is called by the deployer/factory when creating a contract\\n * @param initPayload abi encoded payload to use for contract initilaization\\n */\\n function init(bytes memory initPayload) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0x0a76fae986c5c18110ce2b1818c84ec28b7bf7f8fb00d20b39b8d7225fbd892d\",\"license\":\"UNLICENSED\"},\"contracts/library/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nlibrary Strings {\\n function toHexString(address account) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(account)));\\n }\\n\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\n }\\n\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = bytes16(\\\"0123456789abcdef\\\")[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n function toAsciiString(address x) internal pure returns (string memory) {\\n bytes memory s = new bytes(40);\\n for (uint256 i = 0; i < 20; i++) {\\n bytes1 b = bytes1(uint8(uint256(uint160(x)) / (2 ** (8 * (19 - i)))));\\n bytes1 hi = bytes1(uint8(b) / 16);\\n bytes1 lo = bytes1(uint8(b) - 16 * uint8(hi));\\n s[2 * i] = char(hi);\\n s[2 * i + 1] = char(lo);\\n }\\n return string(s);\\n }\\n\\n function char(bytes1 b) internal pure returns (bytes1 c) {\\n if (uint8(b) < 10) {\\n return bytes1(uint8(b) + 0x30);\\n } else {\\n return bytes1(uint8(b) + 0x57);\\n }\\n }\\n\\n function uint2str(uint256 _i) internal pure returns (string memory _uint256AsString) {\\n if (_i == 0) {\\n return \\\"0\\\";\\n }\\n uint256 j = _i;\\n uint256 len;\\n while (j != 0) {\\n len++;\\n j /= 10;\\n }\\n bytes memory bstr = new bytes(len);\\n uint256 k = len;\\n while (_i != 0) {\\n k = k - 1;\\n uint8 temp = (48 + uint8(_i - (_i / 10) * 10));\\n bytes1 b1 = bytes1(temp);\\n bstr[k] = b1;\\n _i /= 10;\\n }\\n return string(bstr);\\n }\\n\\n function toString(uint256 value) internal pure returns (string memory) {\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0xbfc8f2c75b679aefa1c0c0ef095665b957ebaeabde39fb15ce17afcdd4110492\",\"license\":\"UNLICENSED\"},\"contracts/struct/BridgeSettings.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nstruct BridgeSettings {\\n uint256 value;\\n uint256 gasLimit;\\n uint256 gasPrice;\\n uint32 toChain;\\n}\\n\",\"keccak256\":\"0x405f453cf620c5e882cf6d915fd7d14c895877408a7fd7e298d6e751bd4a0ce1\",\"license\":\"UNLICENSED\"},\"contracts/struct/DeploymentConfig.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nstruct DeploymentConfig {\\n bytes32 contractType;\\n uint32 chainType;\\n bytes32 salt;\\n bytes byteCode;\\n bytes initCode;\\n}\\n\",\"keccak256\":\"0x5eb9e83676eb65fa424aa9ca79961e1602a749f264ea4f496a9c359dad0da726\",\"license\":\"UNLICENSED\"},\"contracts/struct/Verification.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nstruct Verification {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n}\\n\",\"keccak256\":\"0xd351869472bcb2497e0a771c6e7f7a0b794d099133c67f5f378a8f7839f9db92\",\"license\":\"UNLICENSED\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50612f61806100206000396000f3fe6080604052600436106100d65760003560e01c8063704b6c021161007f578063b7e0366111610059578063b7e036611461028d578063bf64a82d146102bb578063df6516bd146102ce578063f851a440146102ee57600080fd5b8063704b6c021461023a578063a8935c671461025a578063a91ee0dc1461026d57600080fd5b80634ddf47d4116100b05780634ddf47d4146101b25780635ab1bd53146101d25780636e9960c31461020657600080fd5b806308a1eb20146100e557806325d5cac81461013b5780634827ae0c1461015d57600080fd5b366100e057600080fd5b600080fd5b3480156100f157600080fd5b50610105610100366004611690565b610303565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020015b60405180910390f35b34801561014757600080fd5b5061015b610156366004611708565b6103ba565b005b34801561016957600080fd5b507fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a545b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610132565b3480156101be57600080fd5b506101056101cd36600461185a565b610499565b3480156101de57600080fd5b507fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e75461018d565b34801561021257600080fd5b507f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95461018d565b34801561024657600080fd5b5061015b610255366004611708565b610600565b61015b6102683660046119b2565b6106da565b34801561027957600080fd5b5061015b610288366004611708565b6108c1565b34801561029957600080fd5b506102ad6102a8366004611af9565b61099b565b604051610132929190611bd6565b61015b6102c9366004611c11565b6109ef565b3480156102da57600080fd5b5061015b6102e9366004611c31565b610aca565b3480156102fa57600080fd5b5061018d611015565b600080808061031485870187611c31565b6040517fdf6516bd0000000000000000000000000000000000000000000000000000000081529295509093509150309063df6516bd9061035c90869086908690600401611c94565b600060405180830381600087803b15801561037657600080fd5b505af115801561038a573d6000803e3d6000fd5b507f08a1eb20000000000000000000000000000000000000000000000000000000009a9950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610475576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064015b60405180910390fd5b7fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55565b60006104c37f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a015490565b1561052a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a20616c726561647920696e697469616c697a65640000604482015260640161046c565b600080838060200190518101906105419190611d56565b91509150327f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955817fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55807fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7556105d760017f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a0155565b507f4ddf47d4000000000000000000000000000000000000000000000000000000009392505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955565b81156106eb576106eb858585610aca565b600085858560405160200161070293929190611c94565b604051602081830303815290604052905060007fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a54905060008173ffffffffffffffffffffffffffffffffffffffff16630fffbaf36040518163ffffffff1660e01b8152600401602060405180830381865afa158015610786573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107aa9190611d90565b845190915060005b818110156108b5578273ffffffffffffffffffffffffffffffffffffffff1663e55856668783815181106107e8576107e8611dad565b60200260200101516000015188848151811061080657610806611dad565b602002602001015160600151308a868151811061082557610825611dad565b6020026020010151602001518b878151811061084357610843611dad565b6020026020010151604001518b6040518763ffffffff1660e01b8152600401610870959493929190611ddc565b6000604051808303818588803b15801561088957600080fd5b505af115801561089d573d6000803e3d6000fd5b505050505080806108ad90611e5d565b9150506107b2565b50505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610977576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b7fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e755565b6000606063b7e0366160e01b848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250959c929b50919950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aa5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b808260003760008082600034875af13d6000803e808015610ac5573d6000f35b3d6000fd5b7fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a547fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e754845160208087015160408089015160608a015180519085012060808b01518051908601209251969796600096610bb796909594918b910195865260e09490941b7fffffffff0000000000000000000000000000000000000000000000000000000016602086015260248501929092526044840152606483015260601b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016608482015260980190565b604051602081830303815290604052805190602001209050610be88560000151866020015187604001518488611044565b610c4e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f484f4c4f47524150483a20696e76616c6964207369676e617475726500000000604482015260640161046c565b600060405180602001610c6090611621565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820381018352601f90910116604081815282516020808501919091207fff00000000000000000000000000000000000000000000000000000000000000828501527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b166021850152603584018790526055808501919091528251808503909101815260759093019091528151910120909150610d21816113a4565b15610d88576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f484f4c4f47524150483a20616c7265616479206465706c6f7965640000000000604482015260640161046c565b60608801518051849160009183906020830184f59150828551602087016000f560208c8101518d516040805163ffffffff9093169383019390935273ffffffffffffffffffffffffffffffffffffffff8b811693830193909352606082015284821660808201529195507f4ddf47d4000000000000000000000000000000000000000000000000000000009190861690634ddf47d49060a0016040516020818303038152906040528e60800151604051602001610e46929190611e95565b6040516020818303038152906040526040518263ffffffff1660e01b8152600401610e719190611eba565b6020604051808303816000875af1158015610e90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eb49190611ecd565b7fffffffff000000000000000000000000000000000000000000000000000000001614610f3d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f696e697469616c697a6174696f6e206661696c65640000000000000000000000604482015260640161046c565b6040517f725229f60000000000000000000000000000000000000000000000000000000081526004810187905273ffffffffffffffffffffffffffffffffffffffff858116602483015289169063725229f690604401600060405180830381600087803b158015610fad57600080fd5b505af1158015610fc1573d6000803e3d6000fd5b505060405188925073ffffffffffffffffffffffffffffffffffffffff871691507fa802207d4c618b40db3b25b7b90e6f483e16b2c1f8d3610b15b345a718c6b41b90600090a35050505050505050505050565b600061103f7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95490565b905090565b6000601b8460ff1610156110605761105d601b85611f0f565b93505b8360ff16601b1415801561107857508360ff16601c14155b156110855750600061139b565b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0851115611122576110d7857ffffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141611f34565b945060ff8416601b036110ed57601c93506110f2565b601b93505b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08511156111225750600061139b565b73ffffffffffffffffffffffffffffffffffffffff82161580159061139857506040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c810184905273ffffffffffffffffffffffffffffffffffffffff831690600190605c01604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600084529083018083525260ff881690820152606081018990526080810188905260a0016020604051602081039080840390855afa15801561120c573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff161480611305575073ffffffffffffffffffffffffffffffffffffffff821660016112578560206113de565b6040516020016112679190611f4b565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600084529083018083525260ff881690820152606081018990526080810188905260a0016020604051602081039080840390855afa1580156112e3573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff16145b80611398575060408051600081526020810180835285905260ff861691810191909152606081018790526080810186905273ffffffffffffffffffffffffffffffffffffffff83169060019060a0016020604051602081039080840390855afa158015611376573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff16145b90505b95945050505050565b6000813f80158015906113d757507fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708114155b9392505050565b606060006113ed836002611f90565b6113f8906002611fcd565b67ffffffffffffffff81111561141057611410611725565b6040519080825280601f01601f19166020018201604052801561143a576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061147157611471611dad565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106114d4576114d4611dad565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000611510846002611f90565b61151b906001611fcd565b90505b60018111156115b8577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061155c5761155c611dad565b1a60f81b82828151811061157257611572611dad565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c936115b181611fe5565b905061151e565b5083156113d7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161046c565b610f3a8061201b83390190565b803563ffffffff8116811461164257600080fd5b919050565b60008083601f84011261165957600080fd5b50813567ffffffffffffffff81111561167157600080fd5b60208301915083602082850101111561168957600080fd5b9250929050565b6000806000604084860312156116a557600080fd5b6116ae8461162e565b9250602084013567ffffffffffffffff8111156116ca57600080fd5b6116d686828701611647565b9497909650939450505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461170557600080fd5b50565b60006020828403121561171a57600080fd5b81356113d7816116e3565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516080810167ffffffffffffffff8111828210171561177757611777611725565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156117c4576117c4611725565b604052919050565b600082601f8301126117dd57600080fd5b813567ffffffffffffffff8111156117f7576117f7611725565b61182860207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160161177d565b81815284602083860101111561183d57600080fd5b816020850160208301376000918101602001919091529392505050565b60006020828403121561186c57600080fd5b813567ffffffffffffffff81111561188357600080fd5b61188f848285016117cc565b949350505050565b600060a082840312156118a957600080fd5b60405160a0810167ffffffffffffffff82821081831117156118cd576118cd611725565b81604052829350843583526118e46020860161162e565b602084015260408501356040840152606085013591508082111561190757600080fd5b611913868387016117cc565b6060840152608085013591508082111561192c57600080fd5b50611939858286016117cc565b6080830152505092915050565b60006060828403121561195857600080fd5b6040516060810181811067ffffffffffffffff8211171561197b5761197b611725565b80604052508091508235815260208301356020820152604083013560ff811681146119a557600080fd5b6040919091015292915050565b600080600080600060e086880312156119ca57600080fd5b853567ffffffffffffffff808211156119e257600080fd5b6119ee89838a01611897565b965060209150611a0089838a01611946565b9550608080890135611a11816116e3565b955060a08901358015158114611a2657600080fd5b945060c089013582811115611a3a57600080fd5b8901601f81018b13611a4b57600080fd5b803583811115611a5d57611a5d611725565b611a6b858260051b0161177d565b818152858101945060079190911b82018501908c821115611a8b57600080fd5b918501915b81831015611ae65783838e031215611aa85760008081fd5b611ab0611754565b833581528684013587820152604080850135908201526060611ad381860161162e565b9082015285529385019391830191611a90565b8096505050505050509295509295909350565b60008060008060608587031215611b0f57600080fd5b611b188561162e565b93506020850135611b28816116e3565b9250604085013567ffffffffffffffff811115611b4457600080fd5b611b5087828801611647565b95989497509550505050565b60005b83811015611b77578181015183820152602001611b5f565b83811115611b86576000848401525b50505050565b60008151808452611ba4816020860160208601611b5c565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b7fffffffff000000000000000000000000000000000000000000000000000000008316815260406020820152600061188f6040830184611b8c565b600080600060408486031215611c2657600080fd5b83356116ae816116e3565b600080600060a08486031215611c4657600080fd5b833567ffffffffffffffff811115611c5d57600080fd5b611c6986828701611897565b935050611c798560208601611946565b91506080840135611c89816116e3565b809150509250925092565b60a08152835160a082015263ffffffff60208501511660c0820152604084015160e08201526000606085015160a0610100840152611cd6610140840182611b8c565b905060808601517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6084830301610120850152611d128282611b8c565b92505050835160208301526020840151604083015260ff604085015116606083015261188f608083018473ffffffffffffffffffffffffffffffffffffffff169052565b60008060408385031215611d6957600080fd5b8251611d74816116e3565b6020840151909250611d85816116e3565b809150509250929050565b600060208284031215611da257600080fd5b81516113d7816116e3565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b63ffffffff8616815273ffffffffffffffffffffffffffffffffffffffff8516602082015283604082015282606082015260a060808201526000611e2360a0830184611b8c565b979650505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611e8e57611e8e611e2e565b5060010190565b604081526000611ea86040830185611b8c565b828103602084015261139b8185611b8c565b6020815260006113d76020830184611b8c565b600060208284031215611edf57600080fd5b81517fffffffff00000000000000000000000000000000000000000000000000000000811681146113d757600080fd5b600060ff821660ff84168060ff03821115611f2c57611f2c611e2e565b019392505050565b600082821015611f4657611f46611e2e565b500390565b7f19457468657265756d205369676e6564204d6573736167653a0a363600000000815260008251611f8381601c850160208701611b5c565b91909101601c0192915050565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611fc857611fc8611e2e565b500290565b60008219821115611fe057611fe0611e2e565b500190565b600081611ff457611ff4611e2e565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019056fe608060405234801561001057600080fd5b50610f1a806100206000396000f3fe6080604052600436106100c05760003560e01c806380d1cb3511610074578063c51a29e01161004e578063c51a29e0146102c1578063c8a4c3d5146102f5578063f851a4401461030a576100c7565b806380d1cb351461022c578063913a0ef21461026a578063bf64a82d146102ae576100c7565b80636e9960c3116100a55780636e9960c3146101a45780636faf275b146101d8578063704b6c021461020c576100c7565b80634827ae0c146100f95780634ddf47d414610153576100c7565b366100c757005b60006100d161031f565b90503660008037600080366000845af43d6000803e8080156100f2573d6000f35b3d6000fd5b005b34801561010557600080fd5b507fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a545b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b34801561015f57600080fd5b5061017361016e366004610bb4565b61045d565b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200161014a565b3480156101b057600080fd5b507f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c954610129565b3480156101e457600080fd5b507f27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b07454610129565b34801561021857600080fd5b506100f7610227366004610c59565b610911565b34801561023857600080fd5b507f9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de3545b60405190815260200161014a565b34801561027657600080fd5b507fd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d5460405163ffffffff909116815260200161014a565b6100f76102bc366004610c7d565b6109eb565b3480156102cd57600080fd5b507f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c75461025c565b34801561030157600080fd5b5061012961031f565b34801561031657600080fd5b50610129610ac1565b60008060007fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a5491507f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c75490508173ffffffffffffffffffffffffffffffffffffffff16635ab1bd536040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103db9190610d02565b73ffffffffffffffffffffffffffffffffffffffff166374b7510c826040518263ffffffff1660e01b815260040161041591815260200190565b602060405180830381865afa158015610432573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104569190610d02565b9250505090565b60006104877f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a015490565b156104f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f484f4c4f475241504845523a20616c726561647920696e697469616c697a656460448201526064015b60405180910390fd5b6000808380602001905181019061050a9190610d9c565b91509150600080600080858060200190518101906105289190610e00565b9350935093509350337f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955437f9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de355817f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c755827fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55837fd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d55807f27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b074556000808473ffffffffffffffffffffffffffffffffffffffff16635ab1bd536040518163ffffffff1660e01b8152600401602060405180830381865afa158015610650573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106749190610d02565b73ffffffffffffffffffffffffffffffffffffffff166374b7510c856040518263ffffffff1660e01b81526004016106ae91815260200190565b602060405180830381865afa1580156106cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ef9190610d02565b73ffffffffffffffffffffffffffffffffffffffff16634ddf47d460e01b8860405160240161071e9190610e5e565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009094169390931790925290516107a79190610eaf565b600060405180830381855af49150503d80600081146107e2576040519150601f19603f3d011682016040523d82523d6000602084013e6107e7565b606091505b50915091506000818060200190518101906108029190610ecb565b905082801561085257507fffffffff0000000000000000000000000000000000000000000000000000000081167f4ddf47d400000000000000000000000000000000000000000000000000000000145b6108b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f484f4c4f47524150483a20696e697469616c697a6174696f6e206661696c656460448201526064016104ea565b6108e160017f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a0155565b507f4ddf47d4000000000000000000000000000000000000000000000000000000009a9950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016104ea565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aa1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016104ea565b808260003760008082600034875af13d6000803e8080156100f2573d6000f35b6000610aeb7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95490565b905090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715610b6657610b66610af0565b604052919050565b600067ffffffffffffffff821115610b8857610b88610af0565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600060208284031215610bc657600080fd5b813567ffffffffffffffff811115610bdd57600080fd5b8201601f81018413610bee57600080fd5b8035610c01610bfc82610b6e565b610b1f565b818152856020838501011115610c1657600080fd5b81602084016020830137600091810160200191909152949350505050565b73ffffffffffffffffffffffffffffffffffffffff81168114610c5657600080fd5b50565b600060208284031215610c6b57600080fd5b8135610c7681610c34565b9392505050565b600080600060408486031215610c9257600080fd5b8335610c9d81610c34565b9250602084013567ffffffffffffffff80821115610cba57600080fd5b818601915086601f830112610cce57600080fd5b813581811115610cdd57600080fd5b876020828501011115610cef57600080fd5b6020830194508093505050509250925092565b600060208284031215610d1457600080fd5b8151610c7681610c34565b60005b83811015610d3a578181015183820152602001610d22565b83811115610d49576000848401525b50505050565b600082601f830112610d6057600080fd5b8151610d6e610bfc82610b6e565b818152846020838601011115610d8357600080fd5b610d94826020830160208701610d1f565b949350505050565b60008060408385031215610daf57600080fd5b825167ffffffffffffffff80821115610dc757600080fd5b610dd386838701610d4f565b93506020850151915080821115610de957600080fd5b50610df685828601610d4f565b9150509250929050565b60008060008060808587031215610e1657600080fd5b845163ffffffff81168114610e2a57600080fd5b6020860151909450610e3b81610c34565b604086015160608701519194509250610e5381610c34565b939692955090935050565b6020815260008251806020840152610e7d816040850160208701610d1f565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60008251610ec1818460208701610d1f565b9190910192915050565b600060208284031215610edd57600080fd5b81517fffffffff0000000000000000000000000000000000000000000000000000000081168114610c7657600080fdfea164736f6c634300080d000aa164736f6c634300080d000a", + "deployedBytecode": "0x6080604052600436106100d65760003560e01c8063704b6c021161007f578063b7e0366111610059578063b7e036611461028d578063bf64a82d146102bb578063df6516bd146102ce578063f851a440146102ee57600080fd5b8063704b6c021461023a578063a8935c671461025a578063a91ee0dc1461026d57600080fd5b80634ddf47d4116100b05780634ddf47d4146101b25780635ab1bd53146101d25780636e9960c31461020657600080fd5b806308a1eb20146100e557806325d5cac81461013b5780634827ae0c1461015d57600080fd5b366100e057600080fd5b600080fd5b3480156100f157600080fd5b50610105610100366004611690565b610303565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020015b60405180910390f35b34801561014757600080fd5b5061015b610156366004611708565b6103ba565b005b34801561016957600080fd5b507fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a545b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610132565b3480156101be57600080fd5b506101056101cd36600461185a565b610499565b3480156101de57600080fd5b507fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e75461018d565b34801561021257600080fd5b507f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95461018d565b34801561024657600080fd5b5061015b610255366004611708565b610600565b61015b6102683660046119b2565b6106da565b34801561027957600080fd5b5061015b610288366004611708565b6108c1565b34801561029957600080fd5b506102ad6102a8366004611af9565b61099b565b604051610132929190611bd6565b61015b6102c9366004611c11565b6109ef565b3480156102da57600080fd5b5061015b6102e9366004611c31565b610aca565b3480156102fa57600080fd5b5061018d611015565b600080808061031485870187611c31565b6040517fdf6516bd0000000000000000000000000000000000000000000000000000000081529295509093509150309063df6516bd9061035c90869086908690600401611c94565b600060405180830381600087803b15801561037657600080fd5b505af115801561038a573d6000803e3d6000fd5b507f08a1eb20000000000000000000000000000000000000000000000000000000009a9950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610475576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064015b60405180910390fd5b7fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55565b60006104c37f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a015490565b1561052a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a20616c726561647920696e697469616c697a65640000604482015260640161046c565b600080838060200190518101906105419190611d56565b91509150327f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955817fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55807fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7556105d760017f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a0155565b507f4ddf47d4000000000000000000000000000000000000000000000000000000009392505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955565b81156106eb576106eb858585610aca565b600085858560405160200161070293929190611c94565b604051602081830303815290604052905060007fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a54905060008173ffffffffffffffffffffffffffffffffffffffff16630fffbaf36040518163ffffffff1660e01b8152600401602060405180830381865afa158015610786573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107aa9190611d90565b845190915060005b818110156108b5578273ffffffffffffffffffffffffffffffffffffffff1663e55856668783815181106107e8576107e8611dad565b60200260200101516000015188848151811061080657610806611dad565b602002602001015160600151308a868151811061082557610825611dad565b6020026020010151602001518b878151811061084357610843611dad565b6020026020010151604001518b6040518763ffffffff1660e01b8152600401610870959493929190611ddc565b6000604051808303818588803b15801561088957600080fd5b505af115801561089d573d6000803e3d6000fd5b505050505080806108ad90611e5d565b9150506107b2565b50505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610977576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b7fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e755565b6000606063b7e0366160e01b848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250959c929b50919950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aa5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b808260003760008082600034875af13d6000803e808015610ac5573d6000f35b3d6000fd5b7fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a547fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e754845160208087015160408089015160608a015180519085012060808b01518051908601209251969796600096610bb796909594918b910195865260e09490941b7fffffffff0000000000000000000000000000000000000000000000000000000016602086015260248501929092526044840152606483015260601b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016608482015260980190565b604051602081830303815290604052805190602001209050610be88560000151866020015187604001518488611044565b610c4e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f484f4c4f47524150483a20696e76616c6964207369676e617475726500000000604482015260640161046c565b600060405180602001610c6090611621565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820381018352601f90910116604081815282516020808501919091207fff00000000000000000000000000000000000000000000000000000000000000828501527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b166021850152603584018790526055808501919091528251808503909101815260759093019091528151910120909150610d21816113a4565b15610d88576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f484f4c4f47524150483a20616c7265616479206465706c6f7965640000000000604482015260640161046c565b60608801518051849160009183906020830184f59150828551602087016000f560208c8101518d516040805163ffffffff9093169383019390935273ffffffffffffffffffffffffffffffffffffffff8b811693830193909352606082015284821660808201529195507f4ddf47d4000000000000000000000000000000000000000000000000000000009190861690634ddf47d49060a0016040516020818303038152906040528e60800151604051602001610e46929190611e95565b6040516020818303038152906040526040518263ffffffff1660e01b8152600401610e719190611eba565b6020604051808303816000875af1158015610e90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eb49190611ecd565b7fffffffff000000000000000000000000000000000000000000000000000000001614610f3d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f696e697469616c697a6174696f6e206661696c65640000000000000000000000604482015260640161046c565b6040517f725229f60000000000000000000000000000000000000000000000000000000081526004810187905273ffffffffffffffffffffffffffffffffffffffff858116602483015289169063725229f690604401600060405180830381600087803b158015610fad57600080fd5b505af1158015610fc1573d6000803e3d6000fd5b505060405188925073ffffffffffffffffffffffffffffffffffffffff871691507fa802207d4c618b40db3b25b7b90e6f483e16b2c1f8d3610b15b345a718c6b41b90600090a35050505050505050505050565b600061103f7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95490565b905090565b6000601b8460ff1610156110605761105d601b85611f0f565b93505b8360ff16601b1415801561107857508360ff16601c14155b156110855750600061139b565b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0851115611122576110d7857ffffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141611f34565b945060ff8416601b036110ed57601c93506110f2565b601b93505b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08511156111225750600061139b565b73ffffffffffffffffffffffffffffffffffffffff82161580159061139857506040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c810184905273ffffffffffffffffffffffffffffffffffffffff831690600190605c01604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600084529083018083525260ff881690820152606081018990526080810188905260a0016020604051602081039080840390855afa15801561120c573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff161480611305575073ffffffffffffffffffffffffffffffffffffffff821660016112578560206113de565b6040516020016112679190611f4b565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600084529083018083525260ff881690820152606081018990526080810188905260a0016020604051602081039080840390855afa1580156112e3573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff16145b80611398575060408051600081526020810180835285905260ff861691810191909152606081018790526080810186905273ffffffffffffffffffffffffffffffffffffffff83169060019060a0016020604051602081039080840390855afa158015611376573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff16145b90505b95945050505050565b6000813f80158015906113d757507fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708114155b9392505050565b606060006113ed836002611f90565b6113f8906002611fcd565b67ffffffffffffffff81111561141057611410611725565b6040519080825280601f01601f19166020018201604052801561143a576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061147157611471611dad565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106114d4576114d4611dad565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000611510846002611f90565b61151b906001611fcd565b90505b60018111156115b8577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061155c5761155c611dad565b1a60f81b82828151811061157257611572611dad565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c936115b181611fe5565b905061151e565b5083156113d7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161046c565b610f3a8061201b83390190565b803563ffffffff8116811461164257600080fd5b919050565b60008083601f84011261165957600080fd5b50813567ffffffffffffffff81111561167157600080fd5b60208301915083602082850101111561168957600080fd5b9250929050565b6000806000604084860312156116a557600080fd5b6116ae8461162e565b9250602084013567ffffffffffffffff8111156116ca57600080fd5b6116d686828701611647565b9497909650939450505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461170557600080fd5b50565b60006020828403121561171a57600080fd5b81356113d7816116e3565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516080810167ffffffffffffffff8111828210171561177757611777611725565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156117c4576117c4611725565b604052919050565b600082601f8301126117dd57600080fd5b813567ffffffffffffffff8111156117f7576117f7611725565b61182860207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160161177d565b81815284602083860101111561183d57600080fd5b816020850160208301376000918101602001919091529392505050565b60006020828403121561186c57600080fd5b813567ffffffffffffffff81111561188357600080fd5b61188f848285016117cc565b949350505050565b600060a082840312156118a957600080fd5b60405160a0810167ffffffffffffffff82821081831117156118cd576118cd611725565b81604052829350843583526118e46020860161162e565b602084015260408501356040840152606085013591508082111561190757600080fd5b611913868387016117cc565b6060840152608085013591508082111561192c57600080fd5b50611939858286016117cc565b6080830152505092915050565b60006060828403121561195857600080fd5b6040516060810181811067ffffffffffffffff8211171561197b5761197b611725565b80604052508091508235815260208301356020820152604083013560ff811681146119a557600080fd5b6040919091015292915050565b600080600080600060e086880312156119ca57600080fd5b853567ffffffffffffffff808211156119e257600080fd5b6119ee89838a01611897565b965060209150611a0089838a01611946565b9550608080890135611a11816116e3565b955060a08901358015158114611a2657600080fd5b945060c089013582811115611a3a57600080fd5b8901601f81018b13611a4b57600080fd5b803583811115611a5d57611a5d611725565b611a6b858260051b0161177d565b818152858101945060079190911b82018501908c821115611a8b57600080fd5b918501915b81831015611ae65783838e031215611aa85760008081fd5b611ab0611754565b833581528684013587820152604080850135908201526060611ad381860161162e565b9082015285529385019391830191611a90565b8096505050505050509295509295909350565b60008060008060608587031215611b0f57600080fd5b611b188561162e565b93506020850135611b28816116e3565b9250604085013567ffffffffffffffff811115611b4457600080fd5b611b5087828801611647565b95989497509550505050565b60005b83811015611b77578181015183820152602001611b5f565b83811115611b86576000848401525b50505050565b60008151808452611ba4816020860160208601611b5c565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b7fffffffff000000000000000000000000000000000000000000000000000000008316815260406020820152600061188f6040830184611b8c565b600080600060408486031215611c2657600080fd5b83356116ae816116e3565b600080600060a08486031215611c4657600080fd5b833567ffffffffffffffff811115611c5d57600080fd5b611c6986828701611897565b935050611c798560208601611946565b91506080840135611c89816116e3565b809150509250925092565b60a08152835160a082015263ffffffff60208501511660c0820152604084015160e08201526000606085015160a0610100840152611cd6610140840182611b8c565b905060808601517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6084830301610120850152611d128282611b8c565b92505050835160208301526020840151604083015260ff604085015116606083015261188f608083018473ffffffffffffffffffffffffffffffffffffffff169052565b60008060408385031215611d6957600080fd5b8251611d74816116e3565b6020840151909250611d85816116e3565b809150509250929050565b600060208284031215611da257600080fd5b81516113d7816116e3565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b63ffffffff8616815273ffffffffffffffffffffffffffffffffffffffff8516602082015283604082015282606082015260a060808201526000611e2360a0830184611b8c565b979650505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611e8e57611e8e611e2e565b5060010190565b604081526000611ea86040830185611b8c565b828103602084015261139b8185611b8c565b6020815260006113d76020830184611b8c565b600060208284031215611edf57600080fd5b81517fffffffff00000000000000000000000000000000000000000000000000000000811681146113d757600080fd5b600060ff821660ff84168060ff03821115611f2c57611f2c611e2e565b019392505050565b600082821015611f4657611f46611e2e565b500390565b7f19457468657265756d205369676e6564204d6573736167653a0a363600000000815260008251611f8381601c850160208701611b5c565b91909101601c0192915050565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611fc857611fc8611e2e565b500290565b60008219821115611fe057611fe0611e2e565b500190565b600081611ff457611ff4611e2e565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019056fe608060405234801561001057600080fd5b50610f1a806100206000396000f3fe6080604052600436106100c05760003560e01c806380d1cb3511610074578063c51a29e01161004e578063c51a29e0146102c1578063c8a4c3d5146102f5578063f851a4401461030a576100c7565b806380d1cb351461022c578063913a0ef21461026a578063bf64a82d146102ae576100c7565b80636e9960c3116100a55780636e9960c3146101a45780636faf275b146101d8578063704b6c021461020c576100c7565b80634827ae0c146100f95780634ddf47d414610153576100c7565b366100c757005b60006100d161031f565b90503660008037600080366000845af43d6000803e8080156100f2573d6000f35b3d6000fd5b005b34801561010557600080fd5b507fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a545b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b34801561015f57600080fd5b5061017361016e366004610bb4565b61045d565b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200161014a565b3480156101b057600080fd5b507f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c954610129565b3480156101e457600080fd5b507f27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b07454610129565b34801561021857600080fd5b506100f7610227366004610c59565b610911565b34801561023857600080fd5b507f9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de3545b60405190815260200161014a565b34801561027657600080fd5b507fd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d5460405163ffffffff909116815260200161014a565b6100f76102bc366004610c7d565b6109eb565b3480156102cd57600080fd5b507f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c75461025c565b34801561030157600080fd5b5061012961031f565b34801561031657600080fd5b50610129610ac1565b60008060007fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a5491507f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c75490508173ffffffffffffffffffffffffffffffffffffffff16635ab1bd536040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103db9190610d02565b73ffffffffffffffffffffffffffffffffffffffff166374b7510c826040518263ffffffff1660e01b815260040161041591815260200190565b602060405180830381865afa158015610432573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104569190610d02565b9250505090565b60006104877f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a015490565b156104f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f484f4c4f475241504845523a20616c726561647920696e697469616c697a656460448201526064015b60405180910390fd5b6000808380602001905181019061050a9190610d9c565b91509150600080600080858060200190518101906105289190610e00565b9350935093509350337f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955437f9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de355817f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c755827fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55837fd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d55807f27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b074556000808473ffffffffffffffffffffffffffffffffffffffff16635ab1bd536040518163ffffffff1660e01b8152600401602060405180830381865afa158015610650573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106749190610d02565b73ffffffffffffffffffffffffffffffffffffffff166374b7510c856040518263ffffffff1660e01b81526004016106ae91815260200190565b602060405180830381865afa1580156106cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ef9190610d02565b73ffffffffffffffffffffffffffffffffffffffff16634ddf47d460e01b8860405160240161071e9190610e5e565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009094169390931790925290516107a79190610eaf565b600060405180830381855af49150503d80600081146107e2576040519150601f19603f3d011682016040523d82523d6000602084013e6107e7565b606091505b50915091506000818060200190518101906108029190610ecb565b905082801561085257507fffffffff0000000000000000000000000000000000000000000000000000000081167f4ddf47d400000000000000000000000000000000000000000000000000000000145b6108b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f484f4c4f47524150483a20696e697469616c697a6174696f6e206661696c656460448201526064016104ea565b6108e160017f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a0155565b507f4ddf47d4000000000000000000000000000000000000000000000000000000009a9950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016104ea565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aa1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016104ea565b808260003760008082600034875af13d6000803e8080156100f2573d6000f35b6000610aeb7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95490565b905090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715610b6657610b66610af0565b604052919050565b600067ffffffffffffffff821115610b8857610b88610af0565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600060208284031215610bc657600080fd5b813567ffffffffffffffff811115610bdd57600080fd5b8201601f81018413610bee57600080fd5b8035610c01610bfc82610b6e565b610b1f565b818152856020838501011115610c1657600080fd5b81602084016020830137600091810160200191909152949350505050565b73ffffffffffffffffffffffffffffffffffffffff81168114610c5657600080fd5b50565b600060208284031215610c6b57600080fd5b8135610c7681610c34565b9392505050565b600080600060408486031215610c9257600080fd5b8335610c9d81610c34565b9250602084013567ffffffffffffffff80821115610cba57600080fd5b818601915086601f830112610cce57600080fd5b813581811115610cdd57600080fd5b876020828501011115610cef57600080fd5b6020830194508093505050509250925092565b600060208284031215610d1457600080fd5b8151610c7681610c34565b60005b83811015610d3a578181015183820152602001610d22565b83811115610d49576000848401525b50505050565b600082601f830112610d6057600080fd5b8151610d6e610bfc82610b6e565b818152846020838601011115610d8357600080fd5b610d94826020830160208701610d1f565b949350505050565b60008060408385031215610daf57600080fd5b825167ffffffffffffffff80821115610dc757600080fd5b610dd386838701610d4f565b93506020850151915080821115610de957600080fd5b50610df685828601610d4f565b9150509250929050565b60008060008060808587031215610e1657600080fd5b845163ffffffff81168114610e2a57600080fd5b6020860151909450610e3b81610c34565b604086015160608701519194509250610e5381610c34565b939692955090935050565b6020815260008251806020840152610e7d816040850160208701610d1f565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60008251610ec1818460208701610d1f565b9190910192915050565b600060208284031215610edd57600080fd5b81517fffffffff0000000000000000000000000000000000000000000000000000000081168114610c7657600080fdfea164736f6c634300080d000aa164736f6c634300080d000a", "devdoc": { "author": "https://github.com/holographxyz", "details": "The contract provides methods that allow for the creation of Holograph Protocol compliant smart contracts, that are capable of minting holographable assets", diff --git a/deployments/develop/ethereumTestnetGoerli/solcInputs/c71d96e115e745dd34ef9239c385494d.json b/deployments/develop/ethereumTestnetGoerli/solcInputs/c71d96e115e745dd34ef9239c385494d.json new file mode 100644 index 000000000..2f9c65ed5 --- /dev/null +++ b/deployments/develop/ethereumTestnetGoerli/solcInputs/c71d96e115e745dd34ef9239c385494d.json @@ -0,0 +1,465 @@ +{ + "language": "Solidity", + "sources": { + "contracts/abstract/Admin.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nabstract contract Admin {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.admin')) - 1)\n */\n bytes32 constant _adminSlot = 0x3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c9;\n\n modifier onlyAdmin() {\n require(msg.sender == getAdmin(), \"HOLOGRAPH: admin only function\");\n _;\n }\n\n constructor() {}\n\n function admin() public view returns (address) {\n return getAdmin();\n }\n\n function getAdmin() public view returns (address adminAddress) {\n assembly {\n adminAddress := sload(_adminSlot)\n }\n }\n\n function setAdmin(address adminAddress) public onlyAdmin {\n assembly {\n sstore(_adminSlot, adminAddress)\n }\n }\n\n function adminCall(address target, bytes calldata data) external payable onlyAdmin {\n assembly {\n calldatacopy(0, data.offset, data.length)\n let result := call(gas(), target, callvalue(), 0, data.length, 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/abstract/EIP712.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/cryptography/draft-EIP712.sol)\n\npragma solidity 0.8.13;\n\nimport \"../library/ECDSA.sol\";\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\n *\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\n *\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\n * ({_hashTypedDataV4}).\n *\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\n * the chain id to protect against replay attacks on an eventual fork of the chain.\n *\n * NOTE: This contract implements the version of the encoding known as \"v4\", as implemented by the JSON RPC method\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\n *\n * _Available since v3.4._\n */\nabstract contract EIP712 {\n /* solhint-disable var-name-mixedcase */\n // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to\n // invalidate the cached domain separator if the chain id changes.\n // WE CANNOT USE immutable VALUES SINCE IT BREAKS OUT CREATE2 COMPUTATIONS ON DEPLOYER SCRIPTS\n // AFTER MAKING NECESARRY CHANGES, WE CAN ADD IT BACK IN\n bytes32 private _CACHED_DOMAIN_SEPARATOR;\n uint256 private _CACHED_CHAIN_ID;\n address private _CACHED_THIS;\n\n bytes32 private _HASHED_NAME;\n bytes32 private _HASHED_VERSION;\n bytes32 private _TYPE_HASH;\n\n /* solhint-enable var-name-mixedcase */\n\n /**\n * @dev Initializes the domain separator and parameter caches.\n *\n * The meaning of `name` and `version` is specified in\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\n *\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\n * - `version`: the current major version of the signing domain.\n *\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\n * contract upgrade].\n */\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n function _eip712_init(string memory name, string memory version) internal {\n bytes32 hashedName = keccak256(bytes(name));\n bytes32 hashedVersion = keccak256(bytes(version));\n bytes32 typeHash = keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\");\n _HASHED_NAME = hashedName;\n _HASHED_VERSION = hashedVersion;\n _CACHED_CHAIN_ID = block.chainid;\n _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion);\n _CACHED_THIS = address(this);\n _TYPE_HASH = typeHash;\n }\n\n /**\n * @dev Returns the domain separator for the current chain.\n */\n function _domainSeparatorV4() internal view returns (bytes32) {\n if (address(this) == _CACHED_THIS && block.chainid == _CACHED_CHAIN_ID) {\n return _CACHED_DOMAIN_SEPARATOR;\n } else {\n return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION);\n }\n }\n\n function _buildDomainSeparator(\n bytes32 typeHash,\n bytes32 nameHash,\n bytes32 versionHash\n ) private view returns (bytes32) {\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\n }\n\n /**\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\n * function returns the hash of the fully encoded EIP712 message for this domain.\n *\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\n *\n * ```solidity\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\n * keccak256(\"Mail(address to,string contents)\"),\n * mailTo,\n * keccak256(bytes(mailContents))\n * )));\n * address signer = ECDSA.recover(digest, signature);\n * ```\n */\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\n return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);\n }\n}\n" + }, + "contracts/abstract/ERC1155H.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Initializable.sol\";\n\nabstract contract ERC1155H is Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holographer')) - 1)\n */\n bytes32 constant _holographerSlot = 0xe9fcff60011c1a99f7b7244d1f2d9da93d79ea8ef3654ce590d775575255b2bd;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.owner')) - 1)\n */\n bytes32 constant _ownerSlot = 0xb56711ba6bd3ded7639fc335ee7524fe668a79d7558c85992e3f8494cf772777;\n\n modifier onlyHolographer() {\n require(msg.sender == holographer(), \"ERC1155: holographer only\");\n _;\n }\n\n modifier onlyOwner() {\n require(msgSender() == _getOwner(), \"ERC1155: owner only function\");\n _;\n }\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external virtual override returns (bytes4) {\n return _init(initPayload);\n }\n\n function _init(bytes memory /* initPayload*/) internal returns (bytes4) {\n require(!_isInitialized(), \"ERC1155: already initialized\");\n address _holographer = msg.sender;\n address currentOwner;\n assembly {\n sstore(_holographerSlot, _holographer)\n currentOwner := sload(_ownerSlot)\n }\n require(currentOwner != address(0), \"HOLOGRAPH: owner not set\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @dev The Holographer passes original msg.sender via calldata. This function extracts it.\n */\n function msgSender() internal view returns (address sender) {\n assembly {\n switch eq(caller(), sload(_holographerSlot))\n case 0 {\n sender := caller()\n }\n default {\n sender := calldataload(sub(calldatasize(), 0x20))\n }\n }\n }\n\n /**\n * @dev Address of Holograph ERC1155 standards enforcer smart contract.\n */\n function holographer() internal view returns (address _holographer) {\n assembly {\n _holographer := sload(_holographerSlot)\n }\n }\n\n function supportsInterface(bytes4) external pure virtual returns (bool) {\n return false;\n }\n\n /**\n * @dev Address of initial creator/owner of the collection.\n */\n function owner() external view virtual returns (address) {\n return _getOwner();\n }\n\n function isOwner() external view returns (bool) {\n return (msgSender() == _getOwner());\n }\n\n function isOwner(address wallet) external view returns (bool) {\n return wallet == _getOwner();\n }\n\n function _getOwner() internal view returns (address ownerAddress) {\n assembly {\n ownerAddress := sload(_ownerSlot)\n }\n }\n\n function _setOwner(address ownerAddress) internal {\n assembly {\n sstore(_ownerSlot, ownerAddress)\n }\n }\n\n function withdraw() external virtual onlyOwner {\n payable(_getOwner()).transfer(address(this).balance);\n }\n\n event FundsReceived(address indexed source, uint256 amount);\n\n /**\n * @dev This function emits an event to indicate native gas token receipt. Do not rely on this to work.\n * Please use custom payable functions for accepting native value.\n */\n receive() external payable virtual {\n emit FundsReceived(msgSender(), msg.value);\n }\n\n /**\n * @dev Return true for any un-implemented event hooks\n */\n fallback() external payable virtual {\n assembly {\n switch eq(sload(_holographerSlot), caller())\n case 1 {\n mstore(0x80, 0x0000000000000000000000000000000000000000000000000000000000000001)\n return(0x80, 0x20)\n }\n default {\n revert(0x00, 0x00)\n }\n }\n }\n}\n" + }, + "contracts/abstract/ERC20H.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Initializable.sol\";\n\nabstract contract ERC20H is Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holographer')) - 1)\n */\n bytes32 constant _holographerSlot = 0xe9fcff60011c1a99f7b7244d1f2d9da93d79ea8ef3654ce590d775575255b2bd;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.owner')) - 1)\n */\n bytes32 constant _ownerSlot = 0xb56711ba6bd3ded7639fc335ee7524fe668a79d7558c85992e3f8494cf772777;\n\n modifier onlyHolographer() {\n require(msg.sender == holographer(), \"ERC20: holographer only\");\n _;\n }\n\n modifier onlyOwner() {\n require(msgSender() == _getOwner(), \"ERC20: owner only function\");\n _;\n }\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external virtual override returns (bytes4) {\n return _init(initPayload);\n }\n\n function _init(bytes memory /* initPayload*/) internal returns (bytes4) {\n require(!_isInitialized(), \"ERC20: already initialized\");\n address _holographer = msg.sender;\n address currentOwner;\n assembly {\n sstore(_holographerSlot, _holographer)\n currentOwner := sload(_ownerSlot)\n }\n require(currentOwner != address(0), \"HOLOGRAPH: owner not set\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @dev The Holographer passes original msg.sender via calldata. This function extracts it.\n */\n function msgSender() internal view returns (address sender) {\n assembly {\n switch eq(caller(), sload(_holographerSlot))\n case 0 {\n sender := caller()\n }\n default {\n sender := calldataload(sub(calldatasize(), 0x20))\n }\n }\n }\n\n /**\n * @dev Address of Holograph ERC20 standards enforcer smart contract.\n */\n function holographer() internal view returns (address _holographer) {\n assembly {\n _holographer := sload(_holographerSlot)\n }\n }\n\n function supportsInterface(bytes4) external pure virtual returns (bool) {\n return false;\n }\n\n /**\n * @dev Address of initial creator/owner of the token contract.\n */\n function owner() external view virtual returns (address) {\n return _getOwner();\n }\n\n function isOwner() external view returns (bool) {\n return (msgSender() == _getOwner());\n }\n\n function isOwner(address wallet) external view returns (bool) {\n return wallet == _getOwner();\n }\n\n function _getOwner() internal view returns (address ownerAddress) {\n assembly {\n ownerAddress := sload(_ownerSlot)\n }\n }\n\n function _setOwner(address ownerAddress) internal {\n assembly {\n sstore(_ownerSlot, ownerAddress)\n }\n }\n\n function withdraw() external virtual onlyOwner {\n payable(_getOwner()).transfer(address(this).balance);\n }\n\n event FundsReceived(address indexed source, uint256 amount);\n\n /**\n * @dev This function emits an event to indicate native gas token receipt. Do not rely on this to work.\n * Please use custom payable functions for accepting native value.\n */\n receive() external payable virtual {\n emit FundsReceived(msgSender(), msg.value);\n }\n\n /**\n * @dev Return true for any un-implemented event hooks\n */\n fallback() external payable virtual {\n assembly {\n switch eq(sload(_holographerSlot), caller())\n case 1 {\n mstore(0x80, 0x0000000000000000000000000000000000000000000000000000000000000001)\n return(0x80, 0x20)\n }\n default {\n revert(0x00, 0x00)\n }\n }\n }\n}\n" + }, + "contracts/abstract/ERC721H.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Initializable.sol\";\n\nabstract contract ERC721H is Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holographer')) - 1)\n */\n bytes32 constant _holographerSlot = 0xe9fcff60011c1a99f7b7244d1f2d9da93d79ea8ef3654ce590d775575255b2bd;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.owner')) - 1)\n */\n bytes32 constant _ownerSlot = 0xb56711ba6bd3ded7639fc335ee7524fe668a79d7558c85992e3f8494cf772777;\n\n modifier onlyHolographer() {\n require(msg.sender == holographer(), \"ERC721: holographer only\");\n _;\n }\n\n modifier onlyOwner() {\n require(msgSender() == _getOwner(), \"ERC721: owner only function\");\n _;\n }\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external virtual override returns (bytes4) {\n return _init(initPayload);\n }\n\n function _init(bytes memory /* initPayload*/) internal returns (bytes4) {\n require(!_isInitialized(), \"ERC721: already initialized\");\n address _holographer = msg.sender;\n address currentOwner;\n assembly {\n sstore(_holographerSlot, _holographer)\n currentOwner := sload(_ownerSlot)\n }\n require(currentOwner != address(0), \"HOLOGRAPH: owner not set\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @dev The Holographer passes original msg.sender via calldata. This function extracts it.\n */\n function msgSender() internal view returns (address sender) {\n assembly {\n switch eq(caller(), sload(_holographerSlot))\n case 0 {\n sender := caller()\n }\n default {\n sender := calldataload(sub(calldatasize(), 0x20))\n }\n }\n }\n\n /**\n * @dev Address of Holograph ERC721 standards enforcer smart contract.\n */\n function holographer() internal view returns (address _holographer) {\n assembly {\n _holographer := sload(_holographerSlot)\n }\n }\n\n function supportsInterface(bytes4) external pure virtual returns (bool) {\n return false;\n }\n\n /**\n * @dev Address of initial creator/owner of the collection.\n */\n function owner() external view virtual returns (address) {\n return _getOwner();\n }\n\n function isOwner() external view returns (bool) {\n return (msgSender() == _getOwner());\n }\n\n function isOwner(address wallet) external view returns (bool) {\n return wallet == _getOwner();\n }\n\n function _getOwner() internal view returns (address ownerAddress) {\n assembly {\n ownerAddress := sload(_ownerSlot)\n }\n }\n\n function _setOwner(address ownerAddress) internal {\n assembly {\n sstore(_ownerSlot, ownerAddress)\n }\n }\n\n function withdraw() external virtual onlyOwner {\n payable(_getOwner()).transfer(address(this).balance);\n }\n\n event FundsReceived(address indexed source, uint256 amount);\n\n /**\n * @dev This function emits an event to indicate native gas token receipt. Do not rely on this to work.\n * Please use custom payable functions for accepting native value.\n */\n receive() external payable virtual {\n emit FundsReceived(msgSender(), msg.value);\n }\n\n /**\n * @dev Return true for any un-implemented event hooks\n */\n fallback() external payable virtual {\n assembly {\n switch eq(sload(_holographerSlot), caller())\n case 1 {\n mstore(0x80, 0x0000000000000000000000000000000000000000000000000000000000000001)\n return(0x80, 0x20)\n }\n default {\n revert(0x00, 0x00)\n }\n }\n }\n}\n" + }, + "contracts/abstract/GenericH.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Initializable.sol\";\n\nabstract contract GenericH is Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holographer')) - 1)\n */\n bytes32 constant _holographerSlot = 0xe9fcff60011c1a99f7b7244d1f2d9da93d79ea8ef3654ce590d775575255b2bd;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.owner')) - 1)\n */\n bytes32 constant _ownerSlot = 0xb56711ba6bd3ded7639fc335ee7524fe668a79d7558c85992e3f8494cf772777;\n\n modifier onlyHolographer() {\n require(msg.sender == holographer(), \"GENERIC: holographer only\");\n _;\n }\n\n modifier onlyOwner() {\n require(msgSender() == _getOwner(), \"GENERIC: owner only function\");\n _;\n }\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external virtual override returns (bytes4) {\n return _init(initPayload);\n }\n\n function _init(bytes memory /* initPayload*/) internal returns (bytes4) {\n require(!_isInitialized(), \"GENERIC: already initialized\");\n address _holographer = msg.sender;\n address currentOwner;\n assembly {\n sstore(_holographerSlot, _holographer)\n currentOwner := sload(_ownerSlot)\n }\n require(currentOwner != address(0), \"HOLOGRAPH: owner not set\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @dev The Holographer passes original msg.sender via calldata. This function extracts it.\n */\n function msgSender() internal view returns (address sender) {\n assembly {\n switch eq(caller(), sload(_holographerSlot))\n case 0 {\n sender := caller()\n }\n default {\n sender := calldataload(sub(calldatasize(), 0x20))\n }\n }\n }\n\n /**\n * @dev Address of Holograph GENERIC standards enforcer smart contract.\n */\n function holographer() internal view returns (address _holographer) {\n assembly {\n _holographer := sload(_holographerSlot)\n }\n }\n\n function supportsInterface(bytes4) external pure virtual returns (bool) {\n return false;\n }\n\n /**\n * @dev Address of initial creator/owner of the contract.\n */\n function owner() external view virtual returns (address) {\n return _getOwner();\n }\n\n function isOwner() external view returns (bool) {\n return (msgSender() == _getOwner());\n }\n\n function isOwner(address wallet) external view returns (bool) {\n return wallet == _getOwner();\n }\n\n function _getOwner() internal view returns (address ownerAddress) {\n assembly {\n ownerAddress := sload(_ownerSlot)\n }\n }\n\n function _setOwner(address ownerAddress) internal {\n assembly {\n sstore(_ownerSlot, ownerAddress)\n }\n }\n\n function withdraw() external virtual onlyOwner {\n payable(_getOwner()).transfer(address(this).balance);\n }\n\n event FundsReceived(address indexed source, uint256 amount);\n\n /**\n * @dev This function emits an event to indicate native gas token receipt. Do not rely on this to work.\n * Please use custom payable functions for accepting native value.\n */\n receive() external payable virtual {\n emit FundsReceived(msgSender(), msg.value);\n }\n\n /**\n * @dev Return true for any un-implemented event hooks\n */\n fallback() external payable virtual {\n assembly {\n switch eq(sload(_holographerSlot), caller())\n case 1 {\n mstore(0x80, 0x0000000000000000000000000000000000000000000000000000000000000001)\n return(0x80, 0x20)\n }\n default {\n revert(0x00, 0x00)\n }\n }\n }\n}\n" + }, + "contracts/abstract/HLGERC20H.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Initializable.sol\";\n\nabstract contract HLGERC20H is Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holographer')) - 1)\n */\n bytes32 constant _holographerSlot = 0xe9fcff60011c1a99f7b7244d1f2d9da93d79ea8ef3654ce590d775575255b2bd;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.owner')) - 1)\n */\n bytes32 constant _ownerSlot = 0xb56711ba6bd3ded7639fc335ee7524fe668a79d7558c85992e3f8494cf772777;\n\n modifier onlyHolographer() {\n require(msg.sender == holographer(), \"ERC20: holographer only\");\n _;\n }\n\n modifier onlyOwner() {\n if (msg.sender == holographer()) {\n require(msgSender() == _getOwner(), \"ERC20: owner only function\");\n } else {\n require(msg.sender == _getOwner(), \"ERC20: owner only function\");\n }\n _;\n }\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external virtual override returns (bytes4) {\n return _init(initPayload);\n }\n\n function _init(bytes memory /* initPayload*/) internal returns (bytes4) {\n require(!_isInitialized(), \"ERC20: already initialized\");\n address _holographer = msg.sender;\n address currentOwner;\n assembly {\n sstore(_holographerSlot, _holographer)\n currentOwner := sload(_ownerSlot)\n }\n require(currentOwner != address(0), \"HOLOGRAPH: owner not set\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @dev The Holographer passes original msg.sender via calldata. This function extracts it.\n */\n function msgSender() internal pure returns (address sender) {\n assembly {\n sender := calldataload(sub(calldatasize(), 0x20))\n }\n }\n\n /**\n * @dev Address of Holograph ERC20 standards enforcer smart contract.\n */\n function holographer() internal view returns (address _holographer) {\n assembly {\n _holographer := sload(_holographerSlot)\n }\n }\n\n function supportsInterface(bytes4) external pure returns (bool) {\n return false;\n }\n\n /**\n * @dev Address of initial creator/owner of the token contract.\n */\n function owner() external view returns (address) {\n return _getOwner();\n }\n\n function isOwner() external view returns (bool) {\n if (msg.sender == holographer()) {\n return msgSender() == _getOwner();\n } else {\n return msg.sender == _getOwner();\n }\n }\n\n function isOwner(address wallet) external view returns (bool) {\n return wallet == _getOwner();\n }\n\n function _getOwner() internal view returns (address ownerAddress) {\n assembly {\n ownerAddress := sload(_ownerSlot)\n }\n }\n\n function _setOwner(address ownerAddress) internal {\n assembly {\n sstore(_ownerSlot, ownerAddress)\n }\n }\n\n function withdraw() external virtual onlyOwner {\n payable(_getOwner()).transfer(address(this).balance);\n }\n\n /**\n * @dev This function is unreachable unless custom contract address is called directly.\n * Please use custom payable functions for accepting native value.\n */\n receive() external payable {\n revert(\"ERC20: unreachable code\");\n }\n\n /**\n * @dev Return true for any un-implemented event hooks\n */\n fallback() external payable {\n assembly {\n switch eq(sload(_holographerSlot), caller())\n case 1 {\n mstore(0x80, 0x0000000000000000000000000000000000000000000000000000000000000001)\n return(0x80, 0x20)\n }\n default {\n revert(0x00, 0x00)\n }\n }\n }\n}\n" + }, + "contracts/abstract/Initializable.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../interface/InitializableInterface.sol\";\n\n/**\n * @title Initializable\n * @author https://github.com/holographxyz\n * @notice Use init instead of constructor\n * @dev This allows for use of init function to make one time initializations without the need for a constructor\n */\nabstract contract Initializable is InitializableInterface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.initialized')) - 1)\n */\n bytes32 constant _initializedSlot = 0x4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a01;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external virtual returns (bytes4);\n\n function _isInitialized() internal view returns (bool initialized) {\n assembly {\n initialized := sload(_initializedSlot)\n }\n }\n\n function _setInitialized() internal {\n assembly {\n sstore(_initializedSlot, 0x0000000000000000000000000000000000000000000000000000000000000001)\n }\n }\n}\n" + }, + "contracts/abstract/NonReentrant.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nabstract contract NonReentrant {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.reentrant')) - 1)\n */\n bytes32 constant _reentrantSlot = 0x04b524dd539523930d3901481aa9455d7752b49add99e1647adb8b09a3137279;\n\n modifier nonReentrant() {\n require(getStatus() != 2, \"HOLOGRAPH: reentrant call\");\n setStatus(2);\n _;\n setStatus(1);\n }\n\n constructor() {}\n\n function getStatus() internal view returns (uint256 status) {\n assembly {\n status := sload(_reentrantSlot)\n }\n }\n\n function setStatus(uint256 status) internal {\n assembly {\n sstore(_reentrantSlot, status)\n }\n }\n}\n" + }, + "contracts/abstract/Owner.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nabstract contract Owner {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.owner')) - 1)\n */\n bytes32 constant _ownerSlot = 0xb56711ba6bd3ded7639fc335ee7524fe668a79d7558c85992e3f8494cf772777;\n\n /**\n * @dev Event emitted when contract owner is changed.\n */\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n modifier onlyOwner() virtual {\n require(msg.sender == getOwner(), \"HOLOGRAPH: owner only function\");\n _;\n }\n\n function owner() external view virtual returns (address) {\n return getOwner();\n }\n\n constructor() {}\n\n function getOwner() public view returns (address ownerAddress) {\n assembly {\n ownerAddress := sload(_ownerSlot)\n }\n }\n\n function setOwner(address ownerAddress) public virtual onlyOwner {\n address previousOwner = getOwner();\n assembly {\n sstore(_ownerSlot, ownerAddress)\n }\n emit OwnershipTransferred(previousOwner, ownerAddress);\n }\n\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0), \"HOLOGRAPH: zero address\");\n assembly {\n sstore(_ownerSlot, newOwner)\n }\n }\n\n function ownerCall(address target, bytes calldata data) external payable onlyOwner {\n assembly {\n calldatacopy(0, data.offset, data.length)\n let result := call(gas(), target, callvalue(), 0, data.length, 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/abstract/StrictERC1155H.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../interface/HolographedERC1155.sol\";\n\nimport \"./ERC1155H.sol\";\n\nabstract contract StrictERC1155H is ERC1155H, HolographedERC1155 {\n /**\n * @dev Dummy variable to prevent empty functions from making \"switch to pure\" warnings.\n */\n bool private _success;\n\n function bridgeIn(\n uint32 /* _chainId*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool) {\n _success = true;\n return true;\n }\n\n function bridgeOut(\n uint32 /* _chainId*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bytes memory _data) {\n _success = true;\n _data = abi.encode(holographer());\n }\n\n function afterApprove(\n address /* _owner*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeApprove(\n address /* _owner*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterApprovalAll(\n address /* _to*/,\n bool /* _approved*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeApprovalAll(\n address /* _to*/,\n bool /* _approved*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterBurn(\n address /* _owner*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeBurn(\n address /* _owner*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterMint(\n address /* _owner*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeMint(\n address /* _owner*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterSafeTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeSafeTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterOnERC1155Received(\n address /* _operator*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeOnERC1155Received(\n address /* _operator*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n}\n" + }, + "contracts/abstract/StrictERC20H.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../interface/HolographedERC20.sol\";\n\nimport \"./ERC20H.sol\";\n\nabstract contract StrictERC20H is ERC20H, HolographedERC20 {\n /**\n * @dev Dummy variable to prevent empty functions from making \"switch to pure\" warnings.\n */\n bool private _success;\n\n function bridgeIn(\n uint32 /* _chainId*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool) {\n _success = true;\n return true;\n }\n\n function bridgeOut(\n uint32 /* _chainId*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bytes memory _data) {\n /**\n * @dev This is just here to suppress unused parameter warning\n */\n _data = abi.encodePacked(holographer());\n _success = true;\n }\n\n function afterApprove(\n address /* _owner*/,\n address /* _to*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeApprove(\n address /* _owner*/,\n address /* _to*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterOnERC20Received(\n address /* _token*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeOnERC20Received(\n address /* _token*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterBurn(\n address /* _owner*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeBurn(\n address /* _owner*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterMint(\n address /* _owner*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeMint(\n address /* _owner*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterSafeTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeSafeTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function onAllowance(\n address /* _owner*/,\n address /* _to*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = false;\n return _success;\n }\n}\n" + }, + "contracts/abstract/StrictERC721H.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../interface/HolographedERC721.sol\";\n\nimport \"./ERC721H.sol\";\n\nabstract contract StrictERC721H is ERC721H, HolographedERC721 {\n /**\n * @dev Dummy variable to prevent empty functions from making \"switch to pure\" warnings.\n */\n bool private _success;\n\n function bridgeIn(\n uint32 /* _chainId*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool) {\n _success = true;\n return true;\n }\n\n function bridgeOut(\n uint32 /* _chainId*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/\n ) external virtual onlyHolographer returns (bytes memory _data) {\n _success = true;\n _data = abi.encode(holographer());\n }\n\n function afterApprove(\n address /* _owner*/,\n address /* _to*/,\n uint256 /* _tokenId*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeApprove(\n address /* _owner*/,\n address /* _to*/,\n uint256 /* _tokenId*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterApprovalAll(\n address /* _sender*/,\n address /* _to*/,\n bool /* _approved*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeApprovalAll(\n address /* _sender*/,\n address /* _to*/,\n bool /* _approved*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterBurn(\n address /* _owner*/,\n uint256 /* _tokenId*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeBurn(\n address /* _owner*/,\n uint256 /* _tokenId*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterMint(\n address /* _owner*/,\n uint256 /* _tokenId*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeMint(\n address /* _owner*/,\n uint256 /* _tokenId*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterSafeTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeSafeTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterOnERC721Received(\n address /* _operator*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeOnERC721Received(\n address /* _operator*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function onIsApprovedForAll(\n address /* _wallet*/,\n address /* _operator*/\n ) external view virtual onlyHolographer returns (bool approved) {\n approved = _success;\n return false;\n }\n\n function contractURI() external view virtual onlyHolographer returns (string memory contractJSON) {\n contractJSON = _success ? \"\" : \"\";\n }\n}\n" + }, + "contracts/drops/interface/IDropsPriceOracle.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\ninterface IDropsPriceOracle {\n function convertUsdToWei(uint256 usdAmount) external view returns (uint256 weiAmount);\n}\n" + }, + "contracts/drops/interface/IHolographDropERC721.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {IMetadataRenderer} from \"./IMetadataRenderer.sol\";\n\nimport {AddressMintDetails} from \"../struct/AddressMintDetails.sol\";\nimport {SaleDetails} from \"../struct/SaleDetails.sol\";\n\n/// @notice Interface for HOLOGRAPH Drops contract\ninterface IHolographDropERC721 {\n // Access errors\n\n /// @notice Only admin can access this function\n error Access_OnlyAdmin();\n /// @notice Missing the given role or admin access\n error Access_MissingRoleOrAdmin(bytes32 role);\n /// @notice Withdraw is not allowed by this user\n error Access_WithdrawNotAllowed();\n /// @notice Cannot withdraw funds due to ETH send failure.\n error Withdraw_FundsSendFailure();\n /// @notice Mint fee send failure\n error MintFee_FundsSendFailure();\n\n /// @notice Call to external metadata renderer failed.\n error ExternalMetadataRenderer_CallFailed();\n\n /// @notice Thrown when the operator for the contract is not allowed\n /// @dev Used when strict enforcement of marketplaces for creator royalties is desired.\n error OperatorNotAllowed(address operator);\n\n /// @notice Thrown when there is no active market filter DAO address supported for the current chain\n /// @dev Used for enabling and disabling filter for the given chain.\n error MarketFilterDAOAddressNotSupportedForChain();\n\n /// @notice Used when the operator filter registry external call fails\n /// @dev Used for bubbling error up to clients.\n error RemoteOperatorFilterRegistryCallFailed();\n\n // Sale/Purchase errors\n /// @notice Sale is inactive\n error Sale_Inactive();\n /// @notice Presale is inactive\n error Presale_Inactive();\n /// @notice Presale merkle root is invalid\n error Presale_MerkleNotApproved();\n /// @notice Wrong price for purchase\n error Purchase_WrongPrice(uint256 correctPrice);\n /// @notice NFT sold out\n error Mint_SoldOut();\n /// @notice Too many purchase for address\n error Purchase_TooManyForAddress();\n /// @notice Too many presale for address\n error Presale_TooManyForAddress();\n\n // Admin errors\n /// @notice Royalty percentage too high\n error Setup_RoyaltyPercentageTooHigh(uint16 maxRoyaltyBPS);\n /// @notice Invalid admin upgrade address\n error Admin_InvalidUpgradeAddress(address proposedAddress);\n /// @notice Unable to finalize an edition not marked as open (size set to uint64_max_value)\n error Admin_UnableToFinalizeNotOpenEdition();\n\n /// @notice Event emitted for mint fee payout\n /// @param mintFeeAmount amount of the mint fee\n /// @param mintFeeRecipient recipient of the mint fee\n /// @param success if the payout succeeded\n event MintFeePayout(uint256 mintFeeAmount, address mintFeeRecipient, bool success);\n\n /// @notice Event emitted for each sale\n /// @param to address sale was made to\n /// @param quantity quantity of the minted nfts\n /// @param pricePerToken price for each token\n /// @param firstPurchasedTokenId first purchased token ID (to get range add to quantity for max)\n event Sale(\n address indexed to,\n uint256 indexed quantity,\n uint256 indexed pricePerToken,\n uint256 firstPurchasedTokenId\n );\n\n /// @notice Sales configuration has been changed\n /// @dev To access new sales configuration, use getter function.\n /// @param changedBy Changed by user\n event SalesConfigChanged(address indexed changedBy);\n\n /// @notice Event emitted when the funds recipient is changed\n /// @param newAddress new address for the funds recipient\n /// @param changedBy address that the recipient is changed by\n event FundsRecipientChanged(address indexed newAddress, address indexed changedBy);\n\n /// @notice Event emitted when the funds are withdrawn from the minting contract\n /// @param withdrawnBy address that issued the withdraw\n /// @param withdrawnTo address that the funds were withdrawn to\n /// @param amount amount that was withdrawn\n /// @param feeRecipient user getting withdraw fee (if any)\n /// @param feeAmount amount of the fee getting sent (if any)\n event FundsWithdrawn(\n address indexed withdrawnBy,\n address indexed withdrawnTo,\n uint256 amount,\n address feeRecipient,\n uint256 feeAmount\n );\n\n /// @notice Event emitted when an open mint is finalized and further minting is closed forever on the contract.\n /// @param sender address sending close mint\n /// @param numberOfMints number of mints the contract is finalized at\n event OpenMintFinalized(address indexed sender, uint256 numberOfMints);\n\n /// @notice Event emitted when metadata renderer is updated.\n /// @param sender address of the updater\n /// @param renderer new metadata renderer address\n event UpdatedMetadataRenderer(address sender, IMetadataRenderer renderer);\n\n /// @notice Admin function to update the sales configuration settings\n /// @param publicSalePrice public sale price in ether\n /// @param maxSalePurchasePerAddress Max # of purchases (public) per address allowed\n /// @param publicSaleStart unix timestamp when the public sale starts\n /// @param publicSaleEnd unix timestamp when the public sale ends (set to 0 to disable)\n /// @param presaleStart unix timestamp when the presale starts\n /// @param presaleEnd unix timestamp when the presale ends\n /// @param presaleMerkleRoot merkle root for the presale information\n function setSaleConfiguration(\n uint104 publicSalePrice,\n uint32 maxSalePurchasePerAddress,\n uint64 publicSaleStart,\n uint64 publicSaleEnd,\n uint64 presaleStart,\n uint64 presaleEnd,\n bytes32 presaleMerkleRoot\n ) external;\n\n /// @notice External purchase function (payable in eth)\n /// @param quantity to purchase\n /// @return first minted token ID\n function purchase(uint256 quantity) external payable returns (uint256);\n\n /// @notice External purchase presale function (takes a merkle proof and matches to root) (payable in eth)\n /// @param quantity to purchase\n /// @param maxQuantity can purchase (verified by merkle root)\n /// @param pricePerToken price per token allowed (verified by merkle root)\n /// @param merkleProof input for merkle proof leaf verified by merkle root\n /// @return first minted token ID\n function purchasePresale(\n uint256 quantity,\n uint256 maxQuantity,\n uint256 pricePerToken,\n bytes32[] memory merkleProof\n ) external payable returns (uint256);\n\n /// @notice Function to return the global sales details for the given drop\n function saleDetails() external view returns (SaleDetails memory);\n\n /// @notice Function to return the specific sales details for a given address\n /// @param minter address for minter to return mint information for\n function mintedPerAddress(address minter) external view returns (AddressMintDetails memory);\n\n /// @notice This is the opensea/public owner setting that can be set by the contract admin\n function owner() external view returns (address);\n\n /// @notice Update the metadata renderer\n /// @param newRenderer new address for renderer\n /// @param setupRenderer data to call to bootstrap data for the new renderer (optional)\n function setMetadataRenderer(IMetadataRenderer newRenderer, bytes memory setupRenderer) external;\n\n /// @notice This is an admin mint function to mint a quantity to a specific address\n /// @param to address to mint to\n /// @param quantity quantity to mint\n /// @return the id of the first minted NFT\n function adminMint(address to, uint256 quantity) external returns (uint256);\n\n /// @notice This is an admin mint function to mint a single nft each to a list of addresses\n /// @param to list of addresses to mint an NFT each to\n /// @return the id of the first minted NFT\n function adminMintAirdrop(address[] memory to) external returns (uint256);\n\n /// @dev Getter for admin role associated with the contract to handle metadata\n /// @return boolean if address is admin\n function isAdmin(address user) external view returns (bool);\n}\n" + }, + "contracts/drops/interface/IMetadataRenderer.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\ninterface IMetadataRenderer {\n function tokenURI(uint256) external view returns (string memory);\n\n function contractURI() external view returns (string memory);\n\n function initializeWithData(bytes memory initData) external;\n}\n" + }, + "contracts/drops/interface/IOperatorFilterRegistry.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\ninterface IOperatorFilterRegistry {\n function isOperatorAllowed(address registrant, address operator) external view returns (bool);\n\n function register(address registrant) external;\n\n function registerAndSubscribe(address registrant, address subscription) external;\n\n function registerAndCopyEntries(address registrant, address registrantToCopy) external;\n\n function updateOperator(address registrant, address operator, bool filtered) external;\n\n function updateOperators(address registrant, address[] calldata operators, bool filtered) external;\n\n function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external;\n\n function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external;\n\n function subscribe(address registrant, address registrantToSubscribe) external;\n\n function unsubscribe(address registrant, bool copyExistingEntries) external;\n\n function subscriptionOf(address addr) external returns (address registrant);\n\n function subscribers(address registrant) external returns (address[] memory);\n\n function subscriberAt(address registrant, uint256 index) external returns (address);\n\n function copyEntriesOf(address registrant, address registrantToCopy) external;\n\n function isOperatorFiltered(address registrant, address operator) external returns (bool);\n\n function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool);\n\n function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool);\n\n function filteredOperators(address addr) external returns (address[] memory);\n\n function filteredCodeHashes(address addr) external returns (bytes32[] memory);\n\n function filteredOperatorAt(address registrant, uint256 index) external returns (address);\n\n function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32);\n\n function isRegistered(address addr) external returns (bool);\n\n function codeHashOf(address addr) external returns (bytes32);\n\n function unregister(address registrant) external;\n}\n" + }, + "contracts/drops/library/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nlibrary Address {\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "contracts/drops/library/MerkleProof.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nlibrary MerkleProof {\n /**\n * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree\n * defined by `root`. For this, a `proof` must be provided, containing\n * sibling hashes on the branch from the leaf to the root of the tree. Each\n * pair of leaves and each pair of pre-images are assumed to be sorted.\n */\n function verify(bytes32[] memory proof, bytes32 root, bytes32 leaf) internal pure returns (bool) {\n return processProof(proof, leaf) == root;\n }\n\n /**\n * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up\n * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt\n * hash matches the root of the tree. When processing the proof, the pairs\n * of leafs & pre-images are assumed to be sorted.\n *\n * _Available since v4.4._\n */\n function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {\n bytes32 computedHash = leaf;\n for (uint256 i = 0; i < proof.length; i++) {\n bytes32 proofElement = proof[i];\n if (computedHash <= proofElement) {\n // Hash(current computed hash + current element of the proof)\n computedHash = _efficientHash(computedHash, proofElement);\n } else {\n // Hash(current element of the proof + current computed hash)\n computedHash = _efficientHash(proofElement, computedHash);\n }\n }\n return computedHash;\n }\n\n function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {\n assembly {\n mstore(0x00, a)\n mstore(0x20, b)\n value := keccak256(0x00, 0x40)\n }\n }\n}\n" + }, + "contracts/drops/library/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nlibrary Strings {\n bytes16 private constant _HEX_SYMBOLS = \"0123456789abcdef\";\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n // Inspired by OraclizeAPI's implementation - MIT licence\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n if (value == 0) {\n return \"0\";\n }\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n bytes memory buffer = new bytes(digits);\n while (value != 0) {\n digits -= 1;\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n value /= 10;\n }\n return string(buffer);\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n if (value == 0) {\n return \"0x00\";\n }\n uint256 temp = value;\n uint256 length = 0;\n while (temp != 0) {\n length++;\n temp >>= 8;\n }\n return toHexString(value, length);\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n}\n" + }, + "contracts/drops/metadata/DropsMetadataRenderer.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IMetadataRenderer} from \"../interface/IMetadataRenderer.sol\";\n\nimport {Strings} from \"../library/Strings.sol\";\n\nimport {MetadataRenderAdminCheck} from \"./MetadataRenderAdminCheck.sol\";\n\n/// @notice Drops metadata system\ncontract DropsMetadataRenderer is Initializable, IMetadataRenderer, MetadataRenderAdminCheck {\n error MetadataFrozen();\n\n /// Event to mark updated metadata information\n event MetadataUpdated(\n address indexed target,\n string metadataBase,\n string metadataExtension,\n string contractURI,\n uint256 freezeAt\n );\n\n /// @notice Hash to mark updated provenance hash\n event ProvenanceHashUpdated(address indexed target, bytes32 provenanceHash);\n\n /// @notice Struct to store metadata info and update data\n struct MetadataURIInfo {\n string base;\n string extension;\n string contractURI;\n uint256 freezeAt;\n }\n\n /// @notice NFT metadata by contract\n mapping(address => MetadataURIInfo) public metadataBaseByContract;\n\n /// @notice Optional provenance hashes for NFT metadata by contract\n mapping(address => bytes32) public provenanceHashes;\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @dev A blank init function is required to be able to call genesisDeriveFutureAddress to get the deterministic address\n * @dev Since no data is required to be intialized the selector is just returned and _setInitialized() does not need to be called\n */\n function init(bytes memory /* initPayload */) external pure override returns (bytes4) {\n return Initializable.init.selector;\n }\n\n /// @notice Standard init for drop metadata from root drop contract\n /// @param data passed in for initialization\n function initializeWithData(bytes memory data) external {\n // data format: string baseURI, string newContractURI\n (string memory initialBaseURI, string memory initialContractURI) = abi.decode(data, (string, string));\n _updateMetadataDetails(msg.sender, initialBaseURI, \"\", initialContractURI, 0);\n }\n\n /// @notice Update the provenance hash (optional) for a given nft\n /// @param target target address to update\n /// @param provenanceHash provenance hash to set\n function updateProvenanceHash(address target, bytes32 provenanceHash) external requireSenderAdmin(target) {\n provenanceHashes[target] = provenanceHash;\n emit ProvenanceHashUpdated(target, provenanceHash);\n }\n\n /// @notice Update metadata base URI and contract URI\n /// @param baseUri new base URI\n /// @param newContractUri new contract URI (can be an empty string)\n function updateMetadataBase(\n address target,\n string memory baseUri,\n string memory newContractUri\n ) external requireSenderAdmin(target) {\n _updateMetadataDetails(target, baseUri, \"\", newContractUri, 0);\n }\n\n /// @notice Update metadata base URI, extension, contract URI and freezing detailsUpdate metadata base URI, extension, contract URI and freezing detailsUpdate metadata base URI, extension, contract URI and freezing detailsUpdate metadata base URI, extension, contract URI and freezing detailsUpdate metadata base URI, extension, contract URI and freezing detailsUpdate metadata base URI, extension, contract URI and freezing detailsUpdate metadata base URI, extension, contract URI and freezing detailsUpdate metadata base URI, extension, contract URI and freezing details\n /// @param target target contract to update metadata for\n /// @param metadataBase new base URI to update metadata with\n /// @param metadataExtension new extension to append to base metadata URI\n /// @param freezeAt time to freeze the contract metadata at (set to 0 to disable)\n function updateMetadataBaseWithDetails(\n address target,\n string memory metadataBase,\n string memory metadataExtension,\n string memory newContractURI,\n uint256 freezeAt\n ) external requireSenderAdmin(target) {\n _updateMetadataDetails(target, metadataBase, metadataExtension, newContractURI, freezeAt);\n }\n\n /// @notice Internal metadata update function\n /// @param metadataBase Base URI to update metadata for\n /// @param metadataExtension Extension URI to update metadata for\n /// @param freezeAt timestamp to freeze metadata (set to 0 to disable freezing)\n function _updateMetadataDetails(\n address target,\n string memory metadataBase,\n string memory metadataExtension,\n string memory newContractURI,\n uint256 freezeAt\n ) internal {\n if (freezeAt != 0 && freezeAt > block.timestamp) {\n revert MetadataFrozen();\n }\n\n metadataBaseByContract[target] = MetadataURIInfo({\n base: metadataBase,\n extension: metadataExtension,\n contractURI: newContractURI,\n freezeAt: freezeAt\n });\n emit MetadataUpdated({\n target: target,\n metadataBase: metadataBase,\n metadataExtension: metadataExtension,\n contractURI: newContractURI,\n freezeAt: freezeAt\n });\n }\n\n /// @notice A contract URI for the given drop contract\n /// @dev reverts if a contract uri is not provided\n /// @return contract uri for the contract metadata\n function contractURI() external view override returns (string memory) {\n string memory uri = metadataBaseByContract[msg.sender].contractURI;\n if (bytes(uri).length == 0) revert();\n return uri;\n }\n\n /// @notice A token URI for the given drops contract\n /// @dev reverts if a contract uri is not set\n /// @return token URI for the given token ID and contract (set by msg.sender)\n function tokenURI(uint256 tokenId) external view override returns (string memory) {\n MetadataURIInfo memory info = metadataBaseByContract[msg.sender];\n\n if (bytes(info.base).length == 0) revert();\n\n return string(abi.encodePacked(info.base, Strings.toString(tokenId), info.extension));\n }\n}\n" + }, + "contracts/drops/metadata/EditionsMetadataRenderer.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport \"../../abstract/Initializable.sol\";\n\nimport {IMetadataRenderer} from \"../interface/IMetadataRenderer.sol\";\nimport {IHolographDropERC721} from \"../interface/IHolographDropERC721.sol\";\nimport {ERC721Metadata} from \"../../interface/ERC721Metadata.sol\";\nimport {NFTMetadataRenderer} from \"../utils/NFTMetadataRenderer.sol\";\nimport {MetadataRenderAdminCheck} from \"./MetadataRenderAdminCheck.sol\";\n\nimport {Configuration} from \"../struct/Configuration.sol\";\n\ninterface DropConfigGetter {\n function config() external view returns (Configuration memory config);\n}\n\n/// @notice EditionsMetadataRenderer for editions support\ncontract EditionsMetadataRenderer is Initializable, IMetadataRenderer, MetadataRenderAdminCheck {\n /// @notice Storage for token edition information\n struct TokenEditionInfo {\n string description;\n string imageURI;\n string animationURI;\n }\n\n /// @notice Event for updated Media URIs\n event MediaURIsUpdated(address indexed target, address sender, string imageURI, string animationURI);\n\n /// @notice Event for a new edition initialized\n /// @dev admin function indexer feedback\n event EditionInitialized(address indexed target, string description, string imageURI, string animationURI);\n\n /// @notice Description updated for this edition\n /// @dev admin function indexer feedback\n event DescriptionUpdated(address indexed target, address sender, string newDescription);\n\n /// @notice Token information mapping storage\n mapping(address => TokenEditionInfo) public tokenInfos;\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @dev A blank init function is required to be able to call genesisDeriveFutureAddress to get the deterministic address\n * @dev Since no data is required to be intialized the selector is just returned and _setInitialized() does not need to be called\n */\n function init(bytes memory /* initPayload */) external pure override returns (bytes4) {\n return InitializableInterface.init.selector;\n }\n\n /// @notice Update media URIs\n /// @param target target for contract to update metadata for\n /// @param imageURI new image uri address\n /// @param animationURI new animation uri address\n function updateMediaURIs(\n address target,\n string memory imageURI,\n string memory animationURI\n ) external requireSenderAdmin(target) {\n tokenInfos[target].imageURI = imageURI;\n tokenInfos[target].animationURI = animationURI;\n emit MediaURIsUpdated({target: target, sender: msg.sender, imageURI: imageURI, animationURI: animationURI});\n }\n\n /// @notice Admin function to update description\n /// @param target target description\n /// @param newDescription new description\n function updateDescription(address target, string memory newDescription) external requireSenderAdmin(target) {\n tokenInfos[target].description = newDescription;\n\n emit DescriptionUpdated({target: target, sender: msg.sender, newDescription: newDescription});\n }\n\n /// @notice Default initializer for edition data from a specific contract\n /// @param data data to init with\n function initializeWithData(bytes memory data) external {\n // data format: description, imageURI, animationURI\n (string memory description, string memory imageURI, string memory animationURI) = abi.decode(\n data,\n (string, string, string)\n );\n\n tokenInfos[msg.sender] = TokenEditionInfo({\n description: description,\n imageURI: imageURI,\n animationURI: animationURI\n });\n emit EditionInitialized({\n target: msg.sender,\n description: description,\n imageURI: imageURI,\n animationURI: animationURI\n });\n }\n\n /// @notice Contract URI information getter\n /// @return contract uri (if set)\n function contractURI() external view override returns (string memory) {\n address target = msg.sender;\n TokenEditionInfo storage editionInfo = tokenInfos[target];\n Configuration memory config = DropConfigGetter(target).config();\n\n return\n NFTMetadataRenderer.encodeContractURIJSON({\n name: ERC721Metadata(target).name(),\n description: editionInfo.description,\n imageURI: editionInfo.imageURI,\n animationURI: editionInfo.animationURI,\n royaltyBPS: uint256(config.royaltyBPS),\n royaltyRecipient: config.fundsRecipient\n });\n }\n\n /// @notice Token URI information getter\n /// @param tokenId to get uri for\n /// @return contract uri (if set)\n function tokenURI(uint256 tokenId) external view override returns (string memory) {\n address target = msg.sender;\n\n TokenEditionInfo memory info = tokenInfos[target];\n IHolographDropERC721 media = IHolographDropERC721(target);\n\n uint256 maxSupply = media.saleDetails().maxSupply;\n\n // For open editions, set max supply to 0 for renderer to remove the edition max number\n // This will be added back on once the open edition is \"finalized\"\n if (maxSupply == type(uint64).max) {\n maxSupply = 0;\n }\n\n return\n NFTMetadataRenderer.createMetadataEdition({\n name: ERC721Metadata(target).name(),\n description: info.description,\n imageURI: info.imageURI,\n animationURI: info.animationURI,\n tokenOfEdition: tokenId,\n editionSize: maxSupply\n });\n }\n}\n" + }, + "contracts/drops/metadata/MetadataRenderAdminCheck.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {IHolographDropERC721} from \"../interface/IHolographDropERC721.sol\";\n\ncontract MetadataRenderAdminCheck {\n error Access_OnlyAdmin();\n\n /// @notice Modifier to require the sender to be an admin\n /// @param target address that the user wants to modify\n modifier requireSenderAdmin(address target) {\n if (target != msg.sender && !IHolographDropERC721(target).isAdmin(msg.sender)) {\n revert Access_OnlyAdmin();\n }\n\n _;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleArbitrumNova.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOracleArbitrumNova is Admin, Initializable, IDropsPriceOracle {\n address constant WETH = 0x0000000000000000000000000000000000000000; // 18 decimals\n address constant USDC = 0x0000000000000000000000000000000000000000; // 6 decimals\n address constant USDT = 0x0000000000000000000000000000000000000000; // 6 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n\n IUniswapV2Pair constant UniV2UsdcPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n IUniswapV2Pair constant UniV2UsdtPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external view returns (uint256 weiAmount) {\n weiAmount =\n (_getSushiUSDC(usdAmount) + _getSushiUSDT(usdAmount) + _getUniUSDC(usdAmount) + _getUniUSDT(usdAmount)) /\n 4;\n }\n\n function _getSushiUSDC(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdcPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getSushiUSDT(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdtPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUniUSDC(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = UniV2UsdcPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUniUSDT(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = UniV2UsdtPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleArbitrumOne.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOracleArbitrumOne is Admin, Initializable, IDropsPriceOracle {\n address constant WETH = 0x82aF49447D8a07e3bd95BD0d56f35241523fBab1; // 18 decimals\n address constant USDC = 0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8; // 6 decimals\n address constant USDT = 0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9; // 6 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0x905dfCD5649217c42684f23958568e533C711Aa3);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0xCB0E5bFa72bBb4d16AB5aA0c60601c438F04b4ad);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external view returns (uint256 weiAmount) {\n weiAmount = (_getSushiUSDC(usdAmount) + _getSushiUSDT(usdAmount)) / 2;\n }\n\n function _getSushiUSDC(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdcPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDC\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getSushiUSDT(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdtPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleArbitrumTestnetGoerli.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOracleArbitrumTestnetGoerli is Admin, Initializable, IDropsPriceOracle {\n address constant WETH = 0x0000000000000000000000000000000000000000; // 18 decimals\n address constant USDC = 0x0000000000000000000000000000000000000000; // 6 decimals\n address constant USDT = 0x0000000000000000000000000000000000000000; // 6 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n\n IUniswapV2Pair constant UniV2UsdcPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n IUniswapV2Pair constant UniV2UsdtPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external pure returns (uint256 weiAmount) {\n weiAmount = (_getSushiUSDC(usdAmount) + _getSushiUSDT(usdAmount)) / 2;\n }\n\n function _getSushiUSDC(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdcPool.getReserves();\n uint112 _reserve0 = 14248413024234;\n uint112 _reserve1 = 8237558200010903232972;\n // x is always native token / WETH\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getSushiUSDT(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdtPool.getReserves();\n uint112 _reserve0 = 7190540826553156156218;\n uint112 _reserve1 = 12394808861997;\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleAvalanche.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {ILBPair} from \"./interface/ILBPair.sol\";\nimport {ILBRouter} from \"./interface/ILBRouter.sol\";\n\ncontract DropsPriceOracleAvalanche is Admin, Initializable, IDropsPriceOracle {\n address constant WAVAX = 0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7; // 18 decimals\n address constant USDC = 0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E; // 6 decimals\n address constant USDT = 0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7; // 6 decimals\n\n ILBRouter constant TraderJoeRouter = ILBRouter(0xb4315e873dBcf96Ffd0acd8EA43f689D8c20fB30);\n ILBPair constant TraderJoeUsdcPool = ILBPair(0xD446eb1660F766d533BeCeEf890Df7A69d26f7d1);\n ILBPair constant TraderJoeUsdtPool = ILBPair(0x87EB2F90d7D0034571f343fb7429AE22C1Bd9F72);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external view returns (uint256 weiAmount) {\n if (usdAmount == 0) {\n weiAmount = 0;\n return weiAmount;\n }\n weiAmount = (_getTraderJoeUSDC(usdAmount) + _getTraderJoeUSDT(usdAmount)) / 2;\n }\n\n function _getTraderJoeUSDC(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint128 amountIn, uint128 amountOutLeft, uint128 fee) = TraderJoeRouter.getSwapIn(\n TraderJoeUsdcPool,\n uint128(usdAmount),\n true\n );\n weiAmount = amountIn + fee;\n }\n\n function _getTraderJoeUSDT(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint128 amountIn, uint128 amountOutLeft, uint128 fee) = TraderJoeRouter.getSwapIn(\n TraderJoeUsdtPool,\n uint128(usdAmount),\n true\n );\n weiAmount = amountIn + fee;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleAvalancheTestnet.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOracleAvalancheTestnet is Admin, Initializable, IDropsPriceOracle {\n address constant WAVAX = 0xd00ae08403B9bbb9124bB305C09058E32C39A48c;\n address constant USDC = 0x5425890298aed601595a70AB815c96711a31Bc65; // 6 decimals\n address constant USDT = 0x0000000000000000000000000000000000000000; // 6 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0x1B92bf7394d317A758d953F6428445A8977e195C);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external pure returns (uint256 weiAmount) {\n weiAmount = (_getSushiUSDC(usdAmount) + _getSushiUSDT(usdAmount)) / 2;\n }\n\n function _getSushiUSDC(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdcPool.getReserves();\n uint112 _reserve0 = 133224784402692878349;\n uint112 _reserve1 = 2205199060;\n // x is always native token / WAVAX\n uint256 x = _reserve0;\n // y is always USD token / USDC\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getSushiUSDT(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdtPool.getReserves();\n uint112 _reserve0 = 2205199060;\n uint112 _reserve1 = 133224784402692878349;\n // x is always native token / WAVAX\n uint256 x = _reserve1;\n // y is always USD token / USDT\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleBinanceSmartChain.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOracleBinanceSmartChain is Admin, Initializable, IDropsPriceOracle {\n address constant WBNB = 0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c;\n address constant USDC = 0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d; // 18 decimals\n address constant USDT = 0x55d398326f99059fF775485246999027B3197955; // 18 decimals\n address constant BUSD = 0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56; // 18 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0xc7632B7b2d768bbb30a404E13E1dE48d1439ec21);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0x2905817b020fD35D9d09672946362b62766f0d69);\n IUniswapV2Pair constant SushiV2BusdPool = IUniswapV2Pair(0xDc558D64c29721d74C4456CfB4363a6e6660A9Bb);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external view returns (uint256 weiAmount) {\n weiAmount = (_getUSDC(usdAmount) + _getUSDT(usdAmount) + _getBUSD(usdAmount)) / 3;\n }\n\n function _getUSDC(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n usdAmount = usdAmount * (10 ** (18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdcPool.getReserves();\n // x is always native token / WBNB\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUSDT(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n usdAmount = usdAmount * (10 ** (18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdtPool.getReserves();\n // x is always native token / WBNB\n uint256 x = _reserve1;\n // y is always USD token / USDT\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getBUSD(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n usdAmount = usdAmount * (10 ** (18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2BusdPool.getReserves();\n // x is always native token / WBNB\n uint256 x = _reserve0;\n // y is always USD token / BUSD\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleBinanceSmartChainTestnet.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOracleBinanceSmartChainTestnet is Admin, Initializable, IDropsPriceOracle {\n address constant WBNB = 0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd;\n address constant USDC = 0x0000000000000000000000000000000000000000; // 18 decimals\n address constant USDT = 0x337610d27c682E347C9cD60BD4b3b107C9d34dDd; // 18 decimals\n address constant BUSD = 0xeD24FC36d5Ee211Ea25A80239Fb8C4Cfd80f12Ee; // 18 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0x622A814A1c842D34F9828370d9015Dc9d4c5b6F1);\n IUniswapV2Pair constant SushiV2BusdPool = IUniswapV2Pair(0x9A0eeceDA5c0203924484F5467cEE4321cf6A189);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external pure returns (uint256 weiAmount) {\n weiAmount = (_getUSDC(usdAmount) + _getUSDT(usdAmount) + _getBUSD(usdAmount)) / 3;\n }\n\n function _getUSDC(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n usdAmount = usdAmount * (10 ** (18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdcPool.getReserves();\n uint112 _reserve0 = 13021882855694508203763;\n uint112 _reserve1 = 40694382259814793835;\n // x is always native token / WBNB\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUSDT(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n usdAmount = usdAmount * (10 ** (18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdtPool.getReserves();\n uint112 _reserve0 = 27194218672878436248359;\n uint112 _reserve1 = 85236077287017749564;\n // x is always native token / WBNB\n uint256 x = _reserve1;\n // y is always USD token / USDT\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getBUSD(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n usdAmount = usdAmount * (10 ** (18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2BusdPool.getReserves();\n uint112 _reserve0 = 18888866298338593382;\n uint112 _reserve1 = 6055244885106491861952;\n // x is always native token / WBNB\n uint256 x = _reserve0;\n // y is always USD token / BUSD\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleEthereum.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOracleEthereum is Admin, Initializable, IDropsPriceOracle {\n address constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; // 18 decimals\n address constant USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48; // 6 decimals\n address constant USDT = 0xdAC17F958D2ee523a2206206994597C13D831ec7; // 6 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0x397FF1542f962076d0BFE58eA045FfA2d347ACa0);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0x06da0fd433C1A5d7a4faa01111c044910A184553);\n\n IUniswapV2Pair constant UniV2UsdcPool = IUniswapV2Pair(0xB4e16d0168e52d35CaCD2c6185b44281Ec28C9Dc);\n IUniswapV2Pair constant UniV2UsdtPool = IUniswapV2Pair(0x0d4a11d5EEaaC28EC3F61d100daF4d40471f1852);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external view returns (uint256 weiAmount) {\n weiAmount =\n (_getSushiUSDC(usdAmount) + _getSushiUSDT(usdAmount) + _getUniUSDC(usdAmount) + _getUniUSDT(usdAmount)) /\n 4;\n }\n\n function _getSushiUSDC(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdcPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getSushiUSDT(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdtPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUniUSDC(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = UniV2UsdcPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUniUSDT(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = UniV2UsdtPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleEthereumTestnetGoerli.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOracleEthereumTestnetGoerli is Admin, Initializable, IDropsPriceOracle {\n address constant WETH = 0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6; // 18 decimals\n address constant USDC = 0x07865c6E87B9F70255377e024ace6630C1Eaa37F; // 6 decimals\n address constant USDT = 0x0000000000000000000000000000000000000000; // 6 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n\n IUniswapV2Pair constant UniV2UsdcPool = IUniswapV2Pair(0xB4e16d0168e52d35CaCD2c6185b44281Ec28C9Dc);\n IUniswapV2Pair constant UniV2UsdtPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external pure returns (uint256 weiAmount) {\n weiAmount =\n (_getSushiUSDC(usdAmount) + _getSushiUSDT(usdAmount) + _getUniUSDC(usdAmount) + _getUniUSDT(usdAmount)) /\n 4;\n }\n\n function _getSushiUSDC(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdcPool.getReserves();\n uint112 _reserve0 = 14248413024234;\n uint112 _reserve1 = 8237558200010903232972;\n // x is always native token / WETH\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getSushiUSDT(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdtPool.getReserves();\n uint112 _reserve0 = 7190540826553156156218;\n uint112 _reserve1 = 12394808861997;\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUniUSDC(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = UniV2UsdcPool.getReserves();\n uint112 _reserve0 = 27969935741431;\n uint112 _reserve1 = 16175569695347837629371;\n // x is always native token / WETH\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUniUSDT(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = UniV2UsdtPool.getReserves();\n uint112 _reserve0 = 16492332449237327237450;\n uint112 _reserve1 = 28443279643692;\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleOptimism.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOracleOptimism is Admin, Initializable, IDropsPriceOracle {\n address constant WETH = 0x4200000000000000000000000000000000000006; // 18 decimals\n address constant USDC = 0x7F5c764cBc14f9669B88837ca1490cCa17c31607; // 6 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0x7086622E6Db990385B102D79CB1218947fb549a9);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external view returns (uint256 weiAmount) {\n weiAmount = _getSushiUSDC(usdAmount);\n }\n\n function _getSushiUSDC(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdcPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDC\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleOptimismTestnetGoerli.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOracleOptimismTestnetGoerli is Admin, Initializable, IDropsPriceOracle {\n address constant WETH = 0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6; // 18 decimals\n address constant USDC = 0x07865c6E87B9F70255377e024ace6630C1Eaa37F; // 6 decimals\n address constant USDT = 0x0000000000000000000000000000000000000000; // 6 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n\n IUniswapV2Pair constant UniV2UsdcPool = IUniswapV2Pair(0xB4e16d0168e52d35CaCD2c6185b44281Ec28C9Dc);\n IUniswapV2Pair constant UniV2UsdtPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external pure returns (uint256 weiAmount) {\n weiAmount =\n (_getSushiUSDC(usdAmount) + _getSushiUSDT(usdAmount) + _getUniUSDC(usdAmount) + _getUniUSDT(usdAmount)) /\n 4;\n }\n\n function _getSushiUSDC(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdcPool.getReserves();\n uint112 _reserve0 = 14248413024234;\n uint112 _reserve1 = 8237558200010903232972;\n // x is always native token / WETH\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getSushiUSDT(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdtPool.getReserves();\n uint112 _reserve0 = 7190540826553156156218;\n uint112 _reserve1 = 12394808861997;\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUniUSDC(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = UniV2UsdcPool.getReserves();\n uint112 _reserve0 = 27969935741431;\n uint112 _reserve1 = 16175569695347837629371;\n // x is always native token / WETH\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUniUSDT(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = UniV2UsdtPool.getReserves();\n uint112 _reserve0 = 16492332449237327237450;\n uint112 _reserve1 = 28443279643692;\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOraclePolygon.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOraclePolygon is Admin, Initializable, IDropsPriceOracle {\n address constant WMATIC = 0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270; // 18 decimals\n address constant USDC = 0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174; // 6 decimals\n address constant USDT = 0xc2132D05D31c914a87C6611C10748AEb04B58e8F; // 6 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0xcd353F79d9FADe311fC3119B841e1f456b54e858);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0x55FF76BFFC3Cdd9D5FdbBC2ece4528ECcE45047e);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external view returns (uint256 weiAmount) {\n weiAmount = (_getUSDC(usdAmount) + _getUSDT(usdAmount)) / 2;\n }\n\n function _getUSDC(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdcPool.getReserves();\n // x is always native token / WMATIC\n uint256 x = _reserve0;\n // y is always USD token / USDC\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUSDT(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdtPool.getReserves();\n // x is always native token / WMATIC\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOraclePolygonTestnet.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOraclePolygonTestnet is Admin, Initializable, IDropsPriceOracle {\n address constant WMATIC = 0x5B67676a984807a212b1c59eBFc9B3568a474F0a; // 18 decimals\n address constant USDC = 0x742DfA5Aa70a8212857966D491D67B09Ce7D6ec7; // 6 decimals\n address constant USDT = 0x0000000000000000000000000000000000000000; // 6 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0x412D4b3C56836ff78F1C8197c6718A6DFf3702F5);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external pure returns (uint256 weiAmount) {\n weiAmount = (_getUSDC(usdAmount) + _getUSDT(usdAmount)) / 2;\n }\n\n function _getUSDC(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdcPool.getReserves();\n uint112 _reserve0 = 185186616552407552407159;\n uint112 _reserve1 = 207981749778;\n // x is always native token / WMATIC\n uint256 x = _reserve0;\n // y is always USD token / USDC\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUSDT(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdtPool.getReserves();\n uint112 _reserve0 = 13799757434002573084812;\n uint112 _reserve1 = 15484391886;\n // x is always native token / WMATIC\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DummyDropsPriceOracle.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DummyDropsPriceOracle is Admin, Initializable, IDropsPriceOracle {\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external pure returns (uint256 weiAmount) {\n uint112 _reserve0 = 8237558200010903232972;\n uint112 _reserve1 = 14248413024234;\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDC\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/interface/ILBPair.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\ninterface ILBPair {\n function tokenX() external view returns (address);\n\n function tokenY() external view returns (address);\n\n function getReservesAndId() external view returns (uint256 reserveX, uint256 reserveY, uint256 activeId);\n}\n" + }, + "contracts/drops/oracle/interface/ILBRouter.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {ILBPair} from \"./ILBPair.sol\";\n\ninterface ILBRouter {\n function getSwapIn(\n ILBPair LBPair,\n uint128 amountOut,\n bool swapForY\n ) external view returns (uint128 amountIn, uint128 amountOutLeft, uint128 fee);\n}\n" + }, + "contracts/drops/oracle/interface/IUniswapV2Pair.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\ninterface IUniswapV2Pair {\n event Approval(address indexed owner, address indexed spender, uint256 value);\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n function name() external pure returns (string memory);\n\n function symbol() external pure returns (string memory);\n\n function decimals() external pure returns (uint8);\n\n function totalSupply() external view returns (uint256);\n\n function balanceOf(address owner) external view returns (uint256);\n\n function allowance(address owner, address spender) external view returns (uint256);\n\n function approve(address spender, uint256 value) external returns (bool);\n\n function transfer(address to, uint256 value) external returns (bool);\n\n function transferFrom(address from, address to, uint256 value) external returns (bool);\n\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n\n function PERMIT_TYPEHASH() external pure returns (bytes32);\n\n function nonces(address owner) external view returns (uint256);\n\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n event Mint(address indexed sender, uint256 amount0, uint256 amount1);\n event Burn(address indexed sender, uint256 amount0, uint256 amount1, address indexed to);\n event Swap(\n address indexed sender,\n uint256 amount0In,\n uint256 amount1In,\n uint256 amount0Out,\n uint256 amount1Out,\n address indexed to\n );\n event Sync(uint112 reserve0, uint112 reserve1);\n\n function MINIMUM_LIQUIDITY() external pure returns (uint256);\n\n function factory() external view returns (address);\n\n function token0() external view returns (address);\n\n function token1() external view returns (address);\n\n function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);\n\n function price0CumulativeLast() external view returns (uint256);\n\n function price1CumulativeLast() external view returns (uint256);\n\n function kLast() external view returns (uint256);\n\n function mint(address to) external returns (uint256 liquidity);\n\n function burn(address to) external returns (uint256 amount0, uint256 amount1);\n\n function swap(uint256 amount0Out, uint256 amount1Out, address to, bytes calldata data) external;\n\n function skim(address to) external;\n\n function sync() external;\n\n function initialize(address, address) external;\n}\n" + }, + "contracts/drops/oracle/interface/IUniswapV3Pair.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\ninterface IUniswapV3PoolImmutables {\n /// @notice The contract that deployed the pool, which must adhere to the IUniswapV3Factory interface\n /// @return The contract address\n function factory() external view returns (address);\n\n /// @notice The first of the two tokens of the pool, sorted by address\n /// @return The token contract address\n function token0() external view returns (address);\n\n /// @notice The second of the two tokens of the pool, sorted by address\n /// @return The token contract address\n function token1() external view returns (address);\n\n /// @notice The pool's fee in hundredths of a bip, i.e. 1e-6\n /// @return The fee\n function fee() external view returns (uint24);\n\n /// @notice The pool tick spacing\n /// @dev Ticks can only be used at multiples of this value, minimum of 1 and always positive\n /// e.g.: a tickSpacing of 3 means ticks can be initialized every 3rd tick, i.e., ..., -6, -3, 0, 3, 6, ...\n /// This value is an int24 to avoid casting even though it is always positive.\n /// @return The tick spacing\n function tickSpacing() external view returns (int24);\n\n /// @notice The maximum amount of position liquidity that can use any tick in the range\n /// @dev This parameter is enforced per tick to prevent liquidity from overflowing a uint128 at any point, and\n /// also prevents out-of-range liquidity from being used to prevent adding in-range liquidity to a pool\n /// @return The max amount of liquidity per tick\n function maxLiquidityPerTick() external view returns (uint128);\n}\n\ninterface IUniswapV3PoolState {\n /// @notice The 0th storage slot in the pool stores many values, and is exposed as a single method to save gas\n /// when accessed externally.\n /// @return sqrtPriceX96 The current price of the pool as a sqrt(token1/token0) Q64.96 value\n /// tick The current tick of the pool, i.e. according to the last tick transition that was run.\n /// This value may not always be equal to SqrtTickMath.getTickAtSqrtRatio(sqrtPriceX96) if the price is on a tick\n /// boundary.\n /// observationIndex The index of the last oracle observation that was written,\n /// observationCardinality The current maximum number of observations stored in the pool,\n /// observationCardinalityNext The next maximum number of observations, to be updated when the observation.\n /// feeProtocol The protocol fee for both tokens of the pool.\n /// Encoded as two 4 bit values, where the protocol fee of token1 is shifted 4 bits and the protocol fee of token0\n /// is the lower 4 bits. Used as the denominator of a fraction of the swap fee, e.g. 4 means 1/4th of the swap fee.\n /// unlocked Whether the pool is currently locked to reentrancy\n function slot0()\n external\n view\n returns (\n uint160 sqrtPriceX96,\n int24 tick,\n uint16 observationIndex,\n uint16 observationCardinality,\n uint16 observationCardinalityNext,\n uint8 feeProtocol,\n bool unlocked\n );\n\n /// @notice The fee growth as a Q128.128 fees of token0 collected per unit of liquidity for the entire life of the pool\n /// @dev This value can overflow the uint256\n function feeGrowthGlobal0X128() external view returns (uint256);\n\n /// @notice The fee growth as a Q128.128 fees of token1 collected per unit of liquidity for the entire life of the pool\n /// @dev This value can overflow the uint256\n function feeGrowthGlobal1X128() external view returns (uint256);\n\n /// @notice The amounts of token0 and token1 that are owed to the protocol\n /// @dev Protocol fees will never exceed uint128 max in either token\n function protocolFees() external view returns (uint128 token0, uint128 token1);\n\n /// @notice The currently in range liquidity available to the pool\n /// @dev This value has no relationship to the total liquidity across all ticks\n function liquidity() external view returns (uint128);\n\n /// @notice Look up information about a specific tick in the pool\n /// @param tick The tick to look up\n /// @return liquidityGross the total amount of position liquidity that uses the pool either as tick lower or\n /// tick upper,\n /// liquidityNet how much liquidity changes when the pool price crosses the tick,\n /// feeGrowthOutside0X128 the fee growth on the other side of the tick from the current tick in token0,\n /// feeGrowthOutside1X128 the fee growth on the other side of the tick from the current tick in token1,\n /// tickCumulativeOutside the cumulative tick value on the other side of the tick from the current tick\n /// secondsPerLiquidityOutsideX128 the seconds spent per liquidity on the other side of the tick from the current tick,\n /// secondsOutside the seconds spent on the other side of the tick from the current tick,\n /// initialized Set to true if the tick is initialized, i.e. liquidityGross is greater than 0, otherwise equal to false.\n /// Outside values can only be used if the tick is initialized, i.e. if liquidityGross is greater than 0.\n /// In addition, these values are only relative and must be used only in comparison to previous snapshots for\n /// a specific position.\n function ticks(\n int24 tick\n )\n external\n view\n returns (\n uint128 liquidityGross,\n int128 liquidityNet,\n uint256 feeGrowthOutside0X128,\n uint256 feeGrowthOutside1X128,\n int56 tickCumulativeOutside,\n uint160 secondsPerLiquidityOutsideX128,\n uint32 secondsOutside,\n bool initialized\n );\n\n /// @notice Returns 256 packed tick initialized boolean values. See TickBitmap for more information\n function tickBitmap(int16 wordPosition) external view returns (uint256);\n\n /// @notice Returns the information about a position by the position's key\n /// @param key The position's key is a hash of a preimage composed by the owner, tickLower and tickUpper\n /// @return _liquidity The amount of liquidity in the position,\n /// Returns feeGrowthInside0LastX128 fee growth of token0 inside the tick range as of the last mint/burn/poke,\n /// Returns feeGrowthInside1LastX128 fee growth of token1 inside the tick range as of the last mint/burn/poke,\n /// Returns tokensOwed0 the computed amount of token0 owed to the position as of the last mint/burn/poke,\n /// Returns tokensOwed1 the computed amount of token1 owed to the position as of the last mint/burn/poke\n function positions(\n bytes32 key\n )\n external\n view\n returns (\n uint128 _liquidity,\n uint256 feeGrowthInside0LastX128,\n uint256 feeGrowthInside1LastX128,\n uint128 tokensOwed0,\n uint128 tokensOwed1\n );\n\n /// @notice Returns data about a specific observation index\n /// @param index The element of the observations array to fetch\n /// @dev You most likely want to use #observe() instead of this method to get an observation as of some amount of time\n /// ago, rather than at a specific index in the array.\n /// @return blockTimestamp The timestamp of the observation,\n /// Returns tickCumulative the tick multiplied by seconds elapsed for the life of the pool as of the observation timestamp,\n /// Returns secondsPerLiquidityCumulativeX128 the seconds per in range liquidity for the life of the pool as of the observation timestamp,\n /// Returns initialized whether the observation has been initialized and the values are safe to use\n function observations(\n uint256 index\n )\n external\n view\n returns (uint32 blockTimestamp, int56 tickCumulative, uint160 secondsPerLiquidityCumulativeX128, bool initialized);\n}\n\ninterface IUniswapV3PoolDerivedState {\n /// @notice Returns the cumulative tick and liquidity as of each timestamp `secondsAgo` from the current block timestamp\n /// @dev To get a time weighted average tick or liquidity-in-range, you must call this with two values, one representing\n /// the beginning of the period and another for the end of the period. E.g., to get the last hour time-weighted average tick,\n /// you must call it with secondsAgos = [3600, 0].\n /// @dev The time weighted average tick represents the geometric time weighted average price of the pool, in\n /// log base sqrt(1.0001) of token1 / token0. The TickMath library can be used to go from a tick value to a ratio.\n /// @param secondsAgos From how long ago each cumulative tick and liquidity value should be returned\n /// @return tickCumulatives Cumulative tick values as of each `secondsAgos` from the current block timestamp\n /// @return secondsPerLiquidityCumulativeX128s Cumulative seconds per liquidity-in-range value as of each `secondsAgos` from the current block\n /// timestamp\n function observe(\n uint32[] calldata secondsAgos\n ) external view returns (int56[] memory tickCumulatives, uint160[] memory secondsPerLiquidityCumulativeX128s);\n\n /// @notice Returns a snapshot of the tick cumulative, seconds per liquidity and seconds inside a tick range\n /// @dev Snapshots must only be compared to other snapshots, taken over a period for which a position existed.\n /// I.e., snapshots cannot be compared if a position is not held for the entire period between when the first\n /// snapshot is taken and the second snapshot is taken.\n /// @param tickLower The lower tick of the range\n /// @param tickUpper The upper tick of the range\n /// @return tickCumulativeInside The snapshot of the tick accumulator for the range\n /// @return secondsPerLiquidityInsideX128 The snapshot of seconds per liquidity for the range\n /// @return secondsInside The snapshot of seconds per liquidity for the range\n function snapshotCumulativesInside(\n int24 tickLower,\n int24 tickUpper\n ) external view returns (int56 tickCumulativeInside, uint160 secondsPerLiquidityInsideX128, uint32 secondsInside);\n}\n\ninterface IUniswapV3PoolActions {\n /// @notice Sets the initial price for the pool\n /// @dev Price is represented as a sqrt(amountToken1/amountToken0) Q64.96 value\n /// @param sqrtPriceX96 the initial sqrt price of the pool as a Q64.96\n function initialize(uint160 sqrtPriceX96) external;\n\n /// @notice Adds liquidity for the given recipient/tickLower/tickUpper position\n /// @dev The caller of this method receives a callback in the form of IUniswapV3MintCallback#uniswapV3MintCallback\n /// in which they must pay any token0 or token1 owed for the liquidity. The amount of token0/token1 due depends\n /// on tickLower, tickUpper, the amount of liquidity, and the current price.\n /// @param recipient The address for which the liquidity will be created\n /// @param tickLower The lower tick of the position in which to add liquidity\n /// @param tickUpper The upper tick of the position in which to add liquidity\n /// @param amount The amount of liquidity to mint\n /// @param data Any data that should be passed through to the callback\n /// @return amount0 The amount of token0 that was paid to mint the given amount of liquidity. Matches the value in the callback\n /// @return amount1 The amount of token1 that was paid to mint the given amount of liquidity. Matches the value in the callback\n function mint(\n address recipient,\n int24 tickLower,\n int24 tickUpper,\n uint128 amount,\n bytes calldata data\n ) external returns (uint256 amount0, uint256 amount1);\n\n /// @notice Collects tokens owed to a position\n /// @dev Does not recompute fees earned, which must be done either via mint or burn of any amount of liquidity.\n /// Collect must be called by the position owner. To withdraw only token0 or only token1, amount0Requested or\n /// amount1Requested may be set to zero. To withdraw all tokens owed, caller may pass any value greater than the\n /// actual tokens owed, e.g. type(uint128).max. Tokens owed may be from accumulated swap fees or burned liquidity.\n /// @param recipient The address which should receive the fees collected\n /// @param tickLower The lower tick of the position for which to collect fees\n /// @param tickUpper The upper tick of the position for which to collect fees\n /// @param amount0Requested How much token0 should be withdrawn from the fees owed\n /// @param amount1Requested How much token1 should be withdrawn from the fees owed\n /// @return amount0 The amount of fees collected in token0\n /// @return amount1 The amount of fees collected in token1\n function collect(\n address recipient,\n int24 tickLower,\n int24 tickUpper,\n uint128 amount0Requested,\n uint128 amount1Requested\n ) external returns (uint128 amount0, uint128 amount1);\n\n /// @notice Burn liquidity from the sender and account tokens owed for the liquidity to the position\n /// @dev Can be used to trigger a recalculation of fees owed to a position by calling with an amount of 0\n /// @dev Fees must be collected separately via a call to #collect\n /// @param tickLower The lower tick of the position for which to burn liquidity\n /// @param tickUpper The upper tick of the position for which to burn liquidity\n /// @param amount How much liquidity to burn\n /// @return amount0 The amount of token0 sent to the recipient\n /// @return amount1 The amount of token1 sent to the recipient\n function burn(int24 tickLower, int24 tickUpper, uint128 amount) external returns (uint256 amount0, uint256 amount1);\n\n /// @notice Swap token0 for token1, or token1 for token0\n /// @dev The caller of this method receives a callback in the form of IUniswapV3SwapCallback#uniswapV3SwapCallback\n /// @param recipient The address to receive the output of the swap\n /// @param zeroForOne The direction of the swap, true for token0 to token1, false for token1 to token0\n /// @param amountSpecified The amount of the swap, which implicitly configures the swap as exact input (positive), or exact output (negative)\n /// @param sqrtPriceLimitX96 The Q64.96 sqrt price limit. If zero for one, the price cannot be less than this\n /// value after the swap. If one for zero, the price cannot be greater than this value after the swap\n /// @param data Any data to be passed through to the callback\n /// @return amount0 The delta of the balance of token0 of the pool, exact when negative, minimum when positive\n /// @return amount1 The delta of the balance of token1 of the pool, exact when negative, minimum when positive\n function swap(\n address recipient,\n bool zeroForOne,\n int256 amountSpecified,\n uint160 sqrtPriceLimitX96,\n bytes calldata data\n ) external returns (int256 amount0, int256 amount1);\n\n /// @notice Receive token0 and/or token1 and pay it back, plus a fee, in the callback\n /// @dev The caller of this method receives a callback in the form of IUniswapV3FlashCallback#uniswapV3FlashCallback\n /// @dev Can be used to donate underlying tokens pro-rata to currently in-range liquidity providers by calling\n /// with 0 amount{0,1} and sending the donation amount(s) from the callback\n /// @param recipient The address which will receive the token0 and token1 amounts\n /// @param amount0 The amount of token0 to send\n /// @param amount1 The amount of token1 to send\n /// @param data Any data to be passed through to the callback\n function flash(address recipient, uint256 amount0, uint256 amount1, bytes calldata data) external;\n\n /// @notice Increase the maximum number of price and liquidity observations that this pool will store\n /// @dev This method is no-op if the pool already has an observationCardinalityNext greater than or equal to\n /// the input observationCardinalityNext.\n /// @param observationCardinalityNext The desired minimum number of observations for the pool to store\n function increaseObservationCardinalityNext(uint16 observationCardinalityNext) external;\n}\n\ninterface IUniswapV3PoolOwnerActions {\n /// @notice Set the denominator of the protocol's % share of the fees\n /// @param feeProtocol0 new protocol fee for token0 of the pool\n /// @param feeProtocol1 new protocol fee for token1 of the pool\n function setFeeProtocol(uint8 feeProtocol0, uint8 feeProtocol1) external;\n\n /// @notice Collect the protocol fee accrued to the pool\n /// @param recipient The address to which collected protocol fees should be sent\n /// @param amount0Requested The maximum amount of token0 to send, can be 0 to collect fees in only token1\n /// @param amount1Requested The maximum amount of token1 to send, can be 0 to collect fees in only token0\n /// @return amount0 The protocol fee collected in token0\n /// @return amount1 The protocol fee collected in token1\n function collectProtocol(\n address recipient,\n uint128 amount0Requested,\n uint128 amount1Requested\n ) external returns (uint128 amount0, uint128 amount1);\n}\n\ninterface IUniswapV3PoolEvents {\n /// @notice Emitted exactly once by a pool when #initialize is first called on the pool\n /// @dev Mint/Burn/Swap cannot be emitted by the pool before Initialize\n /// @param sqrtPriceX96 The initial sqrt price of the pool, as a Q64.96\n /// @param tick The initial tick of the pool, i.e. log base 1.0001 of the starting price of the pool\n event Initialize(uint160 sqrtPriceX96, int24 tick);\n\n /// @notice Emitted when liquidity is minted for a given position\n /// @param sender The address that minted the liquidity\n /// @param owner The owner of the position and recipient of any minted liquidity\n /// @param tickLower The lower tick of the position\n /// @param tickUpper The upper tick of the position\n /// @param amount The amount of liquidity minted to the position range\n /// @param amount0 How much token0 was required for the minted liquidity\n /// @param amount1 How much token1 was required for the minted liquidity\n event Mint(\n address sender,\n address indexed owner,\n int24 indexed tickLower,\n int24 indexed tickUpper,\n uint128 amount,\n uint256 amount0,\n uint256 amount1\n );\n\n /// @notice Emitted when fees are collected by the owner of a position\n /// @dev Collect events may be emitted with zero amount0 and amount1 when the caller chooses not to collect fees\n /// @param owner The owner of the position for which fees are collected\n /// @param tickLower The lower tick of the position\n /// @param tickUpper The upper tick of the position\n /// @param amount0 The amount of token0 fees collected\n /// @param amount1 The amount of token1 fees collected\n event Collect(\n address indexed owner,\n address recipient,\n int24 indexed tickLower,\n int24 indexed tickUpper,\n uint128 amount0,\n uint128 amount1\n );\n\n /// @notice Emitted when a position's liquidity is removed\n /// @dev Does not withdraw any fees earned by the liquidity position, which must be withdrawn via #collect\n /// @param owner The owner of the position for which liquidity is removed\n /// @param tickLower The lower tick of the position\n /// @param tickUpper The upper tick of the position\n /// @param amount The amount of liquidity to remove\n /// @param amount0 The amount of token0 withdrawn\n /// @param amount1 The amount of token1 withdrawn\n event Burn(\n address indexed owner,\n int24 indexed tickLower,\n int24 indexed tickUpper,\n uint128 amount,\n uint256 amount0,\n uint256 amount1\n );\n\n /// @notice Emitted by the pool for any swaps between token0 and token1\n /// @param sender The address that initiated the swap call, and that received the callback\n /// @param recipient The address that received the output of the swap\n /// @param amount0 The delta of the token0 balance of the pool\n /// @param amount1 The delta of the token1 balance of the pool\n /// @param sqrtPriceX96 The sqrt(price) of the pool after the swap, as a Q64.96\n /// @param liquidity The liquidity of the pool after the swap\n /// @param tick The log base 1.0001 of price of the pool after the swap\n event Swap(\n address indexed sender,\n address indexed recipient,\n int256 amount0,\n int256 amount1,\n uint160 sqrtPriceX96,\n uint128 liquidity,\n int24 tick\n );\n\n /// @notice Emitted by the pool for any flashes of token0/token1\n /// @param sender The address that initiated the swap call, and that received the callback\n /// @param recipient The address that received the tokens from flash\n /// @param amount0 The amount of token0 that was flashed\n /// @param amount1 The amount of token1 that was flashed\n /// @param paid0 The amount of token0 paid for the flash, which can exceed the amount0 plus the fee\n /// @param paid1 The amount of token1 paid for the flash, which can exceed the amount1 plus the fee\n event Flash(\n address indexed sender,\n address indexed recipient,\n uint256 amount0,\n uint256 amount1,\n uint256 paid0,\n uint256 paid1\n );\n\n /// @notice Emitted by the pool for increases to the number of observations that can be stored\n /// @dev observationCardinalityNext is not the observation cardinality until an observation is written at the index\n /// just before a mint/swap/burn.\n /// @param observationCardinalityNextOld The previous value of the next observation cardinality\n /// @param observationCardinalityNextNew The updated value of the next observation cardinality\n event IncreaseObservationCardinalityNext(uint16 observationCardinalityNextOld, uint16 observationCardinalityNextNew);\n\n /// @notice Emitted when the protocol fee is changed by the pool\n /// @param feeProtocol0Old The previous value of the token0 protocol fee\n /// @param feeProtocol1Old The previous value of the token1 protocol fee\n /// @param feeProtocol0New The updated value of the token0 protocol fee\n /// @param feeProtocol1New The updated value of the token1 protocol fee\n event SetFeeProtocol(uint8 feeProtocol0Old, uint8 feeProtocol1Old, uint8 feeProtocol0New, uint8 feeProtocol1New);\n\n /// @notice Emitted when the collected protocol fees are withdrawn by the factory owner\n /// @param sender The address that collects the protocol fees\n /// @param recipient The address that receives the collected protocol fees\n /// @param amount0 The amount of token0 protocol fees that is withdrawn\n /// @param amount0 The amount of token1 protocol fees that is withdrawn\n event CollectProtocol(address indexed sender, address indexed recipient, uint128 amount0, uint128 amount1);\n}\n\ninterface IUniswapV3Pool is\n IUniswapV3PoolImmutables,\n IUniswapV3PoolState,\n IUniswapV3PoolDerivedState,\n IUniswapV3PoolActions,\n IUniswapV3PoolOwnerActions,\n IUniswapV3PoolEvents\n{}\n\ninterface IUniswapV3Pair is IUniswapV3Pool {}\n" + }, + "contracts/drops/oracle/interface/IUniswapV3Quoter.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\ninterface IUniswapV3Quoter {\n /// @notice Returns the amount out received for a given exact input swap without executing the swap\n /// @param path The path of the swap, i.e. each token pair and the pool fee\n /// @param amountIn The amount of the first token to swap\n /// @return amountOut The amount of the last token that would be received\n function quoteExactInput(bytes memory path, uint256 amountIn) external returns (uint256 amountOut);\n\n /// @notice Returns the amount out received for a given exact input but for a swap of a single pool\n /// @param tokenIn The token being swapped in\n /// @param tokenOut The token being swapped out\n /// @param fee The fee of the token pool to consider for the pair\n /// @param amountIn The desired input amount\n /// @param sqrtPriceLimitX96 The price limit of the pool that cannot be exceeded by the swap\n /// @return amountOut The amount of `tokenOut` that would be received\n function quoteExactInputSingle(\n address tokenIn,\n address tokenOut,\n uint24 fee,\n uint256 amountIn,\n uint160 sqrtPriceLimitX96\n ) external returns (uint256 amountOut);\n\n /// @notice Returns the amount in required for a given exact output swap without executing the swap\n /// @param path The path of the swap, i.e. each token pair and the pool fee\n /// @param amountOut The amount of the last token to receive\n /// @return amountIn The amount of first token required to be paid\n function quoteExactOutput(bytes memory path, uint256 amountOut) external returns (uint256 amountIn);\n\n /// @notice Returns the amount in required to receive the given exact output amount but for a swap of a single pool\n /// @param tokenIn The token being swapped in\n /// @param tokenOut The token being swapped out\n /// @param fee The fee of the token pool to consider for the pair\n /// @param amountOut The desired output amount\n /// @param sqrtPriceLimitX96 The price limit of the pool that cannot be exceeded by the swap\n /// @return amountIn The amount required as the input for the swap in order to receive `amountOut`\n function quoteExactOutputSingle(\n address tokenIn,\n address tokenOut,\n uint24 fee,\n uint256 amountOut,\n uint160 sqrtPriceLimitX96\n ) external returns (uint256 amountIn);\n}\n" + }, + "contracts/drops/proxy/DropsMetadataRendererProxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../../abstract/Admin.sol\";\nimport \"../../abstract/Initializable.sol\";\n\ncontract DropsMetadataRendererProxy is Admin, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.dropsMetadataRenderer')) - 1)\n */\n bytes32 constant _dropsMetadataRendererSlot = 0xe1d18664c68b1eedd4e2fc65b2d42097f2cd8cd4c2f1a9a6418986c9f5da3817;\n\n constructor() {}\n\n function init(bytes memory data) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address dropsMetadataRenderer, bytes memory initCode) = abi.decode(data, (address, bytes));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_dropsMetadataRendererSlot, dropsMetadataRenderer)\n }\n (bool success, bytes memory returnData) = dropsMetadataRenderer.delegatecall(\n abi.encodeWithSignature(\"init(bytes)\", initCode)\n );\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == Initializable.init.selector, \"initialization failed\");\n _setInitialized();\n return Initializable.init.selector;\n }\n\n function getDropsMetadataRenderer() external view returns (address dropsMetadataRenderer) {\n assembly {\n dropsMetadataRenderer := sload(_dropsMetadataRendererSlot)\n }\n }\n\n function setDropsMetadataRenderer(address dropsMetadataRenderer) external onlyAdmin {\n assembly {\n sstore(_dropsMetadataRendererSlot, dropsMetadataRenderer)\n }\n }\n\n receive() external payable {}\n\n fallback() external payable {\n assembly {\n let dropsMetadataRenderer := sload(_dropsMetadataRendererSlot)\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), dropsMetadataRenderer, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/drops/proxy/DropsPriceOracleProxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../../abstract/Admin.sol\";\nimport \"../../abstract/Initializable.sol\";\n\ncontract DropsPriceOracleProxy is Admin, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.dropsPriceOracle')) - 1)\n */\n bytes32 constant _dropsPriceOracleSlot = 0x26600f0171e5a2b86874be26285c66444b2a6fa5f62114757214d5e732aded36;\n\n constructor() {}\n\n function init(bytes memory data) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address dropsPriceOracle, bytes memory initCode) = abi.decode(data, (address, bytes));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_dropsPriceOracleSlot, dropsPriceOracle)\n }\n (bool success, bytes memory returnData) = dropsPriceOracle.delegatecall(\n abi.encodeWithSignature(\"init(bytes)\", initCode)\n );\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == Initializable.init.selector, \"initialization failed\");\n _setInitialized();\n return Initializable.init.selector;\n }\n\n function getDropsPriceOracle() external view returns (address dropsPriceOracle) {\n assembly {\n dropsPriceOracle := sload(_dropsPriceOracleSlot)\n }\n }\n\n function setDropsPriceOracle(address dropsPriceOracle) external onlyAdmin {\n assembly {\n sstore(_dropsPriceOracleSlot, dropsPriceOracle)\n }\n }\n\n receive() external payable {}\n\n fallback() external payable {\n assembly {\n let dropsPriceOracle := sload(_dropsPriceOracleSlot)\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), dropsPriceOracle, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/drops/proxy/EditionsMetadataRendererProxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../../abstract/Admin.sol\";\nimport \"../../abstract/Initializable.sol\";\n\ncontract EditionsMetadataRendererProxy is Admin, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.editionsMetadataRenderer')) - 1)\n */\n bytes32 constant _editionsMetadataRendererSlot = 0x747f2428bc473d14fd9642872693b7bc7ad3f58057c4c084ce1f541a26e4bcb1;\n\n constructor() {}\n\n function init(bytes memory data) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address editionsMetadataRenderer, bytes memory initCode) = abi.decode(data, (address, bytes));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_editionsMetadataRendererSlot, editionsMetadataRenderer)\n }\n (bool success, bytes memory returnData) = editionsMetadataRenderer.delegatecall(\n abi.encodeWithSignature(\"init(bytes)\", initCode)\n );\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == Initializable.init.selector, \"initialization failed\");\n _setInitialized();\n return Initializable.init.selector;\n }\n\n function getEditionsMetadataRenderer() external view returns (address editionsMetadataRenderer) {\n assembly {\n editionsMetadataRenderer := sload(_editionsMetadataRendererSlot)\n }\n }\n\n function setEditionsMetadataRenderer(address editionsMetadataRenderer) external onlyAdmin {\n assembly {\n sstore(_editionsMetadataRendererSlot, editionsMetadataRenderer)\n }\n }\n\n receive() external payable {}\n\n fallback() external payable {\n assembly {\n let editionsMetadataRenderer := sload(_editionsMetadataRendererSlot)\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), editionsMetadataRenderer, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/drops/proxy/HolographDropERC721Proxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../../abstract/Admin.sol\";\nimport \"../../abstract/Initializable.sol\";\n\nimport \"../../interface/HolographRegistryInterface.sol\";\n\ncontract HolographDropERC721Proxy is Admin, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.contractType')) - 1)\n */\n bytes32 constant _contractTypeSlot = 0x0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c7;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\n */\n bytes32 constant _registrySlot = 0xce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7;\n\n constructor() {}\n\n function init(bytes memory data) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (bytes32 contractType, address registry, bytes memory initCode) = abi.decode(data, (bytes32, address, bytes));\n assembly {\n sstore(_contractTypeSlot, contractType)\n sstore(_registrySlot, registry)\n }\n (bool success, bytes memory returnData) = getHolographDropERC721Source().delegatecall(\n abi.encodeWithSignature(\"init(bytes)\", initCode)\n );\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == Initializable.init.selector, \"initialization failed\");\n\n _setInitialized();\n return Initializable.init.selector;\n }\n\n function getHolographDropERC721Source() public view returns (address) {\n HolographRegistryInterface registry;\n bytes32 contractType;\n assembly {\n registry := sload(_registrySlot)\n contractType := sload(_contractTypeSlot)\n }\n return registry.getContractTypeAddress(contractType);\n }\n\n receive() external payable {}\n\n fallback() external payable {\n address HolographDropERC721Source = getHolographDropERC721Source();\n assembly {\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), HolographDropERC721Source, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/drops/struct/AddressMintDetails.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\n/// @notice Return type of specific mint counts and details per address\nstruct AddressMintDetails {\n /// Number of total mints from the given address\n uint256 totalMints;\n /// Number of presale mints from the given address\n uint256 presaleMints;\n /// Number of public mints from the given address\n uint256 publicMints;\n}\n" + }, + "contracts/drops/struct/Configuration.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {IMetadataRenderer} from \"../interface/IMetadataRenderer.sol\";\n\n/// @notice General configuration for NFT Minting and bookkeeping\nstruct Configuration {\n /// @dev Metadata renderer (uint160)\n IMetadataRenderer metadataRenderer;\n /// @dev Total size of edition that can be minted (uint160+64 = 224)\n uint64 editionSize;\n /// @dev Royalty amount in bps (uint224+16 = 240)\n uint16 royaltyBPS;\n /// @dev Funds recipient for sale (new slot, uint160)\n address payable fundsRecipient;\n}\n" + }, + "contracts/drops/struct/DropsInitializer.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {SalesConfiguration} from \"./SalesConfiguration.sol\";\n\n/// @param erc721TransferHelper Transfer helper contract\n/// @param marketFilterAddress Market filter address - Manage subscription to the for marketplace filtering based off royalty payouts.\n/// @param initialOwner User that owns and can mint the edition, gets royalty and sales payouts and can update the base url if needed.\n/// @param fundsRecipient Wallet/user that receives funds from sale\n/// @param editionSize Number of editions that can be minted in total. If type(uint64).max, unlimited editions can be minted as an open edition.\n/// @param royaltyBPS BPS of the royalty set on the contract. Can be 0 for no royalty.\n/// @param salesConfiguration The initial SalesConfiguration\n/// @param metadataRenderer Renderer contract to use\n/// @param metadataRendererInit Renderer data initial contract\nstruct DropsInitializer {\n address erc721TransferHelper;\n address marketFilterAddress;\n address initialOwner;\n address payable fundsRecipient;\n uint64 editionSize;\n uint16 royaltyBPS;\n bool enableOpenSeaRoyaltyRegistry;\n SalesConfiguration salesConfiguration;\n address metadataRenderer;\n bytes metadataRendererInit;\n}\n" + }, + "contracts/drops/struct/SaleDetails.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\n/// @notice Return value for sales details to use with front-ends\nstruct SaleDetails {\n // Synthesized status variables for sale and presale\n bool publicSaleActive;\n bool presaleActive;\n // Price for public sale\n uint256 publicSalePrice;\n // Timed sale actions for public sale\n uint64 publicSaleStart;\n uint64 publicSaleEnd;\n // Timed sale actions for presale\n uint64 presaleStart;\n uint64 presaleEnd;\n // Merkle root (includes address, quantity, and price data for each entry)\n bytes32 presaleMerkleRoot;\n // Limit public sale to a specific number of mints per wallet\n uint256 maxSalePurchasePerAddress;\n // Information about the rest of the supply\n // Total that have been minted\n uint256 totalMinted;\n // The total supply available\n uint256 maxSupply;\n}\n" + }, + "contracts/drops/struct/SalesConfiguration.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\n/// @notice Sales states and configuration\n/// @dev Uses 3 storage slots\nstruct SalesConfiguration {\n /// @dev Public sale price (max ether value > 1000 ether with this value)\n uint104 publicSalePrice;\n /// @notice Purchase mint limit per address (if set to 0 === unlimited mints)\n /// @dev Max purchase number per txn (90+32 = 122)\n uint32 maxSalePurchasePerAddress;\n /// @dev uint64 type allows for dates into 292 billion years\n /// @notice Public sale start timestamp (136+64 = 186)\n uint64 publicSaleStart;\n /// @notice Public sale end timestamp (186+64 = 250)\n uint64 publicSaleEnd;\n /// @notice Presale start timestamp\n /// @dev new storage slot\n uint64 presaleStart;\n /// @notice Presale end timestamp\n uint64 presaleEnd;\n /// @notice Presale merkle root\n bytes32 presaleMerkleRoot;\n}\n" + }, + "contracts/drops/token/HolographDropERC721.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport {ERC721H} from \"../../abstract/ERC721H.sol\";\nimport {NonReentrant} from \"../../abstract/NonReentrant.sol\";\n\nimport {HolographERC721Interface} from \"../../interface/HolographERC721Interface.sol\";\nimport {HolographerInterface} from \"../../interface/HolographerInterface.sol\";\nimport {HolographInterface} from \"../../interface/HolographInterface.sol\";\n\nimport {AddressMintDetails} from \"../struct/AddressMintDetails.sol\";\nimport {Configuration} from \"../struct/Configuration.sol\";\nimport {DropsInitializer} from \"../struct/DropsInitializer.sol\";\nimport {SaleDetails} from \"../struct/SaleDetails.sol\";\nimport {SalesConfiguration} from \"../struct/SalesConfiguration.sol\";\n\nimport {Address} from \"../library/Address.sol\";\nimport {MerkleProof} from \"../library/MerkleProof.sol\";\n\nimport {IMetadataRenderer} from \"../interface/IMetadataRenderer.sol\";\nimport {IOperatorFilterRegistry} from \"../interface/IOperatorFilterRegistry.sol\";\nimport {IHolographDropERC721} from \"../interface/IHolographDropERC721.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\n\n/**\n * @dev This contract subscribes to the following HolographERC721 events:\n * - beforeSafeTransfer\n * - beforeTransfer\n * - onIsApprovedForAll\n * - customContractURI\n *\n * Do not enable or subscribe to any other events unless you modified your source code for them.\n */\ncontract HolographDropERC721 is NonReentrant, ERC721H, IHolographDropERC721 {\n /**\n * CONTRACT VARIABLES\n * all variables, without custom storage slots, are defined here\n */\n\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.osRegistryEnabled')) - 1)\n */\n bytes32 constant _osRegistryEnabledSlot = 0x5c835f3b6bd322d9a084ffdeac746df2b96cce308e7f0612f4ff4f9c490734cc;\n\n /**\n * @dev Address of the operator filter registry\n */\n IOperatorFilterRegistry public constant openseaOperatorFilterRegistry =\n IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E);\n\n /**\n * @dev Address of the price oracle proxy\n */\n IDropsPriceOracle public constant dropsPriceOracle = IDropsPriceOracle(0xA3Db09EEC42BAfF7A50fb8F9aF90A0e035Ef3302);\n\n /**\n * @dev Internal reference used for minting incremental token ids.\n */\n uint224 private _currentTokenId;\n\n /**\n * @dev HOLOGRAPH transfer helper address for auto-approval\n */\n address public erc721TransferHelper;\n\n /**\n * @dev Address of the market filter registry\n */\n address public marketFilterAddress;\n\n /**\n * @notice Configuration for NFT minting contract storage\n */\n Configuration public config;\n\n /**\n * @notice Sales configuration\n */\n SalesConfiguration public salesConfig;\n\n /**\n * @dev Mapping for presale mint counts by address to allow public mint limit\n */\n mapping(address => uint256) public presaleMintsByAddress;\n\n /**\n * @dev Mapping for presale mint counts by address to allow public mint limit\n */\n mapping(address => uint256) public totalMintsByAddress;\n\n /**\n * CUSTOM ERRORS\n */\n\n /**\n * @notice Thrown when there is no active market filter address supported for the current chain\n * @dev Used for enabling and disabling filter for the given chain.\n */\n error MarketFilterAddressNotSupportedForChain();\n\n /**\n * MODIFIERS\n */\n\n /**\n * @notice Allows user to mint tokens at a quantity\n */\n modifier canMintTokens(uint256 quantity) {\n if (config.editionSize != 0 && quantity + _currentTokenId > config.editionSize) {\n revert Mint_SoldOut();\n }\n\n _;\n }\n\n /**\n * @notice Presale active\n */\n modifier onlyPresaleActive() {\n if (!_presaleActive()) {\n revert Presale_Inactive();\n }\n\n _;\n }\n\n /**\n * @notice Public sale active\n */\n modifier onlyPublicSaleActive() {\n if (!_publicSaleActive()) {\n revert Sale_Inactive();\n }\n\n _;\n }\n\n /**\n * CONTRACT INITIALIZERS\n * init function is used instead of constructor\n */\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n\n DropsInitializer memory initializer = abi.decode(initPayload, (DropsInitializer));\n\n erc721TransferHelper = initializer.erc721TransferHelper;\n if (initializer.marketFilterAddress != address(0)) {\n marketFilterAddress = initializer.marketFilterAddress;\n }\n\n // Setup the owner role\n _setOwner(initializer.initialOwner);\n\n // Setup config variables\n config = Configuration({\n metadataRenderer: IMetadataRenderer(initializer.metadataRenderer),\n editionSize: initializer.editionSize,\n royaltyBPS: initializer.royaltyBPS,\n fundsRecipient: initializer.fundsRecipient\n });\n\n salesConfig = initializer.salesConfiguration;\n\n // TODO: Need to make sure to initialize the metadata renderer\n if (initializer.metadataRenderer != address(0)) {\n IMetadataRenderer(initializer.metadataRenderer).initializeWithData(initializer.metadataRendererInit);\n }\n\n if (initializer.enableOpenSeaRoyaltyRegistry && Address.isContract(address(openseaOperatorFilterRegistry))) {\n if (marketFilterAddress == address(0)) {\n // this is a default filter that can be used for OS royalty filtering\n // marketFilterAddress = 0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6;\n // we just register to OS royalties and let OS handle it for us with their default filter contract\n HolographERC721Interface(holographer()).sourceExternalCall(\n address(openseaOperatorFilterRegistry),\n abi.encodeWithSelector(IOperatorFilterRegistry.register.selector, holographer())\n );\n } else {\n // allow user to specify custom filtering contract address\n HolographERC721Interface(holographer()).sourceExternalCall(\n address(openseaOperatorFilterRegistry),\n abi.encodeWithSelector(\n IOperatorFilterRegistry.registerAndSubscribe.selector,\n holographer(),\n marketFilterAddress\n )\n );\n }\n assembly {\n sstore(_osRegistryEnabledSlot, true)\n }\n }\n\n setStatus(1);\n\n return _init(initPayload);\n }\n\n /**\n * PUBLIC NON STATE CHANGING FUNCTIONS\n * static\n */\n\n /**\n * @notice Returns the version of the contract\n * @dev Used for contract versioning and validation\n * @return version string representing the version of the contract\n */\n function version() external pure returns (string memory) {\n return \"1.0.0\";\n }\n\n function supportsInterface(bytes4 interfaceId) external pure override returns (bool) {\n return interfaceId == type(IHolographDropERC721).interfaceId;\n }\n\n /**\n * PUBLIC NON STATE CHANGING FUNCTIONS\n * dynamic\n */\n\n function owner() external view override(ERC721H, IHolographDropERC721) returns (address) {\n return _getOwner();\n }\n\n function isAdmin(address user) external view returns (bool) {\n return (_getOwner() == user);\n }\n\n function beforeSafeTransfer(\n address _from,\n address /* _to*/,\n uint256 /* _tokenId*/,\n bytes calldata /* _data*/\n ) external view returns (bool) {\n if (\n _from != address(0) && // skip on mints\n _from != msgSender() // skip on transfers from sender\n ) {\n bool osRegistryEnabled;\n assembly {\n osRegistryEnabled := sload(_osRegistryEnabledSlot)\n }\n if (osRegistryEnabled) {\n try openseaOperatorFilterRegistry.isOperatorAllowed(address(this), msgSender()) returns (bool allowed) {\n return allowed;\n } catch {\n revert OperatorNotAllowed(msgSender());\n }\n }\n }\n return true;\n }\n\n function beforeTransfer(\n address _from,\n address /* _to*/,\n uint256 /* _tokenId*/,\n bytes calldata /* _data*/\n ) external view returns (bool) {\n if (\n _from != address(0) && // skip on mints\n _from != msgSender() // skip on transfers from sender\n ) {\n bool osRegistryEnabled;\n assembly {\n osRegistryEnabled := sload(_osRegistryEnabledSlot)\n }\n if (osRegistryEnabled) {\n try openseaOperatorFilterRegistry.isOperatorAllowed(address(this), msgSender()) returns (bool allowed) {\n return allowed;\n } catch {\n revert OperatorNotAllowed(msgSender());\n }\n }\n }\n return true;\n }\n\n function onIsApprovedForAll(address /* _wallet*/, address _operator) external view returns (bool approved) {\n approved = (erc721TransferHelper != address(0) && _operator == erc721TransferHelper);\n }\n\n /**\n * @notice Sale details\n * @return SaleDetails sale information details\n */\n function saleDetails() external view returns (SaleDetails memory) {\n return\n SaleDetails({\n publicSaleActive: _publicSaleActive(),\n presaleActive: _presaleActive(),\n publicSalePrice: salesConfig.publicSalePrice,\n publicSaleStart: salesConfig.publicSaleStart,\n publicSaleEnd: salesConfig.publicSaleEnd,\n presaleStart: salesConfig.presaleStart,\n presaleEnd: salesConfig.presaleEnd,\n presaleMerkleRoot: salesConfig.presaleMerkleRoot,\n totalMinted: _currentTokenId,\n maxSupply: config.editionSize,\n maxSalePurchasePerAddress: salesConfig.maxSalePurchasePerAddress\n });\n }\n\n /**\n * @dev Number of NFTs the user has minted per address\n * @param minter to get counts for\n */\n function mintedPerAddress(address minter) external view returns (AddressMintDetails memory) {\n return\n AddressMintDetails({\n presaleMints: presaleMintsByAddress[minter],\n publicMints: totalMintsByAddress[minter] - presaleMintsByAddress[minter],\n totalMints: totalMintsByAddress[minter]\n });\n }\n\n /**\n * @notice Contract URI Getter, proxies to metadataRenderer\n * @return Contract URI\n */\n function contractURI() external view returns (string memory) {\n return config.metadataRenderer.contractURI();\n }\n\n /**\n * @notice Getter for metadataRenderer contract\n */\n function metadataRenderer() external view returns (IMetadataRenderer) {\n return IMetadataRenderer(config.metadataRenderer);\n }\n\n /**\n * @notice Convert USD price to current price in native Ether\n */\n function getNativePrice() external view returns (uint256) {\n return _usdToWei(salesConfig.publicSalePrice);\n }\n\n /**\n * @notice Returns the name of the token through the holographer entrypoint\n */\n function name() external view returns (string memory) {\n return HolographERC721Interface(holographer()).name();\n }\n\n /**\n * @notice Token URI Getter, proxies to metadataRenderer\n * @param tokenId id of token to get URI for\n * @return Token URI\n */\n function tokenURI(uint256 tokenId) external view returns (string memory) {\n HolographERC721Interface H721 = HolographERC721Interface(holographer());\n require(H721.exists(tokenId), \"ERC721: token does not exist\");\n\n return config.metadataRenderer.tokenURI(tokenId);\n }\n\n /**\n * PUBLIC STATE CHANGING FUNCTIONS\n * available to all\n */\n\n function multicall(bytes[] memory data) public returns (bytes[] memory results) {\n results = new bytes[](data.length);\n for (uint256 i = 0; i < data.length; i++) {\n results[i] = Address.functionDelegateCall(address(this), abi.encodePacked(data[i], msgSender()));\n }\n }\n\n /**\n * @dev This allows the user to purchase/mint a edition at the given price in the contract.\n */\n function purchase(\n uint256 quantity\n ) external payable nonReentrant canMintTokens(quantity) onlyPublicSaleActive returns (uint256) {\n uint256 salePrice = _usdToWei(salesConfig.publicSalePrice);\n\n if (msg.value < salePrice * quantity) {\n revert Purchase_WrongPrice(salesConfig.publicSalePrice * quantity);\n }\n uint256 remainder = msg.value - (salePrice * quantity);\n\n // If max purchase per address == 0 there is no limit.\n // Any other number, the per address mint limit is that.\n if (\n salesConfig.maxSalePurchasePerAddress != 0 &&\n totalMintsByAddress[msgSender()] + quantity - presaleMintsByAddress[msgSender()] >\n salesConfig.maxSalePurchasePerAddress\n ) {\n revert Purchase_TooManyForAddress();\n }\n\n _mintNFTs(msgSender(), quantity);\n\n HolographERC721Interface H721 = HolographERC721Interface(holographer());\n uint256 chainPrepend = H721.sourceGetChainPrepend();\n uint256 firstMintedTokenId = (chainPrepend + uint256(_currentTokenId - quantity)) + 1;\n\n emit Sale({\n to: msgSender(),\n quantity: quantity,\n pricePerToken: salePrice,\n firstPurchasedTokenId: firstMintedTokenId\n });\n\n if (remainder > 0) {\n msgSender().call{value: remainder, gas: gasleft() > 210_000 ? 210_000 : gasleft()}(\"\");\n }\n\n return firstMintedTokenId;\n }\n\n /**\n * @notice Merkle-tree based presale purchase function\n * @param quantity quantity to purchase\n * @param maxQuantity max quantity that can be purchased via merkle proof #\n * @param pricePerToken price that each token is purchased at\n * @param merkleProof proof for presale mint\n */\n function purchasePresale(\n uint256 quantity,\n uint256 maxQuantity,\n uint256 pricePerToken,\n bytes32[] calldata merkleProof\n ) external payable nonReentrant canMintTokens(quantity) onlyPresaleActive returns (uint256) {\n if (\n !MerkleProof.verify(\n merkleProof,\n salesConfig.presaleMerkleRoot,\n keccak256(\n // address, uint256, uint256\n abi.encode(msgSender(), maxQuantity, pricePerToken)\n )\n )\n ) {\n revert Presale_MerkleNotApproved();\n }\n\n uint256 weiPricePerToken = _usdToWei(pricePerToken);\n if (msg.value < weiPricePerToken * quantity) {\n revert Purchase_WrongPrice(pricePerToken * quantity);\n }\n uint256 remainder = msg.value - (weiPricePerToken * quantity);\n\n presaleMintsByAddress[msgSender()] += quantity;\n if (presaleMintsByAddress[msgSender()] > maxQuantity) {\n revert Presale_TooManyForAddress();\n }\n\n _mintNFTs(msgSender(), quantity);\n\n HolographERC721Interface H721 = HolographERC721Interface(holographer());\n uint256 chainPrepend = H721.sourceGetChainPrepend();\n uint256 firstMintedTokenId = (chainPrepend + uint256(_currentTokenId - quantity)) + 1;\n\n emit Sale({\n to: msgSender(),\n quantity: quantity,\n pricePerToken: weiPricePerToken,\n firstPurchasedTokenId: firstMintedTokenId\n });\n\n if (remainder > 0) {\n msgSender().call{value: remainder, gas: gasleft() > 210_000 ? 210_000 : gasleft()}(\"\");\n }\n\n return firstMintedTokenId;\n }\n\n /**\n * PUBLIC STATE CHANGING FUNCTIONS\n * admin only\n */\n\n /**\n * @notice Proxy to update market filter settings in the main registry contracts\n * @notice Requires admin permissions\n * @param args Calldata args to pass to the registry\n */\n function updateMarketFilterSettings(bytes calldata args) external onlyOwner {\n HolographERC721Interface(holographer()).sourceExternalCall(address(openseaOperatorFilterRegistry), args);\n bool osRegistryEnabled = openseaOperatorFilterRegistry.isRegistered(holographer());\n assembly {\n sstore(_osRegistryEnabledSlot, osRegistryEnabled)\n }\n }\n\n /**\n * @notice Manage subscription for marketplace filtering based off royalty payouts.\n * @param enable Enable filtering to non-royalty payout marketplaces\n */\n function manageMarketFilterSubscription(bool enable) external onlyOwner {\n address self = holographer();\n if (marketFilterAddress == address(0)) {\n revert MarketFilterAddressNotSupportedForChain();\n }\n if (!openseaOperatorFilterRegistry.isRegistered(self) && enable) {\n HolographERC721Interface(self).sourceExternalCall(\n address(openseaOperatorFilterRegistry),\n abi.encodeWithSelector(IOperatorFilterRegistry.registerAndSubscribe.selector, self, marketFilterAddress)\n );\n } else if (enable) {\n HolographERC721Interface(self).sourceExternalCall(\n address(openseaOperatorFilterRegistry),\n abi.encodeWithSelector(IOperatorFilterRegistry.subscribe.selector, self, marketFilterAddress)\n );\n } else {\n HolographERC721Interface(self).sourceExternalCall(\n address(openseaOperatorFilterRegistry),\n abi.encodeWithSelector(IOperatorFilterRegistry.unsubscribe.selector, self, false)\n );\n HolographERC721Interface(self).sourceExternalCall(\n address(openseaOperatorFilterRegistry),\n abi.encodeWithSelector(IOperatorFilterRegistry.unregister.selector, self)\n );\n }\n bool osRegistryEnabled = openseaOperatorFilterRegistry.isRegistered(self);\n assembly {\n sstore(_osRegistryEnabledSlot, osRegistryEnabled)\n }\n }\n\n function modifyMarketFilterAddress(address newMarketFilterAddress) external onlyOwner {\n marketFilterAddress = newMarketFilterAddress;\n }\n\n /**\n * @notice Admin mint tokens to a recipient for free\n * @param recipient recipient to mint to\n * @param quantity quantity to mint\n */\n function adminMint(address recipient, uint256 quantity) external onlyOwner canMintTokens(quantity) returns (uint256) {\n _mintNFTs(recipient, quantity);\n\n return _currentTokenId;\n }\n\n /**\n * @dev Mints multiple editions to the given list of addresses.\n * @param recipients list of addresses to send the newly minted editions to\n */\n function adminMintAirdrop(\n address[] calldata recipients\n ) external onlyOwner canMintTokens(recipients.length) returns (uint256) {\n unchecked {\n for (uint256 i = 0; i < recipients.length; i++) {\n _mintNFTs(recipients[i], 1);\n }\n }\n\n return _currentTokenId;\n }\n\n /**\n * @notice Set a new metadata renderer\n * @param newRenderer new renderer address to use\n * @param setupRenderer data to setup new renderer with\n */\n function setMetadataRenderer(IMetadataRenderer newRenderer, bytes memory setupRenderer) external onlyOwner {\n config.metadataRenderer = newRenderer;\n\n if (setupRenderer.length > 0) {\n newRenderer.initializeWithData(setupRenderer);\n }\n\n emit UpdatedMetadataRenderer({sender: msgSender(), renderer: newRenderer});\n }\n\n /**\n * @dev This sets the sales configuration\n * @param publicSalePrice New public sale price\n * @param maxSalePurchasePerAddress Max # of purchases (public) per address allowed\n * @param publicSaleStart unix timestamp when the public sale starts\n * @param publicSaleEnd unix timestamp when the public sale ends (set to 0 to disable)\n * @param presaleStart unix timestamp when the presale starts\n * @param presaleEnd unix timestamp when the presale ends\n * @param presaleMerkleRoot merkle root for the presale information\n */\n function setSaleConfiguration(\n uint104 publicSalePrice,\n uint32 maxSalePurchasePerAddress,\n uint64 publicSaleStart,\n uint64 publicSaleEnd,\n uint64 presaleStart,\n uint64 presaleEnd,\n bytes32 presaleMerkleRoot\n ) external onlyOwner {\n salesConfig.publicSalePrice = publicSalePrice;\n salesConfig.maxSalePurchasePerAddress = maxSalePurchasePerAddress;\n salesConfig.publicSaleStart = publicSaleStart;\n salesConfig.publicSaleEnd = publicSaleEnd;\n salesConfig.presaleStart = presaleStart;\n salesConfig.presaleEnd = presaleEnd;\n salesConfig.presaleMerkleRoot = presaleMerkleRoot;\n\n emit SalesConfigChanged(msgSender());\n }\n\n /**\n * @notice Set a different funds recipient\n * @param newRecipientAddress new funds recipient address\n */\n function setFundsRecipient(address payable newRecipientAddress) external onlyOwner {\n if (newRecipientAddress == address(0)) {\n revert(\"Funds Recipient cannot be 0 address\");\n }\n config.fundsRecipient = newRecipientAddress;\n emit FundsRecipientChanged(newRecipientAddress, msgSender());\n }\n\n /**\n * @notice This withdraws ETH from the contract to the contract owner.\n */\n function withdraw() external override nonReentrant {\n if (config.fundsRecipient == address(0)) {\n revert(\"Funds Recipient address not set\");\n }\n address sender = msgSender();\n\n // Get fee amount\n uint256 funds = address(this).balance;\n address payable feeRecipient = payable(\n HolographInterface(HolographerInterface(holographer()).getHolograph()).getTreasury()\n );\n // for now set it to 0 since there is no fee\n uint256 holographFee = 0;\n\n // Check if withdraw is allowed for sender\n if (sender != config.fundsRecipient && sender != _getOwner() && sender != feeRecipient) {\n revert Access_WithdrawNotAllowed();\n }\n\n // Payout HOLOGRAPH fee\n if (holographFee > 0) {\n (bool successFee, ) = feeRecipient.call{value: holographFee, gas: 210_000}(\"\");\n if (!successFee) {\n revert Withdraw_FundsSendFailure();\n }\n funds -= holographFee;\n }\n\n // Payout recipient\n (bool successFunds, ) = config.fundsRecipient.call{value: funds, gas: 210_000}(\"\");\n if (!successFunds) {\n revert Withdraw_FundsSendFailure();\n }\n\n // Emit event for indexing\n emit FundsWithdrawn(sender, config.fundsRecipient, funds, feeRecipient, holographFee);\n }\n\n /**\n * @notice Admin function to finalize and open edition sale\n */\n function finalizeOpenEdition() external onlyOwner {\n if (config.editionSize != type(uint64).max) {\n revert Admin_UnableToFinalizeNotOpenEdition();\n }\n\n config.editionSize = uint64(_currentTokenId);\n emit OpenMintFinalized(msgSender(), config.editionSize);\n }\n\n /**\n * INTERNAL FUNCTIONS\n * non state changing\n */\n\n function _presaleActive() internal view returns (bool) {\n return salesConfig.presaleStart <= block.timestamp && salesConfig.presaleEnd > block.timestamp;\n }\n\n function _publicSaleActive() internal view returns (bool) {\n return salesConfig.publicSaleStart <= block.timestamp && salesConfig.publicSaleEnd > block.timestamp;\n }\n\n function _usdToWei(uint256 amount) internal view returns (uint256 weiAmount) {\n if (amount == 0) {\n return 0;\n }\n weiAmount = dropsPriceOracle.convertUsdToWei(amount);\n }\n\n /**\n * INTERNAL FUNCTIONS\n * state changing\n */\n\n function _mintNFTs(address recipient, uint256 quantity) internal {\n HolographERC721Interface H721 = HolographERC721Interface(holographer());\n uint256 chainPrepend = H721.sourceGetChainPrepend();\n uint224 tokenId = 0;\n for (uint256 i = 0; i < quantity; i++) {\n _currentTokenId += 1;\n while (\n H721.exists(chainPrepend + uint256(_currentTokenId)) || H721.burned(chainPrepend + uint256(_currentTokenId))\n ) {\n _currentTokenId += 1;\n }\n tokenId = _currentTokenId;\n H721.sourceMint(recipient, tokenId);\n // uint256 id = chainPrepend + uint256(tokenId);\n }\n }\n\n fallback() external payable override {\n assembly {\n // Allocate memory for the error message\n let errorMsg := mload(0x40)\n\n // Error message: \"Function not found\", properly padded with zeroes\n mstore(errorMsg, 0x46756e6374696f6e206e6f7420666f756e640000000000000000000000000000)\n\n // Revert with the error message\n revert(errorMsg, 20) // 20 is the length of the error message in bytes\n }\n }\n}\n" + }, + "contracts/drops/utils/NFTMetadataRenderer.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nlibrary Math {\n enum Rounding {\n Down, // Toward negative infinity\n Up, // Toward infinity\n Zero // Toward zero\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds up instead\n * of rounding down.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b - 1) / b can overflow on addition, so we distribute.\n return a == 0 ? 0 : (a - 1) / b + 1;\n }\n\n /**\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\n * with further edits by Uniswap Labs also under MIT license.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\n unchecked {\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = prod1 * 2^256 + prod0.\n uint256 prod0; // Least significant 256 bits of the product\n uint256 prod1; // Most significant 256 bits of the product\n assembly {\n let mm := mulmod(x, y, not(0))\n prod0 := mul(x, y)\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n }\n\n // Handle non-overflow cases, 256 by 256 division.\n if (prod1 == 0) {\n return prod0 / denominator;\n }\n\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\n require(denominator > prod1);\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [prod1 prod0].\n uint256 remainder;\n assembly {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n prod1 := sub(prod1, gt(remainder, prod0))\n prod0 := sub(prod0, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\n // See https://cs.stackexchange.com/q/138556/92363.\n\n // Does not overflow because the denominator cannot be zero at this stage in the function.\n uint256 twos = denominator & (~denominator + 1);\n assembly {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [prod1 prod0] by twos.\n prod0 := div(prod0, twos)\n\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from prod1 into prod0.\n prod0 |= prod1 * twos;\n\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv = 1 mod 2^4.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\n // in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\n // is no longer required.\n result = prod0 * inverse;\n return result;\n }\n }\n\n /**\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\n uint256 result = mulDiv(x, y, denominator);\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\n result += 1;\n }\n return result;\n }\n\n /**\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 128;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 64;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 32;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 16;\n }\n if (value >> 8 > 0) {\n value >>= 8;\n result += 8;\n }\n if (value >> 4 > 0) {\n value >>= 4;\n result += 4;\n }\n if (value >> 2 > 0) {\n value >>= 2;\n result += 2;\n }\n if (value >> 1 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log2(value);\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10 ** 64) {\n value /= 10 ** 64;\n result += 64;\n }\n if (value >= 10 ** 32) {\n value /= 10 ** 32;\n result += 32;\n }\n if (value >= 10 ** 16) {\n value /= 10 ** 16;\n result += 16;\n }\n if (value >= 10 ** 8) {\n value /= 10 ** 8;\n result += 8;\n }\n if (value >= 10 ** 4) {\n value /= 10 ** 4;\n result += 4;\n }\n if (value >= 10 ** 2) {\n value /= 10 ** 2;\n result += 2;\n }\n if (value >= 10 ** 1) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log10(value);\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256, rounded down, of a positive value.\n * Returns 0 if given 0.\n *\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n */\n function log256(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 16;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 8;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 4;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 2;\n }\n if (value >> 8 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log256(value);\n return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);\n }\n }\n}\n\nlibrary Strings {\n bytes16 private constant _SYMBOLS = \"0123456789abcdef\";\n uint8 private constant _ADDRESS_LENGTH = 20;\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n unchecked {\n uint256 length = Math.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n /// @solidity memory-safe-assembly\n assembly {\n ptr := add(buffer, add(32, length))\n }\n while (true) {\n ptr--;\n /// @solidity memory-safe-assembly\n assembly {\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n unchecked {\n return toHexString(value, Math.log256(value) + 1);\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\n }\n}\n\nlibrary Base64 {\n /**\n * @dev Base64 Encoding/Decoding Table\n */\n string internal constant _TABLE = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\n\n /**\n * @dev Converts a `bytes` to its Bytes64 `string` representation.\n */\n function encode(bytes memory data) internal pure returns (string memory) {\n /**\n * Inspired by Brecht Devos (Brechtpd) implementation - MIT licence\n * https://github.com/Brechtpd/base64/blob/e78d9fd951e7b0977ddca77d92dc85183770daf4/base64.sol\n */\n if (data.length == 0) return \"\";\n\n // Loads the table into memory\n string memory table = _TABLE;\n\n // Encoding takes 3 bytes chunks of binary data from `bytes` data parameter\n // and split into 4 numbers of 6 bits.\n // The final Base64 length should be `bytes` data length multiplied by 4/3 rounded up\n // - `data.length + 2` -> Round up\n // - `/ 3` -> Number of 3-bytes chunks\n // - `4 *` -> 4 characters for each chunk\n string memory result = new string(4 * ((data.length + 2) / 3));\n\n /// @solidity memory-safe-assembly\n assembly {\n // Prepare the lookup table (skip the first \"length\" byte)\n let tablePtr := add(table, 1)\n\n // Prepare result pointer, jump over length\n let resultPtr := add(result, 32)\n\n // Run over the input, 3 bytes at a time\n for {\n let dataPtr := data\n let endPtr := add(data, mload(data))\n } lt(dataPtr, endPtr) {\n\n } {\n // Advance 3 bytes\n dataPtr := add(dataPtr, 3)\n let input := mload(dataPtr)\n\n // To write each character, shift the 3 bytes (18 bits) chunk\n // 4 times in blocks of 6 bits for each character (18, 12, 6, 0)\n // and apply logical AND with 0x3F which is the number of\n // the previous character in the ASCII table prior to the Base64 Table\n // The result is then added to the table to get the character to write,\n // and finally write it in the result pointer but with a left shift\n // of 256 (1 byte) - 8 (1 ASCII char) = 248 bits\n\n mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F))))\n resultPtr := add(resultPtr, 1) // Advance\n\n mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F))))\n resultPtr := add(resultPtr, 1) // Advance\n\n mstore8(resultPtr, mload(add(tablePtr, and(shr(6, input), 0x3F))))\n resultPtr := add(resultPtr, 1) // Advance\n\n mstore8(resultPtr, mload(add(tablePtr, and(input, 0x3F))))\n resultPtr := add(resultPtr, 1) // Advance\n }\n\n // When data `bytes` is not exactly 3 bytes long\n // it is padded with `=` characters at the end\n switch mod(mload(data), 3)\n case 1 {\n mstore8(sub(resultPtr, 1), 0x3d)\n mstore8(sub(resultPtr, 2), 0x3d)\n }\n case 2 {\n mstore8(sub(resultPtr, 1), 0x3d)\n }\n }\n\n return result;\n }\n}\n\n/// NFT metadata library for rendering metadata associated with editions\nlibrary NFTMetadataRenderer {\n /// Generate edition metadata from storage information as base64-json blob\n /// Combines the media data and metadata\n /// @param name Name of NFT in metadata\n /// @param description Description of NFT in metadata\n /// @param imageURI URI of image to render for edition\n /// @param animationURI URI of animation to render for edition\n /// @param tokenOfEdition Token ID for specific token\n /// @param editionSize Size of entire edition to show\n function createMetadataEdition(\n string memory name,\n string memory description,\n string memory imageURI,\n string memory animationURI,\n uint256 tokenOfEdition,\n uint256 editionSize\n ) internal pure returns (string memory) {\n string memory _tokenMediaData = tokenMediaData(imageURI, animationURI);\n bytes memory json = createMetadataJSON(name, description, _tokenMediaData, tokenOfEdition, editionSize);\n return encodeMetadataJSON(json);\n }\n\n function encodeContractURIJSON(\n string memory name,\n string memory description,\n string memory imageURI,\n string memory animationURI,\n uint256 royaltyBPS,\n address royaltyRecipient\n ) internal pure returns (string memory) {\n bytes memory imageSpace = bytes(\"\");\n if (bytes(imageURI).length > 0) {\n imageSpace = abi.encodePacked('\", \"image\": \"', imageURI);\n }\n bytes memory animationSpace = bytes(\"\");\n if (bytes(animationURI).length > 0) {\n animationSpace = abi.encodePacked('\", \"animation_url\": \"', animationURI);\n }\n\n return\n string(\n encodeMetadataJSON(\n abi.encodePacked(\n '{\"name\": \"',\n name,\n '\", \"description\": \"',\n description,\n // this is for opensea since they don't respect ERC2981 right now\n '\", \"seller_fee_basis_points\": ',\n Strings.toString(royaltyBPS),\n ', \"fee_recipient\": \"',\n Strings.toHexString(uint256(uint160(royaltyRecipient)), 20),\n imageSpace,\n animationSpace,\n '\"}'\n )\n )\n );\n }\n\n /// Function to create the metadata json string for the nft edition\n /// @param name Name of NFT in metadata\n /// @param description Description of NFT in metadata\n /// @param mediaData Data for media to include in json object\n /// @param tokenOfEdition Token ID for specific token\n /// @param editionSize Size of entire edition to show\n function createMetadataJSON(\n string memory name,\n string memory description,\n string memory mediaData,\n uint256 tokenOfEdition,\n uint256 editionSize\n ) internal pure returns (bytes memory) {\n bytes memory editionSizeText;\n if (editionSize > 0) {\n editionSizeText = abi.encodePacked(\"/\", Strings.toString(editionSize));\n }\n return\n abi.encodePacked(\n '{\"name\": \"',\n name,\n \" \",\n Strings.toString(tokenOfEdition),\n editionSizeText,\n '\", \"',\n 'description\": \"',\n description,\n '\", \"',\n mediaData,\n 'properties\": {\"number\": ',\n Strings.toString(tokenOfEdition),\n ', \"name\": \"',\n name,\n '\"}}'\n );\n }\n\n /// Encodes the argument json bytes into base64-data uri format\n /// @param json Raw json to base64 and turn into a data-uri\n function encodeMetadataJSON(bytes memory json) internal pure returns (string memory) {\n return string(abi.encodePacked(\"data:application/json;base64,\", Base64.encode(json)));\n }\n\n /// Generates edition metadata from storage information as base64-json blob\n /// Combines the media data and metadata\n /// @param imageUrl URL of image to render for edition\n /// @param animationUrl URL of animation to render for edition\n function tokenMediaData(string memory imageUrl, string memory animationUrl) internal pure returns (string memory) {\n bool hasImage = bytes(imageUrl).length > 0;\n bool hasAnimation = bytes(animationUrl).length > 0;\n if (hasImage && hasAnimation) {\n return string(abi.encodePacked('image\": \"', imageUrl, '\", \"animation_url\": \"', animationUrl, '\", \"'));\n }\n if (hasImage) {\n return string(abi.encodePacked('image\": \"', imageUrl, '\", \"'));\n }\n if (hasAnimation) {\n return string(abi.encodePacked('animation_url\": \"', animationUrl, '\", \"'));\n }\n\n return \"\";\n }\n}\n" + }, + "contracts/enforcer/Holographer.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\n\nimport \"../interface/HolographInterface.sol\";\nimport \"../interface/HolographerInterface.sol\";\nimport \"../interface/HolographRegistryInterface.sol\";\nimport \"../interface/InitializableInterface.sol\";\n\n/**\n * @dev This contract is a binder. It puts together all the variables to make the underlying contracts functional and be bridgeable.\n */\ncontract Holographer is Admin, Initializable, HolographerInterface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.originChain')) - 1)\n */\n bytes32 constant _originChainSlot = 0xd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\n */\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.contractType')) - 1)\n */\n bytes32 constant _contractTypeSlot = 0x0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c7;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.sourceContract')) - 1)\n */\n bytes32 constant _sourceContractSlot = 0x27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b074;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.blockHeight')) - 1)\n */\n bytes32 constant _blockHeightSlot = 0x9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de3;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPHER: already initialized\");\n (bytes memory encoded, bytes memory initCode) = abi.decode(initPayload, (bytes, bytes));\n (uint32 originChain, address holograph, bytes32 contractType, address sourceContract) = abi.decode(\n encoded,\n (uint32, address, bytes32, address)\n );\n assembly {\n sstore(_adminSlot, caller())\n sstore(_blockHeightSlot, number())\n sstore(_contractTypeSlot, contractType)\n sstore(_holographSlot, holograph)\n sstore(_originChainSlot, originChain)\n sstore(_sourceContractSlot, sourceContract)\n }\n (bool success, bytes memory returnData) = HolographRegistryInterface(HolographInterface(holograph).getRegistry())\n .getReservedContractTypeAddress(contractType)\n .delegatecall(abi.encodeWithSelector(InitializableInterface.init.selector, initCode));\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == InitializableInterface.init.selector, \"HOLOGRAPH: initialization failed\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @dev Returns the contract type that is used for loading the Enforcer\n */\n function getContractType() external view returns (bytes32 contractType) {\n assembly {\n contractType := sload(_contractTypeSlot)\n }\n }\n\n /**\n * @dev Returns the block height of when the smart contract was deployed. Useful for retrieving deployment config for re-deployment on other EVM-compatible chains.\n */\n function getDeploymentBlock() external view returns (uint256 deploymentBlock) {\n assembly {\n deploymentBlock := sload(_blockHeightSlot)\n }\n }\n\n /**\n * @dev Returns a hardcoded address for the Holograph smart contract.\n */\n function getHolograph() external view returns (address holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n /**\n * @dev Returns a hardcoded address for the Holograph smart contract that controls and enforces the ERC standards.\n */\n function getHolographEnforcer() public view returns (address) {\n HolographInterface holograph;\n bytes32 contractType;\n assembly {\n holograph := sload(_holographSlot)\n contractType := sload(_contractTypeSlot)\n }\n return HolographRegistryInterface(holograph.getRegistry()).getReservedContractTypeAddress(contractType);\n }\n\n /**\n * @dev Returns the original chain that contract was deployed on.\n */\n function getOriginChain() external view returns (uint32 originChain) {\n assembly {\n originChain := sload(_originChainSlot)\n }\n }\n\n /**\n * @dev Returns a hardcoded address for the custom secure storage contract deployed in parallel with this contract deployment.\n */\n function getSourceContract() external view returns (address sourceContract) {\n assembly {\n sourceContract := sload(_sourceContractSlot)\n }\n }\n\n /**\n * @dev Purposefully left empty, to prevent running out of gas errors when receiving native token payments.\n */\n receive() external payable {}\n\n /**\n * @dev This takes the Enforcer's source code, runs it, and uses current address for storage slots.\n */\n fallback() external payable {\n address holographEnforcer = getHolographEnforcer();\n assembly {\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), holographEnforcer, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/enforcer/HolographERC20.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/EIP712.sol\";\nimport \"../abstract/Initializable.sol\";\nimport \"../abstract/NonReentrant.sol\";\nimport \"../abstract/Owner.sol\";\n\nimport \"../enum/HolographERC20Event.sol\";\nimport \"../enum/InterfaceType.sol\";\n\nimport \"../interface/ERC20.sol\";\nimport \"../interface/ERC20Burnable.sol\";\nimport \"../interface/HolographERC20Interface.sol\";\nimport \"../interface/ERC20Metadata.sol\";\nimport \"../interface/ERC20Permit.sol\";\nimport \"../interface/ERC20Receiver.sol\";\nimport \"../interface/ERC20Safer.sol\";\nimport \"../interface/ERC165.sol\";\nimport \"../interface/Holographable.sol\";\nimport \"../interface/HolographedERC20.sol\";\nimport \"../interface/HolographInterface.sol\";\nimport \"../interface/HolographerInterface.sol\";\nimport \"../interface/HolographRegistryInterface.sol\";\nimport \"../interface/InitializableInterface.sol\";\nimport \"../interface/HolographInterfacesInterface.sol\";\nimport \"../interface/Ownable.sol\";\n\n/**\n * @title Holograph Bridgeable ERC-20 Token\n * @author Holograph Foundation\n * @notice A smart contract for minting and managing Holograph Bridgeable ERC20 Tokens.\n * @dev The entire logic and functionality of the smart contract is self-contained.\n */\ncontract HolographERC20 is Admin, Owner, Initializable, NonReentrant, EIP712, HolographERC20Interface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\n */\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.sourceContract')) - 1)\n */\n bytes32 constant _sourceContractSlot = 0x27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b074;\n\n /**\n * @dev Configuration for events to trigger for source smart contract.\n */\n uint256 private _eventConfig;\n\n /**\n * @dev Mapping of all the addresse's balances.\n */\n mapping(address => uint256) private _balances;\n\n /**\n * @dev Mapping of all authorized operators, and capped amounts.\n */\n mapping(address => mapping(address => uint256)) private _allowances;\n\n /**\n * @dev Total number of token in circulation.\n */\n uint256 private _totalSupply;\n\n /**\n * @dev Token name.\n */\n string private _name;\n\n /**\n * @dev Token ticker symbol.\n */\n string private _symbol;\n\n /**\n * @dev Token number of decimal places.\n */\n uint8 private _decimals;\n\n /**\n * @dev List of used up nonces. Used in the ERC20Permit interface functionality.\n */\n mapping(address => uint256) private _nonces;\n\n /**\n * @notice Only allow calls from bridge smart contract.\n */\n modifier onlyBridge() {\n require(msg.sender == _holograph().getBridge(), \"ERC20: bridge only call\");\n _;\n }\n\n /**\n * @notice Only allow calls from source smart contract.\n */\n modifier onlySource() {\n address sourceContract;\n assembly {\n sourceContract := sload(_sourceContractSlot)\n }\n require(msg.sender == sourceContract, \"ERC20: source only call\");\n _;\n }\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"ERC20: already initialized\");\n InitializableInterface sourceContract;\n assembly {\n sstore(_reentrantSlot, 0x0000000000000000000000000000000000000000000000000000000000000001)\n sstore(_ownerSlot, caller())\n sourceContract := sload(_sourceContractSlot)\n }\n (\n string memory contractName,\n string memory contractSymbol,\n uint8 contractDecimals,\n uint256 eventConfig,\n string memory domainSeperator,\n string memory domainVersion,\n bool skipInit,\n bytes memory initCode\n ) = abi.decode(initPayload, (string, string, uint8, uint256, string, string, bool, bytes));\n _name = contractName;\n _symbol = contractSymbol;\n _decimals = contractDecimals;\n _eventConfig = eventConfig;\n if (!skipInit) {\n require(sourceContract.init(initCode) == InitializableInterface.init.selector, \"ERC20: could not init source\");\n }\n _setInitialized();\n _eip712_init(domainSeperator, domainVersion);\n return InitializableInterface.init.selector;\n }\n\n /**\n * @dev Purposefully left empty, to prevent running out of gas errors when receiving native token payments.\n */\n receive() external payable {}\n\n /**\n * @notice Fallback to the source contract.\n * @dev Any function call that is not covered here, will automatically be sent over to the source contract.\n */\n fallback() external payable {\n assembly {\n calldatacopy(0, 0, calldatasize())\n mstore(calldatasize(), caller())\n let result := call(gas(), sload(_sourceContractSlot), callvalue(), 0, add(calldatasize(), 0x20), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /*\n * @dev all calls to source contract go through this function in order to inject original msg.sender in calldata\n */\n function _sourceCall(bytes memory payload) private returns (bool output) {\n assembly {\n mstore(add(payload, add(mload(payload), 0x20)), caller())\n // offset memory position by 32 bytes to skip the 32 bytes where bytes length is stored\n // add 32 bytes to bytes length to include the appended msg.sender to calldata\n let result := call(\n gas(),\n sload(_sourceContractSlot),\n callvalue(),\n add(payload, 0x20),\n add(mload(payload), 0x20),\n 0,\n 0\n )\n let pos := mload(0x40)\n // reserve memory space for return data\n mstore(0x40, add(pos, returndatasize()))\n returndatacopy(pos, 0, returndatasize())\n switch result\n case 0 {\n revert(pos, returndatasize())\n }\n output := mload(pos)\n }\n }\n\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n /**\n * @dev Although EIP-165 is not required for ERC20 contracts, we still decided to implement it.\n *\n * This makes it easier for external smart contracts to easily identify a valid ERC20 token contract.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool) {\n HolographInterfacesInterface interfaces = HolographInterfacesInterface(_interfaces());\n ERC165 erc165Contract;\n assembly {\n erc165Contract := sload(_sourceContractSlot)\n }\n if (\n interfaces.supportsInterface(InterfaceType.ERC20, interfaceId) || erc165Contract.supportsInterface(interfaceId) // check global interfaces // check if source supports interface\n ) {\n return true;\n } else {\n return false;\n }\n }\n\n function allowance(address account, address spender) public view returns (uint256) {\n return _allowances[account][spender];\n }\n\n function balanceOf(address account) public view returns (uint256) {\n return _balances[account];\n }\n\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() public view returns (bytes32) {\n return _domainSeparatorV4();\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function nonces(address account) public view returns (uint256) {\n return _nonces[account];\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function totalSupply() public view returns (uint256) {\n return _totalSupply;\n }\n\n function approve(address spender, uint256 amount) public returns (bool) {\n if (_isEventRegistered(HolographERC20Event.beforeApprove)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC20.beforeApprove.selector, msg.sender, spender, amount))\n );\n }\n _approve(msg.sender, spender, amount);\n if (_isEventRegistered(HolographERC20Event.afterApprove)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC20.afterApprove.selector, msg.sender, spender, amount)));\n }\n return true;\n }\n\n function burn(uint256 amount) public {\n if (_isEventRegistered(HolographERC20Event.beforeBurn)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC20.beforeBurn.selector, msg.sender, amount)));\n }\n _burn(msg.sender, amount);\n if (_isEventRegistered(HolographERC20Event.afterBurn)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC20.afterBurn.selector, msg.sender, amount)));\n }\n }\n\n function _allowance(address account, address to, uint256 amount) internal {\n uint256 currentAllowance = _allowances[account][to];\n if (currentAllowance >= amount) {\n unchecked {\n _allowances[account][to] = currentAllowance - amount;\n }\n } else {\n if (_isEventRegistered(HolographERC20Event.onAllowance)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC20.onAllowance.selector, account, to, amount)),\n \"ERC20: amount exceeds allowance\"\n );\n _allowances[account][to] = 0;\n } else {\n revert(\"ERC20: amount exceeds allowance\");\n }\n }\n }\n\n function burnFrom(address account, uint256 amount) public returns (bool) {\n _allowance(account, msg.sender, amount);\n if (_isEventRegistered(HolographERC20Event.beforeBurn)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC20.beforeBurn.selector, account, amount)));\n }\n _burn(account, amount);\n if (_isEventRegistered(HolographERC20Event.afterBurn)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC20.afterBurn.selector, account, amount)));\n }\n return true;\n }\n\n function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {\n uint256 currentAllowance = _allowances[msg.sender][spender];\n require(currentAllowance >= subtractedValue, \"ERC20: decreased below zero\");\n uint256 newAllowance;\n unchecked {\n newAllowance = currentAllowance - subtractedValue;\n }\n if (_isEventRegistered(HolographERC20Event.beforeApprove)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC20.beforeApprove.selector, msg.sender, spender, newAllowance))\n );\n }\n _approve(msg.sender, spender, newAllowance);\n if (_isEventRegistered(HolographERC20Event.afterApprove)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC20.afterApprove.selector, msg.sender, spender, newAllowance))\n );\n }\n return true;\n }\n\n function bridgeIn(uint32 fromChain, bytes calldata payload) external onlyBridge returns (bytes4) {\n (address from, address to, uint256 amount, bytes memory data) = abi.decode(\n payload,\n (address, address, uint256, bytes)\n );\n _mint(to, amount);\n if (_isEventRegistered(HolographERC20Event.bridgeIn)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC20.bridgeIn.selector, fromChain, from, to, amount, data)),\n \"HOLOGRAPH: bridge in failed\"\n );\n }\n return Holographable.bridgeIn.selector;\n }\n\n function bridgeOut(\n uint32 toChain,\n address sender,\n bytes calldata payload\n ) external onlyBridge returns (bytes4 selector, bytes memory data) {\n (address from, address to, uint256 amount) = abi.decode(payload, (address, address, uint256));\n if (sender != from) {\n _allowance(from, sender, amount);\n }\n if (_isEventRegistered(HolographERC20Event.bridgeOut)) {\n /*\n * @dev making a bridgeOut call to source contract\n * assembly is used so that msg.sender can be injected in the calldata\n */\n bytes memory sourcePayload = abi.encodeWithSelector(\n HolographedERC20.bridgeOut.selector,\n toChain,\n from,\n to,\n amount\n );\n assembly {\n // it is important to add 32 bytes in order to accommodate the first 32 bytes being used for storing length of bytes\n mstore(add(sourcePayload, add(mload(sourcePayload), 0x20)), caller())\n let result := call(\n gas(),\n sload(_sourceContractSlot),\n callvalue(),\n // start reading data from memory position, plus 32 bytes, to skip bytes length indicator\n add(sourcePayload, 0x20),\n // add an additional 32 bytes to bytes length to include the appended caller address\n add(mload(sourcePayload), 0x20),\n 0,\n 0\n )\n // when reading back data, skip the first 32 bytes which is used to indicate bytes position in calldata\n // also subtract 32 bytes from returndatasize to accomodate the skipped first 32 bytes\n returndatacopy(data, 0x20, sub(returndatasize(), 0x20))\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n }\n }\n _burn(from, amount);\n return (Holographable.bridgeOut.selector, abi.encode(from, to, amount, data));\n }\n\n /**\n * @dev Allows the bridge to mint tokens (used for hTokens only).\n */\n function holographBridgeMint(address to, uint256 amount) external onlyBridge returns (bytes4) {\n _mint(to, amount);\n return HolographERC20Interface.holographBridgeMint.selector;\n }\n\n function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {\n uint256 currentAllowance = _allowances[msg.sender][spender];\n uint256 newAllowance;\n unchecked {\n newAllowance = currentAllowance + addedValue;\n }\n unchecked {\n require(newAllowance >= currentAllowance, \"ERC20: increased above max value\");\n }\n if (_isEventRegistered(HolographERC20Event.beforeApprove)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC20.beforeApprove.selector, msg.sender, spender, newAllowance))\n );\n }\n _approve(msg.sender, spender, newAllowance);\n if (_isEventRegistered(HolographERC20Event.afterApprove)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC20.afterApprove.selector, msg.sender, spender, newAllowance))\n );\n }\n return true;\n }\n\n function onERC20Received(\n address account,\n address sender,\n uint256 amount,\n bytes calldata data\n ) public returns (bytes4) {\n require(_isContract(account), \"ERC20: operator not contract\");\n if (_isEventRegistered(HolographERC20Event.beforeOnERC20Received)) {\n require(\n _sourceCall(\n abi.encodeWithSelector(\n HolographedERC20.beforeOnERC20Received.selector,\n account,\n sender,\n address(this),\n amount,\n data\n )\n )\n );\n }\n try ERC20(account).balanceOf(address(this)) returns (uint256) {\n // do nothing, just want to see if this reverts due to invalid erc-20 contract\n } catch {\n revert(\"ERC20: failed getting balance\");\n }\n if (_isEventRegistered(HolographERC20Event.afterOnERC20Received)) {\n require(\n _sourceCall(\n abi.encodeWithSelector(\n HolographedERC20.afterOnERC20Received.selector,\n account,\n sender,\n address(this),\n amount,\n data\n )\n )\n );\n }\n return ERC20Receiver.onERC20Received.selector;\n }\n\n function permit(\n address account,\n address spender,\n uint256 amount,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) public {\n require(block.timestamp <= deadline, \"ERC20: expired deadline\");\n bytes32 structHash = keccak256(\n abi.encode(\n 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9,\n account,\n spender,\n amount,\n _useNonce(account),\n deadline\n )\n );\n bytes32 hash = _hashTypedDataV4(structHash);\n address signer = _recover(r, s, v, hash);\n require(signer == account, \"ERC20: invalid signature\");\n if (_isEventRegistered(HolographERC20Event.beforeApprove)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC20.beforeApprove.selector, account, spender, amount)));\n }\n _approve(account, spender, amount);\n if (_isEventRegistered(HolographERC20Event.afterApprove)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC20.afterApprove.selector, account, spender, amount)));\n }\n }\n\n function safeTransfer(address recipient, uint256 amount) public returns (bool) {\n return safeTransfer(recipient, amount, \"\");\n }\n\n function safeTransfer(address recipient, uint256 amount, bytes memory data) public returns (bool) {\n if (_isEventRegistered(HolographERC20Event.beforeSafeTransfer)) {\n require(\n _sourceCall(\n abi.encodeWithSelector(HolographedERC20.beforeSafeTransfer.selector, msg.sender, recipient, amount, data)\n )\n );\n }\n _transfer(msg.sender, recipient, amount);\n if (_isEventRegistered(HolographERC20Event.afterSafeTransfer)) {\n require(\n _sourceCall(\n abi.encodeWithSelector(HolographedERC20.afterSafeTransfer.selector, msg.sender, recipient, amount, data)\n )\n );\n }\n return true;\n }\n\n function safeTransferFrom(address account, address recipient, uint256 amount) public returns (bool) {\n return safeTransferFrom(account, recipient, amount, \"\");\n }\n\n function safeTransferFrom(\n address account,\n address recipient,\n uint256 amount,\n bytes memory data\n ) public returns (bool) {\n if (account != msg.sender) {\n /*\n * @dev This is intentionally enabled to remove friction when operator or bridge needs to move tokens\n */\n if (msg.sender != _holograph().getBridge() && msg.sender != _holograph().getOperator()) {\n _allowance(account, msg.sender, amount);\n }\n }\n if (_isEventRegistered(HolographERC20Event.beforeSafeTransfer)) {\n require(\n _sourceCall(\n abi.encodeWithSelector(HolographedERC20.beforeSafeTransfer.selector, account, recipient, amount, data)\n )\n );\n }\n _transfer(account, recipient, amount);\n if (_isEventRegistered(HolographERC20Event.afterSafeTransfer)) {\n require(\n _sourceCall(\n abi.encodeWithSelector(HolographedERC20.afterSafeTransfer.selector, account, recipient, amount, data)\n )\n );\n }\n return true;\n }\n\n /**\n * @dev Allows for source smart contract to burn tokens.\n */\n function sourceBurn(address from, uint256 amount) external onlySource {\n _burn(from, amount);\n }\n\n /**\n * @dev Allows for source smart contract to mint tokens.\n */\n function sourceMint(address to, uint256 amount) external onlySource {\n _mint(to, amount);\n }\n\n /**\n * @dev Allows for source smart contract to mint a batch of token amounts.\n */\n function sourceMintBatch(address[] calldata wallets, uint256[] calldata amounts) external onlySource {\n for (uint256 i = 0; i < wallets.length; i++) {\n _mint(wallets[i], amounts[i]);\n }\n }\n\n /**\n * @dev Allows for source smart contract to transfer tokens.\n */\n function sourceTransfer(address from, address to, uint256 amount) external onlySource {\n _transfer(from, to, amount);\n }\n\n /**\n * @dev Allows for source smart contract to withdraw contract balance.\n */\n function sourceTransfer(address payable destination, uint256 amount) external onlySource {\n destination.transfer(amount);\n }\n\n /**\n * @dev Allows for source smart contract to make calls to external contracts\n */\n function sourceExternalCall(address target, bytes calldata data) external onlySource {\n assembly {\n calldatacopy(0, data.offset, data.length)\n let result := call(gas(), target, callvalue(), 0, data.length, 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n function transfer(address recipient, uint256 amount) public returns (bool) {\n if (_isEventRegistered(HolographERC20Event.beforeTransfer)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC20.beforeTransfer.selector, msg.sender, recipient, amount))\n );\n }\n _transfer(msg.sender, recipient, amount);\n if (_isEventRegistered(HolographERC20Event.afterTransfer)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC20.afterTransfer.selector, msg.sender, recipient, amount))\n );\n }\n return true;\n }\n\n function transferFrom(address account, address recipient, uint256 amount) public returns (bool) {\n if (account != msg.sender) {\n /*\n * @dev This is intentionally enabled to remove friction when operator or bridge needs to move tokens\n */\n if (msg.sender != _holograph().getBridge() && msg.sender != _holograph().getOperator()) {\n _allowance(account, msg.sender, amount);\n }\n }\n if (_isEventRegistered(HolographERC20Event.beforeTransfer)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC20.beforeTransfer.selector, account, recipient, amount))\n );\n }\n _transfer(account, recipient, amount);\n if (_isEventRegistered(HolographERC20Event.afterTransfer)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC20.afterTransfer.selector, account, recipient, amount)));\n }\n return true;\n }\n\n function _approve(address account, address spender, uint256 amount) private {\n require(account != address(0), \"ERC20: account is zero address\");\n require(spender != address(0), \"ERC20: spender is zero address\");\n _allowances[account][spender] = amount;\n emit Approval(account, spender, amount);\n }\n\n function _burn(address account, uint256 amount) private {\n require(account != address(0), \"ERC20: account is zero address\");\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n }\n _totalSupply -= amount;\n _registryTransfer(account, address(0), amount);\n }\n\n /**\n * @notice Mints tokens.\n * @dev Mint a specific amount of tokens to a specific address.\n * @param to Address to mint to.\n * @param amount Amount of tokens to mint.\n */\n function _mint(address to, uint256 amount) private {\n require(to != address(0), \"ERC20: minting to burn address\");\n _totalSupply += amount;\n _balances[to] += amount;\n _registryTransfer(address(0), to, amount);\n }\n\n function _transfer(address account, address recipient, uint256 amount) private {\n require(account != address(0), \"ERC20: account is zero address\");\n require(recipient != address(0), \"ERC20: recipient is zero address\");\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n }\n _balances[recipient] += amount;\n _registryTransfer(account, recipient, amount);\n }\n\n function _registryTransfer(address _from, address _to, uint256 _amount) private {\n emit Transfer(_from, _to, _amount);\n HolographRegistryInterface(_holograph().getRegistry()).holographableEvent(\n abi.encode(\n // keccak256(\"TransferERC20(address,address,uint256)\")\n bytes32(0x9b035625e569d1d2bf54830a290aefba7ab11610ba8490871dc62b86b63a8956),\n _from,\n _to,\n _amount\n )\n );\n }\n\n /**\n * @dev \"Consume a nonce\": return the current value and increment.\n *\n * _Available since v4.1._\n */\n function _useNonce(address account) private returns (uint256 current) {\n current = _nonces[account];\n _nonces[account]++;\n }\n\n function _isContract(address contractAddress) private view returns (bool) {\n bytes32 codehash;\n assembly {\n codehash := extcodehash(contractAddress)\n }\n return (codehash != 0x0 && codehash != 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470);\n }\n\n /**\n * @dev Internal function used for identifying signer\n */\n function _recover(bytes32 r, bytes32 s, uint8 v, bytes32 hash) private pure returns (address signer) {\n if (v < 27) {\n v += 27;\n }\n require(v == 27 || v == 28, \"ERC20: invalid v-value\");\n // prevent signature malleability by checking if s-value is in the upper range\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n // if s-value is in upper range, calculate a new s-value\n s = bytes32(0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - uint256(s));\n // flip the v-value\n if (v == 27) {\n v = 28;\n } else {\n v = 27;\n }\n // check if s-value is still in upper range\n require(\n uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0,\n \"ERC20: invalid s-value\"\n );\n }\n signer = ecrecover(hash, v, r, s);\n require(signer != address(0), \"ERC20: zero address signer\");\n }\n\n /**\n * @dev Get the interfaces contract address.\n */\n function _interfaces() private view returns (address) {\n return _holograph().getInterfaces();\n }\n\n function owner() public view override returns (address) {\n Ownable ownableContract;\n assembly {\n ownableContract := sload(_sourceContractSlot)\n }\n return ownableContract.owner();\n }\n\n function _holograph() private view returns (HolographInterface holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n function _isEventRegistered(HolographERC20Event _eventName) private view returns (bool) {\n return ((_eventConfig >> uint256(_eventName)) & uint256(1) == 1 ? true : false);\n }\n}\n" + }, + "contracts/enforcer/HolographERC721.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\nimport \"../abstract/Owner.sol\";\n\nimport \"../enum/HolographERC721Event.sol\";\nimport \"../enum/InterfaceType.sol\";\n\nimport \"../interface/ERC165.sol\";\nimport \"../interface/ERC721.sol\";\nimport \"../interface/HolographERC721Interface.sol\";\nimport \"../interface/ERC721Metadata.sol\";\nimport \"../interface/ERC721TokenReceiver.sol\";\nimport \"../interface/Holographable.sol\";\nimport \"../interface/HolographedERC721.sol\";\nimport \"../interface/HolographInterface.sol\";\nimport \"../interface/HolographerInterface.sol\";\nimport \"../interface/HolographRegistryInterface.sol\";\nimport \"../interface/InitializableInterface.sol\";\nimport \"../interface/HolographInterfacesInterface.sol\";\nimport \"../interface/HolographRoyaltiesInterface.sol\";\nimport \"../interface/Ownable.sol\";\n\n/**\n * @title Holograph Bridgeable ERC-721 Collection\n * @author Holograph Foundation\n * @notice A smart contract for minting and managing Holograph Bridgeable ERC721 NFTs.\n * @dev The entire logic and functionality of the smart contract is self-contained.\n */\ncontract HolographERC721 is Admin, Owner, HolographERC721Interface, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\n */\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.sourceContract')) - 1)\n */\n bytes32 constant _sourceContractSlot = 0x27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b074;\n\n /**\n * @dev Configuration for events to trigger for source smart contract.\n */\n uint256 private _eventConfig;\n\n /**\n * @dev Collection name.\n */\n string private _name;\n\n /**\n * @dev Collection symbol.\n */\n string private _symbol;\n\n /**\n * @dev Collection royalty base points.\n */\n uint16 private _bps;\n\n /**\n * @dev Array of all token ids in collection.\n */\n uint256[] private _allTokens;\n\n /**\n * @dev Map of token id to array index of _ownedTokens.\n */\n mapping(uint256 => uint256) private _ownedTokensIndex;\n\n /**\n * @dev Token id to wallet (owner) address map.\n */\n mapping(uint256 => address) private _tokenOwner;\n\n /**\n * @dev 1-to-1 map of token id that was assigned an approved operator address.\n */\n mapping(uint256 => address) private _tokenApprovals;\n\n /**\n * @dev Map of total tokens owner by a specific address.\n */\n mapping(address => uint256) private _ownedTokensCount;\n\n /**\n * @dev Map of array of token ids owned by a specific address.\n */\n mapping(address => uint256[]) private _ownedTokens;\n\n /**\n * @notice Map of full operator approval for a particular address.\n * @dev Usually utilised for supporting marketplace proxy wallets.\n */\n mapping(address => mapping(address => bool)) private _operatorApprovals;\n\n /**\n * @dev Mapping from token id to position in the allTokens array.\n */\n mapping(uint256 => uint256) private _allTokensIndex;\n\n /**\n * @dev Mapping of all token ids that have been burned. This is to prevent re-minting of same token ids.\n */\n mapping(uint256 => bool) private _burnedTokens;\n\n /**\n * @notice Only allow calls from bridge smart contract.\n */\n modifier onlyBridge() {\n require(msg.sender == _holograph().getBridge(), \"ERC721: bridge only call\");\n _;\n }\n\n /**\n * @notice Only allow calls from source smart contract.\n */\n modifier onlySource() {\n address sourceContract;\n assembly {\n sourceContract := sload(_sourceContractSlot)\n }\n require(msg.sender == sourceContract, \"ERC721: source only call\");\n _;\n }\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"ERC721: already initialized\");\n InitializableInterface sourceContract;\n assembly {\n sstore(_ownerSlot, caller())\n sourceContract := sload(_sourceContractSlot)\n }\n (\n string memory contractName,\n string memory contractSymbol,\n uint16 contractBps,\n uint256 eventConfig,\n bool skipInit,\n bytes memory initCode\n ) = abi.decode(initPayload, (string, string, uint16, uint256, bool, bytes));\n _name = contractName;\n _symbol = contractSymbol;\n _bps = contractBps;\n _eventConfig = eventConfig;\n if (!skipInit) {\n require(sourceContract.init(initCode) == InitializableInterface.init.selector, \"ERC721: could not init source\");\n (bool success, bytes memory returnData) = _royalties().delegatecall(\n abi.encodeWithSelector(\n HolographRoyaltiesInterface.initHolographRoyalties.selector,\n abi.encode(uint256(contractBps), uint256(0))\n )\n );\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == InitializableInterface.init.selector, \"ERC721: could not init royalties\");\n }\n\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @notice Gets a base64 encoded contract JSON file.\n * @return string The URI.\n */\n function contractURI() external view returns (string memory) {\n if (_isEventRegistered(HolographERC721Event.customContractURI)) {\n assembly {\n calldatacopy(0, 0, calldatasize())\n mstore(calldatasize(), caller())\n let result := staticcall(gas(), sload(_sourceContractSlot), 0, add(calldatasize(), 0x20), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n return HolographInterfacesInterface(_interfaces()).contractURI(_name, \"\", \"\", _bps, address(this));\n }\n\n /**\n * @notice Gets the name of the collection.\n * @return string The collection name.\n */\n function name() external view returns (string memory) {\n return _name;\n }\n\n /**\n * @notice Shows the interfaces the contracts support\n * @dev Must add new 4 byte interface Ids here to acknowledge support\n * @param interfaceId ERC165 style 4 byte interfaceId.\n * @return bool True if supported.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool) {\n HolographInterfacesInterface interfaces = HolographInterfacesInterface(_interfaces());\n ERC165 erc165Contract;\n assembly {\n erc165Contract := sload(_sourceContractSlot)\n }\n if (\n interfaces.supportsInterface(InterfaceType.ERC721, interfaceId) || // check global interfaces\n interfaces.supportsInterface(InterfaceType.ROYALTIES, interfaceId) || // check if royalties supports interface\n erc165Contract.supportsInterface(interfaceId) // check if source supports interface\n ) {\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * @notice Gets the collection's symbol.\n * @return string The symbol.\n */\n function symbol() external view returns (string memory) {\n return _symbol;\n }\n\n /**\n * @notice Get's the URI of the token.\n * @dev Defaults the the Arweave URI\n * @return string The URI.\n */\n function tokenURI(uint256 tokenId) external view returns (string memory) {\n assembly {\n calldatacopy(0, 0, calldatasize())\n mstore(calldatasize(), caller())\n let result := staticcall(gas(), sload(_sourceContractSlot), 0, add(calldatasize(), 0x20), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @notice Get list of tokens owned by wallet.\n * @param wallet The wallet address to get tokens for.\n * @return uint256[] Returns an array of token ids owned by wallet.\n */\n function tokensOfOwner(address wallet) external view returns (uint256[] memory) {\n return _ownedTokens[wallet];\n }\n\n /**\n * @notice Get set length list, starting from index, for tokens owned by wallet.\n * @param wallet The wallet address to get tokens for.\n * @param index The index to start enumeration from.\n * @param length The length of returned results.\n * @return tokenIds uint256[] Returns a set length array of token ids owned by wallet.\n */\n function tokensOfOwner(\n address wallet,\n uint256 index,\n uint256 length\n ) external view returns (uint256[] memory tokenIds) {\n uint256 supply = _ownedTokensCount[wallet];\n if (index + length > supply) {\n length = supply - index;\n }\n tokenIds = new uint256[](length);\n for (uint256 i = 0; i < length; i++) {\n tokenIds[i] = _ownedTokens[wallet][index + i];\n }\n }\n\n /**\n * @notice Adds a new address to the token's approval list.\n * @dev Requires the sender to be in the approved addresses.\n * @param to The address to approve.\n * @param tokenId The affected token.\n */\n function approve(address to, uint256 tokenId) external payable {\n address tokenOwner = _tokenOwner[tokenId];\n require(to != tokenOwner, \"ERC721: cannot approve self\");\n require(_isApprovedStrict(msg.sender, tokenId), \"ERC721: not approved sender\");\n if (_isEventRegistered(HolographERC721Event.beforeApprove)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC721.beforeApprove.selector, tokenOwner, to, tokenId)));\n }\n _tokenApprovals[tokenId] = to;\n emit Approval(tokenOwner, to, tokenId);\n if (_isEventRegistered(HolographERC721Event.afterApprove)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC721.afterApprove.selector, tokenOwner, to, tokenId)));\n }\n }\n\n /**\n * @notice Burns the token.\n * @dev The sender must be the owner or approved.\n * @param tokenId The token to burn.\n */\n function burn(uint256 tokenId) external {\n require(_isApproved(msg.sender, tokenId), \"ERC721: not approved sender\");\n address wallet = _tokenOwner[tokenId];\n if (_isEventRegistered(HolographERC721Event.beforeBurn)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC721.beforeBurn.selector, wallet, tokenId)));\n }\n _burn(wallet, tokenId);\n if (_isEventRegistered(HolographERC721Event.afterBurn)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC721.afterBurn.selector, wallet, tokenId)));\n }\n }\n\n function bridgeIn(uint32 fromChain, bytes calldata payload) external onlyBridge returns (bytes4) {\n (address from, address to, uint256 tokenId, bytes memory data) = abi.decode(\n payload,\n (address, address, uint256, bytes)\n );\n require(!_exists(tokenId), \"ERC721: token already exists\");\n delete _burnedTokens[tokenId];\n _mint(to, tokenId);\n if (_isEventRegistered(HolographERC721Event.bridgeIn)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC721.bridgeIn.selector, fromChain, from, to, tokenId, data)),\n \"HOLOGRAPH: bridge in failed\"\n );\n }\n return Holographable.bridgeIn.selector;\n }\n\n function bridgeOut(\n uint32 toChain,\n address sender,\n bytes calldata payload\n ) external onlyBridge returns (bytes4 selector, bytes memory data) {\n (address from, address to, uint256 tokenId) = abi.decode(payload, (address, address, uint256));\n require(to != address(0), \"ERC721: zero address\");\n require(_isApproved(sender, tokenId), \"ERC721: sender not approved\");\n require(from == _tokenOwner[tokenId], \"ERC721: from is not owner\");\n if (_isEventRegistered(HolographERC721Event.bridgeOut)) {\n /*\n * @dev making a bridgeOut call to source contract\n * assembly is used so that msg.sender can be injected in the calldata\n */\n bytes memory sourcePayload = abi.encodeWithSelector(\n HolographedERC721.bridgeOut.selector,\n toChain,\n from,\n to,\n tokenId\n );\n assembly {\n // it is important to add 32 bytes in order to accommodate the first 32 bytes being used for storing length of bytes\n mstore(add(sourcePayload, add(mload(sourcePayload), 0x20)), caller())\n let result := call(\n gas(),\n sload(_sourceContractSlot),\n callvalue(),\n // start reading data from memory position, plus 32 bytes, to skip bytes length indicator\n add(sourcePayload, 0x20),\n // add an additional 32 bytes to bytes length to include the appended caller address\n add(mload(sourcePayload), 0x20),\n 0,\n 0\n )\n // when reading back data, skip the first 32 bytes which is used to indicate bytes position in calldata\n // also subtract 32 bytes from returndatasize to accomodate the skipped first 32 bytes\n returndatacopy(data, 0x20, sub(returndatasize(), 0x20))\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n }\n }\n _burn(from, tokenId);\n return (Holographable.bridgeOut.selector, abi.encode(from, to, tokenId, data));\n }\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n * @param from cannot be the zero address.\n * @param to cannot be the zero address.\n * @param tokenId token must exist and be owned by `from`.\n */\n function safeTransferFrom(address from, address to, uint256 tokenId) external payable {\n safeTransferFrom(from, to, tokenId, \"\");\n }\n\n /**\n * @notice Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n * @dev Since it's not being used, the _data variable is commented out to avoid compiler warnings.\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n * @param from cannot be the zero address.\n * @param to cannot be the zero address.\n * @param tokenId token must exist and be owned by `from`.\n */\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public payable {\n require(_isApproved(msg.sender, tokenId), \"ERC721: not approved sender\");\n if (_isEventRegistered(HolographERC721Event.beforeSafeTransfer)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC721.beforeSafeTransfer.selector, from, to, tokenId, data))\n );\n }\n _transferFrom(from, to, tokenId);\n if (_isContract(to)) {\n require(\n ERC721TokenReceiver(to).onERC721Received(msg.sender, from, tokenId, data) ==\n ERC721TokenReceiver.onERC721Received.selector,\n \"ERC721: onERC721Received fail\"\n );\n }\n if (_isEventRegistered(HolographERC721Event.afterSafeTransfer)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC721.afterSafeTransfer.selector, from, to, tokenId, data))\n );\n }\n }\n\n /**\n * @notice Adds a new approved operator.\n * @dev Allows platforms to sell/transfer all your NFTs. Used with proxy contracts like OpenSea/Rarible.\n * @param to The address to approve.\n * @param approved Turn on or off approval status.\n */\n function setApprovalForAll(address to, bool approved) external {\n require(to != msg.sender, \"ERC721: cannot approve self\");\n if (_isEventRegistered(HolographERC721Event.beforeApprovalAll)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC721.beforeApprovalAll.selector, msg.sender, to, approved))\n );\n }\n _operatorApprovals[msg.sender][to] = approved;\n emit ApprovalForAll(msg.sender, to, approved);\n if (_isEventRegistered(HolographERC721Event.afterApprovalAll)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC721.afterApprovalAll.selector, msg.sender, to, approved))\n );\n }\n }\n\n /**\n * @dev Allows for source smart contract to burn a token.\n * Note: this is put in place to make sure that custom logic could be implemented for merging, gamification, etc.\n * Note: token cannot be burned if it's locked by bridge.\n */\n function sourceBurn(uint256 tokenId) external onlySource {\n address wallet = _tokenOwner[tokenId];\n _burn(wallet, tokenId);\n }\n\n /**\n * @dev Allows for source smart contract to mint a token.\n */\n function sourceMint(address to, uint224 tokenId) external onlySource {\n // uint32 is reserved for chain id to be used\n // we need to get current chain id, and prepend it to tokenId\n // this will prevent possible tokenId overlap if minting simultaneously on multiple chains is possible\n uint256 token = uint256(bytes32(abi.encodePacked(_chain(), tokenId)));\n require(!_burnedTokens[token], \"ERC721: can't mint burned token\");\n _mint(to, token);\n }\n\n /**\n * @dev Allows source to get the prepend for their tokenIds.\n */\n function sourceGetChainPrepend() external view onlySource returns (uint256) {\n return uint256(bytes32(abi.encodePacked(_chain(), uint224(0))));\n }\n\n /**\n * @dev Allows for source smart contract to mint a batch of tokens.\n */\n function sourceMintBatch(address to, uint224[] calldata tokenIds) external onlySource {\n require(tokenIds.length < 1000, \"ERC721: max batch size is 1000\");\n uint32 chain = _chain();\n uint256 token;\n for (uint256 i = 0; i < tokenIds.length; i++) {\n require(!_burnedTokens[token], \"ERC721: can't mint burned token\");\n token = uint256(bytes32(abi.encodePacked(chain, tokenIds[i])));\n require(!_burnedTokens[token], \"ERC721: can't mint burned token\");\n _mint(to, token);\n }\n }\n\n /**\n * @dev Allows for source smart contract to mint a batch of tokens.\n */\n function sourceMintBatch(address[] calldata wallets, uint224[] calldata tokenIds) external onlySource {\n require(wallets.length == tokenIds.length, \"ERC721: array length missmatch\");\n require(tokenIds.length < 1000, \"ERC721: max batch size is 1000\");\n uint32 chain = _chain();\n uint256 token;\n for (uint256 i = 0; i < tokenIds.length; i++) {\n token = uint256(bytes32(abi.encodePacked(chain, tokenIds[i])));\n require(!_burnedTokens[token], \"ERC721: can't mint burned token\");\n _mint(wallets[i], token);\n }\n }\n\n /**\n * @dev Allows for source smart contract to mint a batch of tokens.\n */\n function sourceMintBatchIncremental(address to, uint224 startingTokenId, uint256 length) external onlySource {\n uint256 token = uint256(bytes32(abi.encodePacked(_chain(), startingTokenId)));\n for (uint256 i = 0; i < length; i++) {\n require(!_burnedTokens[token], \"ERC721: can't mint burned token\");\n _mint(to, token);\n token++;\n }\n }\n\n /**\n * @dev Allows for source smart contract to transfer a token.\n * Note: this is put in place to make sure that custom logic could be implemented for merging, gamification, etc.\n * Note: token cannot be transfered if it's locked by bridge.\n */\n function sourceTransfer(address to, uint256 tokenId) external onlySource {\n require(!_burnedTokens[tokenId], \"ERC721: token has been burned\");\n address wallet = _tokenOwner[tokenId];\n _transferFrom(wallet, to, tokenId);\n }\n\n /**\n * @dev Allows for source smart contract to make calls to external contracts\n */\n function sourceExternalCall(address target, bytes calldata data) external onlySource {\n assembly {\n calldatacopy(0, data.offset, data.length)\n let result := call(gas(), target, callvalue(), 0, data.length, 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @notice Transfers `tokenId` token from `msg.sender` to `to`.\n * @dev WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\n * @param to cannot be the zero address.\n * @param tokenId token must be owned by `from`.\n */\n function transfer(address to, uint256 tokenId) external payable {\n transferFrom(msg.sender, to, tokenId, \"\");\n }\n\n /**\n * @notice Transfers `tokenId` token from `from` to `to`.\n * @dev WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\n * @param from cannot be the zero address.\n * @param to cannot be the zero address.\n * @param tokenId token must be owned by `from`.\n */\n function transferFrom(address from, address to, uint256 tokenId) public payable {\n transferFrom(from, to, tokenId, \"\");\n }\n\n /**\n * @notice Transfers `tokenId` token from `from` to `to`.\n * @dev WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\n * @dev Since it's not being used, the _data variable is commented out to avoid compiler warnings.\n * @param from cannot be the zero address.\n * @param to cannot be the zero address.\n * @param tokenId token must be owned by `from`.\n * @param data additional data to pass.\n */\n function transferFrom(address from, address to, uint256 tokenId, bytes memory data) public payable {\n require(_isApproved(msg.sender, tokenId), \"ERC721: not approved sender\");\n if (_isEventRegistered(HolographERC721Event.beforeTransfer)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC721.beforeTransfer.selector, from, to, tokenId, data)));\n }\n _transferFrom(from, to, tokenId);\n if (_isEventRegistered(HolographERC721Event.afterTransfer)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC721.afterTransfer.selector, from, to, tokenId, data)));\n }\n }\n\n /**\n * @notice Get total number of tokens owned by wallet.\n * @dev Used to see total amount of tokens owned by a specific wallet.\n * @param wallet Address for which to get token balance.\n * @return uint256 Returns an integer, representing total amount of tokens held by address.\n */\n function balanceOf(address wallet) public view returns (uint256) {\n return _ownedTokensCount[wallet];\n }\n\n function burned(uint256 tokenId) public view returns (bool) {\n return _burnedTokens[tokenId];\n }\n\n /**\n * @notice Decimal places to have for totalSupply.\n * @dev Since ERC721s are single, we use 0 as the decimal places to make sure a round number for totalSupply.\n * @return uint256 Returns the number of decimal places to have for totalSupply.\n */\n function decimals() external pure returns (uint256) {\n return 0;\n }\n\n function exists(uint256 tokenId) public view returns (bool) {\n return _tokenOwner[tokenId] != address(0);\n }\n\n /**\n * @notice Gets the approved address for the token.\n * @dev Single operator set for a specific token. Usually used for one-time very specific authorisations.\n * @param tokenId Token id to get approved operator for.\n * @return address Approved address for token.\n */\n function getApproved(uint256 tokenId) external view returns (address) {\n return _tokenApprovals[tokenId];\n }\n\n /**\n * @notice Checks if the address is approved.\n * @dev Includes references to OpenSea and Rarible marketplace proxies.\n * @param wallet Address of the wallet.\n * @param operator Address of the marketplace operator.\n * @return bool True if approved.\n */\n function isApprovedForAll(address wallet, address operator) external view returns (bool) {\n return (_operatorApprovals[wallet][operator] || _sourceApproved(wallet, operator));\n }\n\n /**\n * @notice Checks who the owner of a token is.\n * @dev The token must exist.\n * @param tokenId The token to look up.\n * @return address Owner of the token.\n */\n function ownerOf(uint256 tokenId) external view returns (address) {\n address tokenOwner = _tokenOwner[tokenId];\n require(tokenOwner != address(0), \"ERC721: token does not exist\");\n return tokenOwner;\n }\n\n /**\n * @notice Get token by index.\n * @dev Used in conjunction with totalSupply function to iterate over all tokens in collection.\n * @param index Index of token in array.\n * @return uint256 Returns the token id of token located at that index.\n */\n function tokenByIndex(uint256 index) external view returns (uint256) {\n require(index < _allTokens.length, \"ERC721: index out of bounds\");\n return _allTokens[index];\n }\n\n /**\n * @notice Get set length list, starting from index, for all tokens.\n * @param index The index to start enumeration from.\n * @param length The length of returned results.\n * @return tokenIds uint256[] Returns a set length array of token ids minted.\n */\n function tokens(uint256 index, uint256 length) external view returns (uint256[] memory tokenIds) {\n uint256 supply = _allTokens.length;\n if (index + length > supply) {\n length = supply - index;\n }\n tokenIds = new uint256[](length);\n for (uint256 i = 0; i < length; i++) {\n tokenIds[i] = _allTokens[index + i];\n }\n }\n\n /**\n * @notice Get token from wallet by index instead of token id.\n * @dev Helpful for wallet token enumeration where token id info is not yet available. Use in conjunction with balanceOf function.\n * @param wallet Specific address for which to get token for.\n * @param index Index of token in array.\n * @return uint256 Returns the token id of token located at that index in specified wallet.\n */\n function tokenOfOwnerByIndex(address wallet, uint256 index) external view returns (uint256) {\n require(index < balanceOf(wallet), \"ERC721: index out of bounds\");\n return _ownedTokens[wallet][index];\n }\n\n /**\n * @notice Total amount of tokens in the collection.\n * @dev Ignores burned tokens.\n * @return uint256 Returns the total number of active (not burned) tokens.\n */\n function totalSupply() external view returns (uint256) {\n return _allTokens.length;\n }\n\n /**\n * @notice Empty function that is triggered by external contract on NFT transfer.\n * @dev We have this blank function in place to make sure that external contract sending in NFTs don't error out.\n * @dev Since it's not being used, the _operator variable is commented out to avoid compiler warnings.\n * @dev Since it's not being used, the _from variable is commented out to avoid compiler warnings.\n * @dev Since it's not being used, the _tokenId variable is commented out to avoid compiler warnings.\n * @dev Since it's not being used, the _data variable is commented out to avoid compiler warnings.\n * @return bytes4 Returns the interfaceId of onERC721Received.\n */\n function onERC721Received(\n address _operator,\n address _from,\n uint256 _tokenId,\n bytes calldata _data\n ) external returns (bytes4) {\n require(_isContract(_operator), \"ERC721: operator not contract\");\n if (_isEventRegistered(HolographERC721Event.beforeOnERC721Received)) {\n require(\n _sourceCall(\n abi.encodeWithSelector(\n HolographedERC721.beforeOnERC721Received.selector,\n _operator,\n _from,\n address(this),\n _tokenId,\n _data\n )\n )\n );\n }\n try HolographERC721Interface(_operator).ownerOf(_tokenId) returns (address tokenOwner) {\n require(tokenOwner == address(this), \"ERC721: contract not token owner\");\n } catch {\n revert(\"ERC721: token does not exist\");\n }\n if (_isEventRegistered(HolographERC721Event.afterOnERC721Received)) {\n require(\n _sourceCall(\n abi.encodeWithSelector(\n HolographedERC721.afterOnERC721Received.selector,\n _operator,\n _from,\n address(this),\n _tokenId,\n _data\n )\n )\n );\n }\n return ERC721TokenReceiver.onERC721Received.selector;\n }\n\n /**\n * @dev Add a newly minted token into managed list of tokens.\n * @param to Address of token owner for which to add the token.\n * @param tokenId Id of token to add.\n */\n function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {\n _ownedTokensIndex[tokenId] = _ownedTokensCount[to];\n _ownedTokensCount[to]++;\n _ownedTokens[to].push(tokenId);\n _allTokensIndex[tokenId] = _allTokens.length;\n _allTokens.push(tokenId);\n }\n\n /**\n * @notice Burns the token.\n * @dev All validation needs to be done before calling this function.\n * @param wallet Address of current token owner.\n * @param tokenId The token to burn.\n */\n function _burn(address wallet, uint256 tokenId) private {\n _clearApproval(tokenId);\n _tokenOwner[tokenId] = address(0);\n _registryTransfer(wallet, address(0), tokenId);\n _removeTokenFromOwnerEnumeration(wallet, tokenId);\n _burnedTokens[tokenId] = true;\n }\n\n /**\n * @notice Deletes a token from the approval list.\n * @dev Removes from count.\n * @param tokenId T.\n */\n function _clearApproval(uint256 tokenId) private {\n delete _tokenApprovals[tokenId];\n }\n\n /**\n * @notice Mints an NFT.\n * @dev Can to mint the token to the zero address and the token cannot already exist.\n * @param to Address to mint to.\n * @param tokenId The new token.\n */\n function _mint(address to, uint256 tokenId) private {\n require(tokenId > 0, \"ERC721: token id cannot be zero\");\n require(to != address(0), \"ERC721: minting to burn address\");\n require(!_exists(tokenId), \"ERC721: token already exists\");\n require(!_burnedTokens[tokenId], \"ERC721: token has been burned\");\n _tokenOwner[tokenId] = to;\n _registryTransfer(address(0), to, tokenId);\n _addTokenToOwnerEnumeration(to, tokenId);\n }\n\n function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {\n uint256 lastTokenIndex = _allTokens.length - 1;\n uint256 tokenIndex = _allTokensIndex[tokenId];\n uint256 lastTokenId = _allTokens[lastTokenIndex];\n _allTokens[tokenIndex] = lastTokenId;\n _allTokensIndex[lastTokenId] = tokenIndex;\n delete _allTokensIndex[tokenId];\n delete _allTokens[lastTokenIndex];\n _allTokens.pop();\n }\n\n /**\n * @dev Remove a token from managed list of tokens.\n * @param from Address of token owner for which to remove the token.\n * @param tokenId Id of token to remove.\n */\n function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {\n _removeTokenFromAllTokensEnumeration(tokenId);\n _ownedTokensCount[from]--;\n uint256 lastTokenIndex = _ownedTokensCount[from];\n uint256 tokenIndex = _ownedTokensIndex[tokenId];\n if (tokenIndex != lastTokenIndex) {\n uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];\n _ownedTokens[from][tokenIndex] = lastTokenId;\n _ownedTokensIndex[lastTokenId] = tokenIndex;\n }\n if (lastTokenIndex == 0) {\n delete _ownedTokens[from];\n } else {\n delete _ownedTokens[from][lastTokenIndex];\n _ownedTokens[from].pop();\n }\n }\n\n /**\n * @dev Primary private function that handles the transfer/mint/burn functionality.\n * @param from Address from where token is being transferred. Zero address means it is being minted.\n * @param to Address to whom the token is being transferred. Zero address means it is being burned.\n * @param tokenId Id of token that is being transferred/minted/burned.\n */\n function _transferFrom(address from, address to, uint256 tokenId) private {\n require(_tokenOwner[tokenId] == from, \"ERC721: token not owned\");\n require(to != address(0), \"ERC721: use burn instead\");\n _clearApproval(tokenId);\n _tokenOwner[tokenId] = to;\n _registryTransfer(from, to, tokenId);\n _removeTokenFromOwnerEnumeration(from, tokenId);\n _addTokenToOwnerEnumeration(to, tokenId);\n }\n\n function _chain() private view returns (uint32) {\n uint32 currentChain = HolographInterface(HolographerInterface(payable(address(this))).getHolograph())\n .getHolographChainId();\n if (currentChain != HolographerInterface(payable(address(this))).getOriginChain()) {\n return currentChain;\n }\n return uint32(0);\n }\n\n /**\n * @notice Checks if the token owner exists.\n * @dev If the address is the zero address no owner exists.\n * @param tokenId The affected token.\n * @return bool True if it exists.\n */\n function _exists(uint256 tokenId) private view returns (bool) {\n address tokenOwner = _tokenOwner[tokenId];\n return tokenOwner != address(0);\n }\n\n function _sourceApproved(address _tokenWallet, address _tokenSpender) internal view returns (bool approved) {\n if (_isEventRegistered(HolographERC721Event.onIsApprovedForAll)) {\n HolographedERC721 sourceContract;\n assembly {\n sourceContract := sload(_sourceContractSlot)\n }\n if (sourceContract.onIsApprovedForAll(_tokenWallet, _tokenSpender)) {\n approved = true;\n }\n }\n }\n\n /**\n * @notice Checks if the address is an approved one.\n * @dev Uses inlined checks for different usecases of approval.\n * @param spender Address of the spender.\n * @param tokenId The affected token.\n * @return bool True if approved.\n */\n function _isApproved(address spender, uint256 tokenId) private view returns (bool) {\n require(_exists(tokenId), \"ERC721: token does not exist\");\n address tokenOwner = _tokenOwner[tokenId];\n return (spender == tokenOwner ||\n _tokenApprovals[tokenId] == spender ||\n _operatorApprovals[tokenOwner][spender] ||\n _sourceApproved(tokenOwner, spender));\n }\n\n function _isApprovedStrict(address spender, uint256 tokenId) private view returns (bool) {\n require(_exists(tokenId), \"ERC721: token does not exist\");\n address tokenOwner = _tokenOwner[tokenId];\n return (spender == tokenOwner || _operatorApprovals[tokenOwner][spender] || _sourceApproved(tokenOwner, spender));\n }\n\n function _isContract(address contractAddress) private view returns (bool) {\n bytes32 codehash;\n assembly {\n codehash := extcodehash(contractAddress)\n }\n return (codehash != 0x0 && codehash != 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470);\n }\n\n /**\n * @dev Get the interfaces contract address.\n */\n function _interfaces() private view returns (address) {\n return _holograph().getInterfaces();\n }\n\n function owner() public view override returns (address) {\n assembly {\n calldatacopy(0, 0, calldatasize())\n mstore(calldatasize(), caller())\n let result := staticcall(gas(), sload(_sourceContractSlot), 0, add(calldatasize(), 0x20), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n function _holograph() private view returns (HolographInterface holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n /**\n * @dev Get the bridge contract address.\n */\n function _royalties() private view returns (address) {\n return\n HolographRegistryInterface(_holograph().getRegistry()).getContractTypeAddress(\n // \"HolographRoyalties\" front zero padded to be 32 bytes\n 0x0000000000000000000000000000486f6c6f6772617068526f79616c74696573\n );\n }\n\n function _registryTransfer(address _from, address _to, uint256 _tokenId) private {\n emit Transfer(_from, _to, _tokenId);\n HolographRegistryInterface(_holograph().getRegistry()).holographableEvent(\n abi.encode(\n // keccak256(\"TransferERC721(address,address,uint256)\")\n bytes32(0x351b8d13789e4d8d2717631559251955685881a31494dd0b8b19b4ef8530bb6d),\n _from,\n _to,\n _tokenId\n )\n );\n }\n\n /**\n * @dev Purposefully left empty, to prevent running out of gas errors when receiving native token payments.\n */\n event FundsReceived(address indexed source, uint256 amount);\n\n receive() external payable {\n emit FundsReceived(msg.sender, msg.value);\n }\n\n /**\n * @notice Fallback to the source contract.\n * @dev Any function call that is not covered here, will automatically be sent over to the source contract.\n */\n fallback() external payable {\n // Check if royalties support the function, send there, otherwise revert to source\n address _target;\n if (HolographInterfacesInterface(_interfaces()).supportsInterface(InterfaceType.ROYALTIES, msg.sig)) {\n _target = _royalties();\n assembly {\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), _target, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n } else {\n assembly {\n calldatacopy(0, 0, calldatasize())\n mstore(calldatasize(), caller())\n let result := call(gas(), sload(_sourceContractSlot), callvalue(), 0, add(calldatasize(), 0x20), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n }\n\n /*\n * @dev all calls to source contract go through this function in order to inject original msg.sender in calldata\n */\n function _sourceCall(bytes memory payload) private returns (bool output) {\n assembly {\n mstore(add(payload, add(mload(payload), 0x20)), caller())\n // offset memory position by 32 bytes to skip the 32 bytes where bytes length is stored\n // add 32 bytes to bytes length to include the appended msg.sender to calldata\n let result := call(\n gas(),\n sload(_sourceContractSlot),\n callvalue(),\n add(payload, 0x20),\n add(mload(payload), 0x20),\n 0,\n 0\n )\n let pos := mload(0x40)\n // reserve memory space for return data\n mstore(0x40, add(pos, returndatasize()))\n returndatacopy(pos, 0, returndatasize())\n switch result\n case 0 {\n revert(pos, returndatasize())\n }\n output := mload(pos)\n }\n }\n\n function _isEventRegistered(HolographERC721Event _eventName) private view returns (bool) {\n return ((_eventConfig >> uint256(_eventName)) & uint256(1) == 1 ? true : false);\n }\n}\n" + }, + "contracts/enforcer/HolographGeneric.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\nimport \"../abstract/Owner.sol\";\n\nimport \"../enum/HolographGenericEvent.sol\";\nimport \"../enum/InterfaceType.sol\";\n\nimport \"../interface/HolographGenericInterface.sol\";\nimport \"../interface/ERC165.sol\";\nimport \"../interface/Holographable.sol\";\nimport \"../interface/HolographedGeneric.sol\";\nimport \"../interface/HolographInterface.sol\";\nimport \"../interface/InitializableInterface.sol\";\nimport \"../interface/HolographInterfacesInterface.sol\";\nimport \"../interface/Ownable.sol\";\n\n/**\n * @title Holograph Bridgeable Generic Contract\n * @author Holograph Foundation\n * @notice A smart contract for creating custom bridgeable logic.\n * @dev The entire logic and functionality of the smart contract is self-contained.\n */\ncontract HolographGeneric is Admin, Owner, Initializable, HolographGenericInterface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\n */\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.sourceContract')) - 1)\n */\n bytes32 constant _sourceContractSlot = 0x27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b074;\n\n /**\n * @dev Configuration for events to trigger for source smart contract.\n */\n uint256 private _eventConfig;\n\n /**\n * @notice Only allow calls from bridge smart contract.\n */\n modifier onlyBridge() {\n require(msg.sender == _holograph().getBridge(), \"GENERIC: bridge only call\");\n _;\n }\n\n /**\n * @notice Only allow calls from source smart contract.\n */\n modifier onlySource() {\n address sourceContract;\n assembly {\n sourceContract := sload(_sourceContractSlot)\n }\n require(msg.sender == sourceContract, \"GENERIC: source only call\");\n _;\n }\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"GENERIC: already initialized\");\n InitializableInterface sourceContract;\n assembly {\n sstore(_ownerSlot, caller())\n sourceContract := sload(_sourceContractSlot)\n }\n (uint256 eventConfig, bool skipInit, bytes memory initCode) = abi.decode(initPayload, (uint256, bool, bytes));\n _eventConfig = eventConfig;\n if (!skipInit) {\n require(sourceContract.init(initCode) == InitializableInterface.init.selector, \"GENERIC: could not init source\");\n }\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @dev Allows for source smart contract to withdraw contract balance.\n */\n function sourceTransfer(address payable destination, uint256 amount) external onlySource {\n destination.transfer(amount);\n }\n\n /**\n * @dev Allows for source smart contract to make calls to external contracts\n */\n function sourceExternalCall(address target, bytes calldata data) external onlySource {\n assembly {\n calldatacopy(0, data.offset, data.length)\n let result := call(gas(), target, callvalue(), 0, data.length, 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @dev Purposefully left empty, to prevent running out of gas errors when receiving native token payments.\n */\n receive() external payable {}\n\n /**\n * @notice Fallback to the source contract.\n * @dev Any function call that is not covered here, will automatically be sent over to the source contract.\n */\n fallback() external payable {\n assembly {\n calldatacopy(0, 0, calldatasize())\n mstore(calldatasize(), caller())\n let result := call(gas(), sload(_sourceContractSlot), callvalue(), 0, add(calldatasize(), 0x20), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n function _sourceCall(bytes memory payload) private returns (bool output) {\n assembly {\n let pos := mload(0x40)\n mstore(0x40, add(pos, 0x20))\n mstore(add(payload, add(mload(payload), 0x20)), caller())\n // offset memory position by 32 bytes to skip the 32 bytes where bytes length is stored\n // add 32 bytes to bytes length to include the appended msg.sender to calldata\n let result := call(\n gas(),\n sload(_sourceContractSlot),\n callvalue(),\n add(payload, 0x20),\n add(mload(payload), 0x20),\n 0,\n 0\n )\n returndatacopy(pos, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n output := mload(pos)\n }\n }\n\n /**\n * @dev Although EIP-165 is not required for ERC20 contracts, we still decided to implement it.\n *\n * This makes it easier for external smart contracts to easily identify a valid ERC20 token contract.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool) {\n HolographInterfacesInterface interfaces = HolographInterfacesInterface(_interfaces());\n ERC165 erc165Contract;\n assembly {\n erc165Contract := sload(_sourceContractSlot)\n }\n if (\n interfaces.supportsInterface(InterfaceType.GENERIC, interfaceId) || erc165Contract.supportsInterface(interfaceId) // check global interfaces // check if source supports interface\n ) {\n return true;\n } else {\n return false;\n }\n }\n\n function bridgeIn(uint32 fromChain, bytes calldata payload) external onlyBridge returns (bytes4) {\n if (_isEventRegistered(HolographGenericEvent.bridgeIn)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedGeneric.bridgeIn.selector, fromChain, payload)),\n \"HOLOGRAPH: bridge in failed\"\n );\n }\n return Holographable.bridgeIn.selector;\n }\n\n function bridgeOut(\n uint32 toChain,\n address sender,\n bytes calldata payload\n ) external onlyBridge returns (bytes4 selector, bytes memory data) {\n if (_isEventRegistered(HolographGenericEvent.bridgeOut)) {\n bytes memory sourcePayload = abi.encodeWithSelector(\n HolographedGeneric.bridgeOut.selector,\n toChain,\n sender,\n payload\n );\n assembly {\n // it is important to add 32 bytes in order to accommodate the first 32 bytes being used for storing length of bytes\n mstore(add(sourcePayload, add(mload(sourcePayload), 0x20)), caller())\n let result := call(\n gas(),\n sload(_sourceContractSlot),\n callvalue(),\n // start reading data from memory position, plus 32 bytes, to skip bytes length indicator\n add(sourcePayload, 0x20),\n // add an additional 32 bytes to bytes length to include the appended caller address\n add(mload(sourcePayload), 0x20),\n 0,\n 0\n )\n // when reading back data, skip the first 32 bytes which is used to indicate bytes position in calldata\n // also subtract 32 bytes from returndatasize to accomodate the skipped first 32 bytes\n returndatacopy(data, 0x20, sub(returndatasize(), 0x20))\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n }\n }\n return (Holographable.bridgeOut.selector, data);\n }\n\n /**\n * @dev Allows for source smart contract to emit events.\n */\n function sourceEmit(bytes calldata eventData) external onlySource {\n assembly {\n calldatacopy(0, eventData.offset, eventData.length)\n log0(0, eventData.length)\n }\n }\n\n function sourceEmit(bytes32 eventId, bytes calldata eventData) external onlySource {\n assembly {\n calldatacopy(0, eventData.offset, eventData.length)\n log1(0, eventData.length, eventId)\n }\n }\n\n function sourceEmit(bytes32 eventId, bytes32 topic1, bytes calldata eventData) external onlySource {\n assembly {\n calldatacopy(0, eventData.offset, eventData.length)\n log2(0, eventData.length, eventId, topic1)\n }\n }\n\n function sourceEmit(bytes32 eventId, bytes32 topic1, bytes32 topic2, bytes calldata eventData) external onlySource {\n assembly {\n calldatacopy(0, eventData.offset, eventData.length)\n log3(0, eventData.length, eventId, topic1, topic2)\n }\n }\n\n function sourceEmit(\n bytes32 eventId,\n bytes32 topic1,\n bytes32 topic2,\n bytes32 topic3,\n bytes calldata eventData\n ) external onlySource {\n assembly {\n calldatacopy(0, eventData.offset, eventData.length)\n log4(0, eventData.length, eventId, topic1, topic2, topic3)\n }\n }\n\n /**\n * @dev Get the source smart contract as bridgeable interface.\n */\n function SourceGeneric() private view returns (HolographedGeneric sourceContract) {\n assembly {\n sourceContract := sload(_sourceContractSlot)\n }\n }\n\n /**\n * @dev Get the interfaces contract address.\n */\n function _interfaces() private view returns (address) {\n return _holograph().getInterfaces();\n }\n\n function owner() public view override returns (address) {\n Ownable ownableContract;\n assembly {\n ownableContract := sload(_sourceContractSlot)\n }\n return ownableContract.owner();\n }\n\n function _holograph() private view returns (HolographInterface holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n function _isEventRegistered(HolographGenericEvent _eventName) private view returns (bool) {\n return ((_eventConfig >> uint256(_eventName)) & uint256(1) == 1 ? true : false);\n }\n}\n" + }, + "contracts/enforcer/HolographRoyalties.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\nimport \"../abstract/Owner.sol\";\n\nimport \"../interface/ERC20.sol\";\nimport \"../interface/HolographerInterface.sol\";\nimport \"../interface/InitializableInterface.sol\";\nimport \"../interface/HolographRoyaltiesInterface.sol\";\n\nimport \"../struct/ZoraBidShares.sol\";\n\n/**\n * @title HolographRoyalties\n * @author Holograph Foundation\n * @notice A smart contract for providing royalty info, collecting royalties, and distributing it to configured payout wallets.\n * @dev This smart contract is not intended to be used directly. Apply it to any of your ERC721 or ERC1155 smart contracts through a delegatecall fallback.\n */\ncontract HolographRoyalties is Admin, Owner, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.ROYALTIES.defaultBp')) - 1)\n */\n bytes32 constant _defaultBpSlot = 0xff29fcf645501423fd56e0287670f6813a1e5db5cf706428bc8516381e7ffe81;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.ROYALTIES.defaultReceiver')) - 1)\n */\n bytes32 constant _defaultReceiverSlot = 0x00b381815b89a20a37ee91e8a0119be5e16f6d1668377e7ae457213a74a415bb;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.ROYALTIES.initialized')) - 1)\n */\n bytes32 constant _initializedPaidSlot = 0x91428d26cb4818e4e627ebb64c06b5a67b82f313516b5c903cf07a00681c95f6;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.ROYALTIES.payout.addresses')) - 1)\n */\n bytes32 constant _payoutAddressesSlot = 0xf31f2a3a453a7aa2f3054423a8c5474ac9817ea457b458152967bbcb12ed6a43;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.ROYALTIES.payout.bps')) - 1)\n */\n bytes32 constant _payoutBpsSlot = 0xa4023567d5b5f01c63e00d90785d7cd4ff057a237ad185c5ecade8f4059fb61a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.ROYALTIES.extendedCall')) - 1)\n * @dev extendedCall is an init config used to determine if payouts should be sent via a call or a transfer.\n */\n bytes32 constant _extendedCallSlot = 0x254926eafdecb56f669f96a3a752fbca17becd902481431df613768b1f903fa3;\n\n string constant _bpString = \"eip1967.Holograph.ROYALTIES.bp\";\n string constant _receiverString = \"eip1967.Holograph.ROYALTIES.receiver\";\n string constant _tokenAddressString = \"eip1967.Holograph.ROYALTIES.tokenAddress\";\n\n /**\n * @notice Event emitted when setting/updating royalty info/fees. This is used by Rarible V1.\n * @dev Emits event in order to comply with Rarible V1 royalty spec.\n * @param tokenId Specific token id for which royalty info is being set, set as 0 for all tokens inside of the smart contract.\n * @param recipients Address array of wallets that will receive tha royalties.\n * @param bps Uint256 array of base points(percentages) that each wallet(specified in recipients) will receive from the royalty payouts.\n * Make sure that all the base points add up to a total of 10000.\n */\n event SecondarySaleFees(uint256 tokenId, address[] recipients, uint256[] bps);\n\n /**\n * @dev Use this modifier to lock public functions that should not be accesible to non-owners.\n */\n modifier onlyOwner() override {\n require(isOwner(), \"ROYALTIES: caller not an owner\");\n _;\n }\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"ROYALTIES: already initialized\");\n assembly {\n sstore(_adminSlot, caller())\n sstore(_ownerSlot, caller())\n }\n uint256 bp = abi.decode(initPayload, (uint256));\n setRoyalties(0, payable(address(this)), bp);\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n function initHolographRoyalties(bytes memory initPayload) external returns (bytes4) {\n uint256 initialized;\n assembly {\n initialized := sload(_initializedPaidSlot)\n }\n require(initialized == 0, \"ROYALTIES: already initialized\");\n (uint256 bp, uint256 useExtenededCall) = abi.decode(initPayload, (uint256, uint256));\n if (useExtenededCall > 0) {\n useExtenededCall = 1;\n }\n assembly {\n sstore(_extendedCallSlot, useExtenededCall)\n }\n setRoyalties(0, payable(address(this)), bp);\n address payable[] memory addresses = new address payable[](1);\n addresses[0] = payable(Owner(HolographerInterface(address(this)).getSourceContract()).owner());\n uint256[] memory bps = new uint256[](1);\n bps[0] = 10000;\n _setPayoutAddresses(addresses);\n _setPayoutBps(bps);\n initialized = 1;\n assembly {\n sstore(_initializedPaidSlot, initialized)\n }\n return InitializableInterface.init.selector;\n }\n\n /**\n * @notice Check if message sender is a legitimate owner of the smart contract\n * @dev We check owner, admin, and identity for a more comprehensive coverage.\n * @return Returns true is message sender is an owner.\n */\n function isOwner() private view returns (bool) {\n return (msg.sender == getOwner() ||\n msg.sender == getAdmin() ||\n msg.sender == Owner(HolographerInterface(address(this)).getSourceContract()).owner());\n }\n\n /**\n * @dev This is here in place to prevent reverts in case contract is used outside of the protocol.\n */\n function getSourceContract() external view returns (address sourceContract) {\n sourceContract = address(this);\n }\n\n /**\n * @dev Gets the default royalty payment receiver address from storage slot.\n * @return receiver Wallet or smart contract that will receive the initial royalty payouts.\n */\n function _getDefaultReceiver() private view returns (address payable receiver) {\n assembly {\n receiver := sload(_defaultReceiverSlot)\n }\n }\n\n /**\n * @dev Sets the default royalty payment receiver address to storage slot.\n * @param receiver Wallet or smart contract that will receive the initial royalty payouts.\n */\n function _setDefaultReceiver(address receiver) private {\n assembly {\n sstore(_defaultReceiverSlot, receiver)\n }\n }\n\n /**\n * @dev Gets the default royalty base points(percentage) from storage slot.\n * @return bp Royalty base points(percentage) for royalty payouts.\n */\n function _getDefaultBp() private view returns (uint256 bp) {\n assembly {\n bp := sload(_defaultBpSlot)\n }\n }\n\n /**\n * @dev Sets the default royalty base points(percentage) to storage slot.\n * @param bp Uint256 of royalty percentage, provided in base points format.\n */\n function _setDefaultBp(uint256 bp) private {\n assembly {\n sstore(_defaultBpSlot, bp)\n }\n }\n\n /**\n * @dev Gets the royalty payment receiver address, for a particular token id, from storage slot.\n * @return receiver Wallet or smart contract that will receive the royalty payouts for a particular token id.\n */\n function _getReceiver(uint256 tokenId) private view returns (address payable receiver) {\n bytes32 slot = bytes32(uint256(keccak256(abi.encodePacked(_receiverString, tokenId))) - 1);\n assembly {\n receiver := sload(slot)\n }\n }\n\n /**\n * @dev Sets the royalty payment receiver address, for a particular token id, to storage slot.\n * @param tokenId Uint256 of the token id to set the receiver for.\n * @param receiver Wallet or smart contract that will receive the royalty payouts for a particular token id.\n */\n function _setReceiver(uint256 tokenId, address receiver) private {\n bytes32 slot = bytes32(uint256(keccak256(abi.encodePacked(_receiverString, tokenId))) - 1);\n assembly {\n sstore(slot, receiver)\n }\n }\n\n /**\n * @dev Gets the royalty base points(percentage), for a particular token id, from storage slot.\n * @return bp Royalty base points(percentage) for the royalty payouts of a specific token id.\n */\n function _getBp(uint256 tokenId) private view returns (uint256 bp) {\n bytes32 slot = bytes32(uint256(keccak256(abi.encodePacked(_bpString, tokenId))) - 1);\n assembly {\n bp := sload(slot)\n }\n }\n\n /**\n * @dev Sets the royalty base points(percentage), for a particular token id, to storage slot.\n * @param tokenId Uint256 of the token id to set the base points for.\n * @param bp Uint256 of royalty percentage, provided in base points format, for a particular token id.\n */\n function _setBp(uint256 tokenId, uint256 bp) private {\n bytes32 slot = bytes32(uint256(keccak256(abi.encodePacked(_bpString, tokenId))) - 1);\n assembly {\n sstore(slot, bp)\n }\n }\n\n function _getPayoutAddresses() private view returns (address payable[] memory addresses) {\n // The slot hash has been precomputed for gas optimizaion\n bytes32 slot = _payoutAddressesSlot;\n uint256 length;\n assembly {\n length := sload(slot)\n }\n addresses = new address payable[](length);\n address payable value;\n for (uint256 i = 0; i < length; i++) {\n slot = keccak256(abi.encodePacked(i, slot));\n assembly {\n value := sload(slot)\n }\n addresses[i] = value;\n }\n }\n\n function _setPayoutAddresses(address payable[] memory addresses) private {\n bytes32 slot = _payoutAddressesSlot;\n uint256 length = addresses.length;\n assembly {\n sstore(slot, length)\n }\n address payable value;\n for (uint256 i = 0; i < length; i++) {\n slot = keccak256(abi.encodePacked(i, slot));\n value = addresses[i];\n assembly {\n sstore(slot, value)\n }\n }\n }\n\n function _getPayoutBps() private view returns (uint256[] memory bps) {\n bytes32 slot = _payoutBpsSlot;\n uint256 length;\n assembly {\n length := sload(slot)\n }\n bps = new uint256[](length);\n uint256 value;\n for (uint256 i = 0; i < length; i++) {\n slot = keccak256(abi.encodePacked(i, slot));\n assembly {\n value := sload(slot)\n }\n bps[i] = value;\n }\n }\n\n function _setPayoutBps(uint256[] memory bps) private {\n bytes32 slot = _payoutBpsSlot;\n uint256 length = bps.length;\n assembly {\n sstore(slot, length)\n }\n uint256 value;\n for (uint256 i = 0; i < length; i++) {\n slot = keccak256(abi.encodePacked(i, slot));\n value = bps[i];\n assembly {\n sstore(slot, value)\n }\n }\n }\n\n function _getTokenAddress(string memory tokenName) private view returns (address tokenAddress) {\n bytes32 slot = bytes32(uint256(keccak256(abi.encodePacked(_tokenAddressString, tokenName))) - 1);\n assembly {\n tokenAddress := sload(slot)\n }\n }\n\n function _setTokenAddress(string memory tokenName, address tokenAddress) private {\n bytes32 slot = bytes32(uint256(keccak256(abi.encodePacked(_tokenAddressString, tokenName))) - 1);\n assembly {\n sstore(slot, tokenAddress)\n }\n }\n\n /**\n * @dev Private function that transfers ETH to all payout recipients.\n * @dev This contract is designed primarily to capture royalties, but is limited in payout logic.\n * @dev This function uses a push payment model, where the contract pushes the ETH to the recipients.\n * @dev The design is intended so that royalty distribution logic can be handled externally via payment distribution contracts.\n * @dev The recommended usage for royalty structures that require more complex payout logic to multiple recipients is to\n * set 100% ownership payout with the recipient being the payment distribution contract.\n */\n function _payoutEth() private {\n address payable[] memory addresses = _getPayoutAddresses();\n uint256[] memory bps = _getPayoutBps();\n uint256 length = addresses.length;\n uint256 balance = address(this).balance;\n uint256 sending;\n bool extendedCall;\n assembly {\n extendedCall := sload(_extendedCallSlot)\n }\n for (uint256 i = 0; i < length; i++) {\n sending = ((bps[i] * balance) / 10000);\n // only send value if it is greater than 0\n if (sending > 0) {\n // If the contract enabled extended call on init then use call to transfer, otherwise use transfer\n if (extendedCall == true) {\n (bool success, ) = addresses[i].call{value: sending}(\"\");\n require(success, \"ROYALTIES: Transfer failed\");\n } else {\n addresses[i].transfer(sending);\n }\n }\n }\n }\n\n /**\n * @dev Private function that transfers tokens to all payout recipients.\n * @dev ERC20 tokens that use fee on transfer are not supported.\n * @dev This contract is designed primarily to capture royalties, but is limited in payout logic.\n * @dev This function uses a push payment model, where the contract pushes the ETH to the recipients.\n * @dev The design is intended so that royalty distribution logic can be handled externally via payment distribution contracts.\n * @dev The recommended usage for royalty structures that require more complex payout logic to multiple recipients is to\n * set 100% ownership payout with the recipient being the payment distribution contract.\n *\n * @param tokenAddress Smart contract address of ERC20 token.\n */\n function _payoutToken(address tokenAddress) private {\n address payable[] memory addresses = _getPayoutAddresses();\n uint256[] memory bps = _getPayoutBps();\n uint256 length = addresses.length;\n ERC20 erc20 = ERC20(tokenAddress);\n uint256 balance = erc20.balanceOf(address(this));\n uint256 sending;\n for (uint256 i = 0; i < length; i++) {\n sending = ((bps[i] * balance) / 10000);\n // Some tokens revert when transferring a zero value amount this check ensures if one recipient's\n // amount is zero, the transfer will still succeed for the other recipients.\n if (sending > 0) {\n require(\n _callOptionalReturn(\n tokenAddress,\n erc20.transfer.selector,\n abi.encode(address(addresses[i]), uint256(sending))\n ),\n \"ROYALTIES: ERC20 transfer failed\"\n );\n }\n }\n }\n\n /**\n * @dev Private function that transfers multiple tokens to all payout recipients.\n * @dev Try to use _payoutToken and handle each token individually.\n * @dev ERC20 tokens that use fee on transfer are not supported.\n * @dev This contract is designed primarily to capture royalties, but is limited in payout logic.\n * @dev This function uses a push payment model, where the contract pushes the ETH to the recipients.\n * @dev The design is intended so that royalty distribution logic can be handled externally via payment distribution contracts.\n * @dev The recommended usage for royalty structures that require more complex payout logic to multiple recipients is to\n * set 100% ownership payout with the recipient being the payment distribution contract.\n *\n * @param tokenAddresses Array of smart contract addresses of ERC20 tokens.\n */\n function _payoutTokens(address[] memory tokenAddresses) private {\n address payable[] memory addresses = _getPayoutAddresses();\n uint256[] memory bps = _getPayoutBps();\n ERC20 erc20;\n uint256 balance;\n uint256 sending;\n for (uint256 t = 0; t < tokenAddresses.length; t++) {\n erc20 = ERC20(tokenAddresses[t]);\n balance = erc20.balanceOf(address(this));\n for (uint256 i = 0; i < addresses.length; i++) {\n sending = ((bps[i] * balance) / 10000);\n // Some tokens revert when transferring a zero value amount this check ensures if one recipient's\n // amount is zero, the transfer will still succeed for the other recipients.\n if (sending > 0) {\n require(\n _callOptionalReturn(\n tokenAddresses[t],\n erc20.transfer.selector,\n abi.encode(address(addresses[i]), uint256(sending))\n ),\n \"ROYALTIES: ERC20 transfer failed\"\n );\n }\n }\n }\n }\n\n /**\n * @dev This function validates that the call is being made by an authorised wallet.\n * @dev Will revert entire tranaction if it fails.\n */\n function _validatePayoutRequestor() private view {\n if (!isOwner()) {\n bool matched;\n address payable[] memory addresses = _getPayoutAddresses();\n address payable sender = payable(msg.sender);\n for (uint256 i = 0; i < addresses.length; i++) {\n if (addresses[i] == sender) {\n matched = true;\n break;\n }\n }\n require(matched, \"ROYALTIES: sender not authorized\");\n }\n }\n\n /**\n * @notice Set the wallets and percentages for royalty payouts.\n * Limited to 10 wallets to prevent out of gas errors.\n * For more complex royalty structures, set 100% ownership payout with the recipient being the payment distribution contract.\n * @dev Function can only we called by owner, admin, or identity wallet.\n * @dev Addresses and bps arrays must be equal length. Bps values added together must equal 10000 exactly.\n * @param addresses An array of all the addresses that will be receiving royalty payouts.\n * @param bps An array of the percentages that each address will receive from the royalty payouts.\n */\n function configurePayouts(address payable[] memory addresses, uint256[] memory bps) public onlyOwner {\n require(addresses.length == bps.length, \"ROYALTIES: missmatched lenghts\");\n require(addresses.length <= 10, \"ROYALTIES: max 10 addresses\");\n uint256 totalBp;\n for (uint256 i = 0; i < addresses.length; i++) {\n require(addresses[i] != address(0), \"ROYALTIES: payee is zero address\");\n require(bps[i] > 0, \"ROYALTIES: bp is zero\");\n totalBp = totalBp + bps[i];\n }\n require(totalBp == 10000, \"ROYALTIES: bps must equal 10000\");\n _setPayoutAddresses(addresses);\n _setPayoutBps(bps);\n }\n\n /**\n * @notice Show the wallets and percentages of payout recipients.\n * @dev These are the recipients that will be getting royalty payouts.\n * @return addresses An array of all the addresses that will be receiving royalty payouts.\n * @return bps An array of the percentages that each address will receive from the royalty payouts.\n */\n function getPayoutInfo() public view returns (address payable[] memory addresses, uint256[] memory bps) {\n addresses = _getPayoutAddresses();\n bps = _getPayoutBps();\n }\n\n /**\n * @notice Get payout of all ETH in smart contract.\n * @dev Distribute all the ETH(minus gas fees) to payout recipients.\n */\n function getEthPayout() public {\n _validatePayoutRequestor();\n _payoutEth();\n }\n\n /**\n * @notice Get payout for a specific token address. Token must have a positive balance!\n * @dev Contract owner, admin, identity wallet, and payout recipients can call this function.\n * @param tokenAddress An address of the token for which to issue payouts for.\n */\n function getTokenPayout(address tokenAddress) public {\n _validatePayoutRequestor();\n _payoutToken(tokenAddress);\n }\n\n /**\n * @notice Get payouts for tokens listed by address. Tokens must have a positive balance!\n * @dev Each token balance must be equal or greater than 10000. Otherwise calculating BP is difficult.\n * @param tokenAddresses An address array of tokens to issue payouts for.\n */\n function getTokensPayout(address[] memory tokenAddresses) public {\n _validatePayoutRequestor();\n _payoutTokens(tokenAddresses);\n }\n\n /**\n * @notice Set the royalty information for entire contract, or a specific token.\n * @dev Take great care to not make this function accessible by other public functions in your overlying smart contract.\n * @param tokenId Set a specific token id, or leave at 0 to set as default parameters.\n * @param receiver Wallet or smart contract that will receive the royalty payouts.\n * @param bp Uint256 of royalty percentage, provided in base points format.\n */\n function setRoyalties(uint256 tokenId, address payable receiver, uint256 bp) public onlyOwner {\n require(receiver != address(0), \"ROYALTIES: receiver is zero address\");\n require(bp <= 10000, \"ROYALTIES: base points over 100%\");\n if (tokenId == 0) {\n _setDefaultReceiver(receiver);\n _setDefaultBp(bp);\n } else {\n _setReceiver(tokenId, receiver);\n _setBp(tokenId, bp);\n }\n address[] memory receivers = new address[](1);\n receivers[0] = address(receiver);\n uint256[] memory bps = new uint256[](1);\n bps[0] = bp;\n emit SecondarySaleFees(tokenId, receivers, bps);\n }\n\n // IEIP2981\n function royaltyInfo(uint256 tokenId, uint256 value) public view returns (address, uint256) {\n if (_getReceiver(tokenId) == address(0)) {\n return (_getDefaultReceiver(), (_getDefaultBp() * value) / 10000);\n } else {\n return (_getReceiver(tokenId), (_getBp(tokenId) * value) / 10000);\n }\n }\n\n // Rarible V1\n function getFeeBps(uint256 tokenId) public view returns (uint256[] memory) {\n uint256[] memory bps = new uint256[](1);\n if (_getReceiver(tokenId) == address(0)) {\n bps[0] = _getDefaultBp();\n } else {\n bps[0] = _getBp(tokenId);\n }\n return bps;\n }\n\n // Rarible V1\n function getFeeRecipients(uint256 tokenId) public view returns (address payable[] memory) {\n address payable[] memory receivers = new address payable[](1);\n if (_getReceiver(tokenId) == address(0)) {\n receivers[0] = _getDefaultReceiver();\n } else {\n receivers[0] = _getReceiver(tokenId);\n }\n return receivers;\n }\n\n // Rarible V2(not being used since it creates a conflict with Manifold royalties)\n // struct Part {\n // address payable account;\n // uint96 value;\n // }\n\n // function getRoyalties(uint256 tokenId) public view returns (Part[] memory) {\n // return royalties[id];\n // }\n\n // Manifold\n function getRoyalties(uint256 tokenId) public view returns (address payable[] memory, uint256[] memory) {\n address payable[] memory receivers = new address payable[](1);\n uint256[] memory bps = new uint256[](1);\n if (_getReceiver(tokenId) == address(0)) {\n receivers[0] = _getDefaultReceiver();\n bps[0] = _getDefaultBp();\n } else {\n receivers[0] = _getReceiver(tokenId);\n bps[0] = _getBp(tokenId);\n }\n return (receivers, bps);\n }\n\n // Foundation\n function getFees(uint256 tokenId) public view returns (address payable[] memory, uint256[] memory) {\n address payable[] memory receivers = new address payable[](1);\n uint256[] memory bps = new uint256[](1);\n if (_getReceiver(tokenId) == address(0)) {\n receivers[0] = _getDefaultReceiver();\n bps[0] = _getDefaultBp();\n } else {\n receivers[0] = _getReceiver(tokenId);\n bps[0] = _getBp(tokenId);\n }\n return (receivers, bps);\n }\n\n // SuperRare\n // Hint taken from Manifold's RoyaltyEngine(https://github.com/manifoldxyz/royalty-registry-solidity/blob/main/contracts/RoyaltyEngineV1.sol)\n // To be quite honest, SuperRare is a closed marketplace. They're working on opening it up but looks like they want to use private smart contracts.\n // We'll just leave this here for just in case they open the flood gates.\n function tokenCreator(\n address,\n /* contractAddress*/\n uint256 tokenId\n ) public view returns (address) {\n address receiver = _getReceiver(tokenId);\n if (receiver == address(0)) {\n return _getDefaultReceiver();\n }\n return receiver;\n }\n\n // SuperRare\n function calculateRoyaltyFee(\n address,\n /* contractAddress */\n uint256 tokenId,\n uint256 amount\n ) public view returns (uint256) {\n if (_getReceiver(tokenId) == address(0)) {\n return (_getDefaultBp() * amount) / 10000;\n } else {\n return (_getBp(tokenId) * amount) / 10000;\n }\n }\n\n // Holograph\n // we indicate that this contract operates market functions\n function marketContract() public view returns (address) {\n return address(this);\n }\n\n // Holograph\n // we indicate that the receiver is the creator, to convince the smart contract to pay\n function tokenCreators(uint256 tokenId) public view returns (address) {\n address receiver = _getReceiver(tokenId);\n if (receiver == address(0)) {\n return _getDefaultReceiver();\n }\n return receiver;\n }\n\n // Holograph\n // we provide the percentage that needs to be paid out from the sale\n function bidSharesForToken(uint256 tokenId) public view returns (HolographBidShares memory bidShares) {\n // this information is outside of the scope of our\n bidShares.prevOwner.value = 0;\n bidShares.owner.value = 0;\n if (_getReceiver(tokenId) == address(0)) {\n bidShares.creator.value = _getDefaultBp() * (10 ** 16);\n } else {\n bidShares.creator.value = _getBp(tokenId) * (10 ** 16);\n }\n return bidShares;\n }\n\n /**\n * @notice Get the smart contract address of a token by common name.\n * @dev Used only to identify really major/common tokens. Avoid using due to gas usages.\n * @param tokenName The ticker symbol of the token. For example \"USDC\" or \"DAI\".\n * @return The smart contract address of the token ticker symbol. Or zero address if not found.\n */\n function getTokenAddress(string memory tokenName) public view returns (address) {\n return _getTokenAddress(tokenName);\n }\n\n /**\n * @notice Used to wrap function calls to check if they return without revert regardless of return type.\n * @dev Checks if wrapped function opcode is a revert, if it is then it reverts as well, if it's not then\n * it checks for return data, if return data exists, it is returned as a bool,\n * if return data does not exist (0 length) then success is expected and returns true\n * @return Returns true if the wrapped function call returns without a revert even if it doesn't return true.\n */\n function _callOptionalReturn(address target, bytes4 functionSignature, bytes memory payload) internal returns (bool) {\n bytes memory data = abi.encodePacked(functionSignature, payload);\n bool success = true;\n assembly {\n let result := call(gas(), target, callvalue(), add(data, 0x20), mload(data), 0, 0)\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n if gt(returndatasize(), 0) {\n returndatacopy(success, 0, 0x20)\n }\n }\n }\n return success;\n }\n}\n" + }, + "contracts/enum/ChainIdType.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nenum ChainIdType {\n UNDEFINED, // 0\n EVM, // 1\n HOLOGRAPH, // 2\n LAYERZERO, // 3\n HYPERLANE // 4\n}\n" + }, + "contracts/enum/HolographERC20Event.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nenum HolographERC20Event {\n UNDEFINED, // 0\n bridgeIn, // 1\n bridgeOut, // 2\n afterApprove, // 3\n beforeApprove, // 4\n afterOnERC20Received, // 5\n beforeOnERC20Received, // 6\n afterBurn, // 7\n beforeBurn, // 8\n afterMint, // 9\n beforeMint, // 10\n afterSafeTransfer, // 11\n beforeSafeTransfer, // 12\n afterTransfer, // 13\n beforeTransfer, // 14\n onAllowance // 15\n}\n" + }, + "contracts/enum/HolographERC721Event.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nenum HolographERC721Event {\n UNDEFINED, // 0\n bridgeIn, // 1\n bridgeOut, // 2\n afterApprove, // 3\n beforeApprove, // 4\n afterApprovalAll, // 5\n beforeApprovalAll, // 6\n afterBurn, // 7\n beforeBurn, // 8\n afterMint, // 9\n beforeMint, // 10\n afterSafeTransfer, // 11\n beforeSafeTransfer, // 12\n afterTransfer, // 13\n beforeTransfer, // 14\n beforeOnERC721Received, // 15\n afterOnERC721Received, // 16\n onIsApprovedForAll, // 17\n customContractURI // 18\n}\n" + }, + "contracts/enum/HolographGenericEvent.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nenum HolographGenericEvent {\n UNDEFINED, // 0\n bridgeIn, // 1\n bridgeOut // 2\n}\n" + }, + "contracts/enum/InterfaceType.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nenum InterfaceType {\n UNDEFINED, // 0\n ERC20, // 1\n ERC721, // 2\n ERC1155, // 3\n ROYALTIES, // 4\n GENERIC // 5\n}\n" + }, + "contracts/enum/TokenUriType.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nenum TokenUriType {\n UNDEFINED, // 0\n IPFS, // 1\n HTTPS, // 2\n ARWEAVE // 3\n}\n" + }, + "contracts/faucet/Faucet.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Initializable.sol\";\nimport \"../interface/HolographERC20Interface.sol\";\nimport \"../interface/InitializableInterface.sol\";\n\ncontract Faucet is Initializable {\n address public owner;\n HolographERC20Interface public token;\n\n uint256 public faucetDripAmount = 100 ether;\n uint256 public faucetCooldown = 24 hours;\n\n mapping(address => uint256) lastAccessTime;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"Faucet contract is already initialized\");\n (address _contractOwner, address _tokenInstance) = abi.decode(initPayload, (address, address));\n token = HolographERC20Interface(_tokenInstance);\n owner = _contractOwner;\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /// @notice Get tokens from faucet's own balance. Rate limited.\n function requestTokens() external {\n require(isAllowedToWithdraw(msg.sender), \"Come back later\");\n require(token.balanceOf(address(this)) >= faucetDripAmount, \"Faucet is empty\");\n lastAccessTime[msg.sender] = block.timestamp;\n token.transfer(msg.sender, faucetDripAmount);\n }\n\n /// @notice Update token address\n function setToken(address tokenAddress) external onlyOwner {\n token = HolographERC20Interface(tokenAddress);\n }\n\n /// @notice Grant tokens to receiver from faucet's own balance. Not rate limited.\n function grantTokens(address _address) external onlyOwner {\n require(token.balanceOf(address(this)) >= faucetDripAmount, \"Faucet is empty\");\n token.transfer(_address, faucetDripAmount);\n }\n\n function grantTokens(address _address, uint256 _amountWei) external onlyOwner {\n require(token.balanceOf(address(this)) >= _amountWei, \"Insufficient funds\");\n token.transfer(_address, _amountWei);\n }\n\n /// @notice Withdraw all funds from the faucet.\n function withdrawAllTokens(address _receiver) external onlyOwner {\n token.transfer(_receiver, token.balanceOf(address(this)));\n }\n\n /// @notice Withdraw amount of funds from the faucet. Amount is in wei.\n function withdrawTokens(address _receiver, uint256 _amountWei) external onlyOwner {\n require(token.balanceOf(address(this)) >= _amountWei, \"Insufficient funds\");\n token.transfer(_receiver, _amountWei);\n }\n\n /// @notice Configure the time between two drip requests. Time is in seconds.\n function setWithdrawCooldown(uint256 _waitTimeSeconds) external onlyOwner {\n faucetCooldown = _waitTimeSeconds;\n }\n\n /// @notice Configure the drip request amount. Amount is in wei.\n function setWithdrawAmount(uint256 _amountWei) external onlyOwner {\n faucetDripAmount = _amountWei;\n }\n\n /// @notice Check whether an address can request drip and is not on cooldown.\n function isAllowedToWithdraw(address _address) public view returns (bool) {\n if (lastAccessTime[_address] == 0) {\n return true;\n } else if (block.timestamp >= lastAccessTime[_address] + faucetCooldown) {\n return true;\n }\n return false;\n }\n\n /// @notice Get the last time the address withdrew tokens.\n function getLastAccessTime(address _address) public view returns (uint256) {\n return lastAccessTime[_address];\n }\n\n modifier onlyOwner() {\n require(msg.sender == owner, \"Caller is not the owner\");\n _;\n }\n}\n" + }, + "contracts/Holograph.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./abstract/Admin.sol\";\nimport \"./abstract/Initializable.sol\";\n\nimport \"./interface/InitializableInterface.sol\";\nimport \"./interface/HolographInterface.sol\";\n\n/**\n * @title Holograph Protocol\n * @author https://github.com/holographxyz\n * @notice This is the primary Holograph Protocol smart contract\n * @dev This contract stores a reference to all the primary modules and variables of the protocol\n */\ncontract Holograph is Admin, Initializable, HolographInterface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.bridge')) - 1)\n */\n bytes32 constant _bridgeSlot = 0xeb87cbb21687feb327e3d58c6c16d552231d12c7a0e8115042a4165fac8a77f9;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.chainId')) - 1)\n */\n bytes32 constant _chainIdSlot = 0x7651bfc11f7485d07ab2b41c1312e2007c8cb7efb0f7352a6dee4a1153eebab2;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.factory')) - 1)\n */\n bytes32 constant _factorySlot = 0xa49f20855ba576e09d13c8041c8039fa655356ea27f6c40f1ec46a4301cd5b23;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holographChainId')) - 1)\n */\n bytes32 constant _holographChainIdSlot = 0xd840a780c26e07edc6e1ee2eaa6f134ed5488dbd762614116653cee8542a3844;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.interfaces')) - 1)\n */\n bytes32 constant _interfacesSlot = 0xbd3084b8c09da87ad159c247a60e209784196be2530cecbbd8f337fdd1848827;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.operator')) - 1)\n */\n bytes32 constant _operatorSlot = 0x7caba557ad34138fa3b7e43fb574e0e6cc10481c3073e0dffbc560db81b5c60f;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\n */\n bytes32 constant _registrySlot = 0xce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.treasury')) - 1)\n */\n bytes32 constant _treasurySlot = 0x4215e7a38d75164ca078bbd61d0992cdeb1ba16f3b3ead5944966d3e4080e8b6;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.utilityToken')) - 1)\n */\n bytes32 constant _utilityTokenSlot = 0xbf76518d46db472b71aa7677a0908b8016f3dee568415ffa24055f9a670f9c37;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (\n uint32 holographChainId,\n address bridge,\n address factory,\n address interfaces,\n address operator,\n address registry,\n address treasury,\n address utilityToken\n ) = abi.decode(initPayload, (uint32, address, address, address, address, address, address, address));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_chainIdSlot, chainid())\n sstore(_holographChainIdSlot, holographChainId)\n sstore(_bridgeSlot, bridge)\n sstore(_factorySlot, factory)\n sstore(_interfacesSlot, interfaces)\n sstore(_operatorSlot, operator)\n sstore(_registrySlot, registry)\n sstore(_treasurySlot, treasury)\n sstore(_utilityTokenSlot, utilityToken)\n }\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @notice Get the address of the Holograph Bridge module\n * @dev Used for beaming holographable assets cross-chain\n */\n function getBridge() external view returns (address bridge) {\n assembly {\n bridge := sload(_bridgeSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Bridge module address\n * @param bridge address of the Holograph Bridge smart contract to use\n */\n function setBridge(address bridge) external onlyAdmin {\n assembly {\n sstore(_bridgeSlot, bridge)\n }\n }\n\n /**\n * @notice Get the chain ID that the Protocol was deployed on\n * @dev Useful for checking if/when a hard fork occurs\n */\n function getChainId() external view returns (uint256 chainId) {\n assembly {\n chainId := sload(_chainIdSlot)\n }\n }\n\n /**\n * @notice Update the chain ID\n * @dev Useful for updating once a hard fork has been mitigated\n * @param chainId EVM chain ID to use\n */\n function setChainId(uint256 chainId) external onlyAdmin {\n assembly {\n sstore(_chainIdSlot, chainId)\n }\n }\n\n /**\n * @notice Get the address of the Holograph Factory module\n * @dev Used for deploying holographable smart contracts\n */\n function getFactory() external view returns (address factory) {\n assembly {\n factory := sload(_factorySlot)\n }\n }\n\n /**\n * @notice Update the Holograph Factory module address\n * @param factory address of the Holograph Factory smart contract to use\n */\n function setFactory(address factory) external onlyAdmin {\n assembly {\n sstore(_factorySlot, factory)\n }\n }\n\n /**\n * @notice Get the Holograph chain Id\n * @dev Holograph uses an internal chain id mapping\n */\n function getHolographChainId() external view returns (uint32 holographChainId) {\n assembly {\n holographChainId := sload(_holographChainIdSlot)\n }\n }\n\n /**\n * @notice Update the Holograph chain ID\n * @dev Useful for updating once a hard fork was mitigated\n * @param holographChainId Holograph chain ID to use\n */\n function setHolographChainId(uint32 holographChainId) external onlyAdmin {\n assembly {\n sstore(_holographChainIdSlot, holographChainId)\n }\n }\n\n /**\n * @notice Get the address of the Holograph Interfaces module\n * @dev Holograph uses this contract to store data that needs to be accessed by a large portion of the modules\n */\n function getInterfaces() external view returns (address interfaces) {\n assembly {\n interfaces := sload(_interfacesSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Interfaces module address\n * @param interfaces address of the Holograph Interfaces smart contract to use\n */\n function setInterfaces(address interfaces) external onlyAdmin {\n assembly {\n sstore(_interfacesSlot, interfaces)\n }\n }\n\n /**\n * @notice Get the address of the Holograph Operator module\n * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module\n */\n function getOperator() external view returns (address operator) {\n assembly {\n operator := sload(_operatorSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Operator module address\n * @param operator address of the Holograph Operator smart contract to use\n */\n function setOperator(address operator) external onlyAdmin {\n assembly {\n sstore(_operatorSlot, operator)\n }\n }\n\n /**\n * @notice Get the Holograph Registry module\n * @dev This module stores a reference for all deployed holographable smart contracts\n */\n function getRegistry() external view returns (address registry) {\n assembly {\n registry := sload(_registrySlot)\n }\n }\n\n /**\n * @notice Update the Holograph Registry module address\n * @param registry address of the Holograph Registry smart contract to use\n */\n function setRegistry(address registry) external onlyAdmin {\n assembly {\n sstore(_registrySlot, registry)\n }\n }\n\n /**\n * @notice Get the Holograph Treasury module\n * @dev All of the Holograph Protocol assets are stored and managed by this module\n */\n function getTreasury() external view returns (address treasury) {\n assembly {\n treasury := sload(_treasurySlot)\n }\n }\n\n /**\n * @notice Update the Holograph Treasury module address\n * @param treasury address of the Holograph Treasury smart contract to use\n */\n function setTreasury(address treasury) external onlyAdmin {\n assembly {\n sstore(_treasurySlot, treasury)\n }\n }\n\n /**\n * @notice Get the Holograph Utility Token address\n * @dev This is the official utility token of the Holograph Protocol\n */\n function getUtilityToken() external view returns (address utilityToken) {\n assembly {\n utilityToken := sload(_utilityTokenSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Utility Token address\n * @param utilityToken address of the Holograph Utility Token smart contract to use\n */\n function setUtilityToken(address utilityToken) external onlyAdmin {\n assembly {\n sstore(_utilityTokenSlot, utilityToken)\n }\n }\n\n /**\n * @dev Purposefully reverts to prevent having any type of ether transfered into the contract\n */\n receive() external payable {\n revert();\n }\n\n /**\n * @dev Purposefully reverts to prevent any calls to undefined functions\n */\n fallback() external payable {\n revert();\n }\n}\n" + }, + "contracts/HolographBridge.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./abstract/Admin.sol\";\nimport \"./abstract/Initializable.sol\";\n\nimport \"./interface/HolographERC20Interface.sol\";\nimport \"./interface/Holographable.sol\";\nimport \"./interface/HolographInterface.sol\";\nimport \"./interface/HolographBridgeInterface.sol\";\nimport \"./interface/HolographFactoryInterface.sol\";\nimport \"./interface/HolographOperatorInterface.sol\";\nimport \"./interface/HolographRegistryInterface.sol\";\nimport \"./interface/InitializableInterface.sol\";\n\n/**\n * @title Holograph Bridge\n * @author https://github.com/holographxyz\n * @notice Beam any holographable contracts and assets across blockchains\n * @dev The contract abstracts all the complexities of making bridge requests and uses a universal interface to bridge any type of holographable assets\n */\ncontract HolographBridge is Admin, Initializable, HolographBridgeInterface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.factory')) - 1)\n */\n bytes32 constant _factorySlot = 0xa49f20855ba576e09d13c8041c8039fa655356ea27f6c40f1ec46a4301cd5b23;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\n */\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.jobNonce')) - 1)\n */\n bytes32 constant _jobNonceSlot = 0x1cda64803f3b43503042e00863791e8d996666552d5855a78d53ee1dd4b3286d;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.operator')) - 1)\n */\n bytes32 constant _operatorSlot = 0x7caba557ad34138fa3b7e43fb574e0e6cc10481c3073e0dffbc560db81b5c60f;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\n */\n bytes32 constant _registrySlot = 0xce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7;\n\n /**\n * @dev Allow calls only from Holograph Operator contract\n */\n modifier onlyOperator() {\n require(msg.sender == address(_operator()), \"HOLOGRAPH: operator only call\");\n _;\n }\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address factory, address holograph, address operator, address registry) = abi.decode(\n initPayload,\n (address, address, address, address)\n );\n assembly {\n sstore(_adminSlot, origin())\n sstore(_factorySlot, factory)\n sstore(_holographSlot, holograph)\n sstore(_operatorSlot, operator)\n sstore(_registrySlot, registry)\n }\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @notice Receive a beam from another chain\n * @dev This function can only be called by the Holograph Operator module\n * @param fromChain Holograph Chain ID where the brigeOutRequest was created\n * @param holographableContract address of the destination contract that the bridgeInRequest is targeted for\n * @param hToken address of the hToken contract that wrapped the origin chain native gas token\n * @param hTokenRecipient address of recipient for the hToken reward\n * @param hTokenValue exact amount of hToken reward in wei\n * @param doNotRevert boolean used to specify if the call should revert\n * @param bridgeInPayload actual abi encoded bytes of the data that the holographable contract bridgeIn function will receive\n */\n function bridgeInRequest(\n uint256 /* nonce*/,\n uint32 fromChain,\n address holographableContract,\n address hToken,\n address hTokenRecipient,\n uint256 hTokenValue,\n bool doNotRevert,\n bytes calldata bridgeInPayload\n ) external payable onlyOperator {\n /**\n * @dev check that the target contract is either Holograph Factory or a deployed holographable contract\n */\n require(\n _registry().isHolographedContract(holographableContract) || address(_factory()) == holographableContract,\n \"HOLOGRAPH: not holographed\"\n );\n /**\n * @dev make a bridgeIn function call to the holographable contract\n */\n bytes4 selector = Holographable(holographableContract).bridgeIn(fromChain, bridgeInPayload);\n /**\n * @dev ensure returned selector is bridgeIn function signature, to guarantee that the function was called and succeeded\n */\n require(selector == Holographable.bridgeIn.selector, \"HOLOGRAPH: bridge in failed\");\n /**\n * @dev check if a specific reward amount was assigned to this request\n */\n if (hTokenValue > 0 && hTokenRecipient != address(0)) {\n /**\n * @dev mint the specific hToken amount for hToken recipient\n * this value is equivalent to amount that is deposited on origin chain's hToken contract\n * recipient can beam the asset to origin chain and unwrap for native gas token at any time\n */\n require(\n HolographERC20Interface(hToken).holographBridgeMint(hTokenRecipient, hTokenValue) ==\n HolographERC20Interface.holographBridgeMint.selector,\n \"HOLOGRAPH: hToken mint failed\"\n );\n }\n /**\n * @dev allow the call to revert on demand, for example use case, look into the Holograph Operator's jobEstimator function\n */\n require(doNotRevert, \"HOLOGRAPH: reverted\");\n }\n\n /**\n * @notice Create a beam request for a destination chain\n * @dev This function works for deploying contracts and beaming supported holographable assets across chains\n * @param toChain Holograph Chain ID where the beam is being sent to\n * @param holographableContract address of the contract for which the bridge request is being made\n * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain\n * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\n */\n function bridgeOutRequest(\n uint32 toChain,\n address holographableContract,\n uint256 gasLimit,\n uint256 gasPrice,\n bytes calldata bridgeOutPayload\n ) external payable {\n /**\n * @dev check that the target contract is either Holograph Factory or a deployed holographable contract\n */\n require(\n _registry().isHolographedContract(holographableContract) || address(_factory()) == holographableContract,\n \"HOLOGRAPH: not holographed\"\n );\n /**\n * @dev make a bridgeOut function call to the holographable contract\n */\n (bytes4 selector, bytes memory returnedPayload) = Holographable(holographableContract).bridgeOut(\n toChain,\n msg.sender,\n bridgeOutPayload\n );\n /**\n * @dev ensure returned selector is bridgeOut function signature, to guarantee that the function was called and succeeded\n */\n require(selector == Holographable.bridgeOut.selector, \"HOLOGRAPH: bridge out failed\");\n /**\n * @dev pass the request, along with all data, to Holograph Operator, to handle the cross-chain messaging logic\n */\n _operator().send{value: msg.value}(\n gasLimit,\n gasPrice,\n toChain,\n msg.sender,\n _jobNonce(),\n holographableContract,\n returnedPayload\n );\n }\n\n /**\n * @notice Do not call this function, it will always revert\n * @dev Used by getBridgeOutRequestPayload function\n * It is purposefully inverted to always revert on a successful call\n * Marked as external and not private to allow use inside try/catch of getBridgeOutRequestPayload function\n * If this function does not revert and returns a string, it is the actual revert reason\n * @param sender address of actual sender that is planning to make a bridgeOutRequest call\n * @param toChain holograph chain id of destination chain\n * @param holographableContract address of the contract for which the bridge request is being made\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\n */\n function revertedBridgeOutRequest(\n address sender,\n uint32 toChain,\n address holographableContract,\n bytes calldata bridgeOutPayload\n ) external returns (string memory revertReason) {\n /**\n * @dev make a bridgeOut function call to the holographable contract inside of a try/catch\n */\n try Holographable(holographableContract).bridgeOut(toChain, sender, bridgeOutPayload) returns (\n bytes4 selector,\n bytes memory payload\n ) {\n /**\n * @dev ensure returned selector is bridgeOut function signature, to guarantee that the function was called and succeeded\n */\n if (selector != Holographable.bridgeOut.selector) {\n /**\n * @dev if selector does not match, then it means the request failed\n */\n return \"HOLOGRAPH: bridge out failed\";\n }\n assembly {\n /**\n * @dev the entire payload is sent back in a revert\n */\n revert(add(payload, 0x20), mload(payload))\n }\n } catch Error(string memory reason) {\n return reason;\n } catch {\n return \"HOLOGRAPH: unknown error\";\n }\n }\n\n /**\n * @notice Get the payload created by the bridgeOutRequest function\n * @dev Use this function to get the payload that will be generated by a bridgeOutRequest\n * Only use this with a static call\n * @param toChain Holograph Chain ID where the beam is being sent to\n * @param holographableContract address of the contract for which the bridge request is being made\n * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain\n * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\n * @return samplePayload bytes made up of the bridgeOutRequest payload\n */\n function getBridgeOutRequestPayload(\n uint32 toChain,\n address holographableContract,\n uint256 gasLimit,\n uint256 gasPrice,\n bytes calldata bridgeOutPayload\n ) external returns (bytes memory samplePayload) {\n /**\n * @dev check that the target contract is either Holograph Factory or a deployed holographable contract\n */\n require(\n _registry().isHolographedContract(holographableContract) || address(_factory()) == holographableContract,\n \"HOLOGRAPH: not holographed\"\n );\n bytes memory payload;\n /**\n * @dev the revertedBridgeOutRequest function is wrapped into a try/catch function\n */\n try this.revertedBridgeOutRequest(msg.sender, toChain, holographableContract, bridgeOutPayload) returns (\n string memory revertReason\n ) {\n /**\n * @dev a non reverted result is actually a revert\n */\n revert(revertReason);\n } catch (bytes memory realResponse) {\n /**\n * @dev a revert is actually success, so the return data is stored as payload\n */\n payload = realResponse;\n }\n uint256 jobNonce;\n assembly {\n jobNonce := sload(_jobNonceSlot)\n }\n /**\n * @dev extract hlgFee from operator\n */\n uint256 fee = 0;\n if (gasPrice < type(uint256).max && gasLimit < type(uint256).max) {\n (uint256 hlgFee, , uint256 dstGasPrice) = _operator().getMessageFee(\n toChain,\n gasLimit,\n gasPrice,\n bridgeOutPayload\n );\n if (gasPrice == 0) {\n gasPrice = dstGasPrice;\n }\n fee = hlgFee;\n }\n /**\n * @dev the data is abi encoded into actual bridgeOutRequest payload bytes\n */\n bytes memory encodedData = abi.encodeWithSelector(\n HolographBridgeInterface.bridgeInRequest.selector,\n /**\n * @dev the latest job nonce is incremented by one\n */\n jobNonce + 1,\n _holograph().getHolographChainId(),\n holographableContract,\n _registry().getHToken(_holograph().getHolographChainId()),\n address(0),\n fee,\n true,\n payload\n );\n /**\n * @dev this abi encodes the data just like in Holograph Operator\n */\n samplePayload = abi.encodePacked(encodedData, gasLimit, gasPrice);\n }\n\n /**\n * @notice Get the fees associated with sending specific payload\n * @dev Will provide exact costs on protocol and message side, combine the two to get total\n * @dev @param toChain holograph chain id of destination chain for payload\n * @dev @param gasLimit amount of gas to provide for executing payload on destination chain\n * @dev @param gasPrice maximum amount to pay for gas price, can be set to 0 and will be chose automatically\n * @dev @param crossChainPayload the entire packet being sent cross-chain\n * @return hlgFee the amount (in wei) of native gas token that will cost for finalizing job on destiantion chain\n * @return msgFee the amount (in wei) of native gas token that will cost for sending message to destiantion chain\n * @return dstGasPrice the amount (in wei) that destination message maximum gas price will be\n */\n function getMessageFee(uint32, uint256, uint256, bytes calldata) external view returns (uint256, uint256, uint256) {\n assembly {\n calldatacopy(0, 0, calldatasize())\n let result := staticcall(gas(), sload(_operatorSlot), 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @notice Get the address of the Holograph Factory module\n * @dev Used for deploying holographable smart contracts\n */\n function getFactory() external view returns (address factory) {\n assembly {\n factory := sload(_factorySlot)\n }\n }\n\n /**\n * @notice Update the Holograph Factory module address\n * @param factory address of the Holograph Factory smart contract to use\n */\n function setFactory(address factory) external onlyAdmin {\n assembly {\n sstore(_factorySlot, factory)\n }\n }\n\n /**\n * @notice Get the Holograph Protocol contract\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\n */\n function getHolograph() external view returns (address holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Protocol contract address\n * @param holograph address of the Holograph Protocol smart contract to use\n */\n function setHolograph(address holograph) external onlyAdmin {\n assembly {\n sstore(_holographSlot, holograph)\n }\n }\n\n /**\n * @notice Get the latest job nonce\n * @dev You can use the job nonce as a way to calculate total amount of bridge requests that have been made\n */\n function getJobNonce() external view returns (uint256 jobNonce) {\n assembly {\n jobNonce := sload(_jobNonceSlot)\n }\n }\n\n /**\n * @notice Get the address of the Holograph Operator module\n * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module\n */\n function getOperator() external view returns (address operator) {\n assembly {\n operator := sload(_operatorSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Operator module address\n * @param operator address of the Holograph Operator smart contract to use\n */\n function setOperator(address operator) external onlyAdmin {\n assembly {\n sstore(_operatorSlot, operator)\n }\n }\n\n /**\n * @notice Get the Holograph Registry module\n * @dev This module stores a reference for all deployed holographable smart contracts\n */\n function getRegistry() external view returns (address registry) {\n assembly {\n registry := sload(_registrySlot)\n }\n }\n\n /**\n * @notice Update the Holograph Registry module address\n * @param registry address of the Holograph Registry smart contract to use\n */\n function setRegistry(address registry) external onlyAdmin {\n assembly {\n sstore(_registrySlot, registry)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Factory Interface\n */\n function _factory() private view returns (HolographFactoryInterface factory) {\n assembly {\n factory := sload(_factorySlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Interface\n */\n function _holograph() private view returns (HolographInterface holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n /**\n * @dev Internal nonce, that increments on each call, used for randomness\n */\n function _jobNonce() private returns (uint256 jobNonce) {\n assembly {\n jobNonce := add(sload(_jobNonceSlot), 0x0000000000000000000000000000000000000000000000000000000000000001)\n sstore(_jobNonceSlot, jobNonce)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Operator Interface\n */\n function _operator() private view returns (HolographOperatorInterface operator) {\n assembly {\n operator := sload(_operatorSlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Registry Interface\n */\n function _registry() private view returns (HolographRegistryInterface registry) {\n assembly {\n registry := sload(_registrySlot)\n }\n }\n\n /**\n * @dev Purposefully reverts to prevent having any type of ether transfered into the contract\n */\n receive() external payable {\n revert();\n }\n\n /**\n * @dev Purposefully reverts to prevent any calls to undefined functions\n */\n fallback() external payable {\n revert();\n }\n}\n" + }, + "contracts/HolographFactory.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./abstract/Admin.sol\";\nimport \"./abstract/Initializable.sol\";\n\nimport \"./enforcer/Holographer.sol\";\n\nimport \"./interface/Holographable.sol\";\nimport \"./interface/HolographBridgeInterface.sol\";\nimport \"./interface/HolographFactoryInterface.sol\";\nimport \"./interface/HolographInterface.sol\";\nimport \"./interface/HolographRegistryInterface.sol\";\nimport \"./interface/InitializableInterface.sol\";\n\nimport \"./struct/BridgeSettings.sol\";\nimport \"./struct/DeploymentConfig.sol\";\nimport \"./struct/Verification.sol\";\n\nimport \"./library/Strings.sol\";\n\n/**\n * @title Holograph Factory\n * @author https://github.com/holographxyz\n * @notice Deploy holographable contracts\n * @dev The contract provides methods that allow for the creation of Holograph Protocol compliant smart contracts, that are capable of minting holographable assets\n */\ncontract HolographFactory is Admin, Initializable, Holographable, HolographFactoryInterface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\n */\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\n */\n bytes32 constant _registrySlot = 0xce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address holograph, address registry) = abi.decode(initPayload, (address, address));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_holographSlot, holograph)\n sstore(_registrySlot, registry)\n }\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @notice Deploy holographable contract via bridge request\n * @dev This function directly forwards the calldata to the deployHolographableContract function\n * It is used to allow for Holograph Bridge to make cross-chain deployments\n */\n function bridgeIn(uint32 /* fromChain*/, bytes calldata payload) external returns (bytes4) {\n (DeploymentConfig memory config, Verification memory signature, address signer) = abi.decode(\n payload,\n (DeploymentConfig, Verification, address)\n );\n HolographFactoryInterface(address(this)).deployHolographableContract(config, signature, signer);\n return Holographable.bridgeIn.selector;\n }\n\n /**\n * @notice Deploy holographable contract via bridge request\n * @dev This function directly returns the calldata\n * It is used to allow for Holograph Bridge to make cross-chain deployments\n */\n function bridgeOut(\n uint32 /* toChain*/,\n address /* sender*/,\n bytes calldata payload\n ) external pure returns (bytes4 selector, bytes memory data) {\n return (Holographable.bridgeOut.selector, payload);\n }\n\n function deployHolographableContractMultiChain(\n DeploymentConfig memory config,\n Verification memory signature,\n address signer,\n bool deployOnCurrentChain,\n BridgeSettings[] memory bridgeSettings\n ) external payable {\n if (deployOnCurrentChain) {\n deployHolographableContract(config, signature, signer);\n }\n bytes memory payload = abi.encode(config, signature, signer);\n HolographInterface holograph;\n assembly {\n holograph := sload(_holographSlot)\n }\n HolographBridgeInterface bridge = HolographBridgeInterface(holograph.getBridge());\n uint256 l = bridgeSettings.length;\n for (uint256 i = 0; i < l; i++) {\n bridge.bridgeOutRequest{value: bridgeSettings[i].value}(\n bridgeSettings[i].toChain,\n address(this),\n bridgeSettings[i].gasLimit,\n bridgeSettings[i].gasPrice,\n payload\n );\n }\n }\n\n /**\n * @notice Deploy a holographable smart contract\n * @dev Using this function allows to deploy smart contracts that have the same address across all EVM chains\n * @param config contract deployement configurations\n * @param signature that was created by the wallet that created the original payload\n * @param signer address of wallet that created the payload\n */\n function deployHolographableContract(\n DeploymentConfig memory config,\n Verification memory signature,\n address signer\n ) public {\n address registry;\n address holograph;\n assembly {\n holograph := sload(_holographSlot)\n registry := sload(_registrySlot)\n }\n /**\n * @dev the configuration is encoded and hashed along with signer address\n */\n bytes32 hash = keccak256(\n abi.encodePacked(\n config.contractType,\n config.chainType,\n config.salt,\n keccak256(config.byteCode),\n keccak256(config.initCode),\n signer\n )\n );\n /**\n * @dev the hash is validated against signature\n * this is to guarantee that the original creator's configuration has not been altered\n */\n require(_verifySigner(signature.r, signature.s, signature.v, hash, signer), \"HOLOGRAPH: invalid signature\");\n /**\n * @dev check that this contract has not already been deployed on this chain\n */\n bytes memory holographerBytecode = type(Holographer).creationCode;\n address holographerAddress = address(\n uint160(uint256(keccak256(abi.encodePacked(bytes1(0xff), address(this), hash, keccak256(holographerBytecode)))))\n );\n require(!_isContract(holographerAddress), \"HOLOGRAPH: already deployed\");\n /**\n * @dev convert hash into uint256 which will be used as the salt for create2\n */\n uint256 saltInt = uint256(hash);\n address sourceContractAddress;\n bytes memory sourceByteCode = config.byteCode;\n assembly {\n /**\n * @dev deploy the user created smart contract first\n */\n sourceContractAddress := create2(0, add(sourceByteCode, 0x20), mload(sourceByteCode), saltInt)\n }\n assembly {\n /**\n * @dev deploy the Holographer contract\n */\n holographerAddress := create2(0, add(holographerBytecode, 0x20), mload(holographerBytecode), saltInt)\n }\n /**\n * @dev initialize the Holographer contract\n */\n require(\n InitializableInterface(holographerAddress).init(\n abi.encode(abi.encode(config.chainType, holograph, config.contractType, sourceContractAddress), config.initCode)\n ) == InitializableInterface.init.selector,\n \"initialization failed\"\n );\n /**\n * @dev update the Holograph Registry with deployed contract address\n */\n HolographRegistryInterface(registry).setHolographedHashAddress(hash, holographerAddress);\n /**\n * @dev emit an event that on-chain indexers can easily read\n */\n emit BridgeableContractDeployed(holographerAddress, hash);\n }\n\n /**\n * @notice Get the Holograph Protocol contract\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\n */\n function getHolograph() external view returns (address holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Protocol contract address\n * @param holograph address of the Holograph Protocol smart contract to use\n */\n function setHolograph(address holograph) external onlyAdmin {\n assembly {\n sstore(_holographSlot, holograph)\n }\n }\n\n /**\n * @notice Get the Holograph Registry module\n * @dev This module stores a reference for all deployed holographable smart contracts\n */\n function getRegistry() external view returns (address registry) {\n assembly {\n registry := sload(_registrySlot)\n }\n }\n\n /**\n * @notice Update the Holograph Registry module address\n * @param registry address of the Holograph Registry smart contract to use\n */\n function setRegistry(address registry) external onlyAdmin {\n assembly {\n sstore(_registrySlot, registry)\n }\n }\n\n /**\n * @dev Internal function used for checking if a contract has been deployed at address\n */\n function _isContract(address contractAddress) private view returns (bool) {\n bytes32 codehash;\n assembly {\n codehash := extcodehash(contractAddress)\n }\n return (codehash != 0x0 && codehash != 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470);\n }\n\n /**\n * @dev Internal function used for verifying a signature\n */\n function _verifySigner(bytes32 r, bytes32 s, uint8 v, bytes32 hash, address signer) private pure returns (bool) {\n if (v < 27) {\n v += 27;\n }\n if (v != 27 && v != 28) {\n return false;\n }\n // prevent signature malleability by checking if s-value is in the upper range\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n // if s-value is in upper range, calculate a new s-value\n s = bytes32(0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - uint256(s));\n // flip the v-value\n if (v == 27) {\n v = 28;\n } else {\n v = 27;\n }\n // check if s-value is still in upper range\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return false;\n }\n }\n /**\n * @dev signature is checked against EIP-191 first, then directly, to support legacy wallets\n */\n return (signer != address(0) &&\n (ecrecover(keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", hash)), v, r, s) == signer ||\n (\n ecrecover(\n keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n66\", Strings.toHexString(uint256(hash), 32))),\n v,\n r,\n s\n )\n ) ==\n signer ||\n ecrecover(hash, v, r, s) == signer));\n }\n\n /**\n * @dev Purposefully reverts to prevent having any type of ether transfered into the contract\n */\n receive() external payable {\n revert();\n }\n\n /**\n * @dev Purposefully reverts to prevent any calls to undefined functions\n */\n fallback() external payable {\n revert();\n }\n}\n" + }, + "contracts/HolographGenesis.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./interface/InitializableInterface.sol\";\n\n/**\n * @dev In the beginning there was a smart contract...\n */\ncontract HolographGenesis {\n mapping(address => bool) private _approvedDeployers;\n\n event Message(string message);\n\n modifier onlyDeployer() {\n require(_approvedDeployers[msg.sender], \"HOLOGRAPH: deployer not approved\");\n _;\n }\n\n constructor() {\n _approvedDeployers[tx.origin] = true;\n emit Message(\"The future of NFTs is Holograph.\");\n }\n\n function deploy(\n uint256 chainId,\n bytes12 saltHash,\n bytes memory sourceCode,\n bytes memory initCode\n ) external onlyDeployer {\n require(chainId == block.chainid, \"HOLOGRAPH: incorrect chain id\");\n bytes32 salt = bytes32(abi.encodePacked(msg.sender, saltHash));\n address contractAddress = address(\n uint160(uint256(keccak256(abi.encodePacked(bytes1(0xff), address(this), salt, keccak256(sourceCode)))))\n );\n require(!_isContract(contractAddress), \"HOLOGRAPH: already deployed\");\n assembly {\n contractAddress := create2(0, add(sourceCode, 0x20), mload(sourceCode), salt)\n }\n require(_isContract(contractAddress), \"HOLOGRAPH: deployment failed\");\n require(\n InitializableInterface(contractAddress).init(initCode) == InitializableInterface.init.selector,\n \"HOLOGRAPH: initialization failed\"\n );\n }\n\n function approveDeployer(address newDeployer, bool approve) external onlyDeployer {\n _approvedDeployers[newDeployer] = approve;\n }\n\n function isApprovedDeployer(address deployer) external view returns (bool) {\n return _approvedDeployers[deployer];\n }\n\n function _isContract(address contractAddress) internal view returns (bool) {\n bytes32 codehash;\n assembly {\n codehash := extcodehash(contractAddress)\n }\n return (codehash != 0x0 && codehash != 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470);\n }\n}\n" + }, + "contracts/HolographInterfaces.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./abstract/Admin.sol\";\nimport \"./abstract/Initializable.sol\";\n\nimport \"./enum/ChainIdType.sol\";\nimport \"./enum/InterfaceType.sol\";\nimport \"./enum/TokenUriType.sol\";\n\nimport \"./interface/InitializableInterface.sol\";\n\nimport \"./library/Base64.sol\";\nimport \"./library/Strings.sol\";\n\n/**\n * @title Holograph Interfaces\n * @author https://github.com/holographxyz\n * @notice Get universal Holograph Protocol variables\n * @dev The contract stores a reference of all supported: chains, interfaces, functions, etc.\n */\ncontract HolographInterfaces is Admin, Initializable {\n /**\n * @dev Internal mapping of all InterfaceType interfaces\n */\n mapping(InterfaceType => mapping(bytes4 => bool)) private _supportedInterfaces;\n\n /**\n * @dev Internal mapping of all ChainIdType conversions\n */\n mapping(ChainIdType => mapping(uint256 => mapping(ChainIdType => uint256))) private _chainIdMap;\n\n /**\n * @dev Internal mapping of all TokenUriType prepends\n */\n mapping(TokenUriType => string) private _prependURI;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n address contractAdmin = abi.decode(initPayload, (address));\n assembly {\n sstore(_adminSlot, contractAdmin)\n }\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @notice Get a base64 encoded contract URI JSON string\n * @dev Used to dynamically generate contract JSON payload\n * @param name the name of the smart contract\n * @param imageURL string pointing to the primary contract image, can be: https, ipfs, or ar (arweave)\n * @param externalLink url to website/page related to smart contract\n * @param bps basis points used for specifying royalties percentage\n * @param contractAddress address of the smart contract\n * @return a base64 encoded json string representing the smart contract\n */\n function contractURI(\n string calldata name,\n string calldata imageURL,\n string calldata externalLink,\n uint16 bps,\n address contractAddress\n ) external pure returns (string memory) {\n return\n string(\n abi.encodePacked(\n \"data:application/json;base64,\",\n Base64.encode(\n abi.encodePacked(\n '{\"name\":\"',\n name,\n '\",\"description\":\"',\n name,\n '\",\"image\":\"',\n imageURL,\n '\",\"external_link\":\"',\n externalLink,\n '\",\"seller_fee_basis_points\":',\n Strings.uint2str(bps),\n ',\"fee_recipient\":\"0x',\n Strings.toAsciiString(contractAddress),\n '\"}'\n )\n )\n )\n );\n }\n\n /**\n * @notice Get the prepend to use for tokenURI\n * @dev Provides the prepend to use with TokenUriType URI\n */\n function getUriPrepend(TokenUriType uriType) external view returns (string memory prepend) {\n prepend = _prependURI[uriType];\n }\n\n /**\n * @notice Update the tokenURI prepend\n * @param uriType specify which TokenUriType to set for\n * @param prepend the string to use for the prepend\n */\n function updateUriPrepend(TokenUriType uriType, string calldata prepend) external onlyAdmin {\n _prependURI[uriType] = prepend;\n }\n\n /**\n * @notice Update the tokenURI prepends\n * @param uriTypes specify array of TokenUriTypes to set for\n * @param prepends array string to use for the prepends\n */\n function updateUriPrepends(TokenUriType[] calldata uriTypes, string[] calldata prepends) external onlyAdmin {\n for (uint256 i = 0; i < uriTypes.length; i++) {\n _prependURI[uriTypes[i]] = prepends[i];\n }\n }\n\n function getChainId(\n ChainIdType fromChainType,\n uint256 fromChainId,\n ChainIdType toChainType\n ) external view returns (uint256 toChainId) {\n return _chainIdMap[fromChainType][fromChainId][toChainType];\n }\n\n function updateChainIdMap(\n ChainIdType fromChainType,\n uint256 fromChainId,\n ChainIdType toChainType,\n uint256 toChainId\n ) external onlyAdmin {\n _chainIdMap[fromChainType][fromChainId][toChainType] = toChainId;\n }\n\n function updateChainIdMaps(\n ChainIdType[] calldata fromChainType,\n uint256[] calldata fromChainId,\n ChainIdType[] calldata toChainType,\n uint256[] calldata toChainId\n ) external onlyAdmin {\n uint256 length = fromChainType.length;\n for (uint256 i = 0; i < length; i++) {\n _chainIdMap[fromChainType[i]][fromChainId[i]][toChainType[i]] = toChainId[i];\n }\n }\n\n function supportsInterface(InterfaceType interfaceType, bytes4 interfaceId) external view returns (bool) {\n return _supportedInterfaces[interfaceType][interfaceId];\n }\n\n function updateInterface(InterfaceType interfaceType, bytes4 interfaceId, bool supported) external onlyAdmin {\n _supportedInterfaces[interfaceType][interfaceId] = supported;\n }\n\n function updateInterfaces(\n InterfaceType interfaceType,\n bytes4[] calldata interfaceIds,\n bool supported\n ) external onlyAdmin {\n for (uint256 i = 0; i < interfaceIds.length; i++) {\n _supportedInterfaces[interfaceType][interfaceIds[i]] = supported;\n }\n }\n\n /**\n * @dev Purposefully reverts to prevent having any type of ether transfered into the contract\n */\n receive() external payable {\n revert();\n }\n\n /**\n * @dev Purposefully reverts to prevent any calls to undefined functions\n */\n fallback() external payable {\n revert();\n }\n}\n" + }, + "contracts/HolographOperator.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./abstract/Admin.sol\";\nimport \"./abstract/Initializable.sol\";\n\nimport \"./interface/CrossChainMessageInterface.sol\";\nimport \"./interface/HolographBridgeInterface.sol\";\nimport \"./interface/HolographERC20Interface.sol\";\nimport \"./interface/HolographInterface.sol\";\nimport \"./interface/HolographOperatorInterface.sol\";\nimport \"./interface/HolographRegistryInterface.sol\";\nimport \"./interface/InitializableInterface.sol\";\nimport \"./interface/HolographInterfacesInterface.sol\";\nimport \"./interface/Ownable.sol\";\n\nimport \"./struct/OperatorJob.sol\";\n\n/**\n * @title Holograph Operator\n * @author https://github.com/holographxyz\n * @notice Participate in the Holograph Protocol by becoming an Operator\n * @dev This contract allows operators to bond utility tokens and help execute operator jobs\n */\ncontract HolographOperator is Admin, Initializable, HolographOperatorInterface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.bridge')) - 1)\n */\n bytes32 constant _bridgeSlot = 0xeb87cbb21687feb327e3d58c6c16d552231d12c7a0e8115042a4165fac8a77f9;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\n */\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.interfaces')) - 1)\n */\n bytes32 constant _interfacesSlot = 0xbd3084b8c09da87ad159c247a60e209784196be2530cecbbd8f337fdd1848827;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.jobNonce')) - 1)\n */\n bytes32 constant _jobNonceSlot = 0x1cda64803f3b43503042e00863791e8d996666552d5855a78d53ee1dd4b3286d;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.messagingModule')) - 1)\n */\n bytes32 constant _messagingModuleSlot = 0x54176250282e65985d205704ffce44a59efe61f7afd99e29fda50f55b48c061a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\n */\n bytes32 constant _registrySlot = 0xce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.utilityToken')) - 1)\n */\n bytes32 constant _utilityTokenSlot = 0xbf76518d46db472b71aa7677a0908b8016f3dee568415ffa24055f9a670f9c37;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.minGasPrice')) - 1)\n */\n bytes32 constant _minGasPriceSlot = 0x264d744422f7427cd080572c35c848b6cd3a36da6b47519af89ef13098b12fc0;\n\n /**\n * @dev Internal number (in seconds), used for defining a window for operator to execute the job\n */\n uint256 private _blockTime;\n\n /**\n * @dev Minimum amount of tokens needed for bonding\n */\n uint256 private _baseBondAmount;\n\n /**\n * @dev The multiplier used for calculating bonding amount for pods\n */\n uint256 private _podMultiplier;\n\n /**\n * @dev The threshold used for limiting number of operators in a pod\n */\n uint256 private _operatorThreshold;\n\n /**\n * @dev The threshold step used for increasing bond amount once threshold is reached\n */\n uint256 private _operatorThresholdStep;\n\n /**\n * @dev The threshold divisor used for increasing bond amount once threshold is reached\n */\n uint256 private _operatorThresholdDivisor;\n\n /**\n * @dev Internal counter of all cross-chain messages received\n */\n uint256 private _inboundMessageCounter;\n\n /**\n * @dev Internal mapping of operator job details for a specific job hash\n */\n mapping(bytes32 => uint256) private _operatorJobs;\n\n /**\n * @dev Internal mapping of operator job details for a specific job hash\n */\n mapping(bytes32 => bool) private _failedJobs;\n\n /**\n * @dev Internal mapping of operator addresses, used for temp storage when defining an operator job\n */\n mapping(uint256 => address) private _operatorTempStorage;\n\n /**\n * @dev Internal index used for storing/referencing operator temp storage\n */\n uint32 private _operatorTempStorageCounter;\n\n /**\n * @dev Multi-dimensional array of available operators\n */\n address[][] private _operatorPods;\n\n /**\n * @dev Internal mapping of bonded operators, to prevent double bonding\n */\n mapping(address => uint256) private _bondedOperators;\n\n /**\n * @dev Internal mapping of bonded operators, to prevent double bonding\n */\n mapping(address => uint256) private _operatorPodIndex;\n\n /**\n * @dev Internal mapping of bonded operator amounts\n */\n mapping(address => uint256) private _bondedAmounts;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (\n address bridge,\n address holograph,\n address interfaces,\n address registry,\n address utilityToken,\n uint256 minGasPrice\n ) = abi.decode(initPayload, (address, address, address, address, address, uint256));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_bridgeSlot, bridge)\n sstore(_holographSlot, holograph)\n sstore(_interfacesSlot, interfaces)\n sstore(_registrySlot, registry)\n sstore(_utilityTokenSlot, utilityToken)\n sstore(_minGasPriceSlot, minGasPrice)\n }\n _blockTime = 60; // 60 seconds allowed for execution\n unchecked {\n _baseBondAmount = 100 * (10 ** 18); // one single token unit * 100\n }\n // how much to increase bond amount per pod\n _podMultiplier = 2; // 1, 4, 16, 64\n // starting pod max amount\n _operatorThreshold = 1000;\n // how often to increase price per each operator\n _operatorThresholdStep = 10;\n // we want to multiply by decimals, but instead will have to divide\n _operatorThresholdDivisor = 100; // == * 0.01\n // set first operator for each pod as zero address\n _operatorPods = [[address(0)]];\n // mark zero address as bonded operator, to prevent abuse\n _bondedOperators[address(0)] = 1;\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @notice Recover failed job\n * @dev If a job fails, it can be manually recovered\n * @param bridgeInRequestPayload the entire cross chain message payload\n */\n function recoverJob(bytes calldata bridgeInRequestPayload) external payable {\n bytes32 hash = keccak256(bridgeInRequestPayload);\n require(_failedJobs[hash], \"HOLOGRAPH: invalid recovery job\");\n (bool success, ) = _bridge().call{value: msg.value}(bridgeInRequestPayload);\n require(success, \"HOLOGRAPH: recovery failed\");\n delete (_failedJobs[hash]);\n }\n\n /**\n * @notice Execute an available operator job\n * @dev When making this call, if operating criteria is not met, the call will revert\n * @param bridgeInRequestPayload the entire cross chain message payload\n */\n function executeJob(bytes calldata bridgeInRequestPayload) external payable {\n /**\n * @dev derive the payload hash for use in mappings\n */\n bytes32 hash = keccak256(bridgeInRequestPayload);\n /**\n * @dev check that job exists\n */\n require(_operatorJobs[hash] > 0, \"HOLOGRAPH: invalid job\");\n uint256 gasLimit = 0;\n uint256 gasPrice = 0;\n assembly {\n /**\n * @dev extract gasLimit\n */\n gasLimit := calldataload(sub(add(bridgeInRequestPayload.offset, bridgeInRequestPayload.length), 0x40))\n /**\n * @dev extract gasPrice\n */\n gasPrice := calldataload(sub(add(bridgeInRequestPayload.offset, bridgeInRequestPayload.length), 0x20))\n }\n /**\n * @dev unpack bitwise packed operator job details\n */\n OperatorJob memory job = getJobDetails(hash);\n /**\n * @dev to prevent replay attacks, remove job from mapping\n */\n delete _operatorJobs[hash];\n /**\n * @dev operators of last resort are allowed, but they will not receive HLG rewards of any sort\n */\n bool isBonded = _bondedAmounts[msg.sender] != 0;\n /**\n * @dev check that a specific operator was selected for the job\n */\n if (job.operator != address(0)) {\n /**\n * @dev switch pod to index based value\n */\n uint256 pod = job.pod - 1;\n /**\n * @dev check if sender is not the selected primary operator\n */\n if (job.operator != msg.sender) {\n /**\n * @dev sender is not selected operator, need to check if allowed to do job\n */\n uint256 elapsedTime = block.timestamp - uint256(job.startTimestamp);\n uint256 timeDifference = elapsedTime / job.blockTimes;\n /**\n * @dev validate that initial selected operator time slot is still active\n */\n require(timeDifference > 0, \"HOLOGRAPH: operator has time\");\n /**\n * @dev check that the selected missed the time slot due to a gas spike\n */\n require(gasPrice >= tx.gasprice, \"HOLOGRAPH: gas spike detected\");\n /**\n * @dev check if time is within fallback operator slots\n */\n if (timeDifference < 6) {\n uint256 podIndex = uint256(job.fallbackOperators[timeDifference - 1]);\n /**\n * @dev do a quick sanity check to make sure operator did not leave from index or is a zero address\n */\n if (podIndex > 0 && podIndex < _operatorPods[pod].length) {\n address fallbackOperator = _operatorPods[pod][podIndex];\n /**\n * @dev ensure that sender is currently valid backup operator\n */\n require(fallbackOperator == msg.sender, \"HOLOGRAPH: invalid fallback\");\n } else {\n require(_bondedOperators[msg.sender] == job.pod, \"HOLOGRAPH: pod only fallback\");\n }\n }\n /**\n * @dev time to reward the current operator\n */\n uint256 amount = _getBaseBondAmount(pod);\n /**\n * @dev select operator that failed to do the job, is slashed the pod base fee\n */\n _bondedAmounts[job.operator] -= amount;\n /**\n * @dev only allow HLG rewards to go to bonded operators\n * if operator is bonded, the slashed amount is sent to current operator\n * otherwise it's sent to HolographTreasury, can be burned or distributed from there\n */\n _utilityToken().transfer((isBonded ? msg.sender : address(_holograph().getTreasury())), amount);\n /**\n * @dev check if slashed operator has enough tokens bonded to stay\n */\n if (_bondedAmounts[job.operator] >= amount) {\n /**\n * @dev enough bond amount leftover, put operator back in\n */\n _operatorPods[pod].push(job.operator);\n _operatorPodIndex[job.operator] = _operatorPods[pod].length - 1;\n _bondedOperators[job.operator] = job.pod;\n } else {\n /**\n * @dev slashed operator does not have enough tokens bonded, return remaining tokens only\n */\n uint256 leftovers = _bondedAmounts[job.operator];\n if (leftovers > 0) {\n _bondedAmounts[job.operator] = 0;\n _utilityToken().transfer(job.operator, leftovers);\n }\n }\n } else {\n /**\n * @dev the selected operator is executing the job\n */\n _operatorPods[pod].push(msg.sender);\n _operatorPodIndex[job.operator] = _operatorPods[pod].length - 1;\n _bondedOperators[msg.sender] = job.pod;\n }\n }\n /**\n * @dev every executed job (even if failed) increments total message counter by one\n */\n ++_inboundMessageCounter;\n /**\n * @dev reward operator (with HLG) for executing the job\n * this is out of scope and is purposefully omitted from code\n * currently no rewards are issued\n */\n //_utilityToken().transfer((isBonded ? msg.sender : address(_utilityToken())), (10**18));\n /**\n * @dev always emit an event at end of job, this helps other operators keep track of job status\n */\n emit FinishedOperatorJob(hash, msg.sender);\n /**\n * @dev ensure that there is enough has left for the job\n */\n require(gasleft() > gasLimit, \"HOLOGRAPH: not enough gas left\");\n /**\n * @dev execute the job\n */\n try\n HolographOperatorInterface(address(this)).nonRevertingBridgeCall{value: msg.value}(\n msg.sender,\n bridgeInRequestPayload\n )\n {\n /// @dev do nothing\n } catch {\n /// @dev return any payed funds in case of revert\n payable(msg.sender).transfer(msg.value);\n _failedJobs[hash] = true;\n emit FailedOperatorJob(hash);\n }\n }\n\n /*\n * @dev Purposefully made to be external so that Operator can call it during executeJob function\n * Check the executeJob function to understand it's implementation\n */\n function nonRevertingBridgeCall(address msgSender, bytes calldata payload) external payable {\n require(msg.sender == address(this), \"HOLOGRAPH: operator only call\");\n assembly {\n /**\n * @dev remove gas price from end\n */\n calldatacopy(0, payload.offset, sub(payload.length, 0x20))\n /**\n * @dev hToken recipient is injected right before making the call\n */\n mstore(0x84, msgSender)\n /**\n * @dev make non-reverting call\n */\n let result := call(\n /// @dev gas limit is retrieved from last 32 bytes of payload in-memory value\n mload(sub(payload.length, 0x40)),\n /// @dev destination is bridge contract\n sload(_bridgeSlot),\n /// @dev any value is passed along\n callvalue(),\n /// @dev data is retrieved from 0 index memory position\n 0,\n /// @dev everything except for last 32 bytes (gas limit) is sent\n sub(payload.length, 0x40),\n 0,\n 0\n )\n if eq(result, 0) {\n revert(0, 0)\n }\n return(0, 0)\n }\n }\n\n /**\n * @notice Receive a cross-chain message\n * @dev This function is restricted for use by Holograph Messaging Module only\n */\n function crossChainMessage(bytes calldata bridgeInRequestPayload) external payable {\n require(\n msg.sender == address(_messagingModule()) || msg.sender == 0xE9e30A0aD0d8Af5cF2606ea720052E28D6fcbAAF,\n \"HOLOGRAPH: messaging only call\"\n ); // TODO: Schedule time to remove deprecated LayerZeroModule address after all in-flight LZ messages propagate\n uint256 gasPrice = 0;\n assembly {\n /**\n * @dev extract gasPrice\n */\n gasPrice := calldataload(sub(add(bridgeInRequestPayload.offset, bridgeInRequestPayload.length), 0x20))\n }\n bool underpriced = gasPrice < _minGasPrice();\n unchecked {\n bytes32 jobHash = keccak256(bridgeInRequestPayload);\n /**\n * @dev load and increment operator temp storage in one call\n */\n ++_operatorTempStorageCounter;\n /**\n * @dev use job hash, job nonce, block number, and block timestamp for generating a random number\n */\n uint256 random = uint256(keccak256(abi.encodePacked(jobHash, _jobNonce(), block.number, block.timestamp)));\n // use the left 128 bits of random number\n uint256 random1 = uint256(random >> 128);\n // use the right 128 bits of random number\n uint256 random2 = uint256(uint128(random));\n // combine the two new random numbers for use in additional pod operator selection logic\n random = uint256(keccak256(abi.encodePacked(random1 + random2)));\n /**\n * @dev divide by total number of pods, use modulus/remainder\n */\n uint256 pod = random1 % _operatorPods.length;\n /**\n * @dev identify the total number of available operators in pod\n */\n uint256 podSize = _operatorPods[pod].length;\n /**\n * @dev select a primary operator\n */\n uint256 operatorIndex = underpriced ? 0 : random2 % podSize;\n /**\n * @dev If operator index is 0, then it's open season! Anyone can execute this job. First come first serve\n * pop operator to ensure that they cannot be selected for any other job until this one completes\n * decrease pod size to accomodate popped operator\n */\n _operatorTempStorage[_operatorTempStorageCounter] = _operatorPods[pod][operatorIndex];\n _popOperator(pod, operatorIndex);\n if (podSize > 1) {\n podSize--;\n }\n _operatorJobs[jobHash] = uint256(\n ((pod + 1) << 248) |\n (uint256(_operatorTempStorageCounter) << 216) |\n (block.number << 176) |\n ((underpriced ? 0 : _randomBlockHash(random, podSize, 1)) << 160) |\n ((underpriced ? 0 : _randomBlockHash(random, podSize, 2)) << 144) |\n ((underpriced ? 0 : _randomBlockHash(random, podSize, 3)) << 128) |\n ((underpriced ? 0 : _randomBlockHash(random, podSize, 4)) << 112) |\n ((underpriced ? 0 : _randomBlockHash(random, podSize, 5)) << 96) |\n (block.timestamp << 16) |\n 0\n ); // 80 next available bit position && so far 176 bits used with only 128 left\n /**\n * @dev emit event to signal to operators that a job has become available\n */\n emit AvailableOperatorJob(jobHash, bridgeInRequestPayload);\n }\n }\n\n /**\n * @notice Calculate the amount of gas needed to execute a bridgeInRequest\n * @dev Use this function to estimate the amount of gas that will be used by the bridgeInRequest function\n * Set a specific gas limit when making this call, subtract return value, to get total gas used\n * Only use this with a static call\n * @param bridgeInRequestPayload abi encoded bytes making up the bridgeInRequest payload\n * @return the gas amount remaining after the static call is returned\n */\n function jobEstimator(bytes calldata bridgeInRequestPayload) external payable returns (uint256) {\n assembly {\n calldatacopy(0, bridgeInRequestPayload.offset, sub(bridgeInRequestPayload.length, 0x40))\n /**\n * @dev bridgeInRequest doNotRevert is purposefully set to false so a rever would happen\n */\n mstore8(0xE3, 0x00)\n let result := call(gas(), sload(_bridgeSlot), callvalue(), 0, sub(bridgeInRequestPayload.length, 0x40), 0, 0)\n /**\n * @dev if for some reason the call does not revert, it is force reverted\n */\n if eq(result, 1) {\n returndatacopy(0, 0, returndatasize())\n revert(0, returndatasize())\n }\n /**\n * @dev remaining gas is set as the return value\n */\n mstore(0x00, gas())\n return(0x00, 0x20)\n }\n }\n\n /**\n * @notice Send cross chain bridge request message\n * @dev This function is restricted to only be callable by Holograph Bridge\n * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain\n * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain\n * @param toChain Holograph Chain ID where the beam is being sent to\n * @param nonce incremented number used to ensure job hashes are unique\n * @param holographableContract address of the contract for which the bridge request is being made\n * @param bridgeOutPayload bytes made up of the bridgeOutRequest payload\n */\n function send(\n uint256 gasLimit,\n uint256 gasPrice,\n uint32 toChain,\n address msgSender,\n uint256 nonce,\n address holographableContract,\n bytes calldata bridgeOutPayload\n ) external payable {\n require(msg.sender == _bridge(), \"HOLOGRAPH: bridge only call\");\n CrossChainMessageInterface messagingModule = _messagingModule();\n uint256 hlgFee = messagingModule.getHlgFee(toChain, gasLimit, gasPrice, bridgeOutPayload);\n address hToken = _registry().getHToken(_holograph().getHolographChainId());\n require(hlgFee < msg.value, \"HOLOGRAPH: not enough value\");\n payable(hToken).transfer(hlgFee);\n bytes memory encodedData = abi.encodeWithSelector(\n HolographBridgeInterface.bridgeInRequest.selector,\n /**\n * @dev job nonce is an incremented value that is assigned to each bridge request to guarantee unique hashes\n */\n nonce,\n /**\n * @dev including the current holograph chain id (origin chain)\n */\n _holograph().getHolographChainId(),\n /**\n * @dev holographable contract have the same address across all chains, so our destination address will be the same\n */\n holographableContract,\n /**\n * @dev get the current chain's hToken for native gas token\n */\n hToken,\n /**\n * @dev recipient will be defined when operator picks up the job\n */\n address(0),\n /**\n * @dev value is set to zero for now\n */\n hlgFee,\n /**\n * @dev specify that function call should not revert\n */\n true,\n /**\n * @dev attach actual holographableContract function call\n */\n bridgeOutPayload\n );\n /**\n * @dev add gas variables to the back for later extraction\n */\n encodedData = abi.encodePacked(encodedData, gasLimit, gasPrice);\n /**\n * @dev Send the data to the current Holograph Messaging Module\n * This will be changed to dynamically select which messaging module to use based on destination network\n */\n messagingModule.send{value: msg.value - hlgFee}(\n gasLimit,\n gasPrice,\n toChain,\n msgSender,\n msg.value - hlgFee,\n encodedData\n );\n /**\n * @dev for easy indexing, an event is emitted with the payload hash for status tracking\n */\n emit CrossChainMessageSent(keccak256(encodedData));\n }\n\n /**\n * @notice Get the fees associated with sending specific payload\n * @dev Will provide exact costs on protocol and message side, combine the two to get total\n * @dev @param toChain holograph chain id of destination chain for payload\n * @dev @param gasLimit amount of gas to provide for executing payload on destination chain\n * @dev @param gasPrice maximum amount to pay for gas price, can be set to 0 and will be chose automatically\n * @dev @param crossChainPayload the entire packet being sent cross-chain\n * @return hlgFee the amount (in wei) of native gas token that will cost for finalizing job on destiantion chain\n * @return msgFee the amount (in wei) of native gas token that will cost for sending message to destiantion chain\n * @return dstGasPrice the amount (in wei) that destination message maximum gas price will be\n */\n function getMessageFee(uint32, uint256, uint256, bytes calldata) external view returns (uint256, uint256, uint256) {\n assembly {\n calldatacopy(0, 0, calldatasize())\n let result := staticcall(gas(), sload(_messagingModuleSlot), 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @notice Get the details for an available operator job\n * @dev The job hash is a keccak256 hash of the entire job payload\n * @param jobHash keccak256 hash of the job\n * @return an OperatorJob struct with details about a specific job\n */\n function getJobDetails(bytes32 jobHash) public view returns (OperatorJob memory) {\n uint256 packed = _operatorJobs[jobHash];\n /**\n * @dev The job is bitwise packed into a single 32 byte slot, this unpacks it before returning the struct\n */\n return\n OperatorJob(\n uint8(packed >> 248),\n uint16(_blockTime),\n _operatorTempStorage[uint32(packed >> 216)],\n uint40(packed >> 176),\n // TODO: move the bit-shifting around to have it be sequential\n uint64(packed >> 16),\n [\n uint16(packed >> 160),\n uint16(packed >> 144),\n uint16(packed >> 128),\n uint16(packed >> 112),\n uint16(packed >> 96)\n ]\n );\n }\n\n /**\n * @notice Get number of pods available\n * @dev This returns number of pods that have been opened via bonding\n */\n function getTotalPods() external view returns (uint256 totalPods) {\n return _operatorPods.length;\n }\n\n /**\n * @notice Get total number of operators in a pod\n * @dev Use in conjunction with paginated getPodOperators function\n * @param pod the pod to query\n * @return total operators in a pod\n */\n function getPodOperatorsLength(uint256 pod) external view returns (uint256) {\n require(_operatorPods.length >= pod, \"HOLOGRAPH: pod does not exist\");\n return _operatorPods[pod - 1].length;\n }\n\n /**\n * @notice Get list of operators in a pod\n * @dev Use paginated getPodOperators function instead if list gets too long\n * @param pod the pod to query\n * @return operators array list of operators in a pod\n */\n function getPodOperators(uint256 pod) external view returns (address[] memory operators) {\n require(_operatorPods.length >= pod, \"HOLOGRAPH: pod does not exist\");\n operators = _operatorPods[pod - 1];\n }\n\n /**\n * @notice Get paginated list of operators in a pod\n * @dev Use in conjunction with getPodOperatorsLength to know the total length of results\n * @param pod the pod to query\n * @param index the array index to start from\n * @param length the length of result set to be (will be shorter if reached end of array)\n * @return operators a paginated array of operators\n */\n function getPodOperators(\n uint256 pod,\n uint256 index,\n uint256 length\n ) external view returns (address[] memory operators) {\n require(_operatorPods.length >= pod, \"HOLOGRAPH: pod does not exist\");\n /**\n * @dev if pod 0 is selected, this will create a revert\n */\n pod--;\n /**\n * @dev get total length of pod operators\n */\n uint256 supply = _operatorPods[pod].length;\n /**\n * @dev check if length is out of bounds for this result set\n */\n if (index + length > supply) {\n /**\n * @dev adjust length to return remainder of the results\n */\n length = supply - index;\n }\n /**\n * @dev create in-memory array\n */\n operators = new address[](length);\n /**\n * @dev add operators to result set\n */\n for (uint256 i = 0; i < length; i++) {\n operators[i] = _operatorPods[pod][index + i];\n }\n }\n\n /**\n * @notice Check the base and current price for bonding to a particular pod\n * @dev Useful for understanding what is required for bonding to a pod\n * @param pod the pod to get bonding amounts for\n * @return base the base bond amount required for a pod\n * @return current the current bond amount required for a pod\n */\n function getPodBondAmounts(uint256 pod) external view returns (uint256 base, uint256 current) {\n base = _getBaseBondAmount(pod - 1);\n current = _getCurrentBondAmount(pod - 1);\n }\n\n /**\n * @notice Get an operator's currently bonded amount\n * @dev Useful for checking how much an operator has bonded\n * @param operator address of operator to check\n * @return amount total number of utility token bonded\n */\n function getBondedAmount(address operator) external view returns (uint256 amount) {\n return _bondedAmounts[operator];\n }\n\n /**\n * @notice Get an operator's currently bonded pod\n * @dev Useful for checking if an operator is currently bonded\n * @param operator address of operator to check\n * @return pod number that operator is bonded on, returns zero if not bonded or selected for job\n */\n function getBondedPod(address operator) external view returns (uint256 pod) {\n return _bondedOperators[operator];\n }\n\n /**\n * @notice Get an operator's currently bonded pod index\n * @dev Useful for checking if an operator is a fallback for active job\n * @param operator address of operator to check\n * @return index currently bonded pod's operator index, returns zero if not in pod or moved out for active job\n */\n function getBondedPodIndex(address operator) external view returns (uint256 index) {\n return _operatorPodIndex[operator];\n }\n\n /**\n * @notice Topup a bonded operator with more utility tokens\n * @dev Useful function if an operator got slashed and wants to add a safety buffer to not get unbonded\n * This function will not work if operator has currently been selected for a job\n * @param operator address of operator to topup\n * @param amount utility token amount to add\n */\n function topupUtilityToken(address operator, uint256 amount) external {\n /**\n * @dev check that an operator is currently bonded\n */\n require(_bondedOperators[operator] != 0, \"HOLOGRAPH: operator not bonded\");\n unchecked {\n /**\n * @dev add the additional amount to operator\n */\n _bondedAmounts[operator] += amount;\n }\n /**\n * @dev transfer tokens last, to prevent reentrancy attacks\n */\n require(_utilityToken().transferFrom(msg.sender, address(this), amount), \"HOLOGRAPH: token transfer failed\");\n }\n\n /**\n * @notice Bond utility tokens and become an operator\n * @dev An operator can only bond to one pod at a time, per network\n * @param operator address of operator to bond (can be an ownable smart contract)\n * @param amount utility token amount to bond (can be greater than minimum)\n * @param pod number of pod to bond to (can be for one that does not exist yet)\n */\n function bondUtilityToken(address operator, uint256 amount, uint256 pod) external {\n /**\n * @dev an operator can only bond to one pod at any give time per network\n */\n require(_bondedOperators[operator] == 0 && _bondedAmounts[operator] == 0, \"HOLOGRAPH: operator is bonded\");\n if (_isContract(operator)) {\n require(Ownable(operator).owner() != address(0), \"HOLOGRAPH: contract not ownable\");\n }\n unchecked {\n /**\n * @dev get the current bonding minimum for selected pod\n */\n uint256 current = _getCurrentBondAmount(pod - 1);\n require(current <= amount, \"HOLOGRAPH: bond amount too small\");\n /**\n * @dev check if selected pod is greater than currently existing pods\n */\n if (_operatorPods.length < pod) {\n /**\n * @dev activate pod(s) up until the selected pod\n */\n for (uint256 i = _operatorPods.length; i < pod; i++) {\n /**\n * @dev add zero address into pod to mitigate empty pod issues\n */\n _operatorPods.push([address(0)]);\n }\n }\n /**\n * @dev prevent bonding to a pod with more than uint16 max value\n */\n require(_operatorPods[pod - 1].length < type(uint16).max, \"HOLOGRAPH: too many operators\");\n _operatorPods[pod - 1].push(operator);\n _operatorPodIndex[operator] = _operatorPods[pod - 1].length - 1;\n _bondedOperators[operator] = pod;\n _bondedAmounts[operator] = amount;\n /**\n * @dev transfer tokens last, to prevent reentrancy attacks\n */\n require(_utilityToken().transferFrom(msg.sender, address(this), amount), \"HOLOGRAPH: token transfer failed\");\n }\n }\n\n /**\n * @notice Unbond HLG utility tokens and stop being an operator\n * @dev A bonded operator selected for a job cannot unbond until they complete the job, or are slashed\n * @param operator address of operator to unbond\n * @param recipient address where to send the bonded tokens\n */\n function unbondUtilityToken(address operator, address recipient) external {\n /**\n * @dev validate that operator is currently bonded\n */\n require(_bondedOperators[operator] != 0, \"HOLOGRAPH: operator not bonded\");\n /**\n * @dev check if sender is not actual operator\n */\n if (msg.sender != operator) {\n /**\n * @dev check if operator is a smart contract\n */\n require(_isContract(operator), \"HOLOGRAPH: operator not contract\");\n /**\n * @dev check if smart contract is owned by sender\n */\n require(Ownable(operator).owner() == msg.sender, \"HOLOGRAPH: sender not owner\");\n }\n /**\n * @dev get current bonded amount by operator\n */\n uint256 amount = _bondedAmounts[operator];\n /**\n * @dev unset operator bond amount before making a transfer\n */\n _bondedAmounts[operator] = 0;\n /**\n * @dev remove all operator references\n */\n _popOperator(_bondedOperators[operator] - 1, _operatorPodIndex[operator]);\n /**\n * @dev transfer tokens to recipient\n */\n require(_utilityToken().transfer(recipient, amount), \"HOLOGRAPH: token transfer failed\");\n }\n\n /**\n * @notice Get the address of the Holograph Bridge module\n * @dev Used for beaming holographable assets cross-chain\n */\n function getBridge() external view returns (address bridge) {\n assembly {\n bridge := sload(_bridgeSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Bridge module address\n * @param bridge address of the Holograph Bridge smart contract to use\n */\n function setBridge(address bridge) external onlyAdmin {\n assembly {\n sstore(_bridgeSlot, bridge)\n }\n }\n\n /**\n * @notice Get the Holograph Protocol contract\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\n */\n function getHolograph() external view returns (address holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Protocol contract address\n * @param holograph address of the Holograph Protocol smart contract to use\n */\n function setHolograph(address holograph) external onlyAdmin {\n assembly {\n sstore(_holographSlot, holograph)\n }\n }\n\n /**\n * @notice Get the address of the Holograph Interfaces module\n * @dev Holograph uses this contract to store data that needs to be accessed by a large portion of the modules\n */\n function getInterfaces() external view returns (address interfaces) {\n assembly {\n interfaces := sload(_interfacesSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Interfaces module address\n * @param interfaces address of the Holograph Interfaces smart contract to use\n */\n function setInterfaces(address interfaces) external onlyAdmin {\n assembly {\n sstore(_interfacesSlot, interfaces)\n }\n }\n\n /**\n * @notice Get the address of the Holograph Messaging Module\n * @dev All cross-chain message requests will get forwarded to this adress\n */\n function getMessagingModule() external view returns (address messagingModule) {\n assembly {\n messagingModule := sload(_messagingModuleSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Messaging Module address\n * @param messagingModule address of the LayerZero Endpoint to use\n */\n function setMessagingModule(address messagingModule) external onlyAdmin {\n assembly {\n sstore(_messagingModuleSlot, messagingModule)\n }\n }\n\n /**\n * @notice Get the Holograph Registry module\n * @dev This module stores a reference for all deployed holographable smart contracts\n */\n function getRegistry() external view returns (address registry) {\n assembly {\n registry := sload(_registrySlot)\n }\n }\n\n /**\n * @notice Update the Holograph Registry module address\n * @param registry address of the Holograph Registry smart contract to use\n */\n function setRegistry(address registry) external onlyAdmin {\n assembly {\n sstore(_registrySlot, registry)\n }\n }\n\n /**\n * @notice Get the Holograph Utility Token address\n * @dev This is the official utility token of the Holograph Protocol\n */\n function getUtilityToken() external view returns (address utilityToken) {\n assembly {\n utilityToken := sload(_utilityTokenSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Utility Token address\n * @param utilityToken address of the Holograph Utility Token smart contract to use\n */\n function setUtilityToken(address utilityToken) external onlyAdmin {\n assembly {\n sstore(_utilityTokenSlot, utilityToken)\n }\n }\n\n /**\n * @notice Get the Minimum Gas Price\n * @dev The minimum value required to execute a job without it being marked as under priced\n */\n function getMinGasPrice() external view returns (uint256 minGasPrice) {\n assembly {\n minGasPrice := sload(_minGasPriceSlot)\n }\n }\n\n /**\n * @notice Update the Minimum Gas Price\n * @param minGasPrice amount to set for minimum gas price\n */\n function setMinGasPrice(uint256 minGasPrice) external onlyAdmin {\n assembly {\n sstore(_minGasPriceSlot, minGasPrice)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Bridge Interface\n */\n function _bridge() private view returns (address bridge) {\n assembly {\n bridge := sload(_bridgeSlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Interface\n */\n function _holograph() private view returns (HolographInterface holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Interfaces Interface\n */\n function _interfaces() private view returns (HolographInterfacesInterface interfaces) {\n assembly {\n interfaces := sload(_interfacesSlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Messaging Module Interface\n */\n function _messagingModule() private view returns (CrossChainMessageInterface messagingModule) {\n assembly {\n messagingModule := sload(_messagingModuleSlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Registry Interface\n */\n function _registry() private view returns (HolographRegistryInterface registry) {\n assembly {\n registry := sload(_registrySlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Utility Token Interface\n */\n function _utilityToken() private view returns (HolographERC20Interface utilityToken) {\n assembly {\n utilityToken := sload(_utilityTokenSlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the minimum gas price allowed\n */\n function _minGasPrice() private view returns (uint256 minGasPrice) {\n assembly {\n minGasPrice := sload(_minGasPriceSlot)\n }\n }\n\n /**\n * @dev Internal nonce, that increments on each call, used for randomness\n */\n function _jobNonce() private returns (uint256 jobNonce) {\n assembly {\n jobNonce := add(sload(_jobNonceSlot), 0x0000000000000000000000000000000000000000000000000000000000000001)\n sstore(_jobNonceSlot, jobNonce)\n }\n }\n\n /**\n * @dev Internal function used to remove an operator from a particular pod\n */\n function _popOperator(uint256 pod, uint256 operatorIndex) private {\n /**\n * @dev only pop the operator if it's not a zero address\n */\n if (operatorIndex > 0) {\n unchecked {\n address operator = _operatorPods[pod][operatorIndex];\n /**\n * @dev mark operator as no longer bonded\n */\n _bondedOperators[operator] = 0;\n /**\n * @dev remove pod reference for operator\n */\n _operatorPodIndex[operator] = 0;\n uint256 lastIndex = _operatorPods[pod].length - 1;\n if (lastIndex != operatorIndex) {\n /**\n * @dev if operator is not last index, move last index to operator's current index\n */\n _operatorPods[pod][operatorIndex] = _operatorPods[pod][lastIndex];\n _operatorPodIndex[_operatorPods[pod][operatorIndex]] = operatorIndex;\n }\n /**\n * @dev delete last index\n */\n delete _operatorPods[pod][lastIndex];\n /**\n * @dev shorten array length\n */\n _operatorPods[pod].pop();\n }\n }\n }\n\n /**\n * @dev Internal function used for calculating the base bonding amount for a pod\n */\n function _getBaseBondAmount(uint256 pod) private view returns (uint256) {\n return (_podMultiplier ** pod) * _baseBondAmount;\n }\n\n /**\n * @dev Internal function used for calculating the current bonding amount for a pod\n */\n function _getCurrentBondAmount(uint256 pod) private view returns (uint256) {\n uint256 current = (_podMultiplier ** pod) * _baseBondAmount;\n if (pod >= _operatorPods.length) {\n return current;\n }\n uint256 threshold = _operatorThreshold / (2 ** pod);\n uint256 position = _operatorPods[pod].length;\n if (position > threshold) {\n position -= threshold;\n // current += (current / _operatorThresholdDivisor) * position;\n current += (current / _operatorThresholdDivisor) * (position / _operatorThresholdStep);\n }\n return current;\n }\n\n /**\n * @dev Internal function used for generating a random pod operator selection by using previously mined blocks\n */\n function _randomBlockHash(uint256 random, uint256 podSize, uint256 n) private view returns (uint256) {\n unchecked {\n return (random + uint256(blockhash(block.number - n))) % podSize;\n }\n }\n\n /**\n * @dev Internal function used for checking if a contract has been deployed at address\n */\n function _isContract(address contractAddress) private view returns (bool) {\n bytes32 codehash;\n assembly {\n codehash := extcodehash(contractAddress)\n }\n return (codehash != 0x0 && codehash != 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470);\n }\n\n /**\n * @dev Purposefully left empty to ensure ether transfers use least amount of gas possible\n */\n receive() external payable {}\n\n /**\n * @dev Purposefully reverts to prevent any calls to undefined functions\n */\n fallback() external payable {\n revert();\n }\n}\n" + }, + "contracts/HolographRegistry.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./abstract/Admin.sol\";\nimport \"./abstract/Initializable.sol\";\n\nimport \"./interface/HolographInterface.sol\";\nimport \"./interface/HolographRegistryInterface.sol\";\nimport \"./interface/InitializableInterface.sol\";\n\n/**\n * @title Holograph Registry\n * @author https://github.com/holographxyz\n * @notice View and validate all deployed holographable contracts\n * @dev Use this to: validate that contracts are Holograph Protocol compliant, get source code for supported standards, and interact with hTokens\n */\ncontract HolographRegistry is Admin, Initializable, HolographRegistryInterface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\n */\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.utilityToken')) - 1)\n */\n bytes32 constant _utilityTokenSlot = 0xbf76518d46db472b71aa7677a0908b8016f3dee568415ffa24055f9a670f9c37;\n\n /**\n * @dev Array of all Holographable contracts that were ever deployed on this chain\n */\n address[] private _holographableContracts;\n\n /**\n * @dev A mapping of hashes to contract addresses\n */\n mapping(bytes32 => address) private _holographedContractsHashMap;\n\n /**\n * @dev Storage slot for saving contract type to contract address references\n */\n mapping(bytes32 => address) private _contractTypeAddresses;\n\n /**\n * @dev Reserved type addresses for Admin\n * Note: this is used for defining default contracts\n */\n mapping(bytes32 => bool) private _reservedTypes;\n\n /**\n * @dev A list of smart contracts that are guaranteed secure and holographable\n */\n mapping(address => bool) private _holographedContracts;\n\n /**\n * @dev Mapping of all hTokens available for the different EVM chains\n */\n mapping(uint32 => address) private _hTokens;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address holograph, bytes32[] memory reservedTypes) = abi.decode(initPayload, (address, bytes32[]));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_holographSlot, holograph)\n }\n for (uint256 i = 0; i < reservedTypes.length; i++) {\n _reservedTypes[reservedTypes[i]] = true;\n }\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n function isHolographedContract(address smartContract) external view returns (bool) {\n return _holographedContracts[smartContract];\n }\n\n function isHolographedHashDeployed(bytes32 hash) external view returns (bool) {\n return _holographedContractsHashMap[hash] != address(0);\n }\n\n function holographableEvent(bytes calldata payload) external {\n if (_holographedContracts[msg.sender]) {\n emit HolographableContractEvent(msg.sender, payload);\n }\n }\n\n /**\n * @dev Allows to reference a deployed smart contract, and use it's code as reference inside of Holographers\n */\n function referenceContractTypeAddress(address contractAddress) external returns (bytes32) {\n bytes32 contractType;\n assembly {\n contractType := extcodehash(contractAddress)\n }\n require(\n (// check that bytecode is not empty\n contractType != 0x0 &&\n // check that hash is not for empty bytes\n contractType != 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470),\n \"HOLOGRAPH: empty contract\"\n );\n require(_contractTypeAddresses[contractType] == address(0), \"HOLOGRAPH: contract already set\");\n require(!_reservedTypes[contractType], \"HOLOGRAPH: reserved address type\");\n _contractTypeAddresses[contractType] = contractAddress;\n return contractType;\n }\n\n /**\n * @dev Returns the contract address for a contract type\n */\n function getContractTypeAddress(bytes32 contractType) external view returns (address) {\n return _contractTypeAddresses[contractType];\n }\n\n /**\n * @dev Sets the contract address for a contract type\n */\n function setContractTypeAddress(bytes32 contractType, address contractAddress) external onlyAdmin {\n require(_reservedTypes[contractType], \"HOLOGRAPH: not reserved type\");\n _contractTypeAddresses[contractType] = contractAddress;\n }\n\n /**\n * @notice Get the Holograph Protocol contract\n * @dev This contract stores a reference to all the primary modules and variables of the protocol\n */\n function getHolograph() external view returns (address holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Protocol contract address\n * @param holograph address of the Holograph Protocol smart contract to use\n */\n function setHolograph(address holograph) external onlyAdmin {\n assembly {\n sstore(_holographSlot, holograph)\n }\n }\n\n /**\n * @notice Get set length list, starting from index, for all holographable contracts\n * @param index The index to start enumeration from\n * @param length The length of returned results\n * @return contracts address[] Returns a set length array of holographable contracts deployed\n */\n function getHolographableContracts(uint256 index, uint256 length) external view returns (address[] memory contracts) {\n uint256 supply = _holographableContracts.length;\n if (index + length > supply) {\n length = supply - index;\n }\n contracts = new address[](length);\n for (uint256 i = 0; i < length; i++) {\n contracts[i] = _holographableContracts[index + i];\n }\n }\n\n /**\n * @notice Get total number of deployed holographable contracts\n */\n function getHolographableContractsLength() external view returns (uint256) {\n return _holographableContracts.length;\n }\n\n /**\n * @dev Returns the address for a holographed hash\n */\n function getHolographedHashAddress(bytes32 hash) external view returns (address) {\n return _holographedContractsHashMap[hash];\n }\n\n /**\n * @dev Allows Holograph Factory to register a deployed contract, referenced with deployment hash\n */\n function setHolographedHashAddress(bytes32 hash, address contractAddress) external {\n address holograph;\n assembly {\n holograph := sload(_holographSlot)\n }\n require(msg.sender == HolographInterface(holograph).getFactory(), \"HOLOGRAPH: factory only function\");\n _holographedContractsHashMap[hash] = contractAddress;\n _holographedContracts[contractAddress] = true;\n _holographableContracts.push(contractAddress);\n }\n\n /**\n * @dev Returns the hToken address for a given chain id\n */\n function getHToken(uint32 chainId) external view returns (address) {\n return _hTokens[chainId];\n }\n\n /**\n * @dev Sets the hToken address for a specific chain id\n */\n function setHToken(uint32 chainId, address hToken) external onlyAdmin {\n _hTokens[chainId] = hToken;\n }\n\n /**\n * @dev Returns the reserved contract address for a contract type\n */\n function getReservedContractTypeAddress(bytes32 contractType) external view returns (address contractTypeAddress) {\n if (_reservedTypes[contractType]) {\n contractTypeAddress = _contractTypeAddresses[contractType];\n }\n }\n\n /**\n * @dev Allows admin to update or toggle reserved type\n */\n function setReservedContractTypeAddress(bytes32 hash, bool reserved) external onlyAdmin {\n _reservedTypes[hash] = reserved;\n }\n\n /**\n * @dev Allows admin to update or toggle reserved types\n */\n function setReservedContractTypeAddresses(bytes32[] calldata hashes, bool[] calldata reserved) external onlyAdmin {\n for (uint256 i = 0; i < hashes.length; i++) {\n _reservedTypes[hashes[i]] = reserved[i];\n }\n }\n\n /**\n * @notice Get the Holograph Utility Token address\n * @dev This is the official utility token of the Holograph Protocol\n */\n function getUtilityToken() external view returns (address utilityToken) {\n assembly {\n utilityToken := sload(_utilityTokenSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Utility Token address\n * @param utilityToken address of the Holograph Utility Token smart contract to use\n */\n function setUtilityToken(address utilityToken) external onlyAdmin {\n assembly {\n sstore(_utilityTokenSlot, utilityToken)\n }\n }\n\n /**\n * @dev Purposefully reverts to prevent having any type of ether transfered into the contract\n */\n receive() external payable {\n revert();\n }\n\n /**\n * @dev Purposefully reverts to prevent any calls to undefined functions\n */\n fallback() external payable {\n revert();\n }\n}\n" + }, + "contracts/HolographTreasury.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./abstract/Admin.sol\";\nimport \"./abstract/Initializable.sol\";\n\nimport \"./interface/HolographERC20Interface.sol\";\nimport \"./interface/HolographERC721Interface.sol\";\nimport \"./interface/HolographInterface.sol\";\nimport \"./interface/HolographTreasuryInterface.sol\";\nimport \"./interface/HolographFactoryInterface.sol\";\nimport \"./interface/HolographOperatorInterface.sol\";\nimport \"./interface/HolographRegistryInterface.sol\";\nimport \"./interface/InitializableInterface.sol\";\n\nimport \"./struct/DeploymentConfig.sol\";\nimport \"./struct/Verification.sol\";\n\n/**\n * @title Holograph Treasury\n * @author https://github.com/holographxyz\n * @notice This contract holds and manages the protocol treasury\n * @dev As of now this is an empty zero logic contract and is still a work in progress\n */\ncontract HolographTreasury is Admin, Initializable, HolographTreasuryInterface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.bridge')) - 1)\n */\n bytes32 constant _bridgeSlot = 0xeb87cbb21687feb327e3d58c6c16d552231d12c7a0e8115042a4165fac8a77f9;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\n */\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.operator')) - 1)\n */\n bytes32 constant _operatorSlot = 0x7caba557ad34138fa3b7e43fb574e0e6cc10481c3073e0dffbc560db81b5c60f;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\n */\n bytes32 constant _registrySlot = 0xce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address bridge, address holograph, address operator, address registry) = abi.decode(\n initPayload,\n (address, address, address, address)\n );\n assembly {\n sstore(_adminSlot, origin())\n\n sstore(_bridgeSlot, bridge)\n sstore(_holographSlot, holograph)\n sstore(_operatorSlot, operator)\n sstore(_registrySlot, registry)\n }\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @notice Get the address of the Holograph Bridge module\n * @dev Used for beaming holographable assets cross-chain\n */\n function getBridge() external view returns (address bridge) {\n assembly {\n bridge := sload(_bridgeSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Bridge module address\n * @param bridge address of the Holograph Bridge smart contract to use\n */\n function setBridge(address bridge) external onlyAdmin {\n assembly {\n sstore(_bridgeSlot, bridge)\n }\n }\n\n /**\n * @notice Get the Holograph Protocol contract\n * @dev This contract stores a reference to all the primary modules and variables of the protocol\n */\n function getHolograph() external view returns (address holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Protocol contract address\n * @param holograph address of the Holograph Protocol smart contract to use\n */\n function setHolograph(address holograph) external onlyAdmin {\n assembly {\n sstore(_holographSlot, holograph)\n }\n }\n\n /**\n * @notice Get the address of the Holograph Operator module\n * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module\n */\n function getOperator() external view returns (address operator) {\n assembly {\n operator := sload(_operatorSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Operator module address\n * @param operator address of the Holograph Operator smart contract to use\n */\n function setOperator(address operator) external onlyAdmin {\n assembly {\n sstore(_operatorSlot, operator)\n }\n }\n\n /**\n * @notice Get the Holograph Registry module\n * @dev This module stores a reference for all deployed holographable smart contracts\n */\n function getRegistry() external view returns (address registry) {\n assembly {\n registry := sload(_registrySlot)\n }\n }\n\n /**\n * @notice Update the Holograph Registry module address\n * @param registry address of the Holograph Registry smart contract to use\n */\n function setRegistry(address registry) external onlyAdmin {\n assembly {\n sstore(_registrySlot, registry)\n }\n }\n\n function _bridge() private view returns (address bridge) {\n assembly {\n bridge := sload(_bridgeSlot)\n }\n }\n\n function _holograph() private view returns (address holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n function _operator() private view returns (address operator) {\n assembly {\n operator := sload(_operatorSlot)\n }\n }\n\n function _registry() private view returns (address registry) {\n assembly {\n registry := sload(_registrySlot)\n }\n }\n\n /**\n * @dev Purposefully left empty to ensure ether transfers use least amount of gas possible\n */\n receive() external payable {}\n\n /**\n * @dev Purposefully reverts to prevent any calls to undefined functions\n */\n fallback() external payable {\n revert();\n }\n}\n" + }, + "contracts/interface/CollectionURI.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\ninterface CollectionURI {\n function contractURI() external view returns (string memory);\n}\n" + }, + "contracts/interface/CrossChainMessageInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\ninterface CrossChainMessageInterface {\n function send(\n uint256 gasLimit,\n uint256 gasPrice,\n uint32 toChain,\n address msgSender,\n uint256 msgValue,\n bytes calldata crossChainPayload\n ) external payable;\n\n function getMessageFee(\n uint32 toChain,\n uint256 gasLimit,\n uint256 gasPrice,\n bytes calldata crossChainPayload\n ) external view returns (uint256 hlgFee, uint256 msgFee, uint256 dstGasPrice);\n\n function getHlgFee(\n uint32 toChain,\n uint256 gasLimit,\n uint256 gasPrice,\n bytes calldata crossChainPayload\n ) external view returns (uint256 hlgFee);\n}\n" + }, + "contracts/interface/ERC1271.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1271.sol)\n\npragma solidity 0.8.13;\n\n/**\n * @dev Interface of the ERC1271 standard signature validation method for\n * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271].\n *\n * _Available since v4.1._\n */\ninterface ERC1271 {\n /**\n * @dev Should return whether the signature provided is valid for the provided data\n * @param hash Hash of the data to be signed\n * @param signature Signature byte array associated with _data\n */\n function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue);\n}\n" + }, + "contracts/interface/ERC165.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity 0.8.13;\n\ninterface ERC165 {\n /// @notice Query if a contract implements an interface\n /// @param interfaceID The interface identifier, as specified in ERC-165\n /// @dev Interface identification is specified in ERC-165. This function\n /// uses less than 30,000 gas.\n /// @return `true` if the contract implements `interfaceID` and\n /// `interfaceID` is not 0xffffffff, `false` otherwise\n function supportsInterface(bytes4 interfaceID) external view returns (bool);\n}\n" + }, + "contracts/interface/ERC20.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity 0.8.13;\n\ninterface ERC20 {\n function totalSupply() external view returns (uint256);\n\n function balanceOf(address _owner) external view returns (uint256 balance);\n\n function transfer(address _to, uint256 _value) external returns (bool success);\n\n function transferFrom(address _from, address _to, uint256 _value) external returns (bool success);\n\n function approve(address _spender, uint256 _value) external returns (bool success);\n\n function allowance(address _owner, address _spender) external view returns (uint256 remaining);\n\n event Transfer(address indexed _from, address indexed _to, uint256 _value);\n\n event Approval(address indexed _owner, address indexed _spender, uint256 _value);\n}\n" + }, + "contracts/interface/ERC20Burnable.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity 0.8.13;\n\ninterface ERC20Burnable {\n function burn(uint256 amount) external;\n\n function burnFrom(address account, uint256 amount) external returns (bool);\n}\n" + }, + "contracts/interface/ERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity 0.8.13;\n\ninterface ERC20Metadata {\n function decimals() external view returns (uint8);\n\n function name() external view returns (string memory);\n\n function symbol() external view returns (string memory);\n}\n" + }, + "contracts/interface/ERC20Permit.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)\n\npragma solidity 0.8.13;\n\n/**\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n */\ninterface ERC20Permit {\n /**\n * @dev Sets `value` as the allowance of `spender` over ``account``'s tokens,\n * given ``account``'s signed approval.\n *\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n * ordering also apply here.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `deadline` must be a timestamp in the future.\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `account`\n * over the EIP712-formatted function arguments.\n * - the signature must use ``account``'s current nonce (see {nonces}).\n *\n * For more information on the signature format, see the\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n * section].\n */\n function permit(\n address account,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n /**\n * @dev Returns the current nonce for `account`. This value must be\n * included whenever a signature is generated for {permit}.\n *\n * Every successful call to {permit} increases ``account``'s nonce by one. This\n * prevents a signature from being used multiple times.\n */\n function nonces(address account) external view returns (uint256);\n\n /**\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n" + }, + "contracts/interface/ERC20Receiver.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity 0.8.13;\n\ninterface ERC20Receiver {\n function onERC20Received(\n address account,\n address recipient,\n uint256 amount,\n bytes memory data\n ) external returns (bytes4);\n}\n" + }, + "contracts/interface/ERC20Safer.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity 0.8.13;\n\ninterface ERC20Safer {\n function safeTransfer(address recipient, uint256 amount) external returns (bool);\n\n function safeTransfer(address recipient, uint256 amount, bytes memory data) external returns (bool);\n\n function safeTransferFrom(address account, address recipient, uint256 amount) external returns (bool);\n\n function safeTransferFrom(\n address account,\n address recipient,\n uint256 amount,\n bytes memory data\n ) external returns (bool);\n}\n" + }, + "contracts/interface/ERC721.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity 0.8.13;\n\n/// @title ERC-721 Non-Fungible Token Standard\n/// @dev See https://eips.ethereum.org/EIPS/eip-721\n/// Note: the ERC-165 identifier for this interface is 0x80ac58cd.\n/* is ERC165 */\ninterface ERC721 {\n /// @dev This emits when ownership of any NFT changes by any mechanism.\n /// This event emits when NFTs are created (`from` == 0) and destroyed\n /// (`to` == 0). Exception: during contract creation, any number of NFTs\n /// may be created and assigned without emitting Transfer. At the time of\n /// any transfer, the approved address for that NFT (if any) is reset to none.\n event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId);\n\n /// @dev This emits when the approved address for an NFT is changed or\n /// reaffirmed. The zero address indicates there is no approved address.\n /// When a Transfer event emits, this also indicates that the approved\n /// address for that NFT (if any) is reset to none.\n event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId);\n\n /// @dev This emits when an operator is enabled or disabled for an owner.\n /// The operator can manage all NFTs of the owner.\n event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved);\n\n /// @notice Count all NFTs assigned to an owner\n /// @dev NFTs assigned to the zero address are considered invalid, and this\n /// function throws for queries about the zero address.\n /// @param _owner An address for whom to query the balance\n /// @return The number of NFTs owned by `_owner`, possibly zero\n function balanceOf(address _owner) external view returns (uint256);\n\n /// @notice Find the owner of an NFT\n /// @dev NFTs assigned to zero address are considered invalid, and queries\n /// about them do throw.\n /// @param _tokenId The identifier for an NFT\n /// @return The address of the owner of the NFT\n function ownerOf(uint256 _tokenId) external view returns (address);\n\n /// @notice Transfers the ownership of an NFT from one address to another address\n /// @dev Throws unless `msg.sender` is the current owner, an authorized\n /// operator, or the approved address for this NFT. Throws if `_from` is\n /// not the current owner. Throws if `_to` is the zero address. Throws if\n /// `_tokenId` is not a valid NFT. When transfer is complete, this function\n /// checks if `_to` is a smart contract (code size > 0). If so, it calls\n /// `onERC721Received` on `_to` and throws if the return value is not\n /// `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`.\n /// @param _from The current owner of the NFT\n /// @param _to The new owner\n /// @param _tokenId The NFT to transfer\n /// @param data Additional data with no specified format, sent in call to `_to`\n function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes calldata data) external payable;\n\n /// @notice Transfers the ownership of an NFT from one address to another address\n /// @dev This works identically to the other function with an extra data parameter,\n /// except this function just sets data to \"\".\n /// @param _from The current owner of the NFT\n /// @param _to The new owner\n /// @param _tokenId The NFT to transfer\n function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable;\n\n /// @notice Transfer ownership of an NFT -- THE CALLER IS RESPONSIBLE\n /// TO CONFIRM THAT `_to` IS CAPABLE OF RECEIVING NFTS OR ELSE\n /// THEY MAY BE PERMANENTLY LOST\n /// @dev Throws unless `msg.sender` is the current owner, an authorized\n /// operator, or the approved address for this NFT. Throws if `_from` is\n /// not the current owner. Throws if `_to` is the zero address. Throws if\n /// `_tokenId` is not a valid NFT.\n /// @param _from The current owner of the NFT\n /// @param _to The new owner\n /// @param _tokenId The NFT to transfer\n function transferFrom(address _from, address _to, uint256 _tokenId) external payable;\n\n /// @notice Change or reaffirm the approved address for an NFT\n /// @dev The zero address indicates there is no approved address.\n /// Throws unless `msg.sender` is the current NFT owner, or an authorized\n /// operator of the current owner.\n /// @param _approved The new approved NFT controller\n /// @param _tokenId The NFT to approve\n function approve(address _approved, uint256 _tokenId) external payable;\n\n /// @notice Enable or disable approval for a third party (\"operator\") to manage\n /// all of `msg.sender`'s assets\n /// @dev Emits the ApprovalForAll event. The contract MUST allow\n /// multiple operators per owner.\n /// @param _operator Address to add to the set of authorized operators\n /// @param _approved True if the operator is approved, false to revoke approval\n function setApprovalForAll(address _operator, bool _approved) external;\n\n /// @notice Get the approved address for a single NFT\n /// @dev Throws if `_tokenId` is not a valid NFT.\n /// @param _tokenId The NFT to find the approved address for\n /// @return The approved address for this NFT, or the zero address if there is none\n function getApproved(uint256 _tokenId) external view returns (address);\n\n /// @notice Query if an address is an authorized operator for another address\n /// @param _owner The address that owns the NFTs\n /// @param _operator The address that acts on behalf of the owner\n /// @return True if `_operator` is an approved operator for `_owner`, false otherwise\n function isApprovedForAll(address _owner, address _operator) external view returns (bool);\n}\n" + }, + "contracts/interface/ERC721Enumerable.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity 0.8.13;\n\n/// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension\n/// @dev See https://eips.ethereum.org/EIPS/eip-721\n/// Note: the ERC-165 identifier for this interface is 0x780e9d63.\n/* is ERC721 */\ninterface ERC721Enumerable {\n /// @notice Count NFTs tracked by this contract\n /// @return A count of valid NFTs tracked by this contract, where each one of\n /// them has an assigned and queryable owner not equal to the zero address\n function totalSupply() external view returns (uint256);\n\n /// @notice Enumerate valid NFTs\n /// @dev Throws if `_index` >= `totalSupply()`.\n /// @param _index A counter less than `totalSupply()`\n /// @return The token identifier for the `_index`th NFT,\n /// (sort order not specified)\n function tokenByIndex(uint256 _index) external view returns (uint256);\n\n /// @notice Enumerate NFTs assigned to an owner\n /// @dev Throws if `_index` >= `balanceOf(_owner)` or if\n /// `_owner` is the zero address, representing invalid NFTs.\n /// @param _owner An address where we are interested in NFTs owned by them\n /// @param _index A counter less than `balanceOf(_owner)`\n /// @return The token identifier for the `_index`th NFT assigned to `_owner`,\n /// (sort order not specified)\n function tokenOfOwnerByIndex(address _owner, uint256 _index) external view returns (uint256);\n}\n" + }, + "contracts/interface/ERC721Metadata.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity 0.8.13;\n\n/// @title ERC-721 Non-Fungible Token Standard, optional metadata extension\n/// @dev See https://eips.ethereum.org/EIPS/eip-721\n/// Note: the ERC-165 identifier for this interface is 0x5b5e139f.\n/* is ERC721 */\ninterface ERC721Metadata {\n /// @notice A descriptive name for a collection of NFTs in this contract\n function name() external view returns (string memory _name);\n\n /// @notice An abbreviated name for NFTs in this contract\n function symbol() external view returns (string memory _symbol);\n\n /// @notice A distinct Uniform Resource Identifier (URI) for a given asset.\n /// @dev Throws if `_tokenId` is not a valid NFT. URIs are defined in RFC\n /// 3986. The URI may point to a JSON file that conforms to the \"ERC721\n /// Metadata JSON Schema\".\n function tokenURI(uint256 _tokenId) external view returns (string memory);\n}\n" + }, + "contracts/interface/ERC721TokenReceiver.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\n/// @dev Note: the ERC-165 identifier for this interface is 0x150b7a02.\ninterface ERC721TokenReceiver {\n /// @notice Handle the receipt of an NFT\n /// @dev The ERC721 smart contract calls this function on the recipient\n /// after a `transfer`. This function MAY throw to revert and reject the\n /// transfer. Return of other than the magic value MUST result in the\n /// transaction being reverted.\n /// Note: the contract address is always the message sender.\n /// @param _operator The address which called `safeTransferFrom` function\n /// @param _from The address which previously owned the token\n /// @param _tokenId The NFT identifier which is being transferred\n /// @param _data Additional data with no specified format\n /// @return `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`\n /// unless throwing\n function onERC721Received(\n address _operator,\n address _from,\n uint256 _tokenId,\n bytes calldata _data\n ) external returns (bytes4);\n}\n" + }, + "contracts/interface/Holographable.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\ninterface Holographable {\n function bridgeIn(uint32 fromChain, bytes calldata payload) external returns (bytes4);\n\n function bridgeOut(\n uint32 toChain,\n address sender,\n bytes calldata payload\n ) external returns (bytes4 selector, bytes memory data);\n}\n" + }, + "contracts/interface/HolographBridgeInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\n/**\n * @title Holograph Bridge\n * @author https://github.com/holographxyz\n * @notice Beam any holographable contracts and assets across blockchains\n * @dev The contract abstracts all the complexities of making bridge requests and uses a universal interface to bridge any type of holographable assets\n */\ninterface HolographBridgeInterface {\n /**\n * @notice Receive a beam from another chain\n * @dev This function can only be called by the Holograph Operator module\n * @param fromChain Holograph Chain ID where the brigeOutRequest was created\n * @param holographableContract address of the destination contract that the bridgeInRequest is targeted for\n * @param hToken address of the hToken contract that wrapped the origin chain native gas token\n * @param hTokenRecipient address of recipient for the hToken reward\n * @param hTokenValue exact amount of hToken reward in wei\n * @param doNotRevert boolean used to specify if the call should revert\n * @param bridgeInPayload actual abi encoded bytes of the data that the holographable contract bridgeIn function will receive\n */\n function bridgeInRequest(\n uint256 nonce,\n uint32 fromChain,\n address holographableContract,\n address hToken,\n address hTokenRecipient,\n uint256 hTokenValue,\n bool doNotRevert,\n bytes calldata bridgeInPayload\n ) external payable;\n\n /**\n * @notice Create a beam request for a destination chain\n * @dev This function works for deploying contracts and beaming supported holographable assets across chains\n * @param toChain Holograph Chain ID where the beam is being sent to\n * @param holographableContract address of the contract for which the bridge request is being made\n * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain\n * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\n */\n function bridgeOutRequest(\n uint32 toChain,\n address holographableContract,\n uint256 gasLimit,\n uint256 gasPrice,\n bytes calldata bridgeOutPayload\n ) external payable;\n\n /**\n * @notice Do not call this function, it will always revert\n * @dev Used by getBridgeOutRequestPayload function\n * It is purposefully inverted to always revert on a successful call\n * Marked as external and not private to allow use inside try/catch of getBridgeOutRequestPayload function\n * If this function does not revert and returns a string, it is the actual revert reason\n * @param sender address of actual sender that is planning to make a bridgeOutRequest call\n * @param toChain holograph chain id of destination chain\n * @param holographableContract address of the contract for which the bridge request is being made\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\n */\n function revertedBridgeOutRequest(\n address sender,\n uint32 toChain,\n address holographableContract,\n bytes calldata bridgeOutPayload\n ) external returns (string memory revertReason);\n\n /**\n * @notice Get the payload created by the bridgeOutRequest function\n * @dev Use this function to get the payload that will be generated by a bridgeOutRequest\n * Only use this with a static call\n * @param toChain Holograph Chain ID where the beam is being sent to\n * @param holographableContract address of the contract for which the bridge request is being made\n * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain\n * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\n * @return samplePayload bytes made up of the bridgeOutRequest payload\n */\n function getBridgeOutRequestPayload(\n uint32 toChain,\n address holographableContract,\n uint256 gasLimit,\n uint256 gasPrice,\n bytes calldata bridgeOutPayload\n ) external returns (bytes memory samplePayload);\n\n /**\n * @notice Get the fees associated with sending specific payload\n * @dev Will provide exact costs on protocol and message side, combine the two to get total\n * @param toChain holograph chain id of destination chain for payload\n * @param gasLimit amount of gas to provide for executing payload on destination chain\n * @param gasPrice maximum amount to pay for gas price, can be set to 0 and will be chose automatically\n * @param crossChainPayload the entire packet being sent cross-chain\n * @return hlgFee the amount (in wei) of native gas token that will cost for finalizing job on destiantion chain\n * @return msgFee the amount (in wei) of native gas token that will cost for sending message to destiantion chain\n * @return dstGasPrice the amount (in wei) that destination message maximum gas price will be\n */\n function getMessageFee(\n uint32 toChain,\n uint256 gasLimit,\n uint256 gasPrice,\n bytes calldata crossChainPayload\n ) external view returns (uint256 hlgFee, uint256 msgFee, uint256 dstGasPrice);\n\n /**\n * @notice Get the address of the Holograph Factory module\n * @dev Used for deploying holographable smart contracts\n */\n function getFactory() external view returns (address factory);\n\n /**\n * @notice Update the Holograph Factory module address\n * @param factory address of the Holograph Factory smart contract to use\n */\n function setFactory(address factory) external;\n\n /**\n * @notice Get the Holograph Protocol contract\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\n */\n function getHolograph() external view returns (address holograph);\n\n /**\n * @notice Update the Holograph Protocol contract address\n * @param holograph address of the Holograph Protocol smart contract to use\n */\n function setHolograph(address holograph) external;\n\n /**\n * @notice Get the latest job nonce\n * @dev You can use the job nonce as a way to calculate total amount of bridge requests that have been made\n */\n function getJobNonce() external view returns (uint256 jobNonce);\n\n /**\n * @notice Get the address of the Holograph Operator module\n * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module\n */\n function getOperator() external view returns (address operator);\n\n /**\n * @notice Update the Holograph Operator module address\n * @param operator address of the Holograph Operator smart contract to use\n */\n function setOperator(address operator) external;\n\n /**\n * @notice Get the Holograph Registry module\n * @dev This module stores a reference for all deployed holographable smart contracts\n */\n function getRegistry() external view returns (address registry);\n\n /**\n * @notice Update the Holograph Registry module address\n * @param registry address of the Holograph Registry smart contract to use\n */\n function setRegistry(address registry) external;\n}\n" + }, + "contracts/interface/HolographedERC1155.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\n/// @title Holograph ERC-1155 Non-Fungible Token Standard\n/// @dev See https://holograph.network/standard/ERC-1155\n/// Note: the ERC-165 identifier for this interface is 0xFFFFFFFF.\ninterface HolographedERC1155 {\n // event id = 1\n function bridgeIn(\n uint32 _chainId,\n address _from,\n address _to,\n uint256 _tokenId,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 2\n function bridgeOut(\n uint32 _chainId,\n address _from,\n address _to,\n uint256 _tokenId,\n uint256 _amount\n ) external returns (bytes memory _data);\n\n // event id = 3\n function afterApprove(address _owner, address _to, uint256 _tokenId, uint256 _amount) external returns (bool success);\n\n // event id = 4\n function beforeApprove(\n address _owner,\n address _to,\n uint256 _tokenId,\n uint256 _amount\n ) external returns (bool success);\n\n // event id = 5\n function afterApprovalAll(address _to, bool _approved) external returns (bool success);\n\n // event id = 6\n function beforeApprovalAll(address _to, bool _approved) external returns (bool success);\n\n // event id = 7\n function afterBurn(address _owner, uint256 _tokenId, uint256 _amount) external returns (bool success);\n\n // event id = 8\n function beforeBurn(address _owner, uint256 _tokenId, uint256 _amount) external returns (bool success);\n\n // event id = 9\n function afterMint(address _owner, uint256 _tokenId, uint256 _amount) external returns (bool success);\n\n // event id = 10\n function beforeMint(address _owner, uint256 _tokenId, uint256 _amount) external returns (bool success);\n\n // event id = 11\n function afterSafeTransfer(\n address _from,\n address _to,\n uint256 _tokenId,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 12\n function beforeSafeTransfer(\n address _from,\n address _to,\n uint256 _tokenId,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 13\n function afterTransfer(\n address _from,\n address _to,\n uint256 _tokenId,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 14\n function beforeTransfer(\n address _from,\n address _to,\n uint256 _tokenId,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 15\n function afterOnERC1155Received(\n address _operator,\n address _from,\n address _to,\n uint256 _tokenId,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 16\n function beforeOnERC1155Received(\n address _operator,\n address _from,\n address _to,\n uint256 _tokenId,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n}\n" + }, + "contracts/interface/HolographedERC20.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\n/// @title Holograph ERC-20 Fungible Token Standard\n/// @dev See https://holograph.network/standard/ERC-20\n/// Note: the ERC-165 identifier for this interface is 0xFFFFFFFF.\ninterface HolographedERC20 {\n // event id = 1\n function bridgeIn(\n uint32 _chainId,\n address _from,\n address _to,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 2\n function bridgeOut(\n uint32 _chainId,\n address _from,\n address _to,\n uint256 _amount\n ) external returns (bytes memory _data);\n\n // event id = 3\n function afterApprove(address _owner, address _to, uint256 _amount) external returns (bool success);\n\n // event id = 4\n function beforeApprove(address _owner, address _to, uint256 _amount) external returns (bool success);\n\n // event id = 5\n function afterOnERC20Received(\n address _token,\n address _from,\n address _to,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 6\n function beforeOnERC20Received(\n address _token,\n address _from,\n address _to,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 7\n function afterBurn(address _owner, uint256 _amount) external returns (bool success);\n\n // event id = 8\n function beforeBurn(address _owner, uint256 _amount) external returns (bool success);\n\n // event id = 9\n function afterMint(address _owner, uint256 _amount) external returns (bool success);\n\n // event id = 10\n function beforeMint(address _owner, uint256 _amount) external returns (bool success);\n\n // event id = 11\n function afterSafeTransfer(\n address _from,\n address _to,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 12\n function beforeSafeTransfer(\n address _from,\n address _to,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 13\n function afterTransfer(address _from, address _to, uint256 _amount) external returns (bool success);\n\n // event id = 14\n function beforeTransfer(address _from, address _to, uint256 _amount) external returns (bool success);\n\n // event id = 15\n function onAllowance(address _owner, address _to, uint256 _amount) external returns (bool success);\n}\n" + }, + "contracts/interface/HolographedERC721.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\n/// @title Holograph ERC-721 Non-Fungible Token Standard\n/// @dev See https://holograph.network/standard/ERC-721\n/// Note: the ERC-165 identifier for this interface is 0xFFFFFFFF.\ninterface HolographedERC721 {\n // event id = 1\n function bridgeIn(\n uint32 _chainId,\n address _from,\n address _to,\n uint256 _tokenId,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 2\n function bridgeOut(\n uint32 _chainId,\n address _from,\n address _to,\n uint256 _tokenId\n ) external returns (bytes memory _data);\n\n // event id = 3\n function afterApprove(address _owner, address _to, uint256 _tokenId) external returns (bool success);\n\n // event id = 4\n function beforeApprove(address _owner, address _to, uint256 _tokenId) external returns (bool success);\n\n // event id = 5\n function afterApprovalAll(address _sender, address _to, bool _approved) external returns (bool success);\n\n // event id = 6\n function beforeApprovalAll(address _sender, address _to, bool _approved) external returns (bool success);\n\n // event id = 7\n function afterBurn(address _owner, uint256 _tokenId) external returns (bool success);\n\n // event id = 8\n function beforeBurn(address _owner, uint256 _tokenId) external returns (bool success);\n\n // event id = 9\n function afterMint(address _owner, uint256 _tokenId) external returns (bool success);\n\n // event id = 10\n function beforeMint(address _owner, uint256 _tokenId) external returns (bool success);\n\n // event id = 11\n function afterSafeTransfer(\n address _from,\n address _to,\n uint256 _tokenId,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 12\n function beforeSafeTransfer(\n address _from,\n address _to,\n uint256 _tokenId,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 13\n function afterTransfer(\n address _from,\n address _to,\n uint256 _tokenId,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 14\n function beforeTransfer(\n address _from,\n address _to,\n uint256 _tokenId,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 15\n function afterOnERC721Received(\n address _operator,\n address _from,\n address _to,\n uint256 _tokenId,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 16\n function beforeOnERC721Received(\n address _operator,\n address _from,\n address _to,\n uint256 _tokenId,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 17\n function onIsApprovedForAll(address _wallet, address _operator) external view returns (bool approved);\n\n // event id = 18\n function contractURI() external view returns (string memory contractJSON);\n}\n" + }, + "contracts/interface/HolographedGeneric.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\n/// @title Holograph Generic Standard\ninterface HolographedGeneric {\n // event id = 1\n function bridgeIn(uint32 _chainId, bytes calldata _data) external returns (bool success);\n\n // event id = 2\n function bridgeOut(uint32 _chainId, address _sender, bytes calldata _payload) external returns (bytes memory _data);\n}\n" + }, + "contracts/interface/HolographERC20Interface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./ERC20.sol\";\nimport \"./ERC20Burnable.sol\";\nimport \"./ERC20Metadata.sol\";\nimport \"./ERC20Permit.sol\";\nimport \"./ERC20Receiver.sol\";\nimport \"./ERC20Safer.sol\";\nimport \"./ERC165.sol\";\nimport \"./Holographable.sol\";\n\ninterface HolographERC20Interface is\n ERC165,\n ERC20,\n ERC20Burnable,\n ERC20Metadata,\n ERC20Receiver,\n ERC20Safer,\n ERC20Permit,\n Holographable\n{\n function holographBridgeMint(address to, uint256 amount) external returns (bytes4);\n\n function sourceBurn(address from, uint256 amount) external;\n\n function sourceMint(address to, uint256 amount) external;\n\n function sourceMintBatch(address[] calldata wallets, uint256[] calldata amounts) external;\n\n function sourceTransfer(address from, address to, uint256 amount) external;\n\n function sourceTransfer(address payable destination, uint256 amount) external;\n\n function sourceExternalCall(address target, bytes calldata data) external;\n}\n" + }, + "contracts/interface/HolographERC721Interface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./CollectionURI.sol\";\nimport \"./ERC165.sol\";\nimport \"./ERC721.sol\";\nimport \"./ERC721Enumerable.sol\";\nimport \"./ERC721Metadata.sol\";\nimport \"./ERC721TokenReceiver.sol\";\nimport \"./Holographable.sol\";\n\ninterface HolographERC721Interface is\n ERC165,\n ERC721,\n ERC721Enumerable,\n ERC721Metadata,\n ERC721TokenReceiver,\n CollectionURI,\n Holographable\n{\n function approve(address to, uint256 tokenId) external payable;\n\n function burn(uint256 tokenId) external;\n\n function safeTransferFrom(address from, address to, uint256 tokenId) external payable;\n\n function setApprovalForAll(address to, bool approved) external;\n\n function sourceBurn(uint256 tokenId) external;\n\n function sourceMint(address to, uint224 tokenId) external;\n\n function sourceGetChainPrepend() external view returns (uint256);\n\n function sourceTransfer(address to, uint256 tokenId) external;\n\n function sourceExternalCall(address target, bytes calldata data) external;\n\n function transfer(address to, uint256 tokenId) external payable;\n\n function contractURI() external view returns (string memory);\n\n function getApproved(uint256 tokenId) external view returns (address);\n\n function isApprovedForAll(address wallet, address operator) external view returns (bool);\n\n function name() external view returns (string memory);\n\n function burned(uint256 tokenId) external view returns (bool);\n\n function decimals() external pure returns (uint256);\n\n function exists(uint256 tokenId) external view returns (bool);\n\n function ownerOf(uint256 tokenId) external view returns (address);\n\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n\n function symbol() external view returns (string memory);\n\n function tokenByIndex(uint256 index) external view returns (uint256);\n\n function tokenOfOwnerByIndex(address wallet, uint256 index) external view returns (uint256);\n\n function tokensOfOwner(address wallet) external view returns (uint256[] memory);\n\n function tokenURI(uint256 tokenId) external view returns (string memory);\n\n function totalSupply() external view returns (uint256);\n}\n" + }, + "contracts/interface/HolographerInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\ninterface HolographerInterface {\n function getContractType() external view returns (bytes32 contractType);\n\n function getDeploymentBlock() external view returns (uint256 deploymentBlock);\n\n function getHolograph() external view returns (address holograph);\n\n function getHolographEnforcer() external view returns (address);\n\n function getOriginChain() external view returns (uint32 originChain);\n\n function getSourceContract() external view returns (address sourceContract);\n}\n" + }, + "contracts/interface/HolographFactoryInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../struct/DeploymentConfig.sol\";\nimport \"../struct/Verification.sol\";\n\n/**\n * @title Holograph Factory\n * @author https://github.com/holographxyz\n * @notice Deploy holographable contracts\n * @dev The contract provides methods that allow for the creation of Holograph Protocol compliant smart contracts, that are capable of minting holographable assets\n */\ninterface HolographFactoryInterface {\n /**\n * @dev This event is fired every time that a bridgeable contract is deployed.\n */\n event BridgeableContractDeployed(address indexed contractAddress, bytes32 indexed hash);\n\n /**\n * @notice Deploy a holographable smart contract\n * @dev Using this function allows to deploy smart contracts that have the same address across all EVM chains\n * @param config contract deployement configurations\n * @param signature that was created by the wallet that created the original payload\n * @param signer address of wallet that created the payload\n */\n function deployHolographableContract(\n DeploymentConfig memory config,\n Verification memory signature,\n address signer\n ) external;\n\n /**\n * @notice Get the Holograph Protocol contract\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\n */\n function getHolograph() external view returns (address holograph);\n\n /**\n * @notice Update the Holograph Protocol contract address\n * @param holograph address of the Holograph Protocol smart contract to use\n */\n function setHolograph(address holograph) external;\n\n /**\n * @notice Get the Holograph Registry module\n * @dev This module stores a reference for all deployed holographable smart contracts\n */\n function getRegistry() external view returns (address registry);\n\n /**\n * @notice Update the Holograph Registry module address\n * @param registry address of the Holograph Registry smart contract to use\n */\n function setRegistry(address registry) external;\n}\n" + }, + "contracts/interface/HolographGenericInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./ERC165.sol\";\nimport \"./Holographable.sol\";\n\ninterface HolographGenericInterface is ERC165, Holographable {\n function sourceEmit(bytes calldata eventData) external;\n\n function sourceEmit(bytes32 eventId, bytes calldata eventData) external;\n\n function sourceEmit(bytes32 eventId, bytes32 topic1, bytes calldata eventData) external;\n\n function sourceEmit(bytes32 eventId, bytes32 topic1, bytes32 topic2, bytes calldata eventData) external;\n\n function sourceEmit(\n bytes32 eventId,\n bytes32 topic1,\n bytes32 topic2,\n bytes32 topic3,\n bytes calldata eventData\n ) external;\n}\n" + }, + "contracts/interface/HolographInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\n/**\n * @title Holograph Protocol\n * @author https://github.com/holographxyz\n * @notice This is the primary Holograph Protocol smart contract\n * @dev This contract stores a reference to all the primary modules and variables of the protocol\n */\ninterface HolographInterface {\n /**\n * @notice Get the address of the Holograph Bridge module\n * @dev Used for beaming holographable assets cross-chain\n */\n function getBridge() external view returns (address bridge);\n\n /**\n * @notice Update the Holograph Bridge module address\n * @param bridge address of the Holograph Bridge smart contract to use\n */\n function setBridge(address bridge) external;\n\n /**\n * @notice Get the chain ID that the Protocol was deployed on\n * @dev Useful for checking if/when a hard fork occurs\n */\n function getChainId() external view returns (uint256 chainId);\n\n /**\n * @notice Update the chain ID\n * @dev Useful for updating once a hard fork has been mitigated\n * @param chainId EVM chain ID to use\n */\n function setChainId(uint256 chainId) external;\n\n /**\n * @notice Get the address of the Holograph Factory module\n * @dev Used for deploying holographable smart contracts\n */\n function getFactory() external view returns (address factory);\n\n /**\n * @notice Update the Holograph Factory module address\n * @param factory address of the Holograph Factory smart contract to use\n */\n function setFactory(address factory) external;\n\n /**\n * @notice Get the Holograph chain Id\n * @dev Holograph uses an internal chain id mapping\n */\n function getHolographChainId() external view returns (uint32 holographChainId);\n\n /**\n * @notice Update the Holograph chain ID\n * @dev Useful for updating once a hard fork was mitigated\n * @param holographChainId Holograph chain ID to use\n */\n function setHolographChainId(uint32 holographChainId) external;\n\n /**\n * @notice Get the address of the Holograph Interfaces module\n * @dev Holograph uses this contract to store data that needs to be accessed by a large portion of the modules\n */\n function getInterfaces() external view returns (address interfaces);\n\n /**\n * @notice Update the Holograph Interfaces module address\n * @param interfaces address of the Holograph Interfaces smart contract to use\n */\n function setInterfaces(address interfaces) external;\n\n /**\n * @notice Get the address of the Holograph Operator module\n * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module\n */\n function getOperator() external view returns (address operator);\n\n /**\n * @notice Update the Holograph Operator module address\n * @param operator address of the Holograph Operator smart contract to use\n */\n function setOperator(address operator) external;\n\n /**\n * @notice Get the Holograph Registry module\n * @dev This module stores a reference for all deployed holographable smart contracts\n */\n function getRegistry() external view returns (address registry);\n\n /**\n * @notice Update the Holograph Registry module address\n * @param registry address of the Holograph Registry smart contract to use\n */\n function setRegistry(address registry) external;\n\n /**\n * @notice Get the Holograph Treasury module\n * @dev All of the Holograph Protocol assets are stored and managed by this module\n */\n function getTreasury() external view returns (address treasury);\n\n /**\n * @notice Update the Holograph Treasury module address\n * @param treasury address of the Holograph Treasury smart contract to use\n */\n function setTreasury(address treasury) external;\n\n /**\n * @notice Get the Holograph Utility Token address\n * @dev This is the official utility token of the Holograph Protocol\n */\n function getUtilityToken() external view returns (address utilityToken);\n\n /**\n * @notice Update the Holograph Utility Token address\n * @param utilityToken address of the Holograph Utility Token smart contract to use\n */\n function setUtilityToken(address utilityToken) external;\n}\n" + }, + "contracts/interface/HolographInterfacesInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../enum/ChainIdType.sol\";\nimport \"../enum/InterfaceType.sol\";\nimport \"../enum/TokenUriType.sol\";\n\ninterface HolographInterfacesInterface {\n function contractURI(\n string calldata name,\n string calldata imageURL,\n string calldata externalLink,\n uint16 bps,\n address contractAddress\n ) external pure returns (string memory);\n\n function getUriPrepend(TokenUriType uriType) external view returns (string memory prepend);\n\n function updateUriPrepend(TokenUriType uriType, string calldata prepend) external;\n\n function updateUriPrepends(TokenUriType[] calldata uriTypes, string[] calldata prepends) external;\n\n function getChainId(\n ChainIdType fromChainType,\n uint256 fromChainId,\n ChainIdType toChainType\n ) external view returns (uint256 toChainId);\n\n function updateChainIdMap(\n ChainIdType fromChainType,\n uint256 fromChainId,\n ChainIdType toChainType,\n uint256 toChainId\n ) external;\n\n function updateChainIdMaps(\n ChainIdType[] calldata fromChainType,\n uint256[] calldata fromChainId,\n ChainIdType[] calldata toChainType,\n uint256[] calldata toChainId\n ) external;\n\n function supportsInterface(InterfaceType interfaceType, bytes4 interfaceId) external view returns (bool);\n\n function updateInterface(InterfaceType interfaceType, bytes4 interfaceId, bool supported) external;\n\n function updateInterfaces(InterfaceType interfaceType, bytes4[] calldata interfaceIds, bool supported) external;\n}\n" + }, + "contracts/interface/HolographOperatorInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../struct/OperatorJob.sol\";\n\ninterface HolographOperatorInterface {\n /**\n * @dev Event is emitted for every time that a valid job is available.\n */\n event AvailableOperatorJob(bytes32 jobHash, bytes payload);\n\n /**\n * @dev Event is emitted for every time that a job is completed.\n */\n event FinishedOperatorJob(bytes32 jobHash, address operator);\n\n /**\n * @dev Event is emitted every time a cross-chain message is sent\n */\n event CrossChainMessageSent(bytes32 messageHash);\n\n /**\n * @dev Event is emitted if an operator job execution fails\n */\n event FailedOperatorJob(bytes32 jobHash);\n\n /**\n * @notice Execute an available operator job\n * @dev When making this call, if operating criteria is not met, the call will revert\n * @param bridgeInRequestPayload the entire cross chain message payload\n */\n function executeJob(bytes calldata bridgeInRequestPayload) external payable;\n\n function nonRevertingBridgeCall(address msgSender, bytes calldata payload) external payable;\n\n /**\n * @notice Receive a cross-chain message\n * @dev This function is restricted for use by Holograph Messaging Module only\n */\n function crossChainMessage(bytes calldata bridgeInRequestPayload) external payable;\n\n /**\n * @notice Calculate the amount of gas needed to execute a bridgeInRequest\n * @dev Use this function to estimate the amount of gas that will be used by the bridgeInRequest function\n * Set a specific gas limit when making this call, subtract return value, to get total gas used\n * Only use this with a static call\n * @param bridgeInRequestPayload abi encoded bytes making up the bridgeInRequest payload\n * @return the gas amount remaining after the static call is returned\n */\n function jobEstimator(bytes calldata bridgeInRequestPayload) external payable returns (uint256);\n\n /**\n * @notice Send cross chain bridge request message\n * @dev This function is restricted to only be callable by Holograph Bridge\n * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain\n * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain\n * @param toChain Holograph Chain ID where the beam is being sent to\n * @param nonce incremented number used to ensure job hashes are unique\n * @param holographableContract address of the contract for which the bridge request is being made\n * @param bridgeOutPayload bytes made up of the bridgeOutRequest payload\n */\n function send(\n uint256 gasLimit,\n uint256 gasPrice,\n uint32 toChain,\n address msgSender,\n uint256 nonce,\n address holographableContract,\n bytes calldata bridgeOutPayload\n ) external payable;\n\n /**\n * @notice Get the fees associated with sending specific payload\n * @dev Will provide exact costs on protocol and message side, combine the two to get total\n * @param toChain holograph chain id of destination chain for payload\n * @param gasLimit amount of gas to provide for executing payload on destination chain\n * @param gasPrice maximum amount to pay for gas price, can be set to 0 and will be chose automatically\n * @param crossChainPayload the entire packet being sent cross-chain\n * @return hlgFee the amount (in wei) of native gas token that will cost for finalizing job on destiantion chain\n * @return msgFee the amount (in wei) of native gas token that will cost for sending message to destiantion chain\n * @return dstGasPrice the amount (in wei) that destination message maximum gas price will be\n */\n function getMessageFee(\n uint32 toChain,\n uint256 gasLimit,\n uint256 gasPrice,\n bytes calldata crossChainPayload\n ) external view returns (uint256 hlgFee, uint256 msgFee, uint256 dstGasPrice);\n\n /**\n * @notice Get the details for an available operator job\n * @dev The job hash is a keccak256 hash of the entire job payload\n * @param jobHash keccak256 hash of the job\n * @return an OperatorJob struct with details about a specific job\n */\n function getJobDetails(bytes32 jobHash) external view returns (OperatorJob memory);\n\n /**\n * @notice Get number of pods available\n * @dev This returns number of pods that have been opened via bonding\n */\n function getTotalPods() external view returns (uint256 totalPods);\n\n /**\n * @notice Get total number of operators in a pod\n * @dev Use in conjunction with paginated getPodOperators function\n * @param pod the pod to query\n * @return total operators in a pod\n */\n function getPodOperatorsLength(uint256 pod) external view returns (uint256);\n\n /**\n * @notice Get list of operators in a pod\n * @dev Use paginated getPodOperators function instead if list gets too long\n * @param pod the pod to query\n * @return operators array list of operators in a pod\n */\n function getPodOperators(uint256 pod) external view returns (address[] memory operators);\n\n /**\n * @notice Get paginated list of operators in a pod\n * @dev Use in conjunction with getPodOperatorsLength to know the total length of results\n * @param pod the pod to query\n * @param index the array index to start from\n * @param length the length of result set to be (will be shorter if reached end of array)\n * @return operators a paginated array of operators\n */\n function getPodOperators(\n uint256 pod,\n uint256 index,\n uint256 length\n ) external view returns (address[] memory operators);\n\n /**\n * @notice Check the base and current price for bonding to a particular pod\n * @dev Useful for understanding what is required for bonding to a pod\n * @param pod the pod to get bonding amounts for\n * @return base the base bond amount required for a pod\n * @return current the current bond amount required for a pod\n */\n function getPodBondAmounts(uint256 pod) external view returns (uint256 base, uint256 current);\n\n /**\n * @notice Get an operator's currently bonded amount\n * @dev Useful for checking how much an operator has bonded\n * @param operator address of operator to check\n * @return amount total number of utility token bonded\n */\n function getBondedAmount(address operator) external view returns (uint256 amount);\n\n /**\n * @notice Get an operator's currently bonded pod\n * @dev Useful for checking if an operator is currently bonded\n * @param operator address of operator to check\n * @return pod number that operator is bonded on, returns zero if not bonded or selected for job\n */\n function getBondedPod(address operator) external view returns (uint256 pod);\n\n /**\n * @notice Get an operator's currently bonded pod index\n * @dev Useful for checking if an operator is a fallback for active job\n * @param operator address of operator to check\n * @return index currently bonded pod's operator index, returns zero if not in pod or moved out for active job\n */\n function getBondedPodIndex(address operator) external view returns (uint256 index);\n\n /**\n * @notice Topup a bonded operator with more utility tokens\n * @dev Useful function if an operator got slashed and wants to add a safety buffer to not get unbonded\n * @param operator address of operator to topup\n * @param amount utility token amount to add\n */\n function topupUtilityToken(address operator, uint256 amount) external;\n\n /**\n * @notice Bond utility tokens and become an operator\n * @dev An operator can only bond to one pod at a time, per network\n * @param operator address of operator to bond (can be an ownable smart contract)\n * @param amount utility token amount to bond (can be greater than minimum)\n * @param pod number of pod to bond to (can be for one that does not exist yet)\n */\n function bondUtilityToken(address operator, uint256 amount, uint256 pod) external;\n\n /**\n * @notice Unbond HLG utility tokens and stop being an operator\n * @dev A bonded operator selected for a job cannot unbond until they complete the job, or are slashed\n * @param operator address of operator to unbond\n * @param recipient address where to send the bonded tokens\n */\n function unbondUtilityToken(address operator, address recipient) external;\n\n /**\n * @notice Get the address of the Holograph Bridge module\n * @dev Used for beaming holographable assets cross-chain\n */\n function getBridge() external view returns (address bridge);\n\n /**\n * @notice Update the Holograph Bridge module address\n * @param bridge address of the Holograph Bridge smart contract to use\n */\n function setBridge(address bridge) external;\n\n /**\n * @notice Get the Holograph Protocol contract\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\n */\n function getHolograph() external view returns (address holograph);\n\n /**\n * @notice Update the Holograph Protocol contract address\n * @param holograph address of the Holograph Protocol smart contract to use\n */\n function setHolograph(address holograph) external;\n\n /**\n * @notice Get the address of the Holograph Interfaces module\n * @dev Holograph uses this contract to store data that needs to be accessed by a large portion of the modules\n */\n function getInterfaces() external view returns (address interfaces);\n\n /**\n * @notice Update the Holograph Interfaces module address\n * @param interfaces address of the Holograph Interfaces smart contract to use\n */\n function setInterfaces(address interfaces) external;\n\n /**\n * @notice Get the address of the Holograph Messaging Module\n * @dev All cross-chain message requests will get forwarded to this adress\n */\n function getMessagingModule() external view returns (address messagingModule);\n\n /**\n * @notice Update the Holograph Messaging Module address\n * @param messagingModule address of the LayerZero Endpoint to use\n */\n function setMessagingModule(address messagingModule) external;\n\n /**\n * @notice Get the Holograph Registry module\n * @dev This module stores a reference for all deployed holographable smart contracts\n */\n function getRegistry() external view returns (address registry);\n\n /**\n * @notice Update the Holograph Registry module address\n * @param registry address of the Holograph Registry smart contract to use\n */\n function setRegistry(address registry) external;\n\n /**\n * @notice Get the Holograph Utility Token address\n * @dev This is the official utility token of the Holograph Protocol\n */\n function getUtilityToken() external view returns (address utilityToken);\n\n /**\n * @notice Update the Holograph Utility Token address\n * @param utilityToken address of the Holograph Utility Token smart contract to use\n */\n function setUtilityToken(address utilityToken) external;\n\n /**\n * @notice Get the Minimum Gas Price\n * @dev This amount is used as the value that will define a job as underpriced is lower than\n */\n function getMinGasPrice() external view returns (uint256 minGasPrice);\n\n /**\n * @notice Update the Minimum Gas Price\n * @param minGasPrice amount to set for minimum gas price\n */\n function setMinGasPrice(uint256 minGasPrice) external;\n}\n" + }, + "contracts/interface/HolographRegistryInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\ninterface HolographRegistryInterface {\n event HolographableContractEvent(address indexed _holographableContract, bytes _payload);\n\n function isHolographedContract(address smartContract) external view returns (bool);\n\n function isHolographedHashDeployed(bytes32 hash) external view returns (bool);\n\n function referenceContractTypeAddress(address contractAddress) external returns (bytes32);\n\n function getContractTypeAddress(bytes32 contractType) external view returns (address);\n\n function setContractTypeAddress(bytes32 contractType, address contractAddress) external;\n\n function getHolograph() external view returns (address holograph);\n\n function setHolograph(address holograph) external;\n\n function getHolographableContracts(uint256 index, uint256 length) external view returns (address[] memory contracts);\n\n function getHolographableContractsLength() external view returns (uint256);\n\n function getHolographedHashAddress(bytes32 hash) external view returns (address);\n\n function setHolographedHashAddress(bytes32 hash, address contractAddress) external;\n\n function getHToken(uint32 chainId) external view returns (address);\n\n function setHToken(uint32 chainId, address hToken) external;\n\n function getReservedContractTypeAddress(bytes32 contractType) external view returns (address contractTypeAddress);\n\n function setReservedContractTypeAddress(bytes32 hash, bool reserved) external;\n\n function setReservedContractTypeAddresses(bytes32[] calldata hashes, bool[] calldata reserved) external;\n\n function getUtilityToken() external view returns (address utilityToken);\n\n function setUtilityToken(address utilityToken) external;\n\n function holographableEvent(bytes calldata payload) external;\n}\n" + }, + "contracts/interface/HolographRoyaltiesInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../struct/ZoraBidShares.sol\";\n\ninterface HolographRoyaltiesInterface {\n function initHolographRoyalties(bytes memory data) external returns (bytes4);\n\n function configurePayouts(address payable[] memory addresses, uint256[] memory bps) external;\n\n function getPayoutInfo() external view returns (address payable[] memory addresses, uint256[] memory bps);\n\n function getEthPayout() external;\n\n function getTokenPayout(address tokenAddress) external;\n\n function getTokensPayout(address[] memory tokenAddresses) external;\n\n function supportsInterface(bytes4 interfaceId) external pure returns (bool);\n\n function setRoyalties(uint256 tokenId, address payable receiver, uint256 bp) external;\n\n function royaltyInfo(uint256 tokenId, uint256 value) external view returns (address, uint256);\n\n function getFeeBps(uint256 tokenId) external view returns (uint256[] memory);\n\n function getFeeRecipients(uint256 tokenId) external view returns (address payable[] memory);\n\n function getRoyalties(uint256 tokenId) external view returns (address payable[] memory, uint256[] memory);\n\n function getFees(uint256 tokenId) external view returns (address payable[] memory, uint256[] memory);\n\n function tokenCreator(address /* contractAddress*/, uint256 tokenId) external view returns (address);\n\n function calculateRoyaltyFee(\n address /* contractAddress */,\n uint256 tokenId,\n uint256 amount\n ) external view returns (uint256);\n\n function marketContract() external view returns (address);\n\n function tokenCreators(uint256 tokenId) external view returns (address);\n\n function bidSharesForToken(uint256 tokenId) external view returns (HolographBidShares memory bidShares);\n\n function getStorageSlot(string calldata slot) external pure returns (bytes32);\n\n function getTokenAddress(string memory tokenName) external view returns (address);\n}\n" + }, + "contracts/interface/HolographTreasuryInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\ninterface HolographTreasuryInterface {\n // purposefully left blank\n}\n" + }, + "contracts/interface/InitializableInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\n/**\n * @title Initializable\n * @author https://github.com/holographxyz\n * @notice Use init instead of constructor\n * @dev This allows for use of init function to make one time initializations without the need of a constructor\n */\ninterface InitializableInterface {\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external returns (bytes4);\n}\n" + }, + "contracts/interface/LayerZeroEndpointInterface.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport \"./LayerZeroUserApplicationConfigInterface.sol\";\n\ninterface LayerZeroEndpointInterface is LayerZeroUserApplicationConfigInterface {\n // @notice send a LayerZero message to the specified address at a LayerZero endpoint.\n // @param _dstChainId - the destination chain identifier\n // @param _destination - the address on destination chain (in bytes). address length/format may vary by chains\n // @param _payload - a custom bytes payload to send to the destination contract\n // @param _refundAddress - if the source transaction is cheaper than the amount of value passed, refund the additional amount to this address\n // @param _zroPaymentAddress - the address of the ZRO token holder who would pay for the transaction\n // @param _adapterParams - parameters for custom functionality. e.g. receive airdropped native gas from the relayer on destination\n function send(\n uint16 _dstChainId,\n bytes calldata _destination,\n bytes calldata _payload,\n address payable _refundAddress,\n address _zroPaymentAddress,\n bytes calldata _adapterParams\n ) external payable;\n\n // @notice used by the messaging library to publish verified payload\n // @param _srcChainId - the source chain identifier\n // @param _srcAddress - the source contract (as bytes) at the source chain\n // @param _dstAddress - the address on destination chain\n // @param _nonce - the unbound message ordering nonce\n // @param _gasLimit - the gas limit for external contract execution\n // @param _payload - verified payload to send to the destination contract\n function receivePayload(\n uint16 _srcChainId,\n bytes calldata _srcAddress,\n address _dstAddress,\n uint64 _nonce,\n uint256 _gasLimit,\n bytes calldata _payload\n ) external;\n\n // @notice get the inboundNonce of a lzApp from a source chain which could be EVM or non-EVM chain\n // @param _srcChainId - the source chain identifier\n // @param _srcAddress - the source chain contract address\n function getInboundNonce(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (uint64);\n\n // @notice get the outboundNonce from this source chain which, consequently, is always an EVM\n // @param _srcAddress - the source chain contract address\n function getOutboundNonce(uint16 _dstChainId, address _srcAddress) external view returns (uint64);\n\n // @notice gets a quote in source native gas, for the amount that send() requires to pay for message delivery\n // @param _dstChainId - the destination chain identifier\n // @param _userApplication - the user app address on this EVM chain\n // @param _payload - the custom message to send over LayerZero\n // @param _payInZRO - if false, user app pays the protocol fee in native token\n // @param _adapterParam - parameters for the adapter service, e.g. send some dust native token to dstChain\n function estimateFees(\n uint16 _dstChainId,\n address _userApplication,\n bytes calldata _payload,\n bool _payInZRO,\n bytes calldata _adapterParam\n ) external view returns (uint256 nativeFee, uint256 zroFee);\n\n // @notice get this Endpoint's immutable source identifier\n function getChainId() external view returns (uint16);\n\n // @notice the interface to retry failed message on this Endpoint destination\n // @param _srcChainId - the source chain identifier\n // @param _srcAddress - the source chain contract address\n // @param _payload - the payload to be retried\n function retryPayload(uint16 _srcChainId, bytes calldata _srcAddress, bytes calldata _payload) external;\n\n // @notice query if any STORED payload (message blocking) at the endpoint.\n // @param _srcChainId - the source chain identifier\n // @param _srcAddress - the source chain contract address\n function hasStoredPayload(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool);\n\n // @notice query if the _libraryAddress is valid for sending msgs.\n // @param _userApplication - the user app address on this EVM chain\n function getSendLibraryAddress(address _userApplication) external view returns (address);\n\n // @notice query if the _libraryAddress is valid for receiving msgs.\n // @param _userApplication - the user app address on this EVM chain\n function getReceiveLibraryAddress(address _userApplication) external view returns (address);\n\n // @notice query if the non-reentrancy guard for send() is on\n // @return true if the guard is on. false otherwise\n function isSendingPayload() external view returns (bool);\n\n // @notice query if the non-reentrancy guard for receive() is on\n // @return true if the guard is on. false otherwise\n function isReceivingPayload() external view returns (bool);\n\n // @notice get the configuration of the LayerZero messaging library of the specified version\n // @param _version - messaging library version\n // @param _chainId - the chainId for the pending config change\n // @param _userApplication - the contract address of the user application\n // @param _configType - type of configuration. every messaging library has its own convention.\n function getConfig(\n uint16 _version,\n uint16 _chainId,\n address _userApplication,\n uint256 _configType\n ) external view returns (bytes memory);\n\n // @notice get the send() LayerZero messaging library version\n // @param _userApplication - the contract address of the user application\n function getSendVersion(address _userApplication) external view returns (uint16);\n\n // @notice get the lzReceive() LayerZero messaging library version\n // @param _userApplication - the contract address of the user application\n function getReceiveVersion(address _userApplication) external view returns (uint16);\n}\n" + }, + "contracts/interface/LayerZeroModuleInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\ninterface LayerZeroModuleInterface {\n function lzReceive(\n uint16 _srcChainId,\n bytes calldata _srcAddress,\n uint64 _nonce,\n bytes calldata _payload\n ) external payable;\n\n function getInterfaces() external view returns (address interfaces);\n\n function setInterfaces(address interfaces) external;\n\n function getLZEndpoint() external view returns (address lZEndpoint);\n\n function setLZEndpoint(address lZEndpoint) external;\n\n function getOperator() external view returns (address operator);\n\n function setOperator(address operator) external;\n}\n" + }, + "contracts/interface/LayerZeroOverrides.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\ninterface LayerZeroOverrides {\n // @dev defaultAppConfig struct\n struct ApplicationConfiguration {\n uint16 inboundProofLibraryVersion;\n uint64 inboundBlockConfirmations;\n address relayer;\n uint16 outboundProofType;\n uint64 outboundBlockConfirmations;\n address oracle;\n }\n\n struct DstPrice {\n uint128 dstPriceRatio; // 10^10\n uint128 dstGasPriceInWei;\n }\n\n struct DstConfig {\n uint128 dstNativeAmtCap;\n uint64 baseGas;\n uint64 gasPerByte;\n }\n\n // @dev using this to retrieve UltraLightNodeV2 address\n function defaultSendLibrary() external view returns (address);\n\n // @dev using this to extract defaultAppConfig\n function getAppConfig(\n uint16 destinationChainId,\n address userApplicationAddress\n ) external view returns (ApplicationConfiguration memory);\n\n // @dev using this to extract defaultAppConfig directly from storage slot\n function defaultAppConfig(\n uint16 destinationChainId\n )\n external\n view\n returns (\n uint16 inboundProofLibraryVersion,\n uint64 inboundBlockConfirmations,\n address relayer,\n uint16 outboundProofType,\n uint64 outboundBlockConfirmations,\n address oracle\n );\n\n // @dev access the mapping to get base price fee\n function dstPriceLookup(\n uint16 destinationChainId\n ) external view returns (uint128 dstPriceRatio, uint128 dstGasPriceInWei);\n\n // @dev access the mapping to get base gas and gas per byte\n function dstConfigLookup(\n uint16 destinationChainId,\n uint16 outboundProofType\n ) external view returns (uint128 dstNativeAmtCap, uint64 baseGas, uint64 gasPerByte);\n\n // @dev send message to LayerZero Endpoint\n function send(\n uint16 _dstChainId,\n bytes calldata _destination,\n bytes calldata _payload,\n address payable _refundAddress,\n address _zroPaymentAddress,\n bytes calldata _adapterParams\n ) external payable;\n\n // @dev estimate LayerZero message cost\n function estimateFees(\n uint16 _dstChainId,\n address _userApplication,\n bytes calldata _payload,\n bool _payInZRO,\n bytes calldata _adapterParam\n ) external view returns (uint256 nativeFee, uint256 zroFee);\n}\n" + }, + "contracts/interface/LayerZeroReceiverInterface.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\ninterface LayerZeroReceiverInterface {\n // @notice LayerZero endpoint will invoke this function to deliver the message on the destination\n // @param _srcChainId - the source endpoint identifier\n // @param _srcAddress - the source sending contract address from the source chain\n // @param _nonce - the ordered message nonce\n // @param _payload - the signed payload is the UA bytes has encoded to be sent\n function lzReceive(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes calldata _payload) external;\n}\n" + }, + "contracts/interface/LayerZeroUserApplicationConfigInterface.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\ninterface LayerZeroUserApplicationConfigInterface {\n // @notice set the configuration of the LayerZero messaging library of the specified version\n // @param _version - messaging library version\n // @param _chainId - the chainId for the pending config change\n // @param _configType - type of configuration. every messaging library has its own convention.\n // @param _config - configuration in the bytes. can encode arbitrary content.\n function setConfig(uint16 _version, uint16 _chainId, uint256 _configType, bytes calldata _config) external;\n\n // @notice set the send() LayerZero messaging library version to _version\n // @param _version - new messaging library version\n function setSendVersion(uint16 _version) external;\n\n // @notice set the lzReceive() LayerZero messaging library version to _version\n // @param _version - new messaging library version\n function setReceiveVersion(uint16 _version) external;\n\n // @notice Only when the UA needs to resume the message flow in blocking mode and clear the stored payload\n // @param _srcChainId - the chainId of the source chain\n // @param _srcAddress - the contract address of the source contract at the source chain\n function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external;\n}\n" + }, + "contracts/interface/Ownable.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\ninterface Ownable {\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n function owner() external view returns (address);\n\n function transferOwnership(address _newOwner) external;\n\n function isOwner() external view returns (bool);\n\n function isOwner(address wallet) external view returns (bool);\n}\n" + }, + "contracts/library/Base64.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nlibrary Base64 {\n bytes private constant base64stdchars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\n bytes private constant base64urlchars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_\";\n\n function encode(string memory _str) internal pure returns (string memory) {\n bytes memory _bs = bytes(_str);\n return encode(_bs);\n }\n\n function encode(bytes memory _bs) internal pure returns (string memory) {\n uint256 rem = _bs.length % 3;\n\n uint256 res_length = ((_bs.length + 2) / 3) * 4 - ((3 - rem) % 3);\n bytes memory res = new bytes(res_length);\n\n uint256 i = 0;\n uint256 j = 0;\n\n for (; i + 3 <= _bs.length; i += 3) {\n (res[j], res[j + 1], res[j + 2], res[j + 3]) = encode3(uint8(_bs[i]), uint8(_bs[i + 1]), uint8(_bs[i + 2]));\n\n j += 4;\n }\n\n if (rem != 0) {\n uint8 la0 = uint8(_bs[_bs.length - rem]);\n uint8 la1 = 0;\n\n if (rem == 2) {\n la1 = uint8(_bs[_bs.length - 1]);\n }\n\n (bytes1 b0, bytes1 b1, bytes1 b2 /* bytes1 b3*/, ) = encode3(la0, la1, 0);\n res[j] = b0;\n res[j + 1] = b1;\n if (rem == 2) {\n res[j + 2] = b2;\n }\n }\n\n return string(res);\n }\n\n function encode3(\n uint256 a0,\n uint256 a1,\n uint256 a2\n ) private pure returns (bytes1 b0, bytes1 b1, bytes1 b2, bytes1 b3) {\n uint256 n = (a0 << 16) | (a1 << 8) | a2;\n\n uint256 c0 = (n >> 18) & 63;\n uint256 c1 = (n >> 12) & 63;\n uint256 c2 = (n >> 6) & 63;\n uint256 c3 = (n) & 63;\n\n b0 = base64urlchars[c0];\n b1 = base64urlchars[c1];\n b2 = base64urlchars[c2];\n b3 = base64urlchars[c3];\n }\n}\n" + }, + "contracts/library/Bytes.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nlibrary Bytes {\n function getBoolean(uint192 _packedBools, uint192 _boolNumber) internal pure returns (bool) {\n uint192 flag = (_packedBools >> _boolNumber) & uint192(1);\n return (flag == 1 ? true : false);\n }\n\n function setBoolean(uint192 _packedBools, uint192 _boolNumber, bool _value) internal pure returns (uint192) {\n if (_value) {\n return _packedBools | (uint192(1) << _boolNumber);\n } else {\n return _packedBools & ~(uint192(1) << _boolNumber);\n }\n }\n\n function slice(bytes memory _bytes, uint256 _start, uint256 _length) internal pure returns (bytes memory) {\n require(_length + 31 >= _length, \"slice_overflow\");\n require(_bytes.length >= _start + _length, \"slice_outOfBounds\");\n bytes memory tempBytes;\n assembly {\n switch iszero(_length)\n case 0 {\n tempBytes := mload(0x40)\n let lengthmod := and(_length, 31)\n let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod)))\n let end := add(mc, _length)\n for {\n let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start)\n } lt(mc, end) {\n mc := add(mc, 0x20)\n cc := add(cc, 0x20)\n } {\n mstore(mc, mload(cc))\n }\n mstore(tempBytes, _length)\n mstore(0x40, and(add(mc, 31), not(31)))\n }\n default {\n tempBytes := mload(0x40)\n mstore(tempBytes, 0)\n mstore(0x40, add(tempBytes, 0x20))\n }\n }\n return tempBytes;\n }\n\n function trim(bytes32 source) internal pure returns (bytes memory) {\n uint256 temp = uint256(source);\n uint256 length = 0;\n while (temp != 0) {\n length++;\n temp >>= 8;\n }\n return slice(abi.encodePacked(source), 32 - length, length);\n }\n}\n" + }, + "contracts/library/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/cryptography/ECDSA.sol)\n\npragma solidity 0.8.13;\n\nimport \"./Strings.sol\";\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSA {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS,\n InvalidSignatureV\n }\n\n function _throwError(RecoverError error) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert(\"ECDSA: invalid signature\");\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert(\"ECDSA: invalid signature length\");\n } else if (error == RecoverError.InvalidSignatureS) {\n revert(\"ECDSA: invalid signature 's' value\");\n } else if (error == RecoverError.InvalidSignatureV) {\n revert(\"ECDSA: invalid signature 'v' value\");\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature` or error string. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\n // Check the signature length\n // - case 65: r,s,v signature (standard)\n // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._\n if (signature.length == 65) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n assembly {\n r := mload(add(signature, 0x20))\n s := mload(add(signature, 0x40))\n v := byte(0, mload(add(signature, 0x60)))\n }\n return tryRecover(hash, v, r, s);\n } else if (signature.length == 64) {\n bytes32 r;\n bytes32 vs;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n assembly {\n r := mload(add(signature, 0x20))\n vs := mload(add(signature, 0x40))\n }\n return tryRecover(hash, r, vs);\n } else {\n return (address(0), RecoverError.InvalidSignatureLength);\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, signature);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n *\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n *\n * _Available since v4.2._\n */\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n * `r` and `s` signature fields separately.\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS);\n }\n if (v != 27 && v != 28) {\n return (address(0), RecoverError.InvalidSignatureV);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature);\n }\n\n return (signer, RecoverError.NoError);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\n // 32 is the length in bytes of hash,\n // enforced by the type signature above\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", hash));\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from `s`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n\", Strings.toString(s.length), s));\n }\n\n /**\n * @dev Returns an Ethereum Signed Typed Data, created from a\n * `domainSeparator` and a `structHash`. This produces hash corresponding\n * to the one signed with the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\n * JSON-RPC method as part of EIP-712.\n *\n * See {recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n }\n}\n" + }, + "contracts/library/Strings.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nlibrary Strings {\n function toHexString(address account) internal pure returns (string memory) {\n return toHexString(uint256(uint160(account)));\n }\n\n function toHexString(uint256 value) internal pure returns (string memory) {\n if (value == 0) {\n return \"0x00\";\n }\n uint256 temp = value;\n uint256 length = 0;\n while (temp != 0) {\n length++;\n temp >>= 8;\n }\n return toHexString(value, length);\n }\n\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = bytes16(\"0123456789abcdef\")[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n\n function toAsciiString(address x) internal pure returns (string memory) {\n bytes memory s = new bytes(40);\n for (uint256 i = 0; i < 20; i++) {\n bytes1 b = bytes1(uint8(uint256(uint160(x)) / (2 ** (8 * (19 - i)))));\n bytes1 hi = bytes1(uint8(b) / 16);\n bytes1 lo = bytes1(uint8(b) - 16 * uint8(hi));\n s[2 * i] = char(hi);\n s[2 * i + 1] = char(lo);\n }\n return string(s);\n }\n\n function char(bytes1 b) internal pure returns (bytes1 c) {\n if (uint8(b) < 10) {\n return bytes1(uint8(b) + 0x30);\n } else {\n return bytes1(uint8(b) + 0x57);\n }\n }\n\n function uint2str(uint256 _i) internal pure returns (string memory _uint256AsString) {\n if (_i == 0) {\n return \"0\";\n }\n uint256 j = _i;\n uint256 len;\n while (j != 0) {\n len++;\n j /= 10;\n }\n bytes memory bstr = new bytes(len);\n uint256 k = len;\n while (_i != 0) {\n k = k - 1;\n uint8 temp = (48 + uint8(_i - (_i / 10) * 10));\n bytes1 b1 = bytes1(temp);\n bstr[k] = b1;\n _i /= 10;\n }\n return string(bstr);\n }\n\n function toString(uint256 value) internal pure returns (string memory) {\n if (value == 0) {\n return \"0\";\n }\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n bytes memory buffer = new bytes(digits);\n while (value != 0) {\n digits -= 1;\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n value /= 10;\n }\n return string(buffer);\n }\n}\n" + }, + "contracts/mock/ERC20Mock.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/EIP712.sol\";\nimport \"../abstract/NonReentrant.sol\";\n\nimport \"../interface/ERC20.sol\";\nimport \"../interface/ERC20Burnable.sol\";\nimport \"../interface/HolographERC20Interface.sol\";\nimport \"../interface/ERC20Metadata.sol\";\nimport \"../interface/ERC20Permit.sol\";\nimport \"../interface/ERC20Receiver.sol\";\nimport \"../interface/ERC20Safer.sol\";\nimport \"../interface/ERC165.sol\";\nimport \"../interface/ERC165.sol\";\n\nimport \"../library/ECDSA.sol\";\n\n/**\n * @title Mock ERC20 Token\n * @author Holograph Foundation\n * @notice Used for imitating the likes of WETH and WMATIC tokens.\n * @dev The entire logic and functionality of the smart contract is self-contained.\n */\ncontract ERC20Mock is\n ERC165,\n ERC20,\n ERC20Burnable,\n ERC20Metadata,\n ERC20Receiver,\n ERC20Safer,\n ERC20Permit,\n NonReentrant,\n EIP712\n{\n bool private _works;\n\n /**\n * @dev Mapping of all the addresse's balances.\n */\n mapping(address => uint256) private _balances;\n\n /**\n * @dev Mapping of all authorized operators, and capped amounts.\n */\n mapping(address => mapping(address => uint256)) private _allowances;\n\n /**\n * @dev Total number of token in circulation.\n */\n uint256 private _totalSupply;\n\n /**\n * @dev Token name.\n */\n string private _name;\n\n /**\n * @dev Token ticker symbol.\n */\n string private _symbol;\n\n /**\n * @dev Token number of decimal places.\n */\n uint8 private _decimals;\n\n /**\n * @dev List of all supported ERC165 interfaces.\n */\n mapping(bytes4 => bool) private _supportedInterfaces;\n\n /**\n * @dev List of used up nonces. Used in the ERC20Permit interface functionality.\n */\n mapping(address => uint256) private _nonces;\n\n /**\n * @dev Constructor does not accept any parameters.\n */\n constructor(\n string memory contractName,\n string memory contractSymbol,\n uint8 contractDecimals,\n string memory domainSeperator,\n string memory domainVersion\n ) {\n _works = true;\n _name = contractName;\n _symbol = contractSymbol;\n _decimals = contractDecimals;\n\n // ERC165\n _supportedInterfaces[ERC165.supportsInterface.selector] = true;\n\n // ERC20\n _supportedInterfaces[ERC20.allowance.selector] = true;\n _supportedInterfaces[ERC20.approve.selector] = true;\n _supportedInterfaces[ERC20.balanceOf.selector] = true;\n _supportedInterfaces[ERC20.totalSupply.selector] = true;\n _supportedInterfaces[ERC20.transfer.selector] = true;\n _supportedInterfaces[ERC20.transferFrom.selector] = true;\n _supportedInterfaces[\n ERC20.allowance.selector ^\n ERC20.approve.selector ^\n ERC20.balanceOf.selector ^\n ERC20.totalSupply.selector ^\n ERC20.transfer.selector ^\n ERC20.transferFrom.selector\n ] = true;\n\n // ERC20Metadata\n _supportedInterfaces[ERC20Metadata.name.selector] = true;\n _supportedInterfaces[ERC20Metadata.symbol.selector] = true;\n _supportedInterfaces[ERC20Metadata.decimals.selector] = true;\n _supportedInterfaces[\n ERC20Metadata.name.selector ^ ERC20Metadata.symbol.selector ^ ERC20Metadata.decimals.selector\n ] = true;\n\n // ERC20Burnable\n _supportedInterfaces[ERC20Burnable.burn.selector] = true;\n _supportedInterfaces[ERC20Burnable.burnFrom.selector] = true;\n _supportedInterfaces[ERC20Burnable.burn.selector ^ ERC20Burnable.burnFrom.selector] = true;\n\n // ERC20Safer\n // bytes4(keccak256(abi.encodePacked('safeTransfer(address,uint256)'))) == 0x423f6cef\n _supportedInterfaces[0x423f6cef] = true;\n // bytes4(keccak256(abi.encodePacked('safeTransfer(address,uint256,bytes)'))) == 0xeb795549\n _supportedInterfaces[0xeb795549] = true;\n // bytes4(keccak256(abi.encodePacked('safeTransferFrom(address,address,uint256)'))) == 0x42842e0e\n _supportedInterfaces[0x42842e0e] = true;\n // bytes4(keccak256(abi.encodePacked('safeTransferFrom(address,address,uint256,bytes)'))) == 0xb88d4fde\n _supportedInterfaces[0xb88d4fde] = true;\n _supportedInterfaces[bytes4(0x423f6cef) ^ bytes4(0xeb795549) ^ bytes4(0x42842e0e) ^ bytes4(0xb88d4fde)] = true;\n\n // ERC20Receiver\n _supportedInterfaces[ERC20Receiver.onERC20Received.selector] = true;\n\n // ERC20Permit\n _supportedInterfaces[ERC20Permit.permit.selector] = true;\n _supportedInterfaces[ERC20Permit.nonces.selector] = true;\n _supportedInterfaces[ERC20Permit.DOMAIN_SEPARATOR.selector] = true;\n _supportedInterfaces[\n ERC20Permit.permit.selector ^ ERC20Permit.nonces.selector ^ ERC20Permit.DOMAIN_SEPARATOR.selector\n ] = true;\n _eip712_init(domainSeperator, domainVersion);\n }\n\n function toggleWorks(bool active) external {\n _works = active;\n }\n\n function transferTokens(address payable token, address to, uint256 amount) external {\n ERC20(token).transfer(to, amount);\n }\n\n /**\n * @dev Purposefully left empty, to prevent running out of gas errors when receiving native token payments.\n */\n receive() external payable {}\n\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n /**\n * @dev Although EIP-165 is not required for ERC20 contracts, we still decided to implement it.\n *\n * This makes it easier for external smart contracts to easily identify a valid ERC20 token contract.\n */\n function supportsInterface(bytes4 interfaceId) public view returns (bool) {\n return _supportedInterfaces[interfaceId];\n }\n\n function allowance(address account, address spender) public view returns (uint256) {\n return _allowances[account][spender];\n }\n\n function balanceOf(address account) public view returns (uint256) {\n return _balances[account];\n }\n\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() public view returns (bytes32) {\n return _domainSeparatorV4();\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function nonces(address account) public view returns (uint256) {\n return _nonces[account];\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function totalSupply() public view returns (uint256) {\n return _totalSupply;\n }\n\n function approve(address spender, uint256 amount) public returns (bool) {\n _approve(msg.sender, spender, amount);\n return true;\n }\n\n function burn(uint256 amount) public {\n _burn(msg.sender, amount);\n }\n\n function burnFrom(address account, uint256 amount) public returns (bool) {\n uint256 currentAllowance = _allowances[account][msg.sender];\n require(currentAllowance >= amount, \"ERC20: amount exceeds allowance\");\n unchecked {\n _allowances[account][msg.sender] = currentAllowance - amount;\n }\n _burn(account, amount);\n return true;\n }\n\n function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {\n uint256 currentAllowance = _allowances[msg.sender][spender];\n require(currentAllowance >= subtractedValue, \"ERC20: decreased below zero\");\n uint256 newAllowance;\n unchecked {\n newAllowance = currentAllowance - subtractedValue;\n }\n _approve(msg.sender, spender, newAllowance);\n return true;\n }\n\n function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {\n uint256 currentAllowance = _allowances[msg.sender][spender];\n uint256 newAllowance;\n unchecked {\n newAllowance = currentAllowance + addedValue;\n }\n unchecked {\n require(newAllowance >= currentAllowance, \"ERC20: increased above max value\");\n }\n _approve(msg.sender, spender, newAllowance);\n return true;\n }\n\n function mint(address account, uint256 amount) external {\n _mint(account, amount);\n }\n\n function onERC20Received(\n address account,\n address /* sender*/,\n uint256 amount,\n bytes calldata /* data*/\n ) public returns (bytes4) {\n assembly {\n // used to drop \"change function to view\" compiler warning\n sstore(0x17fb676f92438402d8ef92193dd096c59ee1f4ba1bb57f67f3e6d2eef8aeed5e, amount)\n }\n if (_works) {\n require(_isContract(account), \"ERC20: operator not contract\");\n try ERC20(account).balanceOf(address(this)) returns (uint256 balance) {\n require(balance >= amount, \"ERC20: balance check failed\");\n } catch {\n revert(\"ERC20: failed getting balance\");\n }\n return ERC20Receiver.onERC20Received.selector;\n } else {\n return 0x00000000;\n }\n }\n\n function permit(\n address account,\n address spender,\n uint256 amount,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) public {\n require(block.timestamp <= deadline, \"ERC20: expired deadline\");\n // keccak256(\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\")\n // == 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9\n bytes32 structHash = keccak256(\n abi.encode(\n 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9,\n account,\n spender,\n amount,\n _useNonce(account),\n deadline\n )\n );\n bytes32 hash = _hashTypedDataV4(structHash);\n address signer = ECDSA.recover(hash, v, r, s);\n require(signer == account, \"ERC20: invalid signature\");\n _approve(account, spender, amount);\n }\n\n function safeTransfer(address recipient, uint256 amount) public returns (bool) {\n return safeTransfer(recipient, amount, \"\");\n }\n\n function safeTransfer(address recipient, uint256 amount, bytes memory data) public returns (bool) {\n _transfer(msg.sender, recipient, amount);\n require(_checkOnERC20Received(msg.sender, recipient, amount, data), \"ERC20: non ERC20Receiver\");\n return true;\n }\n\n function safeTransferFrom(address account, address recipient, uint256 amount) public returns (bool) {\n return safeTransferFrom(account, recipient, amount, \"\");\n }\n\n function safeTransferFrom(\n address account,\n address recipient,\n uint256 amount,\n bytes memory data\n ) public returns (bool) {\n if (account != msg.sender) {\n uint256 currentAllowance = _allowances[account][msg.sender];\n require(currentAllowance >= amount, \"ERC20: amount exceeds allowance\");\n unchecked {\n _allowances[account][msg.sender] = currentAllowance - amount;\n }\n }\n _transfer(account, recipient, amount);\n require(_checkOnERC20Received(account, recipient, amount, data), \"ERC20: non ERC20Receiver\");\n return true;\n }\n\n function transfer(address recipient, uint256 amount) public returns (bool) {\n _transfer(msg.sender, recipient, amount);\n return true;\n }\n\n function transferFrom(address account, address recipient, uint256 amount) public returns (bool) {\n if (account != msg.sender) {\n uint256 currentAllowance = _allowances[account][msg.sender];\n require(currentAllowance >= amount, \"ERC20: amount exceeds allowance\");\n unchecked {\n _allowances[account][msg.sender] = currentAllowance - amount;\n }\n }\n _transfer(account, recipient, amount);\n return true;\n }\n\n function _approve(address account, address spender, uint256 amount) internal {\n require(account != address(0), \"ERC20: account is zero address\");\n require(spender != address(0), \"ERC20: spender is zero address\");\n _allowances[account][spender] = amount;\n emit Approval(account, spender, amount);\n }\n\n function _burn(address account, uint256 amount) internal {\n require(account != address(0), \"ERC20: account is zero address\");\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n }\n _totalSupply -= amount;\n emit Transfer(account, address(0), amount);\n }\n\n function _checkOnERC20Received(\n address account,\n address recipient,\n uint256 amount,\n bytes memory data\n ) internal nonReentrant returns (bool) {\n if (_isContract(recipient)) {\n try ERC165(recipient).supportsInterface(0x01ffc9a7) returns (bool erc165support) {\n require(erc165support, \"ERC20: no ERC165 support\");\n // we have erc165 support\n if (ERC165(recipient).supportsInterface(0x534f5876)) {\n // we have eip-4524 support\n try ERC20Receiver(recipient).onERC20Received(msg.sender, account, amount, data) returns (bytes4 retval) {\n return retval == ERC20Receiver.onERC20Received.selector;\n } catch (bytes memory reason) {\n if (reason.length == 0) {\n revert(\"ERC20: non ERC20Receiver\");\n } else {\n assembly {\n revert(add(32, reason), mload(reason))\n }\n }\n }\n } else {\n revert(\"ERC20: eip-4524 not supported\");\n }\n } catch (bytes memory reason) {\n if (reason.length == 0) {\n revert(\"ERC20: no ERC165 support\");\n } else {\n assembly {\n revert(add(32, reason), mload(reason))\n }\n }\n }\n } else {\n return true;\n }\n }\n\n /**\n * @notice Mints tokens.\n * @dev Mint a specific amount of tokens to a specific address.\n * @param to Address to mint to.\n * @param amount Amount of tokens to mint.\n */\n function _mint(address to, uint256 amount) internal {\n require(to != address(0), \"ERC20: minting to burn address\");\n _totalSupply += amount;\n _balances[to] += amount;\n emit Transfer(address(0), to, amount);\n }\n\n function _transfer(address account, address recipient, uint256 amount) internal {\n require(account != address(0), \"ERC20: account is zero address\");\n require(recipient != address(0), \"ERC20: recipient is zero address\");\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n }\n _balances[recipient] += amount;\n emit Transfer(account, recipient, amount);\n }\n\n /**\n * @dev \"Consume a nonce\": return the current value and increment.\n *\n * _Available since v4.1._\n */\n function _useNonce(address account) internal returns (uint256 current) {\n current = _nonces[account];\n _nonces[account]++;\n }\n\n function _isContract(address contractAddress) private view returns (bool) {\n bytes32 codehash;\n assembly {\n codehash := extcodehash(contractAddress)\n }\n return (codehash != 0x0 && codehash != 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470);\n }\n}\n" + }, + "contracts/mock/LZEndpointMock.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../interface/LayerZeroReceiverInterface.sol\";\nimport \"../interface/LayerZeroEndpointInterface.sol\";\n\n/**\nmocking multi endpoint connection.\n- send() will short circuit to lzReceive() directly\n- no reentrancy guard. the real LayerZero endpoint on main net has a send and receive guard, respectively.\nif we run a ping-pong-like application, the recursive call might use all gas limit in the block.\n- not using any messaging library, hence all messaging library func, e.g. estimateFees, version, will not work\n*/\ncontract LZEndpointMock is LayerZeroEndpointInterface {\n mapping(address => address) public lzEndpointLookup;\n\n uint16 public mockChainId;\n address payable public mockOracle;\n address payable public mockRelayer;\n uint256 public mockBlockConfirmations;\n uint16 public mockLibraryVersion;\n uint256 public mockStaticNativeFee;\n uint16 public mockLayerZeroVersion;\n uint256 public nativeFee;\n uint256 public zroFee;\n bool nextMsgBLocked;\n\n struct StoredPayload {\n uint64 payloadLength;\n address dstAddress;\n bytes32 payloadHash;\n }\n\n struct QueuedPayload {\n address dstAddress;\n uint64 nonce;\n bytes payload;\n }\n\n // inboundNonce = [srcChainId][srcAddress].\n mapping(uint16 => mapping(bytes => uint64)) public inboundNonce;\n // outboundNonce = [dstChainId][srcAddress].\n mapping(uint16 => mapping(address => uint64)) public outboundNonce;\n // storedPayload = [srcChainId][srcAddress]\n mapping(uint16 => mapping(bytes => StoredPayload)) public storedPayload;\n // msgToDeliver = [srcChainId][srcAddress]\n mapping(uint16 => mapping(bytes => QueuedPayload[])) public msgsToDeliver;\n\n event UaForceResumeReceive(uint16 chainId, bytes srcAddress);\n event PayloadCleared(uint16 srcChainId, bytes srcAddress, uint64 nonce, address dstAddress);\n event PayloadStored(\n uint16 srcChainId,\n bytes srcAddress,\n address dstAddress,\n uint64 nonce,\n bytes payload,\n bytes reason\n );\n\n constructor(uint16 _chainId) {\n mockStaticNativeFee = 42;\n mockLayerZeroVersion = 1;\n mockChainId = _chainId;\n }\n\n // mock helper to set the value returned by `estimateNativeFees`\n function setEstimatedFees(uint256 _nativeFee, uint256 _zroFee) public {\n nativeFee = _nativeFee;\n zroFee = _zroFee;\n }\n\n function getChainId() external view override returns (uint16) {\n return mockChainId;\n }\n\n function setDestLzEndpoint(address destAddr, address lzEndpointAddr) external {\n lzEndpointLookup[destAddr] = lzEndpointAddr;\n }\n\n function send(\n uint16 _chainId,\n bytes calldata _destination,\n bytes calldata _payload,\n address payable, // _refundAddress\n address, // _zroPaymentAddress\n bytes memory _adapterParams\n ) external payable override {\n address destAddr = packedBytesToAddr(_destination);\n address lzEndpoint = lzEndpointLookup[destAddr];\n\n require(lzEndpoint != address(0), \"LayerZeroMock: destination LayerZero Endpoint not found\");\n\n uint64 nonce;\n {\n nonce = ++outboundNonce[_chainId][msg.sender];\n }\n\n // Mock the relayer paying the dstNativeAddr the amount of extra native token\n {\n uint256 extraGas;\n uint256 dstNative;\n address dstNativeAddr;\n assembly {\n extraGas := mload(add(_adapterParams, 34))\n dstNative := mload(add(_adapterParams, 66))\n dstNativeAddr := mload(add(_adapterParams, 86))\n }\n\n // to simulate actually sending the ether, add a transfer call and ensure the LZEndpointMock contract has an ether balance\n }\n\n bytes memory bytesSourceUserApplicationAddr = addrToPackedBytes(address(msg.sender)); // cast this address to bytes\n\n // not using the extra gas parameter because this is a single tx call, not split between different chains\n // LZEndpointMock(lzEndpoint).receivePayload(mockChainId, bytesSourceUserApplicationAddr, destAddr, nonce, extraGas, _payload);\n LZEndpointMock(lzEndpoint).receivePayload(\n mockChainId,\n bytesSourceUserApplicationAddr,\n destAddr,\n nonce,\n 0,\n _payload\n );\n }\n\n function receivePayload(\n uint16 _srcChainId,\n bytes calldata _srcAddress,\n address _dstAddress,\n uint64 _nonce,\n uint256 /*_gasLimit*/,\n bytes calldata _payload\n ) external override {\n StoredPayload storage sp = storedPayload[_srcChainId][_srcAddress];\n\n // assert and increment the nonce. no message shuffling\n require(_nonce == ++inboundNonce[_srcChainId][_srcAddress], \"LayerZero: wrong nonce\");\n\n // queue the following msgs inside of a stack to simulate a successful send on src, but not fully delivered on dst\n if (sp.payloadHash != bytes32(0)) {\n QueuedPayload[] storage msgs = msgsToDeliver[_srcChainId][_srcAddress];\n QueuedPayload memory newMsg = QueuedPayload(_dstAddress, _nonce, _payload);\n\n // warning, might run into gas issues trying to forward through a bunch of queued msgs\n // shift all the msgs over so we can treat this like a fifo via array.pop()\n if (msgs.length > 0) {\n // extend the array\n msgs.push(newMsg);\n\n // shift all the indexes up for pop()\n for (uint256 i = 0; i < msgs.length - 1; i++) {\n msgs[i + 1] = msgs[i];\n }\n\n // put the newMsg at the bottom of the stack\n msgs[0] = newMsg;\n } else {\n msgs.push(newMsg);\n }\n } else if (nextMsgBLocked) {\n storedPayload[_srcChainId][_srcAddress] = StoredPayload(\n uint64(_payload.length),\n _dstAddress,\n keccak256(_payload)\n );\n emit PayloadStored(_srcChainId, _srcAddress, _dstAddress, _nonce, _payload, bytes(\"\"));\n // ensure the next msgs that go through are no longer blocked\n nextMsgBLocked = false;\n } else {\n // we ignore the gas limit because this call is made in one tx due to being \"same chain\"\n // LayerZeroReceiverInterface(_dstAddress).lzReceive{gas: _gasLimit}(_srcChainId, _srcAddress, _nonce, _payload); // invoke lzReceive\n LayerZeroReceiverInterface(_dstAddress).lzReceive(_srcChainId, _srcAddress, _nonce, _payload); // invoke lzReceive\n }\n }\n\n // used to simulate messages received get stored as a payload\n function blockNextMsg() external {\n nextMsgBLocked = true;\n }\n\n function getLengthOfQueue(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (uint256) {\n return msgsToDeliver[_srcChainId][_srcAddress].length;\n }\n\n // @notice gets a quote in source native gas, for the amount that send() requires to pay for message delivery\n // @param _dstChainId - the destination chain identifier\n // @param _userApplication - the user app address on this EVM chain\n // @param _payload - the custom message to send over LayerZero\n // @param _payInZRO - if false, user app pays the protocol fee in native token\n // @param _adapterParam - parameters for the adapter service, e.g. send some dust native token to dstChain\n function estimateFees(\n uint16,\n address,\n bytes memory,\n bool,\n bytes memory\n ) external view override returns (uint256 _nativeFee, uint256 _zroFee) {\n _nativeFee = nativeFee;\n _zroFee = zroFee;\n }\n\n // give 20 bytes, return the decoded address\n function packedBytesToAddr(bytes calldata _b) public pure returns (address) {\n address addr;\n assembly {\n let ptr := mload(0x40)\n calldatacopy(ptr, sub(_b.offset, 2), add(_b.length, 2))\n addr := mload(sub(ptr, 10))\n }\n return addr;\n }\n\n // given an address, return the 20 bytes\n function addrToPackedBytes(address _a) public pure returns (bytes memory) {\n bytes memory data = abi.encodePacked(_a);\n return data;\n }\n\n function setConfig(\n uint16 /*_version*/,\n uint16 /*_chainId*/,\n uint256 /*_configType*/,\n bytes memory /*_config*/\n ) external override {}\n\n function getConfig(\n uint16 /*_version*/,\n uint16 /*_chainId*/,\n address /*_ua*/,\n uint256 /*_configType*/\n ) external pure override returns (bytes memory) {\n return \"\";\n }\n\n function setSendVersion(uint16 /*version*/) external override {}\n\n function setReceiveVersion(uint16 /*version*/) external override {}\n\n function getSendVersion(address /*_userApplication*/) external pure override returns (uint16) {\n return 1;\n }\n\n function getReceiveVersion(address /*_userApplication*/) external pure override returns (uint16) {\n return 1;\n }\n\n function getInboundNonce(uint16 _chainID, bytes calldata _srcAddress) external view override returns (uint64) {\n return inboundNonce[_chainID][_srcAddress];\n }\n\n function getOutboundNonce(uint16 _chainID, address _srcAddress) external view override returns (uint64) {\n return outboundNonce[_chainID][_srcAddress];\n }\n\n // simulates the relayer pushing through the rest of the msgs that got delayed due to the stored payload\n function _clearMsgQue(uint16 _srcChainId, bytes calldata _srcAddress) internal {\n QueuedPayload[] storage msgs = msgsToDeliver[_srcChainId][_srcAddress];\n\n // warning, might run into gas issues trying to forward through a bunch of queued msgs\n while (msgs.length > 0) {\n QueuedPayload memory payload = msgs[msgs.length - 1];\n LayerZeroReceiverInterface(payload.dstAddress).lzReceive(\n _srcChainId,\n _srcAddress,\n payload.nonce,\n payload.payload\n );\n msgs.pop();\n }\n }\n\n function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external override {\n StoredPayload storage sp = storedPayload[_srcChainId][_srcAddress];\n // revert if no messages are cached. safeguard malicious UA behaviour\n require(sp.payloadHash != bytes32(0), \"LayerZero: no stored payload\");\n require(sp.dstAddress == msg.sender, \"LayerZero: invalid caller\");\n\n // empty the storedPayload\n sp.payloadLength = 0;\n sp.dstAddress = address(0);\n sp.payloadHash = bytes32(0);\n\n emit UaForceResumeReceive(_srcChainId, _srcAddress);\n\n // resume the receiving of msgs after we force clear the \"stuck\" msg\n _clearMsgQue(_srcChainId, _srcAddress);\n }\n\n function retryPayload(uint16 _srcChainId, bytes calldata _srcAddress, bytes calldata _payload) external override {\n StoredPayload storage sp = storedPayload[_srcChainId][_srcAddress];\n require(sp.payloadHash != bytes32(0), \"LayerZero: no stored payload\");\n require(_payload.length == sp.payloadLength && keccak256(_payload) == sp.payloadHash, \"LayerZero: invalid payload\");\n\n address dstAddress = sp.dstAddress;\n // empty the storedPayload\n sp.payloadLength = 0;\n sp.dstAddress = address(0);\n sp.payloadHash = bytes32(0);\n\n uint64 nonce = inboundNonce[_srcChainId][_srcAddress];\n\n LayerZeroReceiverInterface(dstAddress).lzReceive(_srcChainId, _srcAddress, nonce, _payload);\n emit PayloadCleared(_srcChainId, _srcAddress, nonce, dstAddress);\n }\n\n function hasStoredPayload(uint16 _srcChainId, bytes calldata _srcAddress) external view override returns (bool) {\n StoredPayload storage sp = storedPayload[_srcChainId][_srcAddress];\n return sp.payloadHash != bytes32(0);\n }\n\n function isSendingPayload() external pure override returns (bool) {\n return false;\n }\n\n function isReceivingPayload() external pure override returns (bool) {\n return false;\n }\n\n function getSendLibraryAddress(address) external view override returns (address) {\n return address(this);\n }\n\n function getReceiveLibraryAddress(address) external view override returns (address) {\n return address(this);\n }\n}\n" + }, + "contracts/mock/Mock.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Initializable.sol\";\nimport \"../abstract/Owner.sol\";\n\nimport \"../interface/InitializableInterface.sol\";\n\ncontract Mock is Initializable, Owner {\n constructor() {}\n\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"MOCK: already initialized\");\n bytes32 arbitraryData = abi.decode(initPayload, (bytes32));\n bool shouldFail = false;\n assembly {\n // we leave slot 0 available for fallback calls\n sstore(0x01, arbitraryData)\n switch arbitraryData\n case 0 {\n shouldFail := 0x01\n }\n sstore(_ownerSlot, caller())\n }\n _setInitialized();\n if (shouldFail) {\n return bytes4(0x12345678);\n } else {\n return InitializableInterface.init.selector;\n }\n }\n\n function getStorage(uint256 slot) public view returns (bytes32 data) {\n assembly {\n data := sload(slot)\n }\n }\n\n function setStorage(uint256 slot, bytes32 data) public {\n assembly {\n sstore(slot, data)\n }\n }\n\n function mockCall(address target, bytes calldata data) public payable {\n assembly {\n calldatacopy(0, data.offset, data.length)\n let result := call(gas(), target, callvalue(), 0, data.length, 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n function mockStaticCall(address target, bytes calldata data) public view returns (bytes memory) {\n assembly {\n calldatacopy(0, data.offset, data.length)\n let result := staticcall(gas(), target, 0, data.length, 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n function mockDelegateCall(address target, bytes calldata data) public returns (bytes memory) {\n assembly {\n calldatacopy(0, data.offset, data.length)\n let result := delegatecall(gas(), target, 0, data.length, 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n receive() external payable {}\n\n fallback() external payable {\n assembly {\n calldatacopy(0, 0, calldatasize())\n let result := call(gas(), sload(0), callvalue(), 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/mock/MockERC721Receiver.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../interface/ERC721.sol\";\nimport \"../interface/ERC165.sol\";\nimport \"../interface/ERC721TokenReceiver.sol\";\n\ncontract MockERC721Receiver is ERC165, ERC721TokenReceiver {\n bool private _works;\n\n constructor() {\n _works = true;\n }\n\n function toggleWorks(bool active) external {\n _works = active;\n }\n\n function supportsInterface(bytes4 interfaceID) external pure returns (bool) {\n if (interfaceID == 0x01ffc9a7 || interfaceID == 0x150b7a02) {\n return true;\n } else {\n return false;\n }\n }\n\n function onERC721Received(\n address /*operator*/,\n address /*from*/,\n uint256 /*tokenId*/,\n bytes calldata /*data*/\n ) external view returns (bytes4) {\n if (_works) {\n return 0x150b7a02;\n } else {\n return 0x00000000;\n }\n }\n\n function transferNFT(address payable token, uint256 tokenId, address to) external {\n ERC721(token).safeTransferFrom(address(this), to, tokenId);\n }\n}\n" + }, + "contracts/mock/MockExternalCall.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\ncontract MockExternalCall {\n function callExternalFn(address contractAddress, bytes calldata encodedSignature) public {\n (bool success, ) = address(contractAddress).call(encodedSignature);\n require(success, \"Failed\");\n }\n}\n" + }, + "contracts/mock/MockHolographChild.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../Holograph.sol\";\n\ncontract MockHolographChild is Holograph {\n constructor() {}\n\n function emptyFunction() external pure returns (string memory) {\n return \"on purpose to remove verification conflict\";\n }\n}\n" + }, + "contracts/mock/MockHolographGenesisChild.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../HolographGenesis.sol\";\n\ncontract MockHolographGenesisChild is HolographGenesis {\n constructor() {}\n\n function approveDeployerMock(address newDeployer, bool approve) external onlyDeployer {\n return this.approveDeployer(newDeployer, approve);\n }\n\n function isApprovedDeployerMock(address deployer) external view returns (bool) {\n return this.isApprovedDeployer(deployer);\n }\n}\n" + }, + "contracts/mock/MockLZEndpoint.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\n\nimport \"../interface/HolographOperatorInterface.sol\";\nimport \"../interface/LayerZeroOverrides.sol\";\n\ncontract MockLZEndpoint is Admin {\n event LzEvent(uint16 _dstChainId, bytes _destination, bytes _payload);\n\n constructor() {\n assembly {\n sstore(_adminSlot, origin())\n }\n }\n\n function send(\n uint16 _dstChainId,\n bytes calldata _destination,\n bytes calldata _payload,\n address payable /* _refundAddress*/,\n address /* _zroPaymentAddress*/,\n bytes calldata /* _adapterParams*/\n ) external payable {\n // we really don't care about anything and just emit an event that we can leverage for multichain replication\n emit LzEvent(_dstChainId, _destination, _payload);\n }\n\n function estimateFees(\n uint16,\n address,\n bytes calldata,\n bool,\n bytes calldata\n ) external pure returns (uint256 nativeFee, uint256 zroFee) {\n nativeFee = 10 ** 15;\n zroFee = 10 ** 7;\n }\n\n function defaultSendLibrary() external view returns (address) {\n return address(this);\n }\n\n function getAppConfig(uint16, address) external view returns (LayerZeroOverrides.ApplicationConfiguration memory) {\n return LayerZeroOverrides.ApplicationConfiguration(0, 0, address(this), 0, 0, address(this));\n }\n\n function dstPriceLookup(uint16) external pure returns (uint128 dstPriceRatio, uint128 dstGasPriceInWei) {\n dstPriceRatio = 10 ** 10;\n dstGasPriceInWei = 1000000000;\n }\n\n function dstConfigLookup(\n uint16,\n uint16\n ) external pure returns (uint128 dstNativeAmtCap, uint64 baseGas, uint64 gasPerByte) {\n dstNativeAmtCap = 10 ** 18;\n baseGas = 50000;\n gasPerByte = 25;\n }\n\n function crossChainMessage(address target, uint256 gasLimit, bytes calldata payload) external {\n HolographOperatorInterface(target).crossChainMessage{gas: gasLimit}(payload);\n }\n}\n" + }, + "contracts/module/LayerZeroModule.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\n\nimport \"../enum/ChainIdType.sol\";\n\nimport \"../interface/CrossChainMessageInterface.sol\";\nimport \"../interface/HolographOperatorInterface.sol\";\nimport \"../interface/InitializableInterface.sol\";\nimport \"../interface/HolographInterfacesInterface.sol\";\nimport \"../interface/LayerZeroModuleInterface.sol\";\nimport \"../interface/LayerZeroOverrides.sol\";\n\nimport \"../struct/GasParameters.sol\";\n\nimport \"./OVM_GasPriceOracle.sol\";\n\n/**\n * @title Holograph LayerZero Module\n * @author https://github.com/holographxyz\n * @notice Holograph module for enabling LayerZero cross-chain messaging\n * @dev This contract abstracts all of the LayerZero specific logic into an isolated module\n */\ncontract LayerZeroModule is Admin, Initializable, CrossChainMessageInterface, LayerZeroModuleInterface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.bridge')) - 1)\n */\n bytes32 constant _bridgeSlot = 0xeb87cbb21687feb327e3d58c6c16d552231d12c7a0e8115042a4165fac8a77f9;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.interfaces')) - 1)\n */\n bytes32 constant _interfacesSlot = 0xbd3084b8c09da87ad159c247a60e209784196be2530cecbbd8f337fdd1848827;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.lZEndpoint')) - 1)\n */\n bytes32 constant _lZEndpointSlot = 0x56825e447adf54cdde5f04815fcf9b1dd26ef9d5c053625147c18b7c13091686;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.operator')) - 1)\n */\n bytes32 constant _operatorSlot = 0x7caba557ad34138fa3b7e43fb574e0e6cc10481c3073e0dffbc560db81b5c60f;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.gasParameters')) - 1)\n */\n bytes32 constant _gasParametersSlot = 0x15eee82a0af3c04e4b65c3842105c973a6b0fb2a68728bf035809e13b38ce8cf;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.gasParameters')) - 1)\n */\n bytes32 constant _optimismGasPriceOracleSlot = 0x46043c284a96474ab4a54c741ea0d0fce54e98eea878b99d4b85808fa6f71a5f;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (\n address bridge,\n address interfaces,\n address operator,\n address optimismGasPriceOracle,\n uint32[] memory chainIds,\n GasParameters[] memory gasParameters\n ) = abi.decode(initPayload, (address, address, address, address, uint32[], GasParameters[]));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_bridgeSlot, bridge)\n sstore(_interfacesSlot, interfaces)\n sstore(_operatorSlot, operator)\n sstore(_optimismGasPriceOracleSlot, optimismGasPriceOracle)\n }\n require(chainIds.length == gasParameters.length, \"HOLOGRAPH: wrong array lengths\");\n for (uint256 i = 0; i < chainIds.length; i++) {\n _setGasParameters(chainIds[i], gasParameters[i]);\n }\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @notice Receive cross-chain message from LayerZero\n * @dev This function only allows calls from the configured LayerZero endpoint address\n */\n function lzReceive(\n uint16 /* _srcChainId*/,\n bytes calldata _srcAddress,\n uint64 /* _nonce*/,\n bytes calldata _payload\n ) external payable {\n assembly {\n /**\n * @dev check if msg.sender is LayerZero Endpoint\n */\n switch eq(sload(_lZEndpointSlot), caller())\n case 0 {\n /**\n * @dev this is the assembly version of -> revert(\"HOLOGRAPH: LZ only endpoint\");\n */\n mstore(0x80, 0x08c379a000000000000000000000000000000000000000000000000000000000)\n mstore(0xa0, 0x0000002000000000000000000000000000000000000000000000000000000000)\n mstore(0xc0, 0x0000001b484f4c4f47524150483a204c5a206f6e6c7920656e64706f696e7400)\n mstore(0xe0, 0x0000000000000000000000000000000000000000000000000000000000000000)\n revert(0x80, 0xc4)\n }\n let ptr := mload(0x40)\n calldatacopy(add(ptr, 0x0c), _srcAddress.offset, _srcAddress.length)\n /**\n * @dev check if LZ from address is same as address(this)\n */\n switch eq(mload(ptr), address())\n case 0 {\n /**\n * @dev this is the assembly version of -> revert(\"HOLOGRAPH: unauthorized sender\");\n */\n mstore(0x80, 0x08c379a000000000000000000000000000000000000000000000000000000000)\n mstore(0xa0, 0x0000002000000000000000000000000000000000000000000000000000000000)\n mstore(0xc0, 0x0000001e484f4c4f47524150483a20756e617574686f72697a65642073656e64)\n mstore(0xe0, 0x6572000000000000000000000000000000000000000000000000000000000000)\n revert(0x80, 0xc4)\n }\n }\n /**\n * @dev if validation has passed, submit payload to Holograph Operator for converting into an operator job\n */\n _operator().crossChainMessage(_payload);\n }\n\n /**\n * @dev Need to add an extra function to get LZ gas amount needed for their internal cross-chain message verification\n */\n function send(\n uint256 /* gasLimit*/,\n uint256 /* gasPrice*/,\n uint32 toChain,\n address msgSender,\n uint256 msgValue,\n bytes calldata crossChainPayload\n ) external payable {\n require(msg.sender == address(_operator()), \"HOLOGRAPH: operator only call\");\n LayerZeroOverrides lZEndpoint;\n assembly {\n lZEndpoint := sload(_lZEndpointSlot)\n }\n GasParameters memory gasParameters = _gasParameters(toChain);\n // need to recalculate the gas amounts for LZ to deliver message\n lZEndpoint.send{value: msgValue}(\n uint16(_interfaces().getChainId(ChainIdType.HOLOGRAPH, uint256(toChain), ChainIdType.LAYERZERO)),\n abi.encodePacked(address(this), address(this)),\n crossChainPayload,\n payable(msgSender),\n address(this),\n abi.encodePacked(\n uint16(1),\n uint256(gasParameters.msgBaseGas + (crossChainPayload.length * gasParameters.msgGasPerByte))\n )\n );\n }\n\n function getMessageFee(\n uint32 toChain,\n uint256 gasLimit,\n uint256 gasPrice,\n bytes calldata crossChainPayload\n ) external view returns (uint256 hlgFee, uint256 msgFee, uint256 dstGasPrice) {\n uint16 lzDestChain = uint16(\n _interfaces().getChainId(ChainIdType.HOLOGRAPH, uint256(toChain), ChainIdType.LAYERZERO)\n );\n LayerZeroOverrides lz;\n assembly {\n lz := sload(_lZEndpointSlot)\n }\n // convert holograph chain id to lz chain id\n (uint128 dstPriceRatio, uint128 dstGasPriceInWei) = _getPricing(lz, lzDestChain);\n if (gasPrice == 0) {\n gasPrice = dstGasPriceInWei;\n }\n GasParameters memory gasParameters = _gasParameters(toChain);\n require(gasPrice > gasParameters.minGasPrice, \"HOLOGRAPH: gas price too low\");\n bytes memory adapterParams = abi.encodePacked(\n uint16(1),\n uint256(gasParameters.msgBaseGas + (crossChainPayload.length * gasParameters.msgGasPerByte))\n );\n gasLimit = gasLimit + gasParameters.jobBaseGas + (crossChainPayload.length * gasParameters.jobGasPerByte);\n gasLimit = gasLimit + (gasLimit / 10);\n require(gasLimit < gasParameters.maxGasLimit, \"HOLOGRAPH: gas limit over max\");\n (uint256 nativeFee, ) = lz.estimateFees(lzDestChain, address(this), crossChainPayload, false, adapterParams);\n hlgFee = ((gasPrice * gasLimit) * dstPriceRatio) / (10 ** 20);\n /*\n * @dev toChain is a ChainIdType.HOLOGRAPH, which can be found at https://github.com/holographxyz/networks/blob/main/src/networks.ts\n * chainId 7 == optimism\n * chainId 4000000015 == optimismTestnetGoerli\n */\n if (toChain == uint32(7) || toChain == uint32(4000000015)) {\n hlgFee += (_optimismGasPriceOracle().getL1Fee(crossChainPayload) * dstPriceRatio) / (10 ** 20);\n }\n msgFee = nativeFee;\n dstGasPrice = (dstGasPriceInWei * dstPriceRatio) / (10 ** 20);\n }\n\n function getHlgFee(\n uint32 toChain,\n uint256 gasLimit,\n uint256 gasPrice,\n bytes calldata crossChainPayload\n ) external view returns (uint256 hlgFee) {\n LayerZeroOverrides lz;\n assembly {\n lz := sload(_lZEndpointSlot)\n }\n uint16 lzDestChain = uint16(\n _interfaces().getChainId(ChainIdType.HOLOGRAPH, uint256(toChain), ChainIdType.LAYERZERO)\n );\n (uint128 dstPriceRatio, uint128 dstGasPriceInWei) = _getPricing(lz, lzDestChain);\n if (gasPrice == 0) {\n gasPrice = dstGasPriceInWei;\n }\n GasParameters memory gasParameters = _gasParameters(toChain);\n require(gasPrice > gasParameters.minGasPrice, \"HOLOGRAPH: gas price too low\");\n gasLimit = gasLimit + gasParameters.jobBaseGas + (crossChainPayload.length * gasParameters.jobGasPerByte);\n gasLimit = gasLimit + (gasLimit / 10);\n require(gasLimit < gasParameters.maxGasLimit, \"HOLOGRAPH: gas limit over max\");\n hlgFee = ((gasPrice * gasLimit) * dstPriceRatio) / (10 ** 20);\n /*\n * @dev toChain is a ChainIdType.HOLOGRAPH, which can be found at https://github.com/holographxyz/networks/blob/main/src/networks.ts\n * chainId 7 == optimism\n * chainId 4000000015 == optimismTestnetGoerli\n */\n if (toChain == uint32(7) || toChain == uint32(4000000015)) {\n hlgFee += (_optimismGasPriceOracle().getL1Fee(crossChainPayload) * dstPriceRatio) / (10 ** 20);\n }\n }\n\n function _getPricing(\n LayerZeroOverrides lz,\n uint16 lzDestChain\n ) private view returns (uint128 dstPriceRatio, uint128 dstGasPriceInWei) {\n return\n LayerZeroOverrides(LayerZeroOverrides(lz.defaultSendLibrary()).getAppConfig(lzDestChain, address(this)).relayer)\n .dstPriceLookup(lzDestChain);\n }\n\n /**\n * @notice Get the address of the Holograph Bridge module\n * @dev Used for beaming holographable assets cross-chain\n */\n function getBridge() external view returns (address bridge) {\n assembly {\n bridge := sload(_bridgeSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Bridge module address\n * @param bridge address of the Holograph Bridge smart contract to use\n */\n function setBridge(address bridge) external onlyAdmin {\n assembly {\n sstore(_bridgeSlot, bridge)\n }\n }\n\n /**\n * @notice Get the address of the Holograph Interfaces module\n * @dev Holograph uses this contract to store data that needs to be accessed by a large portion of the modules\n */\n function getInterfaces() external view returns (address interfaces) {\n assembly {\n interfaces := sload(_interfacesSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Interfaces module address\n * @param interfaces address of the Holograph Interfaces smart contract to use\n */\n function setInterfaces(address interfaces) external onlyAdmin {\n assembly {\n sstore(_interfacesSlot, interfaces)\n }\n }\n\n /**\n * @notice Get the address of the approved LayerZero Endpoint\n * @dev All lzReceive function calls allow only requests from this address\n */\n function getLZEndpoint() external view returns (address lZEndpoint) {\n assembly {\n lZEndpoint := sload(_lZEndpointSlot)\n }\n }\n\n /**\n * @notice Update the approved LayerZero Endpoint address\n * @param lZEndpoint address of the LayerZero Endpoint to use\n */\n function setLZEndpoint(address lZEndpoint) external onlyAdmin {\n assembly {\n sstore(_lZEndpointSlot, lZEndpoint)\n }\n }\n\n /**\n * @notice Get the address of the Holograph Operator module\n * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module\n */\n function getOperator() external view returns (address operator) {\n assembly {\n operator := sload(_operatorSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Operator module address\n * @param operator address of the Holograph Operator smart contract to use\n */\n function setOperator(address operator) external onlyAdmin {\n assembly {\n sstore(_operatorSlot, operator)\n }\n }\n\n /**\n * @notice Get the address of the Optimism Gas Price Oracle module\n * @dev Allows to properly calculate the L1 security fee for Optimism bridge transactions\n */\n function getOptimismGasPriceOracle() external view returns (address optimismGasPriceOracle) {\n assembly {\n optimismGasPriceOracle := sload(_optimismGasPriceOracleSlot)\n }\n }\n\n /**\n * @notice Update the Optimism Gas Price Oracle module address\n * @param optimismGasPriceOracle address of the Optimism Gas Price Oracle smart contract to use\n */\n function setOptimismGasPriceOracle(address optimismGasPriceOracle) external onlyAdmin {\n assembly {\n sstore(_optimismGasPriceOracleSlot, optimismGasPriceOracle)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Bridge Interface\n */\n function _bridge() private view returns (address bridge) {\n assembly {\n bridge := sload(_bridgeSlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Interfaces Interface\n */\n function _interfaces() private view returns (HolographInterfacesInterface interfaces) {\n assembly {\n interfaces := sload(_interfacesSlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Operator Interface\n */\n function _operator() private view returns (HolographOperatorInterface operator) {\n assembly {\n operator := sload(_operatorSlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the Optimism Gas Price Oracle Interface\n */\n function _optimismGasPriceOracle() private view returns (OVM_GasPriceOracle optimismGasPriceOracle) {\n assembly {\n optimismGasPriceOracle := sload(_optimismGasPriceOracleSlot)\n }\n }\n\n /**\n * @dev Purposefully reverts to prevent having any type of ether transfered into the contract\n */\n receive() external payable {\n revert();\n }\n\n /**\n * @dev Purposefully reverts to prevent any calls to undefined functions\n */\n fallback() external payable {\n revert();\n }\n\n /**\n * @notice Get the default or chain-specific GasParameters\n * @param chainId the Holograph ChainId to get gas parameters for, set to 0 for default\n */\n function getGasParameters(uint32 chainId) external view returns (GasParameters memory gasParameters) {\n return _gasParameters(chainId);\n }\n\n /**\n * @notice Update the default or chain-specific GasParameters\n * @param chainId the Holograph ChainId to set gas parameters for, set to 0 for default\n * @param gasParameters struct of all the gas parameters to set\n */\n function setGasParameters(uint32 chainId, GasParameters memory gasParameters) external onlyAdmin {\n _setGasParameters(chainId, gasParameters);\n }\n\n /**\n * @notice Update the default or chain-specific GasParameters\n * @param chainIds array of Holograph ChainId to set gas parameters for\n * @param gasParameters array of all the gas parameters to set\n */\n function setGasParameters(uint32[] memory chainIds, GasParameters[] memory gasParameters) external onlyAdmin {\n require(chainIds.length == gasParameters.length, \"HOLOGRAPH: wrong array lengths\");\n for (uint256 i = 0; i < chainIds.length; i++) {\n _setGasParameters(chainIds[i], gasParameters[i]);\n }\n }\n\n /**\n * @notice Internal function for setting the default or chain-specific GasParameters\n * @param chainId the Holograph ChainId to set gas parameters for, set to 0 for default\n * @param gasParameters struct of all the gas parameters to set\n */\n function _setGasParameters(uint32 chainId, GasParameters memory gasParameters) private {\n bytes32 slot = chainId == 0 ? _gasParametersSlot : keccak256(abi.encode(chainId, _gasParametersSlot));\n assembly {\n let pos := gasParameters\n for {\n let i := 0\n } lt(i, 6) {\n i := add(i, 1)\n } {\n sstore(add(slot, i), mload(pos))\n pos := add(pos, 32)\n }\n }\n }\n\n /**\n * @dev Internal function used for getting the default or chain-specific GasParameters\n * @param chainId the Holograph ChainId to get gas parameters for, set to 0 for default\n */\n function _gasParameters(uint32 chainId) private view returns (GasParameters memory gasParameters) {\n bytes32 slot = chainId == 0 ? _gasParametersSlot : keccak256(abi.encode(chainId, _gasParametersSlot));\n assembly {\n let pos := gasParameters\n for {\n let i := 0\n } lt(i, 6) {\n i := add(i, 1)\n } {\n mstore(pos, sload(add(slot, i)))\n pos := add(pos, 32)\n }\n }\n }\n}\n" + }, + "contracts/module/OVM_GasPriceOracle.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\n\n/**\n * @title OVM_GasPriceOracle\n * @dev This contract exposes the current l2 gas price, a measure of how congested the network\n * currently is. This measure is used by the Sequencer to determine what fee to charge for\n * transactions. When the system is more congested, the l2 gas price will increase and fees\n * will also increase as a result.\n *\n * All public variables are set while generating the initial L2 state. The\n * constructor doesn't run in practice as the L2 state generation script uses\n * the deployed bytecode instead of running the initcode.\n */\ncontract OVM_GasPriceOracle is Admin, Initializable {\n // Current L2 gas price\n uint256 public gasPrice;\n // Current L1 base fee\n uint256 public l1BaseFee;\n // Amortized cost of batch submission per transaction\n uint256 public overhead;\n // Value to scale the fee up by\n uint256 public scalar;\n // Number of decimals of the scalar\n uint256 public decimals;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (uint256 _gasPrice, uint256 _l1BaseFee, uint256 _overhead, uint256 _scalar, uint256 _decimals) = abi.decode(\n initPayload,\n (uint256, uint256, uint256, uint256, uint256)\n );\n gasPrice = _gasPrice;\n l1BaseFee = _l1BaseFee;\n overhead = _overhead;\n scalar = _scalar;\n decimals = _decimals;\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n event GasPriceUpdated(uint256);\n event L1BaseFeeUpdated(uint256);\n event OverheadUpdated(uint256);\n event ScalarUpdated(uint256);\n event DecimalsUpdated(uint256);\n\n /**\n * Allows the owner to modify the l2 gas price.\n * @param _gasPrice New l2 gas price.\n */\n function setGasPrice(uint256 _gasPrice) external onlyAdmin {\n gasPrice = _gasPrice;\n emit GasPriceUpdated(_gasPrice);\n }\n\n /**\n * Allows the owner to modify the l1 base fee.\n * @param _baseFee New l1 base fee\n */\n function setL1BaseFee(uint256 _baseFee) external onlyAdmin {\n l1BaseFee = _baseFee;\n emit L1BaseFeeUpdated(_baseFee);\n }\n\n /**\n * Allows the owner to modify the overhead.\n * @param _overhead New overhead\n */\n function setOverhead(uint256 _overhead) external onlyAdmin {\n overhead = _overhead;\n emit OverheadUpdated(_overhead);\n }\n\n /**\n * Allows the owner to modify the scalar.\n * @param _scalar New scalar\n */\n function setScalar(uint256 _scalar) external onlyAdmin {\n scalar = _scalar;\n emit ScalarUpdated(_scalar);\n }\n\n /**\n * Allows the owner to modify the decimals.\n * @param _decimals New decimals\n */\n function setDecimals(uint256 _decimals) external onlyAdmin {\n decimals = _decimals;\n emit DecimalsUpdated(_decimals);\n }\n\n /**\n * Computes the L1 portion of the fee\n * based on the size of the RLP encoded tx\n * and the current l1BaseFee\n * @param _data Unsigned RLP encoded tx, 6 elements\n * @return L1 fee that should be paid for the tx\n */\n function getL1Fee(bytes memory _data) external view returns (uint256) {\n uint256 l1GasUsed = getL1GasUsed(_data);\n uint256 l1Fee = l1GasUsed * l1BaseFee;\n uint256 divisor = 10 ** decimals;\n uint256 unscaled = l1Fee * scalar;\n uint256 scaled = unscaled / divisor;\n return scaled;\n }\n\n /**\n * Computes the amount of L1 gas used for a transaction\n * The overhead represents the per batch gas overhead of\n * posting both transaction and state roots to L1 given larger\n * batch sizes.\n * 4 gas for 0 byte\n * https://github.com/ethereum/go-ethereum/blob/9ada4a2e2c415e6b0b51c50e901336872e028872/params/protocol_params.go#L33\n * 16 gas for non zero byte\n * https://github.com/ethereum/go-ethereum/blob/9ada4a2e2c415e6b0b51c50e901336872e028872/params/protocol_params.go#L87\n * This will need to be updated if calldata gas prices change\n * Account for the transaction being unsigned\n * Padding is added to account for lack of signature on transaction\n * 1 byte for RLP V prefix\n * 1 byte for V\n * 1 byte for RLP R prefix\n * 32 bytes for R\n * 1 byte for RLP S prefix\n * 32 bytes for S\n * Total: 68 bytes of padding\n * @param _data Unsigned RLP encoded tx, 6 elements\n * @return Amount of L1 gas used for a transaction\n */\n function getL1GasUsed(bytes memory _data) public view returns (uint256) {\n uint256 total = 0;\n for (uint256 i = 0; i < _data.length; i++) {\n if (_data[i] == 0) {\n total += 4;\n } else {\n total += 16;\n }\n }\n uint256 unsigned = total + overhead;\n return unsigned + (68 * 16);\n }\n}\n" + }, + "contracts/proxy/CxipERC721Proxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\n\nimport \"../interface/InitializableInterface.sol\";\nimport \"../interface/HolographRegistryInterface.sol\";\n\ncontract CxipERC721Proxy is Admin, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.contractType')) - 1)\n */\n bytes32 constant _contractTypeSlot = 0x0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c7;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\n */\n bytes32 constant _registrySlot = 0xce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7;\n\n constructor() {}\n\n function init(bytes memory data) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (bytes32 contractType, address registry, bytes memory initCode) = abi.decode(data, (bytes32, address, bytes));\n assembly {\n sstore(_contractTypeSlot, contractType)\n sstore(_registrySlot, registry)\n }\n (bool success, bytes memory returnData) = getCxipERC721Source().delegatecall(\n abi.encodeWithSignature(\"init(bytes)\", initCode)\n );\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == InitializableInterface.init.selector, \"initialization failed\");\n\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n function getCxipERC721Source() public view returns (address) {\n HolographRegistryInterface registry;\n bytes32 contractType;\n assembly {\n registry := sload(_registrySlot)\n contractType := sload(_contractTypeSlot)\n }\n return registry.getContractTypeAddress(contractType);\n }\n\n receive() external payable {}\n\n fallback() external payable {\n address cxipErc721Source = getCxipERC721Source();\n assembly {\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), cxipErc721Source, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/proxy/HolographBridgeProxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\n\nimport \"../interface/InitializableInterface.sol\";\n\ncontract HolographBridgeProxy is Admin, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.bridge')) - 1)\n */\n bytes32 constant _bridgeSlot = 0xeb87cbb21687feb327e3d58c6c16d552231d12c7a0e8115042a4165fac8a77f9;\n\n constructor() {}\n\n function init(bytes memory data) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address bridge, bytes memory initCode) = abi.decode(data, (address, bytes));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_bridgeSlot, bridge)\n }\n (bool success, bytes memory returnData) = bridge.delegatecall(abi.encodeWithSignature(\"init(bytes)\", initCode));\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == InitializableInterface.init.selector, \"initialization failed\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n function getBridge() external view returns (address bridge) {\n assembly {\n bridge := sload(_bridgeSlot)\n }\n }\n\n function setBridge(address bridge) external onlyAdmin {\n assembly {\n sstore(_bridgeSlot, bridge)\n }\n }\n\n receive() external payable {}\n\n fallback() external payable {\n assembly {\n let bridge := sload(_bridgeSlot)\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), bridge, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/proxy/HolographFactoryProxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\n\nimport \"../interface/InitializableInterface.sol\";\n\ncontract HolographFactoryProxy is Admin, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.factory')) - 1)\n */\n bytes32 constant _factorySlot = 0xa49f20855ba576e09d13c8041c8039fa655356ea27f6c40f1ec46a4301cd5b23;\n\n constructor() {}\n\n function init(bytes memory data) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address factory, bytes memory initCode) = abi.decode(data, (address, bytes));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_factorySlot, factory)\n }\n (bool success, bytes memory returnData) = factory.delegatecall(abi.encodeWithSignature(\"init(bytes)\", initCode));\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == InitializableInterface.init.selector, \"initialization failed\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n function getFactory() external view returns (address factory) {\n assembly {\n factory := sload(_factorySlot)\n }\n }\n\n function setFactory(address factory) external onlyAdmin {\n assembly {\n sstore(_factorySlot, factory)\n }\n }\n\n receive() external payable {}\n\n fallback() external payable {\n assembly {\n let factory := sload(_factorySlot)\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), factory, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/proxy/HolographOperatorProxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\n\nimport \"../interface/InitializableInterface.sol\";\n\ncontract HolographOperatorProxy is Admin, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.operator')) - 1)\n */\n bytes32 constant _operatorSlot = 0x7caba557ad34138fa3b7e43fb574e0e6cc10481c3073e0dffbc560db81b5c60f;\n\n constructor() {}\n\n function init(bytes memory data) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address operator, bytes memory initCode) = abi.decode(data, (address, bytes));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_operatorSlot, operator)\n }\n (bool success, bytes memory returnData) = operator.delegatecall(abi.encodeWithSignature(\"init(bytes)\", initCode));\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == InitializableInterface.init.selector, \"initialization failed\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n function getOperator() external view returns (address operator) {\n assembly {\n operator := sload(_operatorSlot)\n }\n }\n\n function setOperator(address operator) external onlyAdmin {\n assembly {\n sstore(_operatorSlot, operator)\n }\n }\n\n receive() external payable {}\n\n fallback() external payable {\n assembly {\n let operator := sload(_operatorSlot)\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), operator, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/proxy/HolographRegistryProxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\n\nimport \"../interface/InitializableInterface.sol\";\n\ncontract HolographRegistryProxy is Admin, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\n */\n bytes32 constant _registrySlot = 0xce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7;\n\n constructor() {}\n\n function init(bytes memory data) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address registry, bytes memory initCode) = abi.decode(data, (address, bytes));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_registrySlot, registry)\n }\n (bool success, bytes memory returnData) = registry.delegatecall(abi.encodeWithSignature(\"init(bytes)\", initCode));\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == InitializableInterface.init.selector, \"initialization failed\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n function getRegistry() external view returns (address registry) {\n assembly {\n registry := sload(_registrySlot)\n }\n }\n\n function setRegistry(address registry) external onlyAdmin {\n assembly {\n sstore(_registrySlot, registry)\n }\n }\n\n receive() external payable {}\n\n fallback() external payable {\n assembly {\n let registry := sload(_registrySlot)\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), registry, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/proxy/HolographTreasuryProxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\n\nimport \"../interface/InitializableInterface.sol\";\n\ncontract HolographTreasuryProxy is Admin, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.treasury')) - 1)\n */\n bytes32 constant _treasurySlot = 0x4215e7a38d75164ca078bbd61d0992cdeb1ba16f3b3ead5944966d3e4080e8b6;\n\n constructor() {}\n\n function init(bytes memory data) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address treasury, bytes memory initCode) = abi.decode(data, (address, bytes));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_treasurySlot, treasury)\n }\n (bool success, bytes memory returnData) = treasury.delegatecall(abi.encodeWithSignature(\"init(bytes)\", initCode));\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == InitializableInterface.init.selector, \"initialization failed\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n function getTreasury() external view returns (address treasury) {\n assembly {\n treasury := sload(_treasurySlot)\n }\n }\n\n function setTreasury(address treasury) external onlyAdmin {\n assembly {\n sstore(_treasurySlot, treasury)\n }\n }\n\n receive() external payable {}\n\n fallback() external payable {\n assembly {\n let treasury := sload(_treasurySlot)\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), treasury, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/struct/BridgeSettings.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nstruct BridgeSettings {\n uint256 value;\n uint256 gasLimit;\n uint256 gasPrice;\n uint32 toChain;\n}\n" + }, + "contracts/struct/DeploymentConfig.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nstruct DeploymentConfig {\n bytes32 contractType;\n uint32 chainType;\n bytes32 salt;\n bytes byteCode;\n bytes initCode;\n}\n" + }, + "contracts/struct/GasParameters.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nstruct GasParameters {\n uint256 msgBaseGas;\n uint256 msgGasPerByte;\n uint256 jobBaseGas;\n uint256 jobGasPerByte;\n uint256 minGasPrice;\n uint256 maxGasLimit;\n}\n" + }, + "contracts/struct/OperatorJob.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nstruct OperatorJob {\n uint8 pod;\n uint16 blockTimes;\n address operator;\n uint40 startBlock;\n uint64 startTimestamp;\n uint16[5] fallbackOperators;\n}\n\n/*\n\nuint\t\tDigits\tMax value\n-----------------------------\nuint8\t\t3\t\t255\nuint16\t\t5\t\t65,535\nuint24\t\t8\t\t16,777,215\nuint32\t\t10\t\t4,294,967,295\nuint40\t\t13\t\t1,099,511,627,775\nuint48\t\t15\t\t281,474,976,710,655\nuint56\t\t17\t\t72,057,594,037,927,935\nuint64\t\t20\t\t18,446,744,073,709,551,615\nuint72\t\t22\t\t4,722,366,482,869,645,213,695\nuint80\t\t25\t\t1,208,925,819,614,629,174,706,175\nuint88\t\t27\t\t309,485,009,821,345,068,724,781,055\nuint96\t\t29\t\t79,228,162,514,264,337,593,543,950,335\n...\nuint128\t\t39\t\t340,282,366,920,938,463,463,374,607,431,768,211,455\n...\nuint256\t\t78\t\t115,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\n\n*/\n" + }, + "contracts/struct/Verification.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nstruct Verification {\n bytes32 r;\n bytes32 s;\n uint8 v;\n}\n" + }, + "contracts/struct/ZoraBidShares.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./ZoraDecimal.sol\";\n\nstruct HolographBidShares {\n // % of sale value that goes to the _previous_ owner of the nft\n HolographDecimal prevOwner;\n // % of sale value that goes to the original creator of the nft\n HolographDecimal creator;\n // % of sale value that goes to the seller (current owner) of the nft\n HolographDecimal owner;\n}\n" + }, + "contracts/struct/ZoraDecimal.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nstruct HolographDecimal {\n uint256 value;\n}\n" + }, + "contracts/token/CxipERC721.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/ERC721H.sol\";\n\nimport \"../enum/TokenUriType.sol\";\n\nimport \"../interface/HolographERC721Interface.sol\";\nimport \"../interface/HolographInterfacesInterface.sol\";\nimport \"../interface/HolographInterface.sol\";\nimport \"../interface/HolographerInterface.sol\";\n\n/**\n * @title CXIP ERC-721 Collection that is bridgeable via Holograph\n * @author Holograph Foundation\n * @notice A smart contract for minting and managing Holograph Bridgeable ERC721 NFTs.\n * @dev The entire logic and functionality of the smart contract is self-contained.\n */\ncontract CxipERC721 is ERC721H {\n /**\n * @dev Internal reference used for minting incremental token ids.\n */\n uint224 private _currentTokenId;\n\n /**\n * @dev Enum of type of token URI to use globally for the entire contract.\n */\n TokenUriType private _uriType;\n\n /**\n * @dev Enum mapping of type of token URI to use for specific tokenId.\n */\n mapping(uint256 => TokenUriType) private _tokenUriType;\n\n /**\n * @dev Mapping of IPFS URIs for tokenIds.\n */\n mapping(uint256 => mapping(TokenUriType => string)) private _tokenURIs;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n // we set this as default type since that's what Mint is currently using\n _uriType = TokenUriType.IPFS;\n address owner = abi.decode(initPayload, (address));\n _setOwner(owner);\n // run underlying initializer logic\n return _init(initPayload);\n }\n\n /**\n * @notice Get's the URI of the token.\n * @return string The URI.\n */\n function tokenURI(uint256 _tokenId) external view onlyHolographer returns (string memory) {\n TokenUriType uriType = _tokenUriType[_tokenId];\n if (uriType == TokenUriType.UNDEFINED) {\n uriType = _uriType;\n }\n return\n string(\n abi.encodePacked(\n HolographInterfacesInterface(\n HolographInterface(HolographerInterface(holographer()).getHolograph()).getInterfaces()\n ).getUriPrepend(uriType),\n _tokenURIs[_tokenId][uriType]\n )\n );\n }\n\n function cxipMint(\n uint224 tokenId,\n TokenUriType uriType,\n string calldata tokenUri\n ) external onlyHolographer onlyOwner {\n HolographERC721Interface H721 = HolographERC721Interface(holographer());\n uint256 chainPrepend = H721.sourceGetChainPrepend();\n if (tokenId == 0) {\n _currentTokenId += 1;\n while (\n H721.exists(chainPrepend + uint256(_currentTokenId)) || H721.burned(chainPrepend + uint256(_currentTokenId))\n ) {\n _currentTokenId += 1;\n }\n tokenId = _currentTokenId;\n }\n H721.sourceMint(msgSender(), tokenId);\n uint256 id = chainPrepend + uint256(tokenId);\n if (uriType == TokenUriType.UNDEFINED) {\n uriType = _uriType;\n }\n _tokenUriType[id] = uriType;\n _tokenURIs[id][uriType] = tokenUri;\n }\n\n function bridgeIn(\n uint32 /* _chainId*/,\n address /* _from*/,\n address /* _to*/,\n uint256 _tokenId,\n bytes calldata _data\n ) external onlyHolographer returns (bool) {\n (TokenUriType uriType, string memory tokenUri) = abi.decode(_data, (TokenUriType, string));\n _tokenUriType[_tokenId] = uriType;\n _tokenURIs[_tokenId][uriType] = tokenUri;\n return true;\n }\n\n function bridgeOut(\n uint32 /* _chainId*/,\n address /* _from*/,\n address /* _to*/,\n uint256 _tokenId\n ) external view onlyHolographer returns (bytes memory _data) {\n TokenUriType uriType = _tokenUriType[_tokenId];\n if (uriType == TokenUriType.UNDEFINED) {\n uriType = _uriType;\n }\n _data = abi.encode(uriType, _tokenURIs[_tokenId][uriType]);\n }\n\n function afterBurn(address /* _owner*/, uint256 _tokenId) external onlyHolographer returns (bool) {\n TokenUriType uriType = _tokenUriType[_tokenId];\n if (uriType == TokenUriType.UNDEFINED) {\n uriType = _uriType;\n }\n delete _tokenURIs[_tokenId][uriType];\n return true;\n }\n}\n" + }, + "contracts/token/HolographUtilityToken.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/HLGERC20H.sol\";\n\nimport \"../interface/ERC20.sol\";\nimport \"../interface/HolographERC20Interface.sol\";\nimport \"../interface/HolographInterface.sol\";\nimport \"../interface/HolographerInterface.sol\";\n\n/**\n * @title Holograph Utility Token.\n * @author Holograph Foundation\n * @notice A smart contract for minting and managing Holograph's ERC20 Utility Tokens.\n * @dev The entire logic and functionality of the smart contract is self-contained.\n */\ncontract HolographUtilityToken is HLGERC20H {\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n (address contractOwner, uint256 tokenAmount, uint256 targetChain, address tokenRecipient) = abi.decode(\n initPayload,\n (address, uint256, uint256, address)\n );\n _setOwner(contractOwner);\n /*\n * @dev Mint token only if target chain matches current chain. Or if no target chain has been selected.\n * Goal of this is to restrict minting on Ethereum only for mainnet deployment.\n */\n if (block.chainid == targetChain || targetChain == 0) {\n if (tokenAmount > 0) {\n HolographERC20Interface(msg.sender).sourceMint(tokenRecipient, tokenAmount);\n }\n }\n // run underlying initializer logic\n return _init(initPayload);\n }\n\n /**\n * @dev Temporarily placed to bypass bytecode conflicts\n */\n function isHLG() external pure returns (bool) {\n return true;\n }\n}\n" + }, + "contracts/token/hToken.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/HLGERC20H.sol\";\n\nimport \"../interface/ERC20.sol\";\nimport \"../interface/HolographERC20Interface.sol\";\nimport \"../interface/HolographInterface.sol\";\nimport \"../interface/HolographerInterface.sol\";\n\n/**\n * @title Holograph token (aka hToken), used to wrap and bridge native tokens across blockchains.\n * @author Holograph Foundation\n * @notice A smart contract for minting and managing Holograph's Bridgeable ERC20 Tokens.\n * @dev The entire logic and functionality of the smart contract is self-contained.\n */\ncontract hToken is HLGERC20H {\n /**\n * @dev Sample fee for unwrapping.\n */\n uint16 private _feeBp; // 10000 == 100.00%\n\n /**\n * @dev List of supported Wrapped Tokens (equivalent), on current-chain.\n */\n mapping(address => bool) private _supportedWrappers;\n\n /**\n * @dev Event that is triggered when native token is converted into hToken.\n */\n event Deposit(address indexed from, uint256 amount);\n\n /**\n * @dev Event that is triggered when ERC20 token is converted into hToken.\n */\n event TokenDeposit(address indexed token, address indexed from, uint256 amount);\n\n /**\n * @dev Event that is triggered when hToken is converted into native token.\n */\n event Withdrawal(address indexed to, uint256 amount);\n\n /**\n * @dev Event that is triggered when hToken is converted into ERC20 token.\n */\n event TokenWithdrawal(address indexed token, address indexed to, uint256 amount);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n (address contractOwner, uint16 fee) = abi.decode(initPayload, (address, uint16));\n _setOwner(contractOwner);\n _feeBp = fee;\n // run underlying initializer logic\n return _init(initPayload);\n }\n\n /**\n * @dev Send native token value, get back hToken equivalent.\n * @param recipient Address of where to send the hToken(s) to.\n */\n function holographNativeToken(address recipient) external payable onlyHolographer {\n require(\n (HolographerInterface(holographer()).getOriginChain() ==\n HolographInterface(HolographerInterface(holographer()).getHolograph()).getHolographChainId()),\n \"hToken: not native token\"\n );\n require(msg.value > 0, \"hToken: no value received\");\n address sender = msgSender();\n if (recipient == address(0)) {\n recipient = sender;\n }\n HolographERC20Interface(holographer()).sourceMint(recipient, msg.value);\n emit Deposit(sender, msg.value);\n }\n\n /**\n * @dev Send hToken, get back native token value equivalent.\n * @param recipient Address of where to send the native token(s) to.\n */\n function extractNativeToken(address payable recipient, uint256 amount) external onlyHolographer {\n address sender = msgSender();\n require(ERC20(address(this)).balanceOf(sender) >= amount, \"hToken: not enough hToken(s)\");\n require(\n (HolographerInterface(holographer()).getOriginChain() ==\n HolographInterface(HolographerInterface(holographer()).getHolograph()).getHolographChainId()),\n \"hToken: not on native chain\"\n );\n require(address(this).balance >= amount, \"hToken: not enough native tokens\");\n HolographERC20Interface(holographer()).sourceBurn(sender, amount);\n // HERE WE NEED TO ADD FEE MECHANISM TO EXTRACT xx.xxxx% FROM NATIVE TOKEN AMOUNT\n // THIS SHOULD GO SOMEWHERE TO REWARD CAPITAL PROVIDERS\n uint256 fee = (amount / 10000) * _feeBp;\n // for now we just leave fee in contract balance\n //\n // amount is updated to reflect fee subtraction\n amount = amount - fee;\n recipient.transfer(amount);\n emit Withdrawal(recipient, amount);\n }\n\n /**\n * @dev Send supported wrapped token, get back hToken equivalent.\n * @param recipient Address of where to send the hToken(s) to.\n */\n function holographWrappedToken(address token, address recipient, uint256 amount) external onlyHolographer {\n require(_supportedWrappers[token], \"hToken: unsupported token type\");\n ERC20 erc20 = ERC20(token);\n address sender = msgSender();\n require(erc20.allowance(sender, address(this)) >= amount, \"hToken: allowance too low\");\n uint256 previousBalance = erc20.balanceOf(address(this));\n require(erc20.transferFrom(sender, address(this), amount), \"hToken: ERC20 transfer failed\");\n uint256 currentBalance = erc20.balanceOf(address(this));\n uint256 difference = currentBalance - previousBalance;\n require(difference >= 0, \"hToken: no tokens transferred\");\n if (difference < amount) {\n // adjust for fee-based mechanisms\n // this allows for discrepancies to not fail the entire operation\n amount = difference;\n }\n if (recipient == address(0)) {\n recipient = sender;\n }\n HolographERC20Interface(holographer()).sourceMint(recipient, amount);\n emit TokenDeposit(token, sender, amount);\n }\n\n /**\n * @dev Send hToken, get back native token value equivalent.\n * @param recipient Address of where to send the native token(s) to.\n */\n function extractWrappedToken(address token, address payable recipient, uint256 amount) external onlyHolographer {\n require(_supportedWrappers[token], \"hToken: unsupported token type\");\n address sender = msgSender();\n require(ERC20(address(this)).balanceOf(sender) >= amount, \"hToken: not enough hToken(s)\");\n ERC20 erc20 = ERC20(token);\n uint256 previousBalance = erc20.balanceOf(address(this));\n require(previousBalance >= amount, \"hToken: not enough ERC20 tokens\");\n if (recipient == address(0)) {\n recipient = payable(sender);\n }\n // HERE WE NEED TO ADD FEE MECHANISM TO EXTRACT xx.xxxx% FROM NATIVE TOKEN AMOUNT\n // THIS SHOULD GO SOMEWHERE TO REWARD CAPITAL PROVIDERS\n uint256 fee = (amount / 10000) * _feeBp;\n uint256 adjustedAmount = amount - fee;\n // for now we just leave fee in contract balance\n erc20.transfer(recipient, adjustedAmount);\n uint256 currentBalance = erc20.balanceOf(address(this));\n uint256 difference = currentBalance - previousBalance;\n require(difference == adjustedAmount, \"hToken: incorrect new balance\");\n HolographERC20Interface(holographer()).sourceBurn(sender, amount);\n emit TokenWithdrawal(token, recipient, adjustedAmount);\n }\n\n function availableNativeTokens() external view onlyHolographer returns (uint256) {\n if (\n HolographerInterface(holographer()).getOriginChain() ==\n HolographInterface(HolographerInterface(holographer()).getHolograph()).getHolographChainId()\n ) {\n return address(this).balance;\n } else {\n return 0;\n }\n }\n\n function availableWrappedTokens(address token) external view onlyHolographer returns (uint256) {\n require(_supportedWrappers[token], \"hToken: unsupported token type\");\n return ERC20(token).balanceOf(address(this));\n }\n\n function updateSupportedWrapper(address token, bool supported) external onlyHolographer onlyOwner {\n _supportedWrappers[token] = supported;\n }\n\n /**\n * @dev Temporarily placed to bypass bytecode conflicts\n */\n function isHToken() external pure returns (bool) {\n return true;\n }\n}\n" + }, + "contracts/token/SampleERC20.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/StrictERC20H.sol\";\n\nimport \"../interface/HolographERC20Interface.sol\";\n\n/**\n * @title Sample ERC-20 token that is bridgeable via Holograph\n * @author Holograph Foundation\n * @notice A smart contract for minting and managing Holograph Bridgeable ERC20 Tokens.\n * @dev The entire logic and functionality of the smart contract is self-contained.\n */\ncontract SampleERC20 is StrictERC20H {\n /**\n * @dev Just a dummy value for now to test transferring of data.\n */\n mapping(address => bytes32) private _walletSalts;\n\n /**\n * @dev Temporary implementation to suppress compiler state mutability warnings.\n */\n bool private _dummy;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n // do your own custom logic here\n address contractOwner = abi.decode(initPayload, (address));\n _setOwner(contractOwner);\n // run underlying initializer logic\n return _init(initPayload);\n }\n\n /**\n * @dev Sample mint where anyone can mint any amounts of tokens.\n */\n function mint(address to, uint256 amount) external onlyHolographer onlyOwner {\n HolographERC20Interface(holographer()).sourceMint(to, amount);\n if (_walletSalts[to] == bytes32(0)) {\n _walletSalts[to] = keccak256(\n abi.encodePacked(to, amount, block.timestamp, block.number, blockhash(block.number - 1))\n );\n }\n }\n\n function bridgeIn(\n uint32 /* _chainId*/,\n address /* _from*/,\n address _to,\n uint256 /* _amount*/,\n bytes calldata _data\n ) external override onlyHolographer returns (bool) {\n bytes32 salt = abi.decode(_data, (bytes32));\n _walletSalts[_to] = salt;\n return true;\n }\n\n function bridgeOut(\n uint32 /* _chainId*/,\n address /* _from*/,\n address _to,\n uint256 /* _amount*/\n ) external override onlyHolographer returns (bytes memory _data) {\n _dummy = false;\n _data = abi.encode(_walletSalts[_to]);\n }\n}\n" + }, + "contracts/token/SampleERC721.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/StrictERC721H.sol\";\n\nimport \"../interface/HolographERC721Interface.sol\";\n\n/**\n * @title Sample ERC-721 Collection that is bridgeable via Holograph\n * @author Holograph Foundation\n * @notice A smart contract for minting and managing Holograph Bridgeable ERC721 NFTs.\n * @dev The entire logic and functionality of the smart contract is self-contained.\n */\ncontract SampleERC721 is StrictERC721H {\n /**\n * @dev Mapping of all token URIs.\n */\n mapping(uint256 => string) private _tokenURIs;\n\n /**\n * @dev Internal reference used for minting incremental token ids.\n */\n uint224 private _currentTokenId;\n\n /**\n * @dev Temporary implementation to suppress compiler state mutability warnings.\n */\n bool private _dummy;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n // do your own custom logic here\n address contractOwner = abi.decode(initPayload, (address));\n _setOwner(contractOwner);\n // run underlying initializer logic\n return _init(initPayload);\n }\n\n /**\n * @notice Get's the URI of the token.\n * @dev Defaults the the Arweave URI\n * @return string The URI.\n */\n function tokenURI(uint256 _tokenId) external view onlyHolographer returns (string memory) {\n return _tokenURIs[_tokenId];\n }\n\n /**\n * @dev Sample mint where anyone can mint specific token, with a custom URI\n */\n function mint(address to, uint224 tokenId, string calldata URI) external onlyHolographer onlyOwner {\n HolographERC721Interface H721 = HolographERC721Interface(holographer());\n if (tokenId == 0) {\n _currentTokenId += 1;\n while (H721.exists(uint256(_currentTokenId)) || H721.burned(uint256(_currentTokenId))) {\n _currentTokenId += 1;\n }\n tokenId = _currentTokenId;\n }\n H721.sourceMint(to, tokenId);\n uint256 id = H721.sourceGetChainPrepend() + uint256(tokenId);\n _tokenURIs[id] = URI;\n }\n\n function bridgeIn(\n uint32 /* _chainId*/,\n address /* _from*/,\n address /* _to*/,\n uint256 _tokenId,\n bytes calldata _data\n ) external override onlyHolographer returns (bool) {\n string memory URI = abi.decode(_data, (string));\n _tokenURIs[_tokenId] = URI;\n return true;\n }\n\n function bridgeOut(\n uint32 /* _chainId*/,\n address /* _from*/,\n address /* _to*/,\n uint256 _tokenId\n ) external override onlyHolographer returns (bytes memory _data) {\n _dummy = false;\n _data = abi.encode(_tokenURIs[_tokenId]);\n }\n\n function afterBurn(address /* _owner*/, uint256 _tokenId) external override onlyHolographer returns (bool) {\n delete _tokenURIs[_tokenId];\n return true;\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 999999 + }, + "metadata": { + "bytecodeHash": "none", + "useLiteralContent": true + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": ["ast"] + } + }, + "remappings": [ + "ds-test/=lib/forge-std/lib/ds-test/src/", + "erc721a-upgradeable/=erc721a-upgradeable/", + "forge-std/=lib/forge-std/src/" + ] + } +} diff --git a/deployments/develop/optimismTestnetGoerli/HolographFactory.json b/deployments/develop/optimismTestnetGoerli/HolographFactory.json index 33e03e769..7f4ddde48 100644 --- a/deployments/develop/optimismTestnetGoerli/HolographFactory.json +++ b/deployments/develop/optimismTestnetGoerli/HolographFactory.json @@ -1,5 +1,5 @@ { - "address": "0xE70F94ED069Cca85c040Cd79FC7Ee0121690dE35", + "address": "0xaF27d972B6Ad681F72bB9acAe5382e829DAe61C5", "abi": [ { "inputs": [], @@ -386,28 +386,28 @@ "type": "receive" } ], - "transactionHash": "0xb5a2e9c85874ccf236c003010aa340db039dbdb369705b81c62cd52bbda6ea55", + "transactionHash": "0xb00bf3078ae6f172c73f22a995c2b866cabaaac1f8d5b0128dd97a9d0ad45dde", "receipt": { "to": "0x0C8aF56F7650a6E3685188d212044338c21d3F73", "from": "0xd078E391cBAEAa6C5785124a7207ff57d64604b7", "contractAddress": null, "transactionIndex": 1, - "gasUsed": "2506045", + "gasUsed": "2725119", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x2c5c66845586c9c28b084c5f7907c5ec8f15c10a177ab1d278c576fd4589c8e5", - "transactionHash": "0xb5a2e9c85874ccf236c003010aa340db039dbdb369705b81c62cd52bbda6ea55", + "blockHash": "0x1fd185563e5619f2bfd02f0c361dec6c337a1cd76d320731613d2ae966d939a3", + "transactionHash": "0xb00bf3078ae6f172c73f22a995c2b866cabaaac1f8d5b0128dd97a9d0ad45dde", "logs": [], - "blockNumber": 9071173, - "cumulativeGasUsed": "2556558", + "blockNumber": 11632248, + "cumulativeGasUsed": "2789120", "status": 1, "byzantium": true }, "args": [], - "numDeployments": 4, - "solcInputHash": "8d1f3241398477d367cba5a9a1af9bf4", - "metadata": "{\"compiler\":{\"version\":\"0.8.13+commit.abaa5c0e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"BridgeableContractDeployed\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"adminCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"bridgeIn\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"bridgeOut\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"selector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"contractType\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"chainType\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"salt\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"byteCode\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"initCode\",\"type\":\"bytes\"}],\"internalType\":\"struct DeploymentConfig\",\"name\":\"config\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"}],\"internalType\":\"struct Verification\",\"name\":\"signature\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"}],\"name\":\"deployHolographableContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"contractType\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"chainType\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"salt\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"byteCode\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"initCode\",\"type\":\"bytes\"}],\"internalType\":\"struct DeploymentConfig\",\"name\":\"config\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"}],\"internalType\":\"struct Verification\",\"name\":\"signature\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"deployOnCurrentChain\",\"type\":\"bool\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"toChain\",\"type\":\"uint32\"}],\"internalType\":\"struct BridgeSettings[]\",\"name\":\"bridgeSettings\",\"type\":\"tuple[]\"}],\"name\":\"deployHolographableContractMultiChain\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"adminAddress\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getHolograph\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"holograph\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRegistry\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"registry\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"initPayload\",\"type\":\"bytes\"}],\"name\":\"init\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"adminAddress\",\"type\":\"address\"}],\"name\":\"setAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"holograph\",\"type\":\"address\"}],\"name\":\"setHolograph\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"registry\",\"type\":\"address\"}],\"name\":\"setRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"author\":\"https://github.com/holographxyz\",\"details\":\"The contract provides methods that allow for the creation of Holograph Protocol compliant smart contracts, that are capable of minting holographable assets\",\"kind\":\"dev\",\"methods\":{\"bridgeIn(uint32,bytes)\":{\"details\":\"This function directly forwards the calldata to the deployHolographableContract function It is used to allow for Holograph Bridge to make cross-chain deployments\"},\"bridgeOut(uint32,address,bytes)\":{\"details\":\"This function directly returns the calldata It is used to allow for Holograph Bridge to make cross-chain deployments\"},\"constructor\":{\"details\":\"Constructor is left empty and init is used instead\"},\"deployHolographableContract((bytes32,uint32,bytes32,bytes,bytes),(bytes32,bytes32,uint8),address)\":{\"details\":\"Using this function allows to deploy smart contracts that have the same address across all EVM chains\",\"params\":{\"config\":\"contract deployement configurations\",\"signature\":\"that was created by the wallet that created the original payload\",\"signer\":\"address of wallet that created the payload\"}},\"getHolograph()\":{\"details\":\"Used for storing a reference to all the primary modules and variables of the protocol\"},\"getRegistry()\":{\"details\":\"This module stores a reference for all deployed holographable smart contracts\"},\"init(bytes)\":{\"details\":\"This function is called by the deployer/factory when creating a contract\",\"params\":{\"initPayload\":\"abi encoded payload to use for contract initilaization\"}},\"setHolograph(address)\":{\"params\":{\"holograph\":\"address of the Holograph Protocol smart contract to use\"}},\"setRegistry(address)\":{\"params\":{\"registry\":\"address of the Holograph Registry smart contract to use\"}}},\"stateVariables\":{\"_holographSlot\":{\"details\":\"bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\"},\"_registrySlot\":{\"details\":\"bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\"}},\"title\":\"Holograph Factory\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"bridgeIn(uint32,bytes)\":{\"notice\":\"Deploy holographable contract via bridge request\"},\"bridgeOut(uint32,address,bytes)\":{\"notice\":\"Deploy holographable contract via bridge request\"},\"deployHolographableContract((bytes32,uint32,bytes32,bytes,bytes),(bytes32,bytes32,uint8),address)\":{\"notice\":\"Deploy a holographable smart contract\"},\"getHolograph()\":{\"notice\":\"Get the Holograph Protocol contract\"},\"getRegistry()\":{\"notice\":\"Get the Holograph Registry module\"},\"init(bytes)\":{\"notice\":\"Used internally to initialize the contract instead of through a constructor\"},\"setHolograph(address)\":{\"notice\":\"Update the Holograph Protocol contract address\"},\"setRegistry(address)\":{\"notice\":\"Update the Holograph Registry module address\"}},\"notice\":\"Deploy holographable contracts\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/HolographFactory.sol\":\"HolographFactory\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc721a-upgradeable/=erc721a-upgradeable/\",\":forge-std/=lib/forge-std/src/\"]},\"sources\":{\"contracts/HolographFactory.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nimport \\\"./abstract/Admin.sol\\\";\\nimport \\\"./abstract/Initializable.sol\\\";\\n\\nimport \\\"./enforcer/Holographer.sol\\\";\\n\\nimport \\\"./interface/Holographable.sol\\\";\\nimport \\\"./interface/HolographBridgeInterface.sol\\\";\\nimport \\\"./interface/HolographFactoryInterface.sol\\\";\\nimport \\\"./interface/HolographInterface.sol\\\";\\nimport \\\"./interface/HolographRegistryInterface.sol\\\";\\nimport \\\"./interface/InitializableInterface.sol\\\";\\n\\nimport \\\"./struct/BridgeSettings.sol\\\";\\nimport \\\"./struct/DeploymentConfig.sol\\\";\\nimport \\\"./struct/Verification.sol\\\";\\n\\n/**\\n * @title Holograph Factory\\n * @author https://github.com/holographxyz\\n * @notice Deploy holographable contracts\\n * @dev The contract provides methods that allow for the creation of Holograph Protocol compliant smart contracts, that are capable of minting holographable assets\\n */\\ncontract HolographFactory is Admin, Initializable, Holographable, HolographFactoryInterface {\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\\n */\\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\\n */\\n bytes32 constant _registrySlot = 0xce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7;\\n\\n /**\\n * @dev Constructor is left empty and init is used instead\\n */\\n constructor() {}\\n\\n /**\\n * @notice Used internally to initialize the contract instead of through a constructor\\n * @dev This function is called by the deployer/factory when creating a contract\\n * @param initPayload abi encoded payload to use for contract initilaization\\n */\\n function init(bytes memory initPayload) external override returns (bytes4) {\\n require(!_isInitialized(), \\\"HOLOGRAPH: already initialized\\\");\\n (address holograph, address registry) = abi.decode(initPayload, (address, address));\\n assembly {\\n sstore(_adminSlot, origin())\\n sstore(_holographSlot, holograph)\\n sstore(_registrySlot, registry)\\n }\\n _setInitialized();\\n return InitializableInterface.init.selector;\\n }\\n\\n /**\\n * @notice Deploy holographable contract via bridge request\\n * @dev This function directly forwards the calldata to the deployHolographableContract function\\n * It is used to allow for Holograph Bridge to make cross-chain deployments\\n */\\n function bridgeIn(\\n uint32, /* fromChain*/\\n bytes calldata payload\\n ) external returns (bytes4) {\\n (DeploymentConfig memory config, Verification memory signature, address signer) = abi.decode(\\n payload,\\n (DeploymentConfig, Verification, address)\\n );\\n HolographFactoryInterface(address(this)).deployHolographableContract(config, signature, signer);\\n return Holographable.bridgeIn.selector;\\n }\\n\\n /**\\n * @notice Deploy holographable contract via bridge request\\n * @dev This function directly returns the calldata\\n * It is used to allow for Holograph Bridge to make cross-chain deployments\\n */\\n function bridgeOut(\\n uint32, /* toChain*/\\n address, /* sender*/\\n bytes calldata payload\\n ) external pure returns (bytes4 selector, bytes memory data) {\\n return (Holographable.bridgeOut.selector, payload);\\n }\\n\\n function deployHolographableContractMultiChain(\\n DeploymentConfig memory config,\\n Verification memory signature,\\n address signer,\\n bool deployOnCurrentChain,\\n BridgeSettings[] memory bridgeSettings\\n ) external payable {\\n if (deployOnCurrentChain) {\\n deployHolographableContract(config, signature, signer);\\n }\\n bytes memory payload = abi.encode(config, signature, signer);\\n HolographInterface holograph;\\n assembly {\\n holograph := sload(_holographSlot)\\n }\\n HolographBridgeInterface bridge = HolographBridgeInterface(holograph.getBridge());\\n uint256 l = bridgeSettings.length;\\n for (uint256 i = 0; i < l; i++) {\\n bridge.bridgeOutRequest{value: bridgeSettings[i].value}(\\n bridgeSettings[i].toChain,\\n address(this),\\n bridgeSettings[i].gasLimit,\\n bridgeSettings[i].gasPrice,\\n payload\\n );\\n }\\n }\\n\\n /**\\n * @notice Deploy a holographable smart contract\\n * @dev Using this function allows to deploy smart contracts that have the same address across all EVM chains\\n * @param config contract deployement configurations\\n * @param signature that was created by the wallet that created the original payload\\n * @param signer address of wallet that created the payload\\n */\\n function deployHolographableContract(\\n DeploymentConfig memory config,\\n Verification memory signature,\\n address signer\\n ) public {\\n address registry;\\n address holograph;\\n assembly {\\n holograph := sload(_holographSlot)\\n registry := sload(_registrySlot)\\n }\\n /**\\n * @dev the configuration is encoded and hashed along with signer address\\n */\\n bytes32 hash = keccak256(\\n abi.encodePacked(\\n config.contractType,\\n config.chainType,\\n config.salt,\\n keccak256(config.byteCode),\\n keccak256(config.initCode),\\n signer\\n )\\n );\\n /**\\n * @dev the hash is validated against signature\\n * this is to guarantee that the original creator's configuration has not been altered\\n */\\n require(_verifySigner(signature.r, signature.s, signature.v, hash, signer), \\\"HOLOGRAPH: invalid signature\\\");\\n /**\\n * @dev check that this contract has not already been deployed on this chain\\n */\\n bytes memory holographerBytecode = type(Holographer).creationCode;\\n address holographerAddress = address(\\n uint160(uint256(keccak256(abi.encodePacked(bytes1(0xff), address(this), hash, keccak256(holographerBytecode)))))\\n );\\n require(!_isContract(holographerAddress), \\\"HOLOGRAPH: already deployed\\\");\\n /**\\n * @dev convert hash into uint256 which will be used as the salt for create2\\n */\\n uint256 saltInt = uint256(hash);\\n address sourceContractAddress;\\n bytes memory sourceByteCode = config.byteCode;\\n assembly {\\n /**\\n * @dev deploy the user created smart contract first\\n */\\n sourceContractAddress := create2(0, add(sourceByteCode, 0x20), mload(sourceByteCode), saltInt)\\n }\\n assembly {\\n /**\\n * @dev deploy the Holographer contract\\n */\\n holographerAddress := create2(0, add(holographerBytecode, 0x20), mload(holographerBytecode), saltInt)\\n }\\n /**\\n * @dev initialize the Holographer contract\\n */\\n require(\\n InitializableInterface(holographerAddress).init(\\n abi.encode(abi.encode(config.chainType, holograph, config.contractType, sourceContractAddress), config.initCode)\\n ) == InitializableInterface.init.selector,\\n \\\"initialization failed\\\"\\n );\\n /**\\n * @dev update the Holograph Registry with deployed contract address\\n */\\n HolographRegistryInterface(registry).setHolographedHashAddress(hash, holographerAddress);\\n /**\\n * @dev emit an event that on-chain indexers can easily read\\n */\\n emit BridgeableContractDeployed(holographerAddress, hash);\\n }\\n\\n /**\\n * @notice Get the Holograph Protocol contract\\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\\n */\\n function getHolograph() external view returns (address holograph) {\\n assembly {\\n holograph := sload(_holographSlot)\\n }\\n }\\n\\n /**\\n * @notice Update the Holograph Protocol contract address\\n * @param holograph address of the Holograph Protocol smart contract to use\\n */\\n function setHolograph(address holograph) external onlyAdmin {\\n assembly {\\n sstore(_holographSlot, holograph)\\n }\\n }\\n\\n /**\\n * @notice Get the Holograph Registry module\\n * @dev This module stores a reference for all deployed holographable smart contracts\\n */\\n function getRegistry() external view returns (address registry) {\\n assembly {\\n registry := sload(_registrySlot)\\n }\\n }\\n\\n /**\\n * @notice Update the Holograph Registry module address\\n * @param registry address of the Holograph Registry smart contract to use\\n */\\n function setRegistry(address registry) external onlyAdmin {\\n assembly {\\n sstore(_registrySlot, registry)\\n }\\n }\\n\\n /**\\n * @dev Internal function used for checking if a contract has been deployed at address\\n */\\n function _isContract(address contractAddress) private view returns (bool) {\\n bytes32 codehash;\\n assembly {\\n codehash := extcodehash(contractAddress)\\n }\\n return (codehash != 0x0 && codehash != 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470);\\n }\\n\\n /**\\n * @dev Internal function used for verifying a signature\\n */\\n function _verifySigner(\\n bytes32 r,\\n bytes32 s,\\n uint8 v,\\n bytes32 hash,\\n address signer\\n ) private pure returns (bool) {\\n if (v < 27) {\\n v += 27;\\n }\\n if (v != 27 && v != 28) {\\n return false;\\n }\\n // prevent signature malleability by checking if s-value is in the upper range\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n // if s-value is in upper range, calculate a new s-value\\n s = bytes32(0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - uint256(s));\\n // flip the v-value\\n if (v == 27) {\\n v = 28;\\n } else {\\n v = 27;\\n }\\n // check if s-value is still in upper range\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return false;\\n }\\n }\\n /**\\n * @dev signature is checked against EIP-191 first, then directly, to support legacy wallets\\n */\\n return (signer != address(0) &&\\n (ecrecover(keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash)), v, r, s) == signer ||\\n ecrecover(hash, v, r, s) == signer));\\n }\\n\\n /**\\n * @dev Purposefully reverts to prevent having any type of ether transfered into the contract\\n */\\n receive() external payable {\\n revert();\\n }\\n\\n /**\\n * @dev Purposefully reverts to prevent any calls to undefined functions\\n */\\n fallback() external payable {\\n revert();\\n }\\n}\\n\",\"keccak256\":\"0x8daccfb651b96557add6db9f587f21109fb5cf698f5db8566b92d936197c48f3\",\"license\":\"UNLICENSED\"},\"contracts/abstract/Admin.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nabstract contract Admin {\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.admin')) - 1)\\n */\\n bytes32 constant _adminSlot = 0x3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c9;\\n\\n modifier onlyAdmin() {\\n require(msg.sender == getAdmin(), \\\"HOLOGRAPH: admin only function\\\");\\n _;\\n }\\n\\n constructor() {}\\n\\n function admin() public view returns (address) {\\n return getAdmin();\\n }\\n\\n function getAdmin() public view returns (address adminAddress) {\\n assembly {\\n adminAddress := sload(_adminSlot)\\n }\\n }\\n\\n function setAdmin(address adminAddress) public onlyAdmin {\\n assembly {\\n sstore(_adminSlot, adminAddress)\\n }\\n }\\n\\n function adminCall(address target, bytes calldata data) external payable onlyAdmin {\\n assembly {\\n calldatacopy(0, data.offset, data.length)\\n let result := call(gas(), target, callvalue(), 0, data.length, 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n switch result\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x93552c9253b579c45113a150a6a3dfddb997afd939d09b49c34d040525734b1a\",\"license\":\"UNLICENSED\"},\"contracts/abstract/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nimport \\\"../interface/InitializableInterface.sol\\\";\\n\\n/**\\n * @title Initializable\\n * @author https://github.com/holographxyz\\n * @notice Use init instead of constructor\\n * @dev This allows for use of init function to make one time initializations without the need for a constructor\\n */\\nabstract contract Initializable is InitializableInterface {\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.initialized')) - 1)\\n */\\n bytes32 constant _initializedSlot = 0x4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a01;\\n\\n /**\\n * @dev Constructor is left empty and init is used instead\\n */\\n constructor() {}\\n\\n /**\\n * @notice Used internally to initialize the contract instead of through a constructor\\n * @dev This function is called by the deployer/factory when creating a contract\\n * @param initPayload abi encoded payload to use for contract initilaization\\n */\\n function init(bytes memory initPayload) external virtual returns (bytes4);\\n\\n function _isInitialized() internal view returns (bool initialized) {\\n assembly {\\n initialized := sload(_initializedSlot)\\n }\\n }\\n\\n function _setInitialized() internal {\\n assembly {\\n sstore(_initializedSlot, 0x0000000000000000000000000000000000000000000000000000000000000001)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa55dc367285f96952dec56adfbfb48b6a4be31aef9ba0d30ad8c91023a572462\",\"license\":\"UNLICENSED\"},\"contracts/enforcer/Holographer.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nimport \\\"../abstract/Admin.sol\\\";\\nimport \\\"../abstract/Initializable.sol\\\";\\n\\nimport \\\"../interface/HolographInterface.sol\\\";\\nimport \\\"../interface/HolographerInterface.sol\\\";\\nimport \\\"../interface/HolographRegistryInterface.sol\\\";\\nimport \\\"../interface/InitializableInterface.sol\\\";\\n\\n/**\\n * @dev This contract is a binder. It puts together all the variables to make the underlying contracts functional and be bridgeable.\\n */\\ncontract Holographer is Admin, Initializable, HolographerInterface {\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.originChain')) - 1)\\n */\\n bytes32 constant _originChainSlot = 0xd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d;\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\\n */\\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.contractType')) - 1)\\n */\\n bytes32 constant _contractTypeSlot = 0x0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c7;\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.sourceContract')) - 1)\\n */\\n bytes32 constant _sourceContractSlot = 0x27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b074;\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.blockHeight')) - 1)\\n */\\n bytes32 constant _blockHeightSlot = 0x9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de3;\\n\\n /**\\n * @dev Constructor is left empty and init is used instead\\n */\\n constructor() {}\\n\\n /**\\n * @notice Used internally to initialize the contract instead of through a constructor\\n * @dev This function is called by the deployer/factory when creating a contract\\n * @param initPayload abi encoded payload to use for contract initilaization\\n */\\n function init(bytes memory initPayload) external override returns (bytes4) {\\n require(!_isInitialized(), \\\"HOLOGRAPHER: already initialized\\\");\\n (bytes memory encoded, bytes memory initCode) = abi.decode(initPayload, (bytes, bytes));\\n (uint32 originChain, address holograph, bytes32 contractType, address sourceContract) = abi.decode(\\n encoded,\\n (uint32, address, bytes32, address)\\n );\\n assembly {\\n sstore(_adminSlot, caller())\\n sstore(_blockHeightSlot, number())\\n sstore(_contractTypeSlot, contractType)\\n sstore(_holographSlot, holograph)\\n sstore(_originChainSlot, originChain)\\n sstore(_sourceContractSlot, sourceContract)\\n }\\n (bool success, bytes memory returnData) = HolographRegistryInterface(HolographInterface(holograph).getRegistry())\\n .getReservedContractTypeAddress(contractType)\\n .delegatecall(abi.encodeWithSelector(InitializableInterface.init.selector, initCode));\\n bytes4 selector = abi.decode(returnData, (bytes4));\\n require(success && selector == InitializableInterface.init.selector, \\\"HOLOGRAPH: initialization failed\\\");\\n _setInitialized();\\n return InitializableInterface.init.selector;\\n }\\n\\n /**\\n * @dev Returns the contract type that is used for loading the Enforcer\\n */\\n function getContractType() external view returns (bytes32 contractType) {\\n assembly {\\n contractType := sload(_contractTypeSlot)\\n }\\n }\\n\\n /**\\n * @dev Returns the block height of when the smart contract was deployed. Useful for retrieving deployment config for re-deployment on other EVM-compatible chains.\\n */\\n function getDeploymentBlock() external view returns (uint256 deploymentBlock) {\\n assembly {\\n deploymentBlock := sload(_blockHeightSlot)\\n }\\n }\\n\\n /**\\n * @dev Returns a hardcoded address for the Holograph smart contract.\\n */\\n function getHolograph() external view returns (address holograph) {\\n assembly {\\n holograph := sload(_holographSlot)\\n }\\n }\\n\\n /**\\n * @dev Returns a hardcoded address for the Holograph smart contract that controls and enforces the ERC standards.\\n */\\n function getHolographEnforcer() public view returns (address) {\\n HolographInterface holograph;\\n bytes32 contractType;\\n assembly {\\n holograph := sload(_holographSlot)\\n contractType := sload(_contractTypeSlot)\\n }\\n return HolographRegistryInterface(holograph.getRegistry()).getReservedContractTypeAddress(contractType);\\n }\\n\\n /**\\n * @dev Returns the original chain that contract was deployed on.\\n */\\n function getOriginChain() external view returns (uint32 originChain) {\\n assembly {\\n originChain := sload(_originChainSlot)\\n }\\n }\\n\\n /**\\n * @dev Returns a hardcoded address for the custom secure storage contract deployed in parallel with this contract deployment.\\n */\\n function getSourceContract() external view returns (address sourceContract) {\\n assembly {\\n sourceContract := sload(_sourceContractSlot)\\n }\\n }\\n\\n /**\\n * @dev Purposefully left empty, to prevent running out of gas errors when receiving native token payments.\\n */\\n receive() external payable {}\\n\\n /**\\n * @dev This takes the Enforcer's source code, runs it, and uses current address for storage slots.\\n */\\n fallback() external payable {\\n address holographEnforcer = getHolographEnforcer();\\n assembly {\\n calldatacopy(0, 0, calldatasize())\\n let result := delegatecall(gas(), holographEnforcer, 0, calldatasize(), 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n switch result\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc31b575625e84743d9a14f282ef3894becece82a6f47ec945585ac5a0d1895f7\",\"license\":\"UNLICENSED\"},\"contracts/interface/HolographBridgeInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\n/**\\n * @title Holograph Bridge\\n * @author https://github.com/holographxyz\\n * @notice Beam any holographable contracts and assets across blockchains\\n * @dev The contract abstracts all the complexities of making bridge requests and uses a universal interface to bridge any type of holographable assets\\n */\\ninterface HolographBridgeInterface {\\n /**\\n * @notice Receive a beam from another chain\\n * @dev This function can only be called by the Holograph Operator module\\n * @param fromChain Holograph Chain ID where the brigeOutRequest was created\\n * @param holographableContract address of the destination contract that the bridgeInRequest is targeted for\\n * @param hToken address of the hToken contract that wrapped the origin chain native gas token\\n * @param hTokenRecipient address of recipient for the hToken reward\\n * @param hTokenValue exact amount of hToken reward in wei\\n * @param doNotRevert boolean used to specify if the call should revert\\n * @param bridgeInPayload actual abi encoded bytes of the data that the holographable contract bridgeIn function will receive\\n */\\n function bridgeInRequest(\\n uint256 nonce,\\n uint32 fromChain,\\n address holographableContract,\\n address hToken,\\n address hTokenRecipient,\\n uint256 hTokenValue,\\n bool doNotRevert,\\n bytes calldata bridgeInPayload\\n ) external payable;\\n\\n /**\\n * @notice Create a beam request for a destination chain\\n * @dev This function works for deploying contracts and beaming supported holographable assets across chains\\n * @param toChain Holograph Chain ID where the beam is being sent to\\n * @param holographableContract address of the contract for which the bridge request is being made\\n * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain\\n * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain\\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\\n */\\n function bridgeOutRequest(\\n uint32 toChain,\\n address holographableContract,\\n uint256 gasLimit,\\n uint256 gasPrice,\\n bytes calldata bridgeOutPayload\\n ) external payable;\\n\\n /**\\n * @notice Do not call this function, it will always revert\\n * @dev Used by getBridgeOutRequestPayload function\\n * It is purposefully inverted to always revert on a successful call\\n * Marked as external and not private to allow use inside try/catch of getBridgeOutRequestPayload function\\n * If this function does not revert and returns a string, it is the actual revert reason\\n * @param sender address of actual sender that is planning to make a bridgeOutRequest call\\n * @param toChain holograph chain id of destination chain\\n * @param holographableContract address of the contract for which the bridge request is being made\\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\\n */\\n function revertedBridgeOutRequest(\\n address sender,\\n uint32 toChain,\\n address holographableContract,\\n bytes calldata bridgeOutPayload\\n ) external returns (string memory revertReason);\\n\\n /**\\n * @notice Get the payload created by the bridgeOutRequest function\\n * @dev Use this function to get the payload that will be generated by a bridgeOutRequest\\n * Only use this with a static call\\n * @param toChain Holograph Chain ID where the beam is being sent to\\n * @param holographableContract address of the contract for which the bridge request is being made\\n * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain\\n * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain\\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\\n * @return samplePayload bytes made up of the bridgeOutRequest payload\\n */\\n function getBridgeOutRequestPayload(\\n uint32 toChain,\\n address holographableContract,\\n uint256 gasLimit,\\n uint256 gasPrice,\\n bytes calldata bridgeOutPayload\\n ) external returns (bytes memory samplePayload);\\n\\n /**\\n * @notice Get the fees associated with sending specific payload\\n * @dev Will provide exact costs on protocol and message side, combine the two to get total\\n * @param toChain holograph chain id of destination chain for payload\\n * @param gasLimit amount of gas to provide for executing payload on destination chain\\n * @param gasPrice maximum amount to pay for gas price, can be set to 0 and will be chose automatically\\n * @param crossChainPayload the entire packet being sent cross-chain\\n * @return hlgFee the amount (in wei) of native gas token that will cost for finalizing job on destiantion chain\\n * @return msgFee the amount (in wei) of native gas token that will cost for sending message to destiantion chain\\n * @return dstGasPrice the amount (in wei) that destination message maximum gas price will be\\n */\\n function getMessageFee(\\n uint32 toChain,\\n uint256 gasLimit,\\n uint256 gasPrice,\\n bytes calldata crossChainPayload\\n )\\n external\\n view\\n returns (\\n uint256 hlgFee,\\n uint256 msgFee,\\n uint256 dstGasPrice\\n );\\n\\n /**\\n * @notice Get the address of the Holograph Factory module\\n * @dev Used for deploying holographable smart contracts\\n */\\n function getFactory() external view returns (address factory);\\n\\n /**\\n * @notice Update the Holograph Factory module address\\n * @param factory address of the Holograph Factory smart contract to use\\n */\\n function setFactory(address factory) external;\\n\\n /**\\n * @notice Get the Holograph Protocol contract\\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\\n */\\n function getHolograph() external view returns (address holograph);\\n\\n /**\\n * @notice Update the Holograph Protocol contract address\\n * @param holograph address of the Holograph Protocol smart contract to use\\n */\\n function setHolograph(address holograph) external;\\n\\n /**\\n * @notice Get the latest job nonce\\n * @dev You can use the job nonce as a way to calculate total amount of bridge requests that have been made\\n */\\n function getJobNonce() external view returns (uint256 jobNonce);\\n\\n /**\\n * @notice Get the address of the Holograph Operator module\\n * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module\\n */\\n function getOperator() external view returns (address operator);\\n\\n /**\\n * @notice Update the Holograph Operator module address\\n * @param operator address of the Holograph Operator smart contract to use\\n */\\n function setOperator(address operator) external;\\n\\n /**\\n * @notice Get the Holograph Registry module\\n * @dev This module stores a reference for all deployed holographable smart contracts\\n */\\n function getRegistry() external view returns (address registry);\\n\\n /**\\n * @notice Update the Holograph Registry module address\\n * @param registry address of the Holograph Registry smart contract to use\\n */\\n function setRegistry(address registry) external;\\n}\\n\",\"keccak256\":\"0xa8e2efb427f7114bc2cd43d3cefd1e6be3ef10f7dce6b8acb6de66e50668824e\",\"license\":\"UNLICENSED\"},\"contracts/interface/HolographFactoryInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nimport \\\"../struct/DeploymentConfig.sol\\\";\\nimport \\\"../struct/Verification.sol\\\";\\n\\n/**\\n * @title Holograph Factory\\n * @author https://github.com/holographxyz\\n * @notice Deploy holographable contracts\\n * @dev The contract provides methods that allow for the creation of Holograph Protocol compliant smart contracts, that are capable of minting holographable assets\\n */\\ninterface HolographFactoryInterface {\\n /**\\n * @dev This event is fired every time that a bridgeable contract is deployed.\\n */\\n event BridgeableContractDeployed(address indexed contractAddress, bytes32 indexed hash);\\n\\n /**\\n * @notice Deploy a holographable smart contract\\n * @dev Using this function allows to deploy smart contracts that have the same address across all EVM chains\\n * @param config contract deployement configurations\\n * @param signature that was created by the wallet that created the original payload\\n * @param signer address of wallet that created the payload\\n */\\n function deployHolographableContract(\\n DeploymentConfig memory config,\\n Verification memory signature,\\n address signer\\n ) external;\\n\\n /**\\n * @notice Get the Holograph Protocol contract\\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\\n */\\n function getHolograph() external view returns (address holograph);\\n\\n /**\\n * @notice Update the Holograph Protocol contract address\\n * @param holograph address of the Holograph Protocol smart contract to use\\n */\\n function setHolograph(address holograph) external;\\n\\n /**\\n * @notice Get the Holograph Registry module\\n * @dev This module stores a reference for all deployed holographable smart contracts\\n */\\n function getRegistry() external view returns (address registry);\\n\\n /**\\n * @notice Update the Holograph Registry module address\\n * @param registry address of the Holograph Registry smart contract to use\\n */\\n function setRegistry(address registry) external;\\n}\\n\",\"keccak256\":\"0x44cd1db20207337ef6abde2d0f42837778d13fb62fe353b0ee9b293a601a0d71\",\"license\":\"UNLICENSED\"},\"contracts/interface/HolographInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\n/**\\n * @title Holograph Protocol\\n * @author https://github.com/holographxyz\\n * @notice This is the primary Holograph Protocol smart contract\\n * @dev This contract stores a reference to all the primary modules and variables of the protocol\\n */\\ninterface HolographInterface {\\n /**\\n * @notice Get the address of the Holograph Bridge module\\n * @dev Used for beaming holographable assets cross-chain\\n */\\n function getBridge() external view returns (address bridge);\\n\\n /**\\n * @notice Update the Holograph Bridge module address\\n * @param bridge address of the Holograph Bridge smart contract to use\\n */\\n function setBridge(address bridge) external;\\n\\n /**\\n * @notice Get the chain ID that the Protocol was deployed on\\n * @dev Useful for checking if/when a hard fork occurs\\n */\\n function getChainId() external view returns (uint256 chainId);\\n\\n /**\\n * @notice Update the chain ID\\n * @dev Useful for updating once a hard fork has been mitigated\\n * @param chainId EVM chain ID to use\\n */\\n function setChainId(uint256 chainId) external;\\n\\n /**\\n * @notice Get the address of the Holograph Factory module\\n * @dev Used for deploying holographable smart contracts\\n */\\n function getFactory() external view returns (address factory);\\n\\n /**\\n * @notice Update the Holograph Factory module address\\n * @param factory address of the Holograph Factory smart contract to use\\n */\\n function setFactory(address factory) external;\\n\\n /**\\n * @notice Get the Holograph chain Id\\n * @dev Holograph uses an internal chain id mapping\\n */\\n function getHolographChainId() external view returns (uint32 holographChainId);\\n\\n /**\\n * @notice Update the Holograph chain ID\\n * @dev Useful for updating once a hard fork was mitigated\\n * @param holographChainId Holograph chain ID to use\\n */\\n function setHolographChainId(uint32 holographChainId) external;\\n\\n /**\\n * @notice Get the address of the Holograph Interfaces module\\n * @dev Holograph uses this contract to store data that needs to be accessed by a large portion of the modules\\n */\\n function getInterfaces() external view returns (address interfaces);\\n\\n /**\\n * @notice Update the Holograph Interfaces module address\\n * @param interfaces address of the Holograph Interfaces smart contract to use\\n */\\n function setInterfaces(address interfaces) external;\\n\\n /**\\n * @notice Get the address of the Holograph Operator module\\n * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module\\n */\\n function getOperator() external view returns (address operator);\\n\\n /**\\n * @notice Update the Holograph Operator module address\\n * @param operator address of the Holograph Operator smart contract to use\\n */\\n function setOperator(address operator) external;\\n\\n /**\\n * @notice Get the Holograph Registry module\\n * @dev This module stores a reference for all deployed holographable smart contracts\\n */\\n function getRegistry() external view returns (address registry);\\n\\n /**\\n * @notice Update the Holograph Registry module address\\n * @param registry address of the Holograph Registry smart contract to use\\n */\\n function setRegistry(address registry) external;\\n\\n /**\\n * @notice Get the Holograph Treasury module\\n * @dev All of the Holograph Protocol assets are stored and managed by this module\\n */\\n function getTreasury() external view returns (address treasury);\\n\\n /**\\n * @notice Update the Holograph Treasury module address\\n * @param treasury address of the Holograph Treasury smart contract to use\\n */\\n function setTreasury(address treasury) external;\\n\\n /**\\n * @notice Get the Holograph Utility Token address\\n * @dev This is the official utility token of the Holograph Protocol\\n */\\n function getUtilityToken() external view returns (address utilityToken);\\n\\n /**\\n * @notice Update the Holograph Utility Token address\\n * @param utilityToken address of the Holograph Utility Token smart contract to use\\n */\\n function setUtilityToken(address utilityToken) external;\\n}\\n\",\"keccak256\":\"0x90b5643e77e914393c508d59b80f5739debfd72455029c0db041f92374b3f586\",\"license\":\"UNLICENSED\"},\"contracts/interface/HolographRegistryInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\ninterface HolographRegistryInterface {\\n function isHolographedContract(address smartContract) external view returns (bool);\\n\\n function isHolographedHashDeployed(bytes32 hash) external view returns (bool);\\n\\n function referenceContractTypeAddress(address contractAddress) external returns (bytes32);\\n\\n function getContractTypeAddress(bytes32 contractType) external view returns (address);\\n\\n function setContractTypeAddress(bytes32 contractType, address contractAddress) external;\\n\\n function getHolograph() external view returns (address holograph);\\n\\n function setHolograph(address holograph) external;\\n\\n function getHolographableContracts(uint256 index, uint256 length) external view returns (address[] memory contracts);\\n\\n function getHolographableContractsLength() external view returns (uint256);\\n\\n function getHolographedHashAddress(bytes32 hash) external view returns (address);\\n\\n function setHolographedHashAddress(bytes32 hash, address contractAddress) external;\\n\\n function getHToken(uint32 chainId) external view returns (address);\\n\\n function setHToken(uint32 chainId, address hToken) external;\\n\\n function getReservedContractTypeAddress(bytes32 contractType) external view returns (address contractTypeAddress);\\n\\n function setReservedContractTypeAddress(bytes32 hash, bool reserved) external;\\n\\n function setReservedContractTypeAddresses(bytes32[] calldata hashes, bool[] calldata reserved) external;\\n\\n function getUtilityToken() external view returns (address utilityToken);\\n\\n function setUtilityToken(address utilityToken) external;\\n}\\n\",\"keccak256\":\"0xaf69834caeee449c3d3d7c7da9bbd27368b448526d9b147482a319311288ad18\",\"license\":\"UNLICENSED\"},\"contracts/interface/Holographable.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\ninterface Holographable {\\n function bridgeIn(uint32 fromChain, bytes calldata payload) external returns (bytes4);\\n\\n function bridgeOut(\\n uint32 toChain,\\n address sender,\\n bytes calldata payload\\n ) external returns (bytes4 selector, bytes memory data);\\n}\\n\",\"keccak256\":\"0x4dd2fc1af269273c46156df8af5cedeed0dfb83f0bfa5696a8d64c768449285b\",\"license\":\"UNLICENSED\"},\"contracts/interface/HolographerInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\ninterface HolographerInterface {\\n function getContractType() external view returns (bytes32 contractType);\\n\\n function getDeploymentBlock() external view returns (uint256 deploymentBlock);\\n\\n function getHolograph() external view returns (address holograph);\\n\\n function getHolographEnforcer() external view returns (address);\\n\\n function getOriginChain() external view returns (uint32 originChain);\\n\\n function getSourceContract() external view returns (address sourceContract);\\n}\\n\",\"keccak256\":\"0x4274b9180266275a8df16b8e1f0956cc795fb1ab87db1c01264c343be3bea937\",\"license\":\"UNLICENSED\"},\"contracts/interface/InitializableInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\n/**\\n * @title Initializable\\n * @author https://github.com/holographxyz\\n * @notice Use init instead of constructor\\n * @dev This allows for use of init function to make one time initializations without the need of a constructor\\n */\\ninterface InitializableInterface {\\n /**\\n * @notice Used internally to initialize the contract instead of through a constructor\\n * @dev This function is called by the deployer/factory when creating a contract\\n * @param initPayload abi encoded payload to use for contract initilaization\\n */\\n function init(bytes memory initPayload) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0x0a76fae986c5c18110ce2b1818c84ec28b7bf7f8fb00d20b39b8d7225fbd892d\",\"license\":\"UNLICENSED\"},\"contracts/struct/BridgeSettings.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nstruct BridgeSettings {\\n uint256 value;\\n uint256 gasLimit;\\n uint256 gasPrice;\\n uint32 toChain;\\n}\\n\",\"keccak256\":\"0x405f453cf620c5e882cf6d915fd7d14c895877408a7fd7e298d6e751bd4a0ce1\",\"license\":\"UNLICENSED\"},\"contracts/struct/DeploymentConfig.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nstruct DeploymentConfig {\\n bytes32 contractType;\\n uint32 chainType;\\n bytes32 salt;\\n bytes byteCode;\\n bytes initCode;\\n}\\n\",\"keccak256\":\"0x5eb9e83676eb65fa424aa9ca79961e1602a749f264ea4f496a9c359dad0da726\",\"license\":\"UNLICENSED\"},\"contracts/struct/Verification.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nstruct Verification {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n}\\n\",\"keccak256\":\"0xd351869472bcb2497e0a771c6e7f7a0b794d099133c67f5f378a8f7839f9db92\",\"license\":\"UNLICENSED\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50612b68806100206000396000f3fe6080604052600436106100d65760003560e01c8063704b6c021161007f578063b7e0366111610059578063b7e036611461028d578063bf64a82d146102bb578063df6516bd146102ce578063f851a440146102ee57600080fd5b8063704b6c021461023a578063a8935c671461025a578063a91ee0dc1461026d57600080fd5b80634ddf47d4116100b05780634ddf47d4146101b25780635ab1bd53146101d25780636e9960c31461020657600080fd5b806308a1eb20146100e557806325d5cac81461013b5780634827ae0c1461015d57600080fd5b366100e057600080fd5b600080fd5b3480156100f157600080fd5b50610105610100366004611375565b610303565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020015b60405180910390f35b34801561014757600080fd5b5061015b6101563660046113ed565b6103ba565b005b34801561016957600080fd5b507fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a545b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610132565b3480156101be57600080fd5b506101056101cd36600461153f565b610499565b3480156101de57600080fd5b507fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e75461018d565b34801561021257600080fd5b507f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95461018d565b34801561024657600080fd5b5061015b6102553660046113ed565b610600565b61015b610268366004611697565b6106da565b34801561027957600080fd5b5061015b6102883660046113ed565b6108c1565b34801561029957600080fd5b506102ad6102a83660046117de565b61099b565b6040516101329291906118ac565b61015b6102c93660046118e7565b6109ef565b3480156102da57600080fd5b5061015b6102e9366004611907565b610aca565b3480156102fa57600080fd5b5061018d611015565b600080808061031485870187611907565b6040517fdf6516bd0000000000000000000000000000000000000000000000000000000081529295509093509150309063df6516bd9061035c9086908690869060040161196a565b600060405180830381600087803b15801561037657600080fd5b505af115801561038a573d6000803e3d6000fd5b507f08a1eb20000000000000000000000000000000000000000000000000000000009a9950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610475576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064015b60405180910390fd5b7fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55565b60006104c37f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a015490565b1561052a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a20616c726561647920696e697469616c697a65640000604482015260640161046c565b600080838060200190518101906105419190611a2c565b91509150327f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955817fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55807fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7556105d760017f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a0155565b507f4ddf47d4000000000000000000000000000000000000000000000000000000009392505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955565b81156106eb576106eb858585610aca565b60008585856040516020016107029392919061196a565b604051602081830303815290604052905060007fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a54905060008173ffffffffffffffffffffffffffffffffffffffff16630fffbaf36040518163ffffffff1660e01b8152600401602060405180830381865afa158015610786573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107aa9190611a66565b845190915060005b818110156108b5578273ffffffffffffffffffffffffffffffffffffffff1663e55856668783815181106107e8576107e8611a83565b60200260200101516000015188848151811061080657610806611a83565b602002602001015160600151308a868151811061082557610825611a83565b6020026020010151602001518b878151811061084357610843611a83565b6020026020010151604001518b6040518763ffffffff1660e01b8152600401610870959493929190611ab2565b6000604051808303818588803b15801561088957600080fd5b505af115801561089d573d6000803e3d6000fd5b505050505080806108ad90611b33565b9150506107b2565b50505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610977576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b7fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e755565b6000606063b7e0366160e01b848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250959c929b50919950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aa5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b808260003760008082600034875af13d6000803e808015610ac5573d6000f35b3d6000fd5b7fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a547fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e754845160208087015160408089015160608a015180519085012060808b01518051908601209251969796600096610bb796909594918b910195865260e09490941b7fffffffff0000000000000000000000000000000000000000000000000000000016602086015260248501929092526044840152606483015260601b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016608482015260980190565b604051602081830303815290604052805190602001209050610be88560000151866020015187604001518488611044565b610c4e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f484f4c4f47524150483a20696e76616c6964207369676e617475726500000000604482015260640161046c565b600060405180602001610c6090611306565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820381018352601f90910116604081815282516020808501919091207fff00000000000000000000000000000000000000000000000000000000000000828501527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b166021850152603584018790526055808501919091528251808503909101815260759093019091528151910120909150610d21816112cc565b15610d88576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f484f4c4f47524150483a20616c7265616479206465706c6f7965640000000000604482015260640161046c565b60608801518051849160009183906020830184f59150828551602087016000f560208c8101518d516040805163ffffffff9093169383019390935273ffffffffffffffffffffffffffffffffffffffff8b811693830193909352606082015284821660808201529195507f4ddf47d4000000000000000000000000000000000000000000000000000000009190861690634ddf47d49060a0016040516020818303038152906040528e60800151604051602001610e46929190611b6b565b6040516020818303038152906040526040518263ffffffff1660e01b8152600401610e719190611b90565b6020604051808303816000875af1158015610e90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eb49190611ba3565b7fffffffff000000000000000000000000000000000000000000000000000000001614610f3d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f696e697469616c697a6174696f6e206661696c65640000000000000000000000604482015260640161046c565b6040517f725229f60000000000000000000000000000000000000000000000000000000081526004810187905273ffffffffffffffffffffffffffffffffffffffff858116602483015289169063725229f690604401600060405180830381600087803b158015610fad57600080fd5b505af1158015610fc1573d6000803e3d6000fd5b505060405188925073ffffffffffffffffffffffffffffffffffffffff871691507fa802207d4c618b40db3b25b7b90e6f483e16b2c1f8d3610b15b345a718c6b41b90600090a35050505050505050505050565b600061103f7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95490565b905090565b6000601b8460ff1610156110605761105d601b85611be5565b93505b8360ff16601b1415801561107857508360ff16601c14155b15611085575060006112c3565b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0851115611122576110d7857ffffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141611c0a565b945060ff8416601b036110ed57601c93506110f2565b601b93505b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0851115611122575060006112c3565b73ffffffffffffffffffffffffffffffffffffffff8216158015906112c057506040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c810184905273ffffffffffffffffffffffffffffffffffffffff831690600190605c01604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600084529083018083525260ff881690820152606081018990526080810188905260a0016020604051602081039080840390855afa15801561120c573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff1614806112c0575060408051600081526020810180835285905260ff861691810191909152606081018790526080810186905273ffffffffffffffffffffffffffffffffffffffff83169060019060a0016020604051602081039080840390855afa15801561129e573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff16145b90505b95945050505050565b6000813f80158015906112ff57507fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708114155b9392505050565b610f3a80611c2283390190565b803563ffffffff8116811461132757600080fd5b919050565b60008083601f84011261133e57600080fd5b50813567ffffffffffffffff81111561135657600080fd5b60208301915083602082850101111561136e57600080fd5b9250929050565b60008060006040848603121561138a57600080fd5b61139384611313565b9250602084013567ffffffffffffffff8111156113af57600080fd5b6113bb8682870161132c565b9497909650939450505050565b73ffffffffffffffffffffffffffffffffffffffff811681146113ea57600080fd5b50565b6000602082840312156113ff57600080fd5b81356112ff816113c8565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516080810167ffffffffffffffff8111828210171561145c5761145c61140a565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156114a9576114a961140a565b604052919050565b600082601f8301126114c257600080fd5b813567ffffffffffffffff8111156114dc576114dc61140a565b61150d60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601611462565b81815284602083860101111561152257600080fd5b816020850160208301376000918101602001919091529392505050565b60006020828403121561155157600080fd5b813567ffffffffffffffff81111561156857600080fd5b611574848285016114b1565b949350505050565b600060a0828403121561158e57600080fd5b60405160a0810167ffffffffffffffff82821081831117156115b2576115b261140a565b81604052829350843583526115c960208601611313565b60208401526040850135604084015260608501359150808211156115ec57600080fd5b6115f8868387016114b1565b6060840152608085013591508082111561161157600080fd5b5061161e858286016114b1565b6080830152505092915050565b60006060828403121561163d57600080fd5b6040516060810181811067ffffffffffffffff821117156116605761166061140a565b80604052508091508235815260208301356020820152604083013560ff8116811461168a57600080fd5b6040919091015292915050565b600080600080600060e086880312156116af57600080fd5b853567ffffffffffffffff808211156116c757600080fd5b6116d389838a0161157c565b9650602091506116e589838a0161162b565b95506080808901356116f6816113c8565b955060a0890135801515811461170b57600080fd5b945060c08901358281111561171f57600080fd5b8901601f81018b1361173057600080fd5b8035838111156117425761174261140a565b611750858260051b01611462565b818152858101945060079190911b82018501908c82111561177057600080fd5b918501915b818310156117cb5783838e03121561178d5760008081fd5b611795611439565b8335815286840135878201526040808501359082015260606117b8818601611313565b9082015285529385019391830191611775565b8096505050505050509295509295909350565b600080600080606085870312156117f457600080fd5b6117fd85611313565b9350602085013561180d816113c8565b9250604085013567ffffffffffffffff81111561182957600080fd5b6118358782880161132c565b95989497509550505050565b6000815180845260005b818110156118675760208185018101518683018201520161184b565b81811115611879576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b7fffffffff00000000000000000000000000000000000000000000000000000000831681526040602082015260006115746040830184611841565b6000806000604084860312156118fc57600080fd5b8335611393816113c8565b600080600060a0848603121561191c57600080fd5b833567ffffffffffffffff81111561193357600080fd5b61193f8682870161157c565b93505061194f856020860161162b565b9150608084013561195f816113c8565b809150509250925092565b60a08152835160a082015263ffffffff60208501511660c0820152604084015160e08201526000606085015160a06101008401526119ac610140840182611841565b905060808601517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60848303016101208501526119e88282611841565b92505050835160208301526020840151604083015260ff6040850151166060830152611574608083018473ffffffffffffffffffffffffffffffffffffffff169052565b60008060408385031215611a3f57600080fd5b8251611a4a816113c8565b6020840151909250611a5b816113c8565b809150509250929050565b600060208284031215611a7857600080fd5b81516112ff816113c8565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b63ffffffff8616815273ffffffffffffffffffffffffffffffffffffffff8516602082015283604082015282606082015260a060808201526000611af960a0830184611841565b979650505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611b6457611b64611b04565b5060010190565b604081526000611b7e6040830185611841565b82810360208401526112c38185611841565b6020815260006112ff6020830184611841565b600060208284031215611bb557600080fd5b81517fffffffff00000000000000000000000000000000000000000000000000000000811681146112ff57600080fd5b600060ff821660ff84168060ff03821115611c0257611c02611b04565b019392505050565b600082821015611c1c57611c1c611b04565b50039056fe608060405234801561001057600080fd5b50610f1a806100206000396000f3fe6080604052600436106100c05760003560e01c806380d1cb3511610074578063c51a29e01161004e578063c51a29e0146102c1578063c8a4c3d5146102f5578063f851a4401461030a576100c7565b806380d1cb351461022c578063913a0ef21461026a578063bf64a82d146102ae576100c7565b80636e9960c3116100a55780636e9960c3146101a45780636faf275b146101d8578063704b6c021461020c576100c7565b80634827ae0c146100f95780634ddf47d414610153576100c7565b366100c757005b60006100d161031f565b90503660008037600080366000845af43d6000803e8080156100f2573d6000f35b3d6000fd5b005b34801561010557600080fd5b507fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a545b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b34801561015f57600080fd5b5061017361016e366004610bb4565b61045d565b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200161014a565b3480156101b057600080fd5b507f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c954610129565b3480156101e457600080fd5b507f27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b07454610129565b34801561021857600080fd5b506100f7610227366004610c59565b610911565b34801561023857600080fd5b507f9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de3545b60405190815260200161014a565b34801561027657600080fd5b507fd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d5460405163ffffffff909116815260200161014a565b6100f76102bc366004610c7d565b6109eb565b3480156102cd57600080fd5b507f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c75461025c565b34801561030157600080fd5b5061012961031f565b34801561031657600080fd5b50610129610ac1565b60008060007fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a5491507f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c75490508173ffffffffffffffffffffffffffffffffffffffff16635ab1bd536040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103db9190610d02565b73ffffffffffffffffffffffffffffffffffffffff166374b7510c826040518263ffffffff1660e01b815260040161041591815260200190565b602060405180830381865afa158015610432573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104569190610d02565b9250505090565b60006104877f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a015490565b156104f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f484f4c4f475241504845523a20616c726561647920696e697469616c697a656460448201526064015b60405180910390fd5b6000808380602001905181019061050a9190610d9c565b91509150600080600080858060200190518101906105289190610e00565b9350935093509350337f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955437f9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de355817f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c755827fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55837fd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d55807f27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b074556000808473ffffffffffffffffffffffffffffffffffffffff16635ab1bd536040518163ffffffff1660e01b8152600401602060405180830381865afa158015610650573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106749190610d02565b73ffffffffffffffffffffffffffffffffffffffff166374b7510c856040518263ffffffff1660e01b81526004016106ae91815260200190565b602060405180830381865afa1580156106cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ef9190610d02565b73ffffffffffffffffffffffffffffffffffffffff16634ddf47d460e01b8860405160240161071e9190610e5e565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009094169390931790925290516107a79190610eaf565b600060405180830381855af49150503d80600081146107e2576040519150601f19603f3d011682016040523d82523d6000602084013e6107e7565b606091505b50915091506000818060200190518101906108029190610ecb565b905082801561085257507fffffffff0000000000000000000000000000000000000000000000000000000081167f4ddf47d400000000000000000000000000000000000000000000000000000000145b6108b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f484f4c4f47524150483a20696e697469616c697a6174696f6e206661696c656460448201526064016104ea565b6108e160017f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a0155565b507f4ddf47d4000000000000000000000000000000000000000000000000000000009a9950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016104ea565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aa1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016104ea565b808260003760008082600034875af13d6000803e8080156100f2573d6000f35b6000610aeb7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95490565b905090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715610b6657610b66610af0565b604052919050565b600067ffffffffffffffff821115610b8857610b88610af0565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600060208284031215610bc657600080fd5b813567ffffffffffffffff811115610bdd57600080fd5b8201601f81018413610bee57600080fd5b8035610c01610bfc82610b6e565b610b1f565b818152856020838501011115610c1657600080fd5b81602084016020830137600091810160200191909152949350505050565b73ffffffffffffffffffffffffffffffffffffffff81168114610c5657600080fd5b50565b600060208284031215610c6b57600080fd5b8135610c7681610c34565b9392505050565b600080600060408486031215610c9257600080fd5b8335610c9d81610c34565b9250602084013567ffffffffffffffff80821115610cba57600080fd5b818601915086601f830112610cce57600080fd5b813581811115610cdd57600080fd5b876020828501011115610cef57600080fd5b6020830194508093505050509250925092565b600060208284031215610d1457600080fd5b8151610c7681610c34565b60005b83811015610d3a578181015183820152602001610d22565b83811115610d49576000848401525b50505050565b600082601f830112610d6057600080fd5b8151610d6e610bfc82610b6e565b818152846020838601011115610d8357600080fd5b610d94826020830160208701610d1f565b949350505050565b60008060408385031215610daf57600080fd5b825167ffffffffffffffff80821115610dc757600080fd5b610dd386838701610d4f565b93506020850151915080821115610de957600080fd5b50610df685828601610d4f565b9150509250929050565b60008060008060808587031215610e1657600080fd5b845163ffffffff81168114610e2a57600080fd5b6020860151909450610e3b81610c34565b604086015160608701519194509250610e5381610c34565b939692955090935050565b6020815260008251806020840152610e7d816040850160208701610d1f565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60008251610ec1818460208701610d1f565b9190910192915050565b600060208284031215610edd57600080fd5b81517fffffffff0000000000000000000000000000000000000000000000000000000081168114610c7657600080fdfea164736f6c634300080d000aa164736f6c634300080d000a", - "deployedBytecode": "0x6080604052600436106100d65760003560e01c8063704b6c021161007f578063b7e0366111610059578063b7e036611461028d578063bf64a82d146102bb578063df6516bd146102ce578063f851a440146102ee57600080fd5b8063704b6c021461023a578063a8935c671461025a578063a91ee0dc1461026d57600080fd5b80634ddf47d4116100b05780634ddf47d4146101b25780635ab1bd53146101d25780636e9960c31461020657600080fd5b806308a1eb20146100e557806325d5cac81461013b5780634827ae0c1461015d57600080fd5b366100e057600080fd5b600080fd5b3480156100f157600080fd5b50610105610100366004611375565b610303565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020015b60405180910390f35b34801561014757600080fd5b5061015b6101563660046113ed565b6103ba565b005b34801561016957600080fd5b507fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a545b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610132565b3480156101be57600080fd5b506101056101cd36600461153f565b610499565b3480156101de57600080fd5b507fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e75461018d565b34801561021257600080fd5b507f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95461018d565b34801561024657600080fd5b5061015b6102553660046113ed565b610600565b61015b610268366004611697565b6106da565b34801561027957600080fd5b5061015b6102883660046113ed565b6108c1565b34801561029957600080fd5b506102ad6102a83660046117de565b61099b565b6040516101329291906118ac565b61015b6102c93660046118e7565b6109ef565b3480156102da57600080fd5b5061015b6102e9366004611907565b610aca565b3480156102fa57600080fd5b5061018d611015565b600080808061031485870187611907565b6040517fdf6516bd0000000000000000000000000000000000000000000000000000000081529295509093509150309063df6516bd9061035c9086908690869060040161196a565b600060405180830381600087803b15801561037657600080fd5b505af115801561038a573d6000803e3d6000fd5b507f08a1eb20000000000000000000000000000000000000000000000000000000009a9950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610475576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064015b60405180910390fd5b7fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55565b60006104c37f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a015490565b1561052a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a20616c726561647920696e697469616c697a65640000604482015260640161046c565b600080838060200190518101906105419190611a2c565b91509150327f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955817fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55807fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7556105d760017f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a0155565b507f4ddf47d4000000000000000000000000000000000000000000000000000000009392505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955565b81156106eb576106eb858585610aca565b60008585856040516020016107029392919061196a565b604051602081830303815290604052905060007fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a54905060008173ffffffffffffffffffffffffffffffffffffffff16630fffbaf36040518163ffffffff1660e01b8152600401602060405180830381865afa158015610786573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107aa9190611a66565b845190915060005b818110156108b5578273ffffffffffffffffffffffffffffffffffffffff1663e55856668783815181106107e8576107e8611a83565b60200260200101516000015188848151811061080657610806611a83565b602002602001015160600151308a868151811061082557610825611a83565b6020026020010151602001518b878151811061084357610843611a83565b6020026020010151604001518b6040518763ffffffff1660e01b8152600401610870959493929190611ab2565b6000604051808303818588803b15801561088957600080fd5b505af115801561089d573d6000803e3d6000fd5b505050505080806108ad90611b33565b9150506107b2565b50505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610977576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b7fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e755565b6000606063b7e0366160e01b848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250959c929b50919950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aa5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b808260003760008082600034875af13d6000803e808015610ac5573d6000f35b3d6000fd5b7fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a547fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e754845160208087015160408089015160608a015180519085012060808b01518051908601209251969796600096610bb796909594918b910195865260e09490941b7fffffffff0000000000000000000000000000000000000000000000000000000016602086015260248501929092526044840152606483015260601b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016608482015260980190565b604051602081830303815290604052805190602001209050610be88560000151866020015187604001518488611044565b610c4e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f484f4c4f47524150483a20696e76616c6964207369676e617475726500000000604482015260640161046c565b600060405180602001610c6090611306565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820381018352601f90910116604081815282516020808501919091207fff00000000000000000000000000000000000000000000000000000000000000828501527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b166021850152603584018790526055808501919091528251808503909101815260759093019091528151910120909150610d21816112cc565b15610d88576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f484f4c4f47524150483a20616c7265616479206465706c6f7965640000000000604482015260640161046c565b60608801518051849160009183906020830184f59150828551602087016000f560208c8101518d516040805163ffffffff9093169383019390935273ffffffffffffffffffffffffffffffffffffffff8b811693830193909352606082015284821660808201529195507f4ddf47d4000000000000000000000000000000000000000000000000000000009190861690634ddf47d49060a0016040516020818303038152906040528e60800151604051602001610e46929190611b6b565b6040516020818303038152906040526040518263ffffffff1660e01b8152600401610e719190611b90565b6020604051808303816000875af1158015610e90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eb49190611ba3565b7fffffffff000000000000000000000000000000000000000000000000000000001614610f3d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f696e697469616c697a6174696f6e206661696c65640000000000000000000000604482015260640161046c565b6040517f725229f60000000000000000000000000000000000000000000000000000000081526004810187905273ffffffffffffffffffffffffffffffffffffffff858116602483015289169063725229f690604401600060405180830381600087803b158015610fad57600080fd5b505af1158015610fc1573d6000803e3d6000fd5b505060405188925073ffffffffffffffffffffffffffffffffffffffff871691507fa802207d4c618b40db3b25b7b90e6f483e16b2c1f8d3610b15b345a718c6b41b90600090a35050505050505050505050565b600061103f7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95490565b905090565b6000601b8460ff1610156110605761105d601b85611be5565b93505b8360ff16601b1415801561107857508360ff16601c14155b15611085575060006112c3565b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0851115611122576110d7857ffffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141611c0a565b945060ff8416601b036110ed57601c93506110f2565b601b93505b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0851115611122575060006112c3565b73ffffffffffffffffffffffffffffffffffffffff8216158015906112c057506040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c810184905273ffffffffffffffffffffffffffffffffffffffff831690600190605c01604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600084529083018083525260ff881690820152606081018990526080810188905260a0016020604051602081039080840390855afa15801561120c573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff1614806112c0575060408051600081526020810180835285905260ff861691810191909152606081018790526080810186905273ffffffffffffffffffffffffffffffffffffffff83169060019060a0016020604051602081039080840390855afa15801561129e573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff16145b90505b95945050505050565b6000813f80158015906112ff57507fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708114155b9392505050565b610f3a80611c2283390190565b803563ffffffff8116811461132757600080fd5b919050565b60008083601f84011261133e57600080fd5b50813567ffffffffffffffff81111561135657600080fd5b60208301915083602082850101111561136e57600080fd5b9250929050565b60008060006040848603121561138a57600080fd5b61139384611313565b9250602084013567ffffffffffffffff8111156113af57600080fd5b6113bb8682870161132c565b9497909650939450505050565b73ffffffffffffffffffffffffffffffffffffffff811681146113ea57600080fd5b50565b6000602082840312156113ff57600080fd5b81356112ff816113c8565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516080810167ffffffffffffffff8111828210171561145c5761145c61140a565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156114a9576114a961140a565b604052919050565b600082601f8301126114c257600080fd5b813567ffffffffffffffff8111156114dc576114dc61140a565b61150d60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601611462565b81815284602083860101111561152257600080fd5b816020850160208301376000918101602001919091529392505050565b60006020828403121561155157600080fd5b813567ffffffffffffffff81111561156857600080fd5b611574848285016114b1565b949350505050565b600060a0828403121561158e57600080fd5b60405160a0810167ffffffffffffffff82821081831117156115b2576115b261140a565b81604052829350843583526115c960208601611313565b60208401526040850135604084015260608501359150808211156115ec57600080fd5b6115f8868387016114b1565b6060840152608085013591508082111561161157600080fd5b5061161e858286016114b1565b6080830152505092915050565b60006060828403121561163d57600080fd5b6040516060810181811067ffffffffffffffff821117156116605761166061140a565b80604052508091508235815260208301356020820152604083013560ff8116811461168a57600080fd5b6040919091015292915050565b600080600080600060e086880312156116af57600080fd5b853567ffffffffffffffff808211156116c757600080fd5b6116d389838a0161157c565b9650602091506116e589838a0161162b565b95506080808901356116f6816113c8565b955060a0890135801515811461170b57600080fd5b945060c08901358281111561171f57600080fd5b8901601f81018b1361173057600080fd5b8035838111156117425761174261140a565b611750858260051b01611462565b818152858101945060079190911b82018501908c82111561177057600080fd5b918501915b818310156117cb5783838e03121561178d5760008081fd5b611795611439565b8335815286840135878201526040808501359082015260606117b8818601611313565b9082015285529385019391830191611775565b8096505050505050509295509295909350565b600080600080606085870312156117f457600080fd5b6117fd85611313565b9350602085013561180d816113c8565b9250604085013567ffffffffffffffff81111561182957600080fd5b6118358782880161132c565b95989497509550505050565b6000815180845260005b818110156118675760208185018101518683018201520161184b565b81811115611879576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b7fffffffff00000000000000000000000000000000000000000000000000000000831681526040602082015260006115746040830184611841565b6000806000604084860312156118fc57600080fd5b8335611393816113c8565b600080600060a0848603121561191c57600080fd5b833567ffffffffffffffff81111561193357600080fd5b61193f8682870161157c565b93505061194f856020860161162b565b9150608084013561195f816113c8565b809150509250925092565b60a08152835160a082015263ffffffff60208501511660c0820152604084015160e08201526000606085015160a06101008401526119ac610140840182611841565b905060808601517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60848303016101208501526119e88282611841565b92505050835160208301526020840151604083015260ff6040850151166060830152611574608083018473ffffffffffffffffffffffffffffffffffffffff169052565b60008060408385031215611a3f57600080fd5b8251611a4a816113c8565b6020840151909250611a5b816113c8565b809150509250929050565b600060208284031215611a7857600080fd5b81516112ff816113c8565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b63ffffffff8616815273ffffffffffffffffffffffffffffffffffffffff8516602082015283604082015282606082015260a060808201526000611af960a0830184611841565b979650505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611b6457611b64611b04565b5060010190565b604081526000611b7e6040830185611841565b82810360208401526112c38185611841565b6020815260006112ff6020830184611841565b600060208284031215611bb557600080fd5b81517fffffffff00000000000000000000000000000000000000000000000000000000811681146112ff57600080fd5b600060ff821660ff84168060ff03821115611c0257611c02611b04565b019392505050565b600082821015611c1c57611c1c611b04565b50039056fe608060405234801561001057600080fd5b50610f1a806100206000396000f3fe6080604052600436106100c05760003560e01c806380d1cb3511610074578063c51a29e01161004e578063c51a29e0146102c1578063c8a4c3d5146102f5578063f851a4401461030a576100c7565b806380d1cb351461022c578063913a0ef21461026a578063bf64a82d146102ae576100c7565b80636e9960c3116100a55780636e9960c3146101a45780636faf275b146101d8578063704b6c021461020c576100c7565b80634827ae0c146100f95780634ddf47d414610153576100c7565b366100c757005b60006100d161031f565b90503660008037600080366000845af43d6000803e8080156100f2573d6000f35b3d6000fd5b005b34801561010557600080fd5b507fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a545b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b34801561015f57600080fd5b5061017361016e366004610bb4565b61045d565b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200161014a565b3480156101b057600080fd5b507f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c954610129565b3480156101e457600080fd5b507f27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b07454610129565b34801561021857600080fd5b506100f7610227366004610c59565b610911565b34801561023857600080fd5b507f9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de3545b60405190815260200161014a565b34801561027657600080fd5b507fd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d5460405163ffffffff909116815260200161014a565b6100f76102bc366004610c7d565b6109eb565b3480156102cd57600080fd5b507f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c75461025c565b34801561030157600080fd5b5061012961031f565b34801561031657600080fd5b50610129610ac1565b60008060007fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a5491507f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c75490508173ffffffffffffffffffffffffffffffffffffffff16635ab1bd536040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103db9190610d02565b73ffffffffffffffffffffffffffffffffffffffff166374b7510c826040518263ffffffff1660e01b815260040161041591815260200190565b602060405180830381865afa158015610432573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104569190610d02565b9250505090565b60006104877f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a015490565b156104f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f484f4c4f475241504845523a20616c726561647920696e697469616c697a656460448201526064015b60405180910390fd5b6000808380602001905181019061050a9190610d9c565b91509150600080600080858060200190518101906105289190610e00565b9350935093509350337f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955437f9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de355817f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c755827fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55837fd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d55807f27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b074556000808473ffffffffffffffffffffffffffffffffffffffff16635ab1bd536040518163ffffffff1660e01b8152600401602060405180830381865afa158015610650573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106749190610d02565b73ffffffffffffffffffffffffffffffffffffffff166374b7510c856040518263ffffffff1660e01b81526004016106ae91815260200190565b602060405180830381865afa1580156106cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ef9190610d02565b73ffffffffffffffffffffffffffffffffffffffff16634ddf47d460e01b8860405160240161071e9190610e5e565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009094169390931790925290516107a79190610eaf565b600060405180830381855af49150503d80600081146107e2576040519150601f19603f3d011682016040523d82523d6000602084013e6107e7565b606091505b50915091506000818060200190518101906108029190610ecb565b905082801561085257507fffffffff0000000000000000000000000000000000000000000000000000000081167f4ddf47d400000000000000000000000000000000000000000000000000000000145b6108b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f484f4c4f47524150483a20696e697469616c697a6174696f6e206661696c656460448201526064016104ea565b6108e160017f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a0155565b507f4ddf47d4000000000000000000000000000000000000000000000000000000009a9950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016104ea565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aa1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016104ea565b808260003760008082600034875af13d6000803e8080156100f2573d6000f35b6000610aeb7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95490565b905090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715610b6657610b66610af0565b604052919050565b600067ffffffffffffffff821115610b8857610b88610af0565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600060208284031215610bc657600080fd5b813567ffffffffffffffff811115610bdd57600080fd5b8201601f81018413610bee57600080fd5b8035610c01610bfc82610b6e565b610b1f565b818152856020838501011115610c1657600080fd5b81602084016020830137600091810160200191909152949350505050565b73ffffffffffffffffffffffffffffffffffffffff81168114610c5657600080fd5b50565b600060208284031215610c6b57600080fd5b8135610c7681610c34565b9392505050565b600080600060408486031215610c9257600080fd5b8335610c9d81610c34565b9250602084013567ffffffffffffffff80821115610cba57600080fd5b818601915086601f830112610cce57600080fd5b813581811115610cdd57600080fd5b876020828501011115610cef57600080fd5b6020830194508093505050509250925092565b600060208284031215610d1457600080fd5b8151610c7681610c34565b60005b83811015610d3a578181015183820152602001610d22565b83811115610d49576000848401525b50505050565b600082601f830112610d6057600080fd5b8151610d6e610bfc82610b6e565b818152846020838601011115610d8357600080fd5b610d94826020830160208701610d1f565b949350505050565b60008060408385031215610daf57600080fd5b825167ffffffffffffffff80821115610dc757600080fd5b610dd386838701610d4f565b93506020850151915080821115610de957600080fd5b50610df685828601610d4f565b9150509250929050565b60008060008060808587031215610e1657600080fd5b845163ffffffff81168114610e2a57600080fd5b6020860151909450610e3b81610c34565b604086015160608701519194509250610e5381610c34565b939692955090935050565b6020815260008251806020840152610e7d816040850160208701610d1f565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60008251610ec1818460208701610d1f565b9190910192915050565b600060208284031215610edd57600080fd5b81517fffffffff0000000000000000000000000000000000000000000000000000000081168114610c7657600080fdfea164736f6c634300080d000aa164736f6c634300080d000a", + "numDeployments": 5, + "solcInputHash": "c71d96e115e745dd34ef9239c385494d", + "metadata": "{\"compiler\":{\"version\":\"0.8.13+commit.abaa5c0e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"BridgeableContractDeployed\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"adminCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"bridgeIn\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"bridgeOut\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"selector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"contractType\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"chainType\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"salt\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"byteCode\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"initCode\",\"type\":\"bytes\"}],\"internalType\":\"struct DeploymentConfig\",\"name\":\"config\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"}],\"internalType\":\"struct Verification\",\"name\":\"signature\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"}],\"name\":\"deployHolographableContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"contractType\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"chainType\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"salt\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"byteCode\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"initCode\",\"type\":\"bytes\"}],\"internalType\":\"struct DeploymentConfig\",\"name\":\"config\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"}],\"internalType\":\"struct Verification\",\"name\":\"signature\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"deployOnCurrentChain\",\"type\":\"bool\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"toChain\",\"type\":\"uint32\"}],\"internalType\":\"struct BridgeSettings[]\",\"name\":\"bridgeSettings\",\"type\":\"tuple[]\"}],\"name\":\"deployHolographableContractMultiChain\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"adminAddress\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getHolograph\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"holograph\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRegistry\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"registry\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"initPayload\",\"type\":\"bytes\"}],\"name\":\"init\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"adminAddress\",\"type\":\"address\"}],\"name\":\"setAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"holograph\",\"type\":\"address\"}],\"name\":\"setHolograph\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"registry\",\"type\":\"address\"}],\"name\":\"setRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"author\":\"https://github.com/holographxyz\",\"details\":\"The contract provides methods that allow for the creation of Holograph Protocol compliant smart contracts, that are capable of minting holographable assets\",\"kind\":\"dev\",\"methods\":{\"bridgeIn(uint32,bytes)\":{\"details\":\"This function directly forwards the calldata to the deployHolographableContract function It is used to allow for Holograph Bridge to make cross-chain deployments\"},\"bridgeOut(uint32,address,bytes)\":{\"details\":\"This function directly returns the calldata It is used to allow for Holograph Bridge to make cross-chain deployments\"},\"constructor\":{\"details\":\"Constructor is left empty and init is used instead\"},\"deployHolographableContract((bytes32,uint32,bytes32,bytes,bytes),(bytes32,bytes32,uint8),address)\":{\"details\":\"Using this function allows to deploy smart contracts that have the same address across all EVM chains\",\"params\":{\"config\":\"contract deployement configurations\",\"signature\":\"that was created by the wallet that created the original payload\",\"signer\":\"address of wallet that created the payload\"}},\"getHolograph()\":{\"details\":\"Used for storing a reference to all the primary modules and variables of the protocol\"},\"getRegistry()\":{\"details\":\"This module stores a reference for all deployed holographable smart contracts\"},\"init(bytes)\":{\"details\":\"This function is called by the deployer/factory when creating a contract\",\"params\":{\"initPayload\":\"abi encoded payload to use for contract initilaization\"}},\"setHolograph(address)\":{\"params\":{\"holograph\":\"address of the Holograph Protocol smart contract to use\"}},\"setRegistry(address)\":{\"params\":{\"registry\":\"address of the Holograph Registry smart contract to use\"}}},\"stateVariables\":{\"_holographSlot\":{\"details\":\"bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\"},\"_registrySlot\":{\"details\":\"bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\"}},\"title\":\"Holograph Factory\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"bridgeIn(uint32,bytes)\":{\"notice\":\"Deploy holographable contract via bridge request\"},\"bridgeOut(uint32,address,bytes)\":{\"notice\":\"Deploy holographable contract via bridge request\"},\"deployHolographableContract((bytes32,uint32,bytes32,bytes,bytes),(bytes32,bytes32,uint8),address)\":{\"notice\":\"Deploy a holographable smart contract\"},\"getHolograph()\":{\"notice\":\"Get the Holograph Protocol contract\"},\"getRegistry()\":{\"notice\":\"Get the Holograph Registry module\"},\"init(bytes)\":{\"notice\":\"Used internally to initialize the contract instead of through a constructor\"},\"setHolograph(address)\":{\"notice\":\"Update the Holograph Protocol contract address\"},\"setRegistry(address)\":{\"notice\":\"Update the Holograph Registry module address\"}},\"notice\":\"Deploy holographable contracts\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/HolographFactory.sol\":\"HolographFactory\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc721a-upgradeable/=erc721a-upgradeable/\",\":forge-std/=lib/forge-std/src/\"]},\"sources\":{\"contracts/HolographFactory.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nimport \\\"./abstract/Admin.sol\\\";\\nimport \\\"./abstract/Initializable.sol\\\";\\n\\nimport \\\"./enforcer/Holographer.sol\\\";\\n\\nimport \\\"./interface/Holographable.sol\\\";\\nimport \\\"./interface/HolographBridgeInterface.sol\\\";\\nimport \\\"./interface/HolographFactoryInterface.sol\\\";\\nimport \\\"./interface/HolographInterface.sol\\\";\\nimport \\\"./interface/HolographRegistryInterface.sol\\\";\\nimport \\\"./interface/InitializableInterface.sol\\\";\\n\\nimport \\\"./struct/BridgeSettings.sol\\\";\\nimport \\\"./struct/DeploymentConfig.sol\\\";\\nimport \\\"./struct/Verification.sol\\\";\\n\\nimport \\\"./library/Strings.sol\\\";\\n\\n/**\\n * @title Holograph Factory\\n * @author https://github.com/holographxyz\\n * @notice Deploy holographable contracts\\n * @dev The contract provides methods that allow for the creation of Holograph Protocol compliant smart contracts, that are capable of minting holographable assets\\n */\\ncontract HolographFactory is Admin, Initializable, Holographable, HolographFactoryInterface {\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\\n */\\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\\n */\\n bytes32 constant _registrySlot = 0xce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7;\\n\\n /**\\n * @dev Constructor is left empty and init is used instead\\n */\\n constructor() {}\\n\\n /**\\n * @notice Used internally to initialize the contract instead of through a constructor\\n * @dev This function is called by the deployer/factory when creating a contract\\n * @param initPayload abi encoded payload to use for contract initilaization\\n */\\n function init(bytes memory initPayload) external override returns (bytes4) {\\n require(!_isInitialized(), \\\"HOLOGRAPH: already initialized\\\");\\n (address holograph, address registry) = abi.decode(initPayload, (address, address));\\n assembly {\\n sstore(_adminSlot, origin())\\n sstore(_holographSlot, holograph)\\n sstore(_registrySlot, registry)\\n }\\n _setInitialized();\\n return InitializableInterface.init.selector;\\n }\\n\\n /**\\n * @notice Deploy holographable contract via bridge request\\n * @dev This function directly forwards the calldata to the deployHolographableContract function\\n * It is used to allow for Holograph Bridge to make cross-chain deployments\\n */\\n function bridgeIn(uint32 /* fromChain*/, bytes calldata payload) external returns (bytes4) {\\n (DeploymentConfig memory config, Verification memory signature, address signer) = abi.decode(\\n payload,\\n (DeploymentConfig, Verification, address)\\n );\\n HolographFactoryInterface(address(this)).deployHolographableContract(config, signature, signer);\\n return Holographable.bridgeIn.selector;\\n }\\n\\n /**\\n * @notice Deploy holographable contract via bridge request\\n * @dev This function directly returns the calldata\\n * It is used to allow for Holograph Bridge to make cross-chain deployments\\n */\\n function bridgeOut(\\n uint32 /* toChain*/,\\n address /* sender*/,\\n bytes calldata payload\\n ) external pure returns (bytes4 selector, bytes memory data) {\\n return (Holographable.bridgeOut.selector, payload);\\n }\\n\\n function deployHolographableContractMultiChain(\\n DeploymentConfig memory config,\\n Verification memory signature,\\n address signer,\\n bool deployOnCurrentChain,\\n BridgeSettings[] memory bridgeSettings\\n ) external payable {\\n if (deployOnCurrentChain) {\\n deployHolographableContract(config, signature, signer);\\n }\\n bytes memory payload = abi.encode(config, signature, signer);\\n HolographInterface holograph;\\n assembly {\\n holograph := sload(_holographSlot)\\n }\\n HolographBridgeInterface bridge = HolographBridgeInterface(holograph.getBridge());\\n uint256 l = bridgeSettings.length;\\n for (uint256 i = 0; i < l; i++) {\\n bridge.bridgeOutRequest{value: bridgeSettings[i].value}(\\n bridgeSettings[i].toChain,\\n address(this),\\n bridgeSettings[i].gasLimit,\\n bridgeSettings[i].gasPrice,\\n payload\\n );\\n }\\n }\\n\\n /**\\n * @notice Deploy a holographable smart contract\\n * @dev Using this function allows to deploy smart contracts that have the same address across all EVM chains\\n * @param config contract deployement configurations\\n * @param signature that was created by the wallet that created the original payload\\n * @param signer address of wallet that created the payload\\n */\\n function deployHolographableContract(\\n DeploymentConfig memory config,\\n Verification memory signature,\\n address signer\\n ) public {\\n address registry;\\n address holograph;\\n assembly {\\n holograph := sload(_holographSlot)\\n registry := sload(_registrySlot)\\n }\\n /**\\n * @dev the configuration is encoded and hashed along with signer address\\n */\\n bytes32 hash = keccak256(\\n abi.encodePacked(\\n config.contractType,\\n config.chainType,\\n config.salt,\\n keccak256(config.byteCode),\\n keccak256(config.initCode),\\n signer\\n )\\n );\\n /**\\n * @dev the hash is validated against signature\\n * this is to guarantee that the original creator's configuration has not been altered\\n */\\n require(_verifySigner(signature.r, signature.s, signature.v, hash, signer), \\\"HOLOGRAPH: invalid signature\\\");\\n /**\\n * @dev check that this contract has not already been deployed on this chain\\n */\\n bytes memory holographerBytecode = type(Holographer).creationCode;\\n address holographerAddress = address(\\n uint160(uint256(keccak256(abi.encodePacked(bytes1(0xff), address(this), hash, keccak256(holographerBytecode)))))\\n );\\n require(!_isContract(holographerAddress), \\\"HOLOGRAPH: already deployed\\\");\\n /**\\n * @dev convert hash into uint256 which will be used as the salt for create2\\n */\\n uint256 saltInt = uint256(hash);\\n address sourceContractAddress;\\n bytes memory sourceByteCode = config.byteCode;\\n assembly {\\n /**\\n * @dev deploy the user created smart contract first\\n */\\n sourceContractAddress := create2(0, add(sourceByteCode, 0x20), mload(sourceByteCode), saltInt)\\n }\\n assembly {\\n /**\\n * @dev deploy the Holographer contract\\n */\\n holographerAddress := create2(0, add(holographerBytecode, 0x20), mload(holographerBytecode), saltInt)\\n }\\n /**\\n * @dev initialize the Holographer contract\\n */\\n require(\\n InitializableInterface(holographerAddress).init(\\n abi.encode(abi.encode(config.chainType, holograph, config.contractType, sourceContractAddress), config.initCode)\\n ) == InitializableInterface.init.selector,\\n \\\"initialization failed\\\"\\n );\\n /**\\n * @dev update the Holograph Registry with deployed contract address\\n */\\n HolographRegistryInterface(registry).setHolographedHashAddress(hash, holographerAddress);\\n /**\\n * @dev emit an event that on-chain indexers can easily read\\n */\\n emit BridgeableContractDeployed(holographerAddress, hash);\\n }\\n\\n /**\\n * @notice Get the Holograph Protocol contract\\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\\n */\\n function getHolograph() external view returns (address holograph) {\\n assembly {\\n holograph := sload(_holographSlot)\\n }\\n }\\n\\n /**\\n * @notice Update the Holograph Protocol contract address\\n * @param holograph address of the Holograph Protocol smart contract to use\\n */\\n function setHolograph(address holograph) external onlyAdmin {\\n assembly {\\n sstore(_holographSlot, holograph)\\n }\\n }\\n\\n /**\\n * @notice Get the Holograph Registry module\\n * @dev This module stores a reference for all deployed holographable smart contracts\\n */\\n function getRegistry() external view returns (address registry) {\\n assembly {\\n registry := sload(_registrySlot)\\n }\\n }\\n\\n /**\\n * @notice Update the Holograph Registry module address\\n * @param registry address of the Holograph Registry smart contract to use\\n */\\n function setRegistry(address registry) external onlyAdmin {\\n assembly {\\n sstore(_registrySlot, registry)\\n }\\n }\\n\\n /**\\n * @dev Internal function used for checking if a contract has been deployed at address\\n */\\n function _isContract(address contractAddress) private view returns (bool) {\\n bytes32 codehash;\\n assembly {\\n codehash := extcodehash(contractAddress)\\n }\\n return (codehash != 0x0 && codehash != 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470);\\n }\\n\\n /**\\n * @dev Internal function used for verifying a signature\\n */\\n function _verifySigner(bytes32 r, bytes32 s, uint8 v, bytes32 hash, address signer) private pure returns (bool) {\\n if (v < 27) {\\n v += 27;\\n }\\n if (v != 27 && v != 28) {\\n return false;\\n }\\n // prevent signature malleability by checking if s-value is in the upper range\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n // if s-value is in upper range, calculate a new s-value\\n s = bytes32(0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - uint256(s));\\n // flip the v-value\\n if (v == 27) {\\n v = 28;\\n } else {\\n v = 27;\\n }\\n // check if s-value is still in upper range\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return false;\\n }\\n }\\n /**\\n * @dev signature is checked against EIP-191 first, then directly, to support legacy wallets\\n */\\n return (signer != address(0) &&\\n (ecrecover(keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash)), v, r, s) == signer ||\\n (\\n ecrecover(\\n keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n66\\\", Strings.toHexString(uint256(hash), 32))),\\n v,\\n r,\\n s\\n )\\n ) ==\\n signer ||\\n ecrecover(hash, v, r, s) == signer));\\n }\\n\\n /**\\n * @dev Purposefully reverts to prevent having any type of ether transfered into the contract\\n */\\n receive() external payable {\\n revert();\\n }\\n\\n /**\\n * @dev Purposefully reverts to prevent any calls to undefined functions\\n */\\n fallback() external payable {\\n revert();\\n }\\n}\\n\",\"keccak256\":\"0xb18538929ca40465f6762c4a6204f631d4a9844e2af366d46d9c340a4c75757c\",\"license\":\"UNLICENSED\"},\"contracts/abstract/Admin.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nabstract contract Admin {\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.admin')) - 1)\\n */\\n bytes32 constant _adminSlot = 0x3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c9;\\n\\n modifier onlyAdmin() {\\n require(msg.sender == getAdmin(), \\\"HOLOGRAPH: admin only function\\\");\\n _;\\n }\\n\\n constructor() {}\\n\\n function admin() public view returns (address) {\\n return getAdmin();\\n }\\n\\n function getAdmin() public view returns (address adminAddress) {\\n assembly {\\n adminAddress := sload(_adminSlot)\\n }\\n }\\n\\n function setAdmin(address adminAddress) public onlyAdmin {\\n assembly {\\n sstore(_adminSlot, adminAddress)\\n }\\n }\\n\\n function adminCall(address target, bytes calldata data) external payable onlyAdmin {\\n assembly {\\n calldatacopy(0, data.offset, data.length)\\n let result := call(gas(), target, callvalue(), 0, data.length, 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n switch result\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x93552c9253b579c45113a150a6a3dfddb997afd939d09b49c34d040525734b1a\",\"license\":\"UNLICENSED\"},\"contracts/abstract/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nimport \\\"../interface/InitializableInterface.sol\\\";\\n\\n/**\\n * @title Initializable\\n * @author https://github.com/holographxyz\\n * @notice Use init instead of constructor\\n * @dev This allows for use of init function to make one time initializations without the need for a constructor\\n */\\nabstract contract Initializable is InitializableInterface {\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.initialized')) - 1)\\n */\\n bytes32 constant _initializedSlot = 0x4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a01;\\n\\n /**\\n * @dev Constructor is left empty and init is used instead\\n */\\n constructor() {}\\n\\n /**\\n * @notice Used internally to initialize the contract instead of through a constructor\\n * @dev This function is called by the deployer/factory when creating a contract\\n * @param initPayload abi encoded payload to use for contract initilaization\\n */\\n function init(bytes memory initPayload) external virtual returns (bytes4);\\n\\n function _isInitialized() internal view returns (bool initialized) {\\n assembly {\\n initialized := sload(_initializedSlot)\\n }\\n }\\n\\n function _setInitialized() internal {\\n assembly {\\n sstore(_initializedSlot, 0x0000000000000000000000000000000000000000000000000000000000000001)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa55dc367285f96952dec56adfbfb48b6a4be31aef9ba0d30ad8c91023a572462\",\"license\":\"UNLICENSED\"},\"contracts/enforcer/Holographer.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nimport \\\"../abstract/Admin.sol\\\";\\nimport \\\"../abstract/Initializable.sol\\\";\\n\\nimport \\\"../interface/HolographInterface.sol\\\";\\nimport \\\"../interface/HolographerInterface.sol\\\";\\nimport \\\"../interface/HolographRegistryInterface.sol\\\";\\nimport \\\"../interface/InitializableInterface.sol\\\";\\n\\n/**\\n * @dev This contract is a binder. It puts together all the variables to make the underlying contracts functional and be bridgeable.\\n */\\ncontract Holographer is Admin, Initializable, HolographerInterface {\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.originChain')) - 1)\\n */\\n bytes32 constant _originChainSlot = 0xd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d;\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\\n */\\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.contractType')) - 1)\\n */\\n bytes32 constant _contractTypeSlot = 0x0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c7;\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.sourceContract')) - 1)\\n */\\n bytes32 constant _sourceContractSlot = 0x27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b074;\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.blockHeight')) - 1)\\n */\\n bytes32 constant _blockHeightSlot = 0x9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de3;\\n\\n /**\\n * @dev Constructor is left empty and init is used instead\\n */\\n constructor() {}\\n\\n /**\\n * @notice Used internally to initialize the contract instead of through a constructor\\n * @dev This function is called by the deployer/factory when creating a contract\\n * @param initPayload abi encoded payload to use for contract initilaization\\n */\\n function init(bytes memory initPayload) external override returns (bytes4) {\\n require(!_isInitialized(), \\\"HOLOGRAPHER: already initialized\\\");\\n (bytes memory encoded, bytes memory initCode) = abi.decode(initPayload, (bytes, bytes));\\n (uint32 originChain, address holograph, bytes32 contractType, address sourceContract) = abi.decode(\\n encoded,\\n (uint32, address, bytes32, address)\\n );\\n assembly {\\n sstore(_adminSlot, caller())\\n sstore(_blockHeightSlot, number())\\n sstore(_contractTypeSlot, contractType)\\n sstore(_holographSlot, holograph)\\n sstore(_originChainSlot, originChain)\\n sstore(_sourceContractSlot, sourceContract)\\n }\\n (bool success, bytes memory returnData) = HolographRegistryInterface(HolographInterface(holograph).getRegistry())\\n .getReservedContractTypeAddress(contractType)\\n .delegatecall(abi.encodeWithSelector(InitializableInterface.init.selector, initCode));\\n bytes4 selector = abi.decode(returnData, (bytes4));\\n require(success && selector == InitializableInterface.init.selector, \\\"HOLOGRAPH: initialization failed\\\");\\n _setInitialized();\\n return InitializableInterface.init.selector;\\n }\\n\\n /**\\n * @dev Returns the contract type that is used for loading the Enforcer\\n */\\n function getContractType() external view returns (bytes32 contractType) {\\n assembly {\\n contractType := sload(_contractTypeSlot)\\n }\\n }\\n\\n /**\\n * @dev Returns the block height of when the smart contract was deployed. Useful for retrieving deployment config for re-deployment on other EVM-compatible chains.\\n */\\n function getDeploymentBlock() external view returns (uint256 deploymentBlock) {\\n assembly {\\n deploymentBlock := sload(_blockHeightSlot)\\n }\\n }\\n\\n /**\\n * @dev Returns a hardcoded address for the Holograph smart contract.\\n */\\n function getHolograph() external view returns (address holograph) {\\n assembly {\\n holograph := sload(_holographSlot)\\n }\\n }\\n\\n /**\\n * @dev Returns a hardcoded address for the Holograph smart contract that controls and enforces the ERC standards.\\n */\\n function getHolographEnforcer() public view returns (address) {\\n HolographInterface holograph;\\n bytes32 contractType;\\n assembly {\\n holograph := sload(_holographSlot)\\n contractType := sload(_contractTypeSlot)\\n }\\n return HolographRegistryInterface(holograph.getRegistry()).getReservedContractTypeAddress(contractType);\\n }\\n\\n /**\\n * @dev Returns the original chain that contract was deployed on.\\n */\\n function getOriginChain() external view returns (uint32 originChain) {\\n assembly {\\n originChain := sload(_originChainSlot)\\n }\\n }\\n\\n /**\\n * @dev Returns a hardcoded address for the custom secure storage contract deployed in parallel with this contract deployment.\\n */\\n function getSourceContract() external view returns (address sourceContract) {\\n assembly {\\n sourceContract := sload(_sourceContractSlot)\\n }\\n }\\n\\n /**\\n * @dev Purposefully left empty, to prevent running out of gas errors when receiving native token payments.\\n */\\n receive() external payable {}\\n\\n /**\\n * @dev This takes the Enforcer's source code, runs it, and uses current address for storage slots.\\n */\\n fallback() external payable {\\n address holographEnforcer = getHolographEnforcer();\\n assembly {\\n calldatacopy(0, 0, calldatasize())\\n let result := delegatecall(gas(), holographEnforcer, 0, calldatasize(), 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n switch result\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc31b575625e84743d9a14f282ef3894becece82a6f47ec945585ac5a0d1895f7\",\"license\":\"UNLICENSED\"},\"contracts/interface/HolographBridgeInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\n/**\\n * @title Holograph Bridge\\n * @author https://github.com/holographxyz\\n * @notice Beam any holographable contracts and assets across blockchains\\n * @dev The contract abstracts all the complexities of making bridge requests and uses a universal interface to bridge any type of holographable assets\\n */\\ninterface HolographBridgeInterface {\\n /**\\n * @notice Receive a beam from another chain\\n * @dev This function can only be called by the Holograph Operator module\\n * @param fromChain Holograph Chain ID where the brigeOutRequest was created\\n * @param holographableContract address of the destination contract that the bridgeInRequest is targeted for\\n * @param hToken address of the hToken contract that wrapped the origin chain native gas token\\n * @param hTokenRecipient address of recipient for the hToken reward\\n * @param hTokenValue exact amount of hToken reward in wei\\n * @param doNotRevert boolean used to specify if the call should revert\\n * @param bridgeInPayload actual abi encoded bytes of the data that the holographable contract bridgeIn function will receive\\n */\\n function bridgeInRequest(\\n uint256 nonce,\\n uint32 fromChain,\\n address holographableContract,\\n address hToken,\\n address hTokenRecipient,\\n uint256 hTokenValue,\\n bool doNotRevert,\\n bytes calldata bridgeInPayload\\n ) external payable;\\n\\n /**\\n * @notice Create a beam request for a destination chain\\n * @dev This function works for deploying contracts and beaming supported holographable assets across chains\\n * @param toChain Holograph Chain ID where the beam is being sent to\\n * @param holographableContract address of the contract for which the bridge request is being made\\n * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain\\n * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain\\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\\n */\\n function bridgeOutRequest(\\n uint32 toChain,\\n address holographableContract,\\n uint256 gasLimit,\\n uint256 gasPrice,\\n bytes calldata bridgeOutPayload\\n ) external payable;\\n\\n /**\\n * @notice Do not call this function, it will always revert\\n * @dev Used by getBridgeOutRequestPayload function\\n * It is purposefully inverted to always revert on a successful call\\n * Marked as external and not private to allow use inside try/catch of getBridgeOutRequestPayload function\\n * If this function does not revert and returns a string, it is the actual revert reason\\n * @param sender address of actual sender that is planning to make a bridgeOutRequest call\\n * @param toChain holograph chain id of destination chain\\n * @param holographableContract address of the contract for which the bridge request is being made\\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\\n */\\n function revertedBridgeOutRequest(\\n address sender,\\n uint32 toChain,\\n address holographableContract,\\n bytes calldata bridgeOutPayload\\n ) external returns (string memory revertReason);\\n\\n /**\\n * @notice Get the payload created by the bridgeOutRequest function\\n * @dev Use this function to get the payload that will be generated by a bridgeOutRequest\\n * Only use this with a static call\\n * @param toChain Holograph Chain ID where the beam is being sent to\\n * @param holographableContract address of the contract for which the bridge request is being made\\n * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain\\n * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain\\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\\n * @return samplePayload bytes made up of the bridgeOutRequest payload\\n */\\n function getBridgeOutRequestPayload(\\n uint32 toChain,\\n address holographableContract,\\n uint256 gasLimit,\\n uint256 gasPrice,\\n bytes calldata bridgeOutPayload\\n ) external returns (bytes memory samplePayload);\\n\\n /**\\n * @notice Get the fees associated with sending specific payload\\n * @dev Will provide exact costs on protocol and message side, combine the two to get total\\n * @param toChain holograph chain id of destination chain for payload\\n * @param gasLimit amount of gas to provide for executing payload on destination chain\\n * @param gasPrice maximum amount to pay for gas price, can be set to 0 and will be chose automatically\\n * @param crossChainPayload the entire packet being sent cross-chain\\n * @return hlgFee the amount (in wei) of native gas token that will cost for finalizing job on destiantion chain\\n * @return msgFee the amount (in wei) of native gas token that will cost for sending message to destiantion chain\\n * @return dstGasPrice the amount (in wei) that destination message maximum gas price will be\\n */\\n function getMessageFee(\\n uint32 toChain,\\n uint256 gasLimit,\\n uint256 gasPrice,\\n bytes calldata crossChainPayload\\n ) external view returns (uint256 hlgFee, uint256 msgFee, uint256 dstGasPrice);\\n\\n /**\\n * @notice Get the address of the Holograph Factory module\\n * @dev Used for deploying holographable smart contracts\\n */\\n function getFactory() external view returns (address factory);\\n\\n /**\\n * @notice Update the Holograph Factory module address\\n * @param factory address of the Holograph Factory smart contract to use\\n */\\n function setFactory(address factory) external;\\n\\n /**\\n * @notice Get the Holograph Protocol contract\\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\\n */\\n function getHolograph() external view returns (address holograph);\\n\\n /**\\n * @notice Update the Holograph Protocol contract address\\n * @param holograph address of the Holograph Protocol smart contract to use\\n */\\n function setHolograph(address holograph) external;\\n\\n /**\\n * @notice Get the latest job nonce\\n * @dev You can use the job nonce as a way to calculate total amount of bridge requests that have been made\\n */\\n function getJobNonce() external view returns (uint256 jobNonce);\\n\\n /**\\n * @notice Get the address of the Holograph Operator module\\n * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module\\n */\\n function getOperator() external view returns (address operator);\\n\\n /**\\n * @notice Update the Holograph Operator module address\\n * @param operator address of the Holograph Operator smart contract to use\\n */\\n function setOperator(address operator) external;\\n\\n /**\\n * @notice Get the Holograph Registry module\\n * @dev This module stores a reference for all deployed holographable smart contracts\\n */\\n function getRegistry() external view returns (address registry);\\n\\n /**\\n * @notice Update the Holograph Registry module address\\n * @param registry address of the Holograph Registry smart contract to use\\n */\\n function setRegistry(address registry) external;\\n}\\n\",\"keccak256\":\"0x6e49ef7e89b6271241da6df330eb5d5cf48da3be31408bb5d99c48d51c0ef176\",\"license\":\"UNLICENSED\"},\"contracts/interface/HolographFactoryInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nimport \\\"../struct/DeploymentConfig.sol\\\";\\nimport \\\"../struct/Verification.sol\\\";\\n\\n/**\\n * @title Holograph Factory\\n * @author https://github.com/holographxyz\\n * @notice Deploy holographable contracts\\n * @dev The contract provides methods that allow for the creation of Holograph Protocol compliant smart contracts, that are capable of minting holographable assets\\n */\\ninterface HolographFactoryInterface {\\n /**\\n * @dev This event is fired every time that a bridgeable contract is deployed.\\n */\\n event BridgeableContractDeployed(address indexed contractAddress, bytes32 indexed hash);\\n\\n /**\\n * @notice Deploy a holographable smart contract\\n * @dev Using this function allows to deploy smart contracts that have the same address across all EVM chains\\n * @param config contract deployement configurations\\n * @param signature that was created by the wallet that created the original payload\\n * @param signer address of wallet that created the payload\\n */\\n function deployHolographableContract(\\n DeploymentConfig memory config,\\n Verification memory signature,\\n address signer\\n ) external;\\n\\n /**\\n * @notice Get the Holograph Protocol contract\\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\\n */\\n function getHolograph() external view returns (address holograph);\\n\\n /**\\n * @notice Update the Holograph Protocol contract address\\n * @param holograph address of the Holograph Protocol smart contract to use\\n */\\n function setHolograph(address holograph) external;\\n\\n /**\\n * @notice Get the Holograph Registry module\\n * @dev This module stores a reference for all deployed holographable smart contracts\\n */\\n function getRegistry() external view returns (address registry);\\n\\n /**\\n * @notice Update the Holograph Registry module address\\n * @param registry address of the Holograph Registry smart contract to use\\n */\\n function setRegistry(address registry) external;\\n}\\n\",\"keccak256\":\"0x44cd1db20207337ef6abde2d0f42837778d13fb62fe353b0ee9b293a601a0d71\",\"license\":\"UNLICENSED\"},\"contracts/interface/HolographInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\n/**\\n * @title Holograph Protocol\\n * @author https://github.com/holographxyz\\n * @notice This is the primary Holograph Protocol smart contract\\n * @dev This contract stores a reference to all the primary modules and variables of the protocol\\n */\\ninterface HolographInterface {\\n /**\\n * @notice Get the address of the Holograph Bridge module\\n * @dev Used for beaming holographable assets cross-chain\\n */\\n function getBridge() external view returns (address bridge);\\n\\n /**\\n * @notice Update the Holograph Bridge module address\\n * @param bridge address of the Holograph Bridge smart contract to use\\n */\\n function setBridge(address bridge) external;\\n\\n /**\\n * @notice Get the chain ID that the Protocol was deployed on\\n * @dev Useful for checking if/when a hard fork occurs\\n */\\n function getChainId() external view returns (uint256 chainId);\\n\\n /**\\n * @notice Update the chain ID\\n * @dev Useful for updating once a hard fork has been mitigated\\n * @param chainId EVM chain ID to use\\n */\\n function setChainId(uint256 chainId) external;\\n\\n /**\\n * @notice Get the address of the Holograph Factory module\\n * @dev Used for deploying holographable smart contracts\\n */\\n function getFactory() external view returns (address factory);\\n\\n /**\\n * @notice Update the Holograph Factory module address\\n * @param factory address of the Holograph Factory smart contract to use\\n */\\n function setFactory(address factory) external;\\n\\n /**\\n * @notice Get the Holograph chain Id\\n * @dev Holograph uses an internal chain id mapping\\n */\\n function getHolographChainId() external view returns (uint32 holographChainId);\\n\\n /**\\n * @notice Update the Holograph chain ID\\n * @dev Useful for updating once a hard fork was mitigated\\n * @param holographChainId Holograph chain ID to use\\n */\\n function setHolographChainId(uint32 holographChainId) external;\\n\\n /**\\n * @notice Get the address of the Holograph Interfaces module\\n * @dev Holograph uses this contract to store data that needs to be accessed by a large portion of the modules\\n */\\n function getInterfaces() external view returns (address interfaces);\\n\\n /**\\n * @notice Update the Holograph Interfaces module address\\n * @param interfaces address of the Holograph Interfaces smart contract to use\\n */\\n function setInterfaces(address interfaces) external;\\n\\n /**\\n * @notice Get the address of the Holograph Operator module\\n * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module\\n */\\n function getOperator() external view returns (address operator);\\n\\n /**\\n * @notice Update the Holograph Operator module address\\n * @param operator address of the Holograph Operator smart contract to use\\n */\\n function setOperator(address operator) external;\\n\\n /**\\n * @notice Get the Holograph Registry module\\n * @dev This module stores a reference for all deployed holographable smart contracts\\n */\\n function getRegistry() external view returns (address registry);\\n\\n /**\\n * @notice Update the Holograph Registry module address\\n * @param registry address of the Holograph Registry smart contract to use\\n */\\n function setRegistry(address registry) external;\\n\\n /**\\n * @notice Get the Holograph Treasury module\\n * @dev All of the Holograph Protocol assets are stored and managed by this module\\n */\\n function getTreasury() external view returns (address treasury);\\n\\n /**\\n * @notice Update the Holograph Treasury module address\\n * @param treasury address of the Holograph Treasury smart contract to use\\n */\\n function setTreasury(address treasury) external;\\n\\n /**\\n * @notice Get the Holograph Utility Token address\\n * @dev This is the official utility token of the Holograph Protocol\\n */\\n function getUtilityToken() external view returns (address utilityToken);\\n\\n /**\\n * @notice Update the Holograph Utility Token address\\n * @param utilityToken address of the Holograph Utility Token smart contract to use\\n */\\n function setUtilityToken(address utilityToken) external;\\n}\\n\",\"keccak256\":\"0x90b5643e77e914393c508d59b80f5739debfd72455029c0db041f92374b3f586\",\"license\":\"UNLICENSED\"},\"contracts/interface/HolographRegistryInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\ninterface HolographRegistryInterface {\\n event HolographableContractEvent(address indexed _holographableContract, bytes _payload);\\n\\n function isHolographedContract(address smartContract) external view returns (bool);\\n\\n function isHolographedHashDeployed(bytes32 hash) external view returns (bool);\\n\\n function referenceContractTypeAddress(address contractAddress) external returns (bytes32);\\n\\n function getContractTypeAddress(bytes32 contractType) external view returns (address);\\n\\n function setContractTypeAddress(bytes32 contractType, address contractAddress) external;\\n\\n function getHolograph() external view returns (address holograph);\\n\\n function setHolograph(address holograph) external;\\n\\n function getHolographableContracts(uint256 index, uint256 length) external view returns (address[] memory contracts);\\n\\n function getHolographableContractsLength() external view returns (uint256);\\n\\n function getHolographedHashAddress(bytes32 hash) external view returns (address);\\n\\n function setHolographedHashAddress(bytes32 hash, address contractAddress) external;\\n\\n function getHToken(uint32 chainId) external view returns (address);\\n\\n function setHToken(uint32 chainId, address hToken) external;\\n\\n function getReservedContractTypeAddress(bytes32 contractType) external view returns (address contractTypeAddress);\\n\\n function setReservedContractTypeAddress(bytes32 hash, bool reserved) external;\\n\\n function setReservedContractTypeAddresses(bytes32[] calldata hashes, bool[] calldata reserved) external;\\n\\n function getUtilityToken() external view returns (address utilityToken);\\n\\n function setUtilityToken(address utilityToken) external;\\n\\n function holographableEvent(bytes calldata payload) external;\\n}\\n\",\"keccak256\":\"0x5e270e2ec4413f7e49d7bc4dd4d935549d3f5234f786e5a7f435cf77850ba966\",\"license\":\"UNLICENSED\"},\"contracts/interface/Holographable.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\ninterface Holographable {\\n function bridgeIn(uint32 fromChain, bytes calldata payload) external returns (bytes4);\\n\\n function bridgeOut(\\n uint32 toChain,\\n address sender,\\n bytes calldata payload\\n ) external returns (bytes4 selector, bytes memory data);\\n}\\n\",\"keccak256\":\"0x4dd2fc1af269273c46156df8af5cedeed0dfb83f0bfa5696a8d64c768449285b\",\"license\":\"UNLICENSED\"},\"contracts/interface/HolographerInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\ninterface HolographerInterface {\\n function getContractType() external view returns (bytes32 contractType);\\n\\n function getDeploymentBlock() external view returns (uint256 deploymentBlock);\\n\\n function getHolograph() external view returns (address holograph);\\n\\n function getHolographEnforcer() external view returns (address);\\n\\n function getOriginChain() external view returns (uint32 originChain);\\n\\n function getSourceContract() external view returns (address sourceContract);\\n}\\n\",\"keccak256\":\"0x4274b9180266275a8df16b8e1f0956cc795fb1ab87db1c01264c343be3bea937\",\"license\":\"UNLICENSED\"},\"contracts/interface/InitializableInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\n/**\\n * @title Initializable\\n * @author https://github.com/holographxyz\\n * @notice Use init instead of constructor\\n * @dev This allows for use of init function to make one time initializations without the need of a constructor\\n */\\ninterface InitializableInterface {\\n /**\\n * @notice Used internally to initialize the contract instead of through a constructor\\n * @dev This function is called by the deployer/factory when creating a contract\\n * @param initPayload abi encoded payload to use for contract initilaization\\n */\\n function init(bytes memory initPayload) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0x0a76fae986c5c18110ce2b1818c84ec28b7bf7f8fb00d20b39b8d7225fbd892d\",\"license\":\"UNLICENSED\"},\"contracts/library/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nlibrary Strings {\\n function toHexString(address account) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(account)));\\n }\\n\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\n }\\n\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = bytes16(\\\"0123456789abcdef\\\")[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n function toAsciiString(address x) internal pure returns (string memory) {\\n bytes memory s = new bytes(40);\\n for (uint256 i = 0; i < 20; i++) {\\n bytes1 b = bytes1(uint8(uint256(uint160(x)) / (2 ** (8 * (19 - i)))));\\n bytes1 hi = bytes1(uint8(b) / 16);\\n bytes1 lo = bytes1(uint8(b) - 16 * uint8(hi));\\n s[2 * i] = char(hi);\\n s[2 * i + 1] = char(lo);\\n }\\n return string(s);\\n }\\n\\n function char(bytes1 b) internal pure returns (bytes1 c) {\\n if (uint8(b) < 10) {\\n return bytes1(uint8(b) + 0x30);\\n } else {\\n return bytes1(uint8(b) + 0x57);\\n }\\n }\\n\\n function uint2str(uint256 _i) internal pure returns (string memory _uint256AsString) {\\n if (_i == 0) {\\n return \\\"0\\\";\\n }\\n uint256 j = _i;\\n uint256 len;\\n while (j != 0) {\\n len++;\\n j /= 10;\\n }\\n bytes memory bstr = new bytes(len);\\n uint256 k = len;\\n while (_i != 0) {\\n k = k - 1;\\n uint8 temp = (48 + uint8(_i - (_i / 10) * 10));\\n bytes1 b1 = bytes1(temp);\\n bstr[k] = b1;\\n _i /= 10;\\n }\\n return string(bstr);\\n }\\n\\n function toString(uint256 value) internal pure returns (string memory) {\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0xbfc8f2c75b679aefa1c0c0ef095665b957ebaeabde39fb15ce17afcdd4110492\",\"license\":\"UNLICENSED\"},\"contracts/struct/BridgeSettings.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nstruct BridgeSettings {\\n uint256 value;\\n uint256 gasLimit;\\n uint256 gasPrice;\\n uint32 toChain;\\n}\\n\",\"keccak256\":\"0x405f453cf620c5e882cf6d915fd7d14c895877408a7fd7e298d6e751bd4a0ce1\",\"license\":\"UNLICENSED\"},\"contracts/struct/DeploymentConfig.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nstruct DeploymentConfig {\\n bytes32 contractType;\\n uint32 chainType;\\n bytes32 salt;\\n bytes byteCode;\\n bytes initCode;\\n}\\n\",\"keccak256\":\"0x5eb9e83676eb65fa424aa9ca79961e1602a749f264ea4f496a9c359dad0da726\",\"license\":\"UNLICENSED\"},\"contracts/struct/Verification.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nstruct Verification {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n}\\n\",\"keccak256\":\"0xd351869472bcb2497e0a771c6e7f7a0b794d099133c67f5f378a8f7839f9db92\",\"license\":\"UNLICENSED\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50612f61806100206000396000f3fe6080604052600436106100d65760003560e01c8063704b6c021161007f578063b7e0366111610059578063b7e036611461028d578063bf64a82d146102bb578063df6516bd146102ce578063f851a440146102ee57600080fd5b8063704b6c021461023a578063a8935c671461025a578063a91ee0dc1461026d57600080fd5b80634ddf47d4116100b05780634ddf47d4146101b25780635ab1bd53146101d25780636e9960c31461020657600080fd5b806308a1eb20146100e557806325d5cac81461013b5780634827ae0c1461015d57600080fd5b366100e057600080fd5b600080fd5b3480156100f157600080fd5b50610105610100366004611690565b610303565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020015b60405180910390f35b34801561014757600080fd5b5061015b610156366004611708565b6103ba565b005b34801561016957600080fd5b507fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a545b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610132565b3480156101be57600080fd5b506101056101cd36600461185a565b610499565b3480156101de57600080fd5b507fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e75461018d565b34801561021257600080fd5b507f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95461018d565b34801561024657600080fd5b5061015b610255366004611708565b610600565b61015b6102683660046119b2565b6106da565b34801561027957600080fd5b5061015b610288366004611708565b6108c1565b34801561029957600080fd5b506102ad6102a8366004611af9565b61099b565b604051610132929190611bd6565b61015b6102c9366004611c11565b6109ef565b3480156102da57600080fd5b5061015b6102e9366004611c31565b610aca565b3480156102fa57600080fd5b5061018d611015565b600080808061031485870187611c31565b6040517fdf6516bd0000000000000000000000000000000000000000000000000000000081529295509093509150309063df6516bd9061035c90869086908690600401611c94565b600060405180830381600087803b15801561037657600080fd5b505af115801561038a573d6000803e3d6000fd5b507f08a1eb20000000000000000000000000000000000000000000000000000000009a9950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610475576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064015b60405180910390fd5b7fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55565b60006104c37f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a015490565b1561052a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a20616c726561647920696e697469616c697a65640000604482015260640161046c565b600080838060200190518101906105419190611d56565b91509150327f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955817fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55807fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7556105d760017f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a0155565b507f4ddf47d4000000000000000000000000000000000000000000000000000000009392505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955565b81156106eb576106eb858585610aca565b600085858560405160200161070293929190611c94565b604051602081830303815290604052905060007fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a54905060008173ffffffffffffffffffffffffffffffffffffffff16630fffbaf36040518163ffffffff1660e01b8152600401602060405180830381865afa158015610786573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107aa9190611d90565b845190915060005b818110156108b5578273ffffffffffffffffffffffffffffffffffffffff1663e55856668783815181106107e8576107e8611dad565b60200260200101516000015188848151811061080657610806611dad565b602002602001015160600151308a868151811061082557610825611dad565b6020026020010151602001518b878151811061084357610843611dad565b6020026020010151604001518b6040518763ffffffff1660e01b8152600401610870959493929190611ddc565b6000604051808303818588803b15801561088957600080fd5b505af115801561089d573d6000803e3d6000fd5b505050505080806108ad90611e5d565b9150506107b2565b50505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610977576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b7fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e755565b6000606063b7e0366160e01b848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250959c929b50919950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aa5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b808260003760008082600034875af13d6000803e808015610ac5573d6000f35b3d6000fd5b7fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a547fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e754845160208087015160408089015160608a015180519085012060808b01518051908601209251969796600096610bb796909594918b910195865260e09490941b7fffffffff0000000000000000000000000000000000000000000000000000000016602086015260248501929092526044840152606483015260601b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016608482015260980190565b604051602081830303815290604052805190602001209050610be88560000151866020015187604001518488611044565b610c4e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f484f4c4f47524150483a20696e76616c6964207369676e617475726500000000604482015260640161046c565b600060405180602001610c6090611621565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820381018352601f90910116604081815282516020808501919091207fff00000000000000000000000000000000000000000000000000000000000000828501527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b166021850152603584018790526055808501919091528251808503909101815260759093019091528151910120909150610d21816113a4565b15610d88576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f484f4c4f47524150483a20616c7265616479206465706c6f7965640000000000604482015260640161046c565b60608801518051849160009183906020830184f59150828551602087016000f560208c8101518d516040805163ffffffff9093169383019390935273ffffffffffffffffffffffffffffffffffffffff8b811693830193909352606082015284821660808201529195507f4ddf47d4000000000000000000000000000000000000000000000000000000009190861690634ddf47d49060a0016040516020818303038152906040528e60800151604051602001610e46929190611e95565b6040516020818303038152906040526040518263ffffffff1660e01b8152600401610e719190611eba565b6020604051808303816000875af1158015610e90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eb49190611ecd565b7fffffffff000000000000000000000000000000000000000000000000000000001614610f3d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f696e697469616c697a6174696f6e206661696c65640000000000000000000000604482015260640161046c565b6040517f725229f60000000000000000000000000000000000000000000000000000000081526004810187905273ffffffffffffffffffffffffffffffffffffffff858116602483015289169063725229f690604401600060405180830381600087803b158015610fad57600080fd5b505af1158015610fc1573d6000803e3d6000fd5b505060405188925073ffffffffffffffffffffffffffffffffffffffff871691507fa802207d4c618b40db3b25b7b90e6f483e16b2c1f8d3610b15b345a718c6b41b90600090a35050505050505050505050565b600061103f7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95490565b905090565b6000601b8460ff1610156110605761105d601b85611f0f565b93505b8360ff16601b1415801561107857508360ff16601c14155b156110855750600061139b565b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0851115611122576110d7857ffffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141611f34565b945060ff8416601b036110ed57601c93506110f2565b601b93505b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08511156111225750600061139b565b73ffffffffffffffffffffffffffffffffffffffff82161580159061139857506040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c810184905273ffffffffffffffffffffffffffffffffffffffff831690600190605c01604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600084529083018083525260ff881690820152606081018990526080810188905260a0016020604051602081039080840390855afa15801561120c573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff161480611305575073ffffffffffffffffffffffffffffffffffffffff821660016112578560206113de565b6040516020016112679190611f4b565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600084529083018083525260ff881690820152606081018990526080810188905260a0016020604051602081039080840390855afa1580156112e3573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff16145b80611398575060408051600081526020810180835285905260ff861691810191909152606081018790526080810186905273ffffffffffffffffffffffffffffffffffffffff83169060019060a0016020604051602081039080840390855afa158015611376573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff16145b90505b95945050505050565b6000813f80158015906113d757507fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708114155b9392505050565b606060006113ed836002611f90565b6113f8906002611fcd565b67ffffffffffffffff81111561141057611410611725565b6040519080825280601f01601f19166020018201604052801561143a576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061147157611471611dad565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106114d4576114d4611dad565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000611510846002611f90565b61151b906001611fcd565b90505b60018111156115b8577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061155c5761155c611dad565b1a60f81b82828151811061157257611572611dad565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c936115b181611fe5565b905061151e565b5083156113d7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161046c565b610f3a8061201b83390190565b803563ffffffff8116811461164257600080fd5b919050565b60008083601f84011261165957600080fd5b50813567ffffffffffffffff81111561167157600080fd5b60208301915083602082850101111561168957600080fd5b9250929050565b6000806000604084860312156116a557600080fd5b6116ae8461162e565b9250602084013567ffffffffffffffff8111156116ca57600080fd5b6116d686828701611647565b9497909650939450505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461170557600080fd5b50565b60006020828403121561171a57600080fd5b81356113d7816116e3565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516080810167ffffffffffffffff8111828210171561177757611777611725565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156117c4576117c4611725565b604052919050565b600082601f8301126117dd57600080fd5b813567ffffffffffffffff8111156117f7576117f7611725565b61182860207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160161177d565b81815284602083860101111561183d57600080fd5b816020850160208301376000918101602001919091529392505050565b60006020828403121561186c57600080fd5b813567ffffffffffffffff81111561188357600080fd5b61188f848285016117cc565b949350505050565b600060a082840312156118a957600080fd5b60405160a0810167ffffffffffffffff82821081831117156118cd576118cd611725565b81604052829350843583526118e46020860161162e565b602084015260408501356040840152606085013591508082111561190757600080fd5b611913868387016117cc565b6060840152608085013591508082111561192c57600080fd5b50611939858286016117cc565b6080830152505092915050565b60006060828403121561195857600080fd5b6040516060810181811067ffffffffffffffff8211171561197b5761197b611725565b80604052508091508235815260208301356020820152604083013560ff811681146119a557600080fd5b6040919091015292915050565b600080600080600060e086880312156119ca57600080fd5b853567ffffffffffffffff808211156119e257600080fd5b6119ee89838a01611897565b965060209150611a0089838a01611946565b9550608080890135611a11816116e3565b955060a08901358015158114611a2657600080fd5b945060c089013582811115611a3a57600080fd5b8901601f81018b13611a4b57600080fd5b803583811115611a5d57611a5d611725565b611a6b858260051b0161177d565b818152858101945060079190911b82018501908c821115611a8b57600080fd5b918501915b81831015611ae65783838e031215611aa85760008081fd5b611ab0611754565b833581528684013587820152604080850135908201526060611ad381860161162e565b9082015285529385019391830191611a90565b8096505050505050509295509295909350565b60008060008060608587031215611b0f57600080fd5b611b188561162e565b93506020850135611b28816116e3565b9250604085013567ffffffffffffffff811115611b4457600080fd5b611b5087828801611647565b95989497509550505050565b60005b83811015611b77578181015183820152602001611b5f565b83811115611b86576000848401525b50505050565b60008151808452611ba4816020860160208601611b5c565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b7fffffffff000000000000000000000000000000000000000000000000000000008316815260406020820152600061188f6040830184611b8c565b600080600060408486031215611c2657600080fd5b83356116ae816116e3565b600080600060a08486031215611c4657600080fd5b833567ffffffffffffffff811115611c5d57600080fd5b611c6986828701611897565b935050611c798560208601611946565b91506080840135611c89816116e3565b809150509250925092565b60a08152835160a082015263ffffffff60208501511660c0820152604084015160e08201526000606085015160a0610100840152611cd6610140840182611b8c565b905060808601517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6084830301610120850152611d128282611b8c565b92505050835160208301526020840151604083015260ff604085015116606083015261188f608083018473ffffffffffffffffffffffffffffffffffffffff169052565b60008060408385031215611d6957600080fd5b8251611d74816116e3565b6020840151909250611d85816116e3565b809150509250929050565b600060208284031215611da257600080fd5b81516113d7816116e3565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b63ffffffff8616815273ffffffffffffffffffffffffffffffffffffffff8516602082015283604082015282606082015260a060808201526000611e2360a0830184611b8c565b979650505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611e8e57611e8e611e2e565b5060010190565b604081526000611ea86040830185611b8c565b828103602084015261139b8185611b8c565b6020815260006113d76020830184611b8c565b600060208284031215611edf57600080fd5b81517fffffffff00000000000000000000000000000000000000000000000000000000811681146113d757600080fd5b600060ff821660ff84168060ff03821115611f2c57611f2c611e2e565b019392505050565b600082821015611f4657611f46611e2e565b500390565b7f19457468657265756d205369676e6564204d6573736167653a0a363600000000815260008251611f8381601c850160208701611b5c565b91909101601c0192915050565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611fc857611fc8611e2e565b500290565b60008219821115611fe057611fe0611e2e565b500190565b600081611ff457611ff4611e2e565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019056fe608060405234801561001057600080fd5b50610f1a806100206000396000f3fe6080604052600436106100c05760003560e01c806380d1cb3511610074578063c51a29e01161004e578063c51a29e0146102c1578063c8a4c3d5146102f5578063f851a4401461030a576100c7565b806380d1cb351461022c578063913a0ef21461026a578063bf64a82d146102ae576100c7565b80636e9960c3116100a55780636e9960c3146101a45780636faf275b146101d8578063704b6c021461020c576100c7565b80634827ae0c146100f95780634ddf47d414610153576100c7565b366100c757005b60006100d161031f565b90503660008037600080366000845af43d6000803e8080156100f2573d6000f35b3d6000fd5b005b34801561010557600080fd5b507fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a545b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b34801561015f57600080fd5b5061017361016e366004610bb4565b61045d565b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200161014a565b3480156101b057600080fd5b507f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c954610129565b3480156101e457600080fd5b507f27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b07454610129565b34801561021857600080fd5b506100f7610227366004610c59565b610911565b34801561023857600080fd5b507f9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de3545b60405190815260200161014a565b34801561027657600080fd5b507fd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d5460405163ffffffff909116815260200161014a565b6100f76102bc366004610c7d565b6109eb565b3480156102cd57600080fd5b507f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c75461025c565b34801561030157600080fd5b5061012961031f565b34801561031657600080fd5b50610129610ac1565b60008060007fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a5491507f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c75490508173ffffffffffffffffffffffffffffffffffffffff16635ab1bd536040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103db9190610d02565b73ffffffffffffffffffffffffffffffffffffffff166374b7510c826040518263ffffffff1660e01b815260040161041591815260200190565b602060405180830381865afa158015610432573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104569190610d02565b9250505090565b60006104877f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a015490565b156104f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f484f4c4f475241504845523a20616c726561647920696e697469616c697a656460448201526064015b60405180910390fd5b6000808380602001905181019061050a9190610d9c565b91509150600080600080858060200190518101906105289190610e00565b9350935093509350337f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955437f9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de355817f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c755827fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55837fd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d55807f27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b074556000808473ffffffffffffffffffffffffffffffffffffffff16635ab1bd536040518163ffffffff1660e01b8152600401602060405180830381865afa158015610650573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106749190610d02565b73ffffffffffffffffffffffffffffffffffffffff166374b7510c856040518263ffffffff1660e01b81526004016106ae91815260200190565b602060405180830381865afa1580156106cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ef9190610d02565b73ffffffffffffffffffffffffffffffffffffffff16634ddf47d460e01b8860405160240161071e9190610e5e565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009094169390931790925290516107a79190610eaf565b600060405180830381855af49150503d80600081146107e2576040519150601f19603f3d011682016040523d82523d6000602084013e6107e7565b606091505b50915091506000818060200190518101906108029190610ecb565b905082801561085257507fffffffff0000000000000000000000000000000000000000000000000000000081167f4ddf47d400000000000000000000000000000000000000000000000000000000145b6108b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f484f4c4f47524150483a20696e697469616c697a6174696f6e206661696c656460448201526064016104ea565b6108e160017f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a0155565b507f4ddf47d4000000000000000000000000000000000000000000000000000000009a9950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016104ea565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aa1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016104ea565b808260003760008082600034875af13d6000803e8080156100f2573d6000f35b6000610aeb7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95490565b905090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715610b6657610b66610af0565b604052919050565b600067ffffffffffffffff821115610b8857610b88610af0565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600060208284031215610bc657600080fd5b813567ffffffffffffffff811115610bdd57600080fd5b8201601f81018413610bee57600080fd5b8035610c01610bfc82610b6e565b610b1f565b818152856020838501011115610c1657600080fd5b81602084016020830137600091810160200191909152949350505050565b73ffffffffffffffffffffffffffffffffffffffff81168114610c5657600080fd5b50565b600060208284031215610c6b57600080fd5b8135610c7681610c34565b9392505050565b600080600060408486031215610c9257600080fd5b8335610c9d81610c34565b9250602084013567ffffffffffffffff80821115610cba57600080fd5b818601915086601f830112610cce57600080fd5b813581811115610cdd57600080fd5b876020828501011115610cef57600080fd5b6020830194508093505050509250925092565b600060208284031215610d1457600080fd5b8151610c7681610c34565b60005b83811015610d3a578181015183820152602001610d22565b83811115610d49576000848401525b50505050565b600082601f830112610d6057600080fd5b8151610d6e610bfc82610b6e565b818152846020838601011115610d8357600080fd5b610d94826020830160208701610d1f565b949350505050565b60008060408385031215610daf57600080fd5b825167ffffffffffffffff80821115610dc757600080fd5b610dd386838701610d4f565b93506020850151915080821115610de957600080fd5b50610df685828601610d4f565b9150509250929050565b60008060008060808587031215610e1657600080fd5b845163ffffffff81168114610e2a57600080fd5b6020860151909450610e3b81610c34565b604086015160608701519194509250610e5381610c34565b939692955090935050565b6020815260008251806020840152610e7d816040850160208701610d1f565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60008251610ec1818460208701610d1f565b9190910192915050565b600060208284031215610edd57600080fd5b81517fffffffff0000000000000000000000000000000000000000000000000000000081168114610c7657600080fdfea164736f6c634300080d000aa164736f6c634300080d000a", + "deployedBytecode": "0x6080604052600436106100d65760003560e01c8063704b6c021161007f578063b7e0366111610059578063b7e036611461028d578063bf64a82d146102bb578063df6516bd146102ce578063f851a440146102ee57600080fd5b8063704b6c021461023a578063a8935c671461025a578063a91ee0dc1461026d57600080fd5b80634ddf47d4116100b05780634ddf47d4146101b25780635ab1bd53146101d25780636e9960c31461020657600080fd5b806308a1eb20146100e557806325d5cac81461013b5780634827ae0c1461015d57600080fd5b366100e057600080fd5b600080fd5b3480156100f157600080fd5b50610105610100366004611690565b610303565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020015b60405180910390f35b34801561014757600080fd5b5061015b610156366004611708565b6103ba565b005b34801561016957600080fd5b507fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a545b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610132565b3480156101be57600080fd5b506101056101cd36600461185a565b610499565b3480156101de57600080fd5b507fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e75461018d565b34801561021257600080fd5b507f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95461018d565b34801561024657600080fd5b5061015b610255366004611708565b610600565b61015b6102683660046119b2565b6106da565b34801561027957600080fd5b5061015b610288366004611708565b6108c1565b34801561029957600080fd5b506102ad6102a8366004611af9565b61099b565b604051610132929190611bd6565b61015b6102c9366004611c11565b6109ef565b3480156102da57600080fd5b5061015b6102e9366004611c31565b610aca565b3480156102fa57600080fd5b5061018d611015565b600080808061031485870187611c31565b6040517fdf6516bd0000000000000000000000000000000000000000000000000000000081529295509093509150309063df6516bd9061035c90869086908690600401611c94565b600060405180830381600087803b15801561037657600080fd5b505af115801561038a573d6000803e3d6000fd5b507f08a1eb20000000000000000000000000000000000000000000000000000000009a9950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610475576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064015b60405180910390fd5b7fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55565b60006104c37f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a015490565b1561052a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a20616c726561647920696e697469616c697a65640000604482015260640161046c565b600080838060200190518101906105419190611d56565b91509150327f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955817fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55807fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7556105d760017f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a0155565b507f4ddf47d4000000000000000000000000000000000000000000000000000000009392505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955565b81156106eb576106eb858585610aca565b600085858560405160200161070293929190611c94565b604051602081830303815290604052905060007fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a54905060008173ffffffffffffffffffffffffffffffffffffffff16630fffbaf36040518163ffffffff1660e01b8152600401602060405180830381865afa158015610786573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107aa9190611d90565b845190915060005b818110156108b5578273ffffffffffffffffffffffffffffffffffffffff1663e55856668783815181106107e8576107e8611dad565b60200260200101516000015188848151811061080657610806611dad565b602002602001015160600151308a868151811061082557610825611dad565b6020026020010151602001518b878151811061084357610843611dad565b6020026020010151604001518b6040518763ffffffff1660e01b8152600401610870959493929190611ddc565b6000604051808303818588803b15801561088957600080fd5b505af115801561089d573d6000803e3d6000fd5b505050505080806108ad90611e5d565b9150506107b2565b50505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610977576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b7fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e755565b6000606063b7e0366160e01b848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250959c929b50919950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aa5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b808260003760008082600034875af13d6000803e808015610ac5573d6000f35b3d6000fd5b7fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a547fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e754845160208087015160408089015160608a015180519085012060808b01518051908601209251969796600096610bb796909594918b910195865260e09490941b7fffffffff0000000000000000000000000000000000000000000000000000000016602086015260248501929092526044840152606483015260601b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016608482015260980190565b604051602081830303815290604052805190602001209050610be88560000151866020015187604001518488611044565b610c4e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f484f4c4f47524150483a20696e76616c6964207369676e617475726500000000604482015260640161046c565b600060405180602001610c6090611621565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820381018352601f90910116604081815282516020808501919091207fff00000000000000000000000000000000000000000000000000000000000000828501527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b166021850152603584018790526055808501919091528251808503909101815260759093019091528151910120909150610d21816113a4565b15610d88576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f484f4c4f47524150483a20616c7265616479206465706c6f7965640000000000604482015260640161046c565b60608801518051849160009183906020830184f59150828551602087016000f560208c8101518d516040805163ffffffff9093169383019390935273ffffffffffffffffffffffffffffffffffffffff8b811693830193909352606082015284821660808201529195507f4ddf47d4000000000000000000000000000000000000000000000000000000009190861690634ddf47d49060a0016040516020818303038152906040528e60800151604051602001610e46929190611e95565b6040516020818303038152906040526040518263ffffffff1660e01b8152600401610e719190611eba565b6020604051808303816000875af1158015610e90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eb49190611ecd565b7fffffffff000000000000000000000000000000000000000000000000000000001614610f3d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f696e697469616c697a6174696f6e206661696c65640000000000000000000000604482015260640161046c565b6040517f725229f60000000000000000000000000000000000000000000000000000000081526004810187905273ffffffffffffffffffffffffffffffffffffffff858116602483015289169063725229f690604401600060405180830381600087803b158015610fad57600080fd5b505af1158015610fc1573d6000803e3d6000fd5b505060405188925073ffffffffffffffffffffffffffffffffffffffff871691507fa802207d4c618b40db3b25b7b90e6f483e16b2c1f8d3610b15b345a718c6b41b90600090a35050505050505050505050565b600061103f7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95490565b905090565b6000601b8460ff1610156110605761105d601b85611f0f565b93505b8360ff16601b1415801561107857508360ff16601c14155b156110855750600061139b565b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0851115611122576110d7857ffffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141611f34565b945060ff8416601b036110ed57601c93506110f2565b601b93505b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08511156111225750600061139b565b73ffffffffffffffffffffffffffffffffffffffff82161580159061139857506040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c810184905273ffffffffffffffffffffffffffffffffffffffff831690600190605c01604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600084529083018083525260ff881690820152606081018990526080810188905260a0016020604051602081039080840390855afa15801561120c573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff161480611305575073ffffffffffffffffffffffffffffffffffffffff821660016112578560206113de565b6040516020016112679190611f4b565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600084529083018083525260ff881690820152606081018990526080810188905260a0016020604051602081039080840390855afa1580156112e3573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff16145b80611398575060408051600081526020810180835285905260ff861691810191909152606081018790526080810186905273ffffffffffffffffffffffffffffffffffffffff83169060019060a0016020604051602081039080840390855afa158015611376573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff16145b90505b95945050505050565b6000813f80158015906113d757507fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708114155b9392505050565b606060006113ed836002611f90565b6113f8906002611fcd565b67ffffffffffffffff81111561141057611410611725565b6040519080825280601f01601f19166020018201604052801561143a576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061147157611471611dad565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106114d4576114d4611dad565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000611510846002611f90565b61151b906001611fcd565b90505b60018111156115b8577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061155c5761155c611dad565b1a60f81b82828151811061157257611572611dad565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c936115b181611fe5565b905061151e565b5083156113d7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161046c565b610f3a8061201b83390190565b803563ffffffff8116811461164257600080fd5b919050565b60008083601f84011261165957600080fd5b50813567ffffffffffffffff81111561167157600080fd5b60208301915083602082850101111561168957600080fd5b9250929050565b6000806000604084860312156116a557600080fd5b6116ae8461162e565b9250602084013567ffffffffffffffff8111156116ca57600080fd5b6116d686828701611647565b9497909650939450505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461170557600080fd5b50565b60006020828403121561171a57600080fd5b81356113d7816116e3565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516080810167ffffffffffffffff8111828210171561177757611777611725565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156117c4576117c4611725565b604052919050565b600082601f8301126117dd57600080fd5b813567ffffffffffffffff8111156117f7576117f7611725565b61182860207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160161177d565b81815284602083860101111561183d57600080fd5b816020850160208301376000918101602001919091529392505050565b60006020828403121561186c57600080fd5b813567ffffffffffffffff81111561188357600080fd5b61188f848285016117cc565b949350505050565b600060a082840312156118a957600080fd5b60405160a0810167ffffffffffffffff82821081831117156118cd576118cd611725565b81604052829350843583526118e46020860161162e565b602084015260408501356040840152606085013591508082111561190757600080fd5b611913868387016117cc565b6060840152608085013591508082111561192c57600080fd5b50611939858286016117cc565b6080830152505092915050565b60006060828403121561195857600080fd5b6040516060810181811067ffffffffffffffff8211171561197b5761197b611725565b80604052508091508235815260208301356020820152604083013560ff811681146119a557600080fd5b6040919091015292915050565b600080600080600060e086880312156119ca57600080fd5b853567ffffffffffffffff808211156119e257600080fd5b6119ee89838a01611897565b965060209150611a0089838a01611946565b9550608080890135611a11816116e3565b955060a08901358015158114611a2657600080fd5b945060c089013582811115611a3a57600080fd5b8901601f81018b13611a4b57600080fd5b803583811115611a5d57611a5d611725565b611a6b858260051b0161177d565b818152858101945060079190911b82018501908c821115611a8b57600080fd5b918501915b81831015611ae65783838e031215611aa85760008081fd5b611ab0611754565b833581528684013587820152604080850135908201526060611ad381860161162e565b9082015285529385019391830191611a90565b8096505050505050509295509295909350565b60008060008060608587031215611b0f57600080fd5b611b188561162e565b93506020850135611b28816116e3565b9250604085013567ffffffffffffffff811115611b4457600080fd5b611b5087828801611647565b95989497509550505050565b60005b83811015611b77578181015183820152602001611b5f565b83811115611b86576000848401525b50505050565b60008151808452611ba4816020860160208601611b5c565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b7fffffffff000000000000000000000000000000000000000000000000000000008316815260406020820152600061188f6040830184611b8c565b600080600060408486031215611c2657600080fd5b83356116ae816116e3565b600080600060a08486031215611c4657600080fd5b833567ffffffffffffffff811115611c5d57600080fd5b611c6986828701611897565b935050611c798560208601611946565b91506080840135611c89816116e3565b809150509250925092565b60a08152835160a082015263ffffffff60208501511660c0820152604084015160e08201526000606085015160a0610100840152611cd6610140840182611b8c565b905060808601517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6084830301610120850152611d128282611b8c565b92505050835160208301526020840151604083015260ff604085015116606083015261188f608083018473ffffffffffffffffffffffffffffffffffffffff169052565b60008060408385031215611d6957600080fd5b8251611d74816116e3565b6020840151909250611d85816116e3565b809150509250929050565b600060208284031215611da257600080fd5b81516113d7816116e3565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b63ffffffff8616815273ffffffffffffffffffffffffffffffffffffffff8516602082015283604082015282606082015260a060808201526000611e2360a0830184611b8c565b979650505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611e8e57611e8e611e2e565b5060010190565b604081526000611ea86040830185611b8c565b828103602084015261139b8185611b8c565b6020815260006113d76020830184611b8c565b600060208284031215611edf57600080fd5b81517fffffffff00000000000000000000000000000000000000000000000000000000811681146113d757600080fd5b600060ff821660ff84168060ff03821115611f2c57611f2c611e2e565b019392505050565b600082821015611f4657611f46611e2e565b500390565b7f19457468657265756d205369676e6564204d6573736167653a0a363600000000815260008251611f8381601c850160208701611b5c565b91909101601c0192915050565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611fc857611fc8611e2e565b500290565b60008219821115611fe057611fe0611e2e565b500190565b600081611ff457611ff4611e2e565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019056fe608060405234801561001057600080fd5b50610f1a806100206000396000f3fe6080604052600436106100c05760003560e01c806380d1cb3511610074578063c51a29e01161004e578063c51a29e0146102c1578063c8a4c3d5146102f5578063f851a4401461030a576100c7565b806380d1cb351461022c578063913a0ef21461026a578063bf64a82d146102ae576100c7565b80636e9960c3116100a55780636e9960c3146101a45780636faf275b146101d8578063704b6c021461020c576100c7565b80634827ae0c146100f95780634ddf47d414610153576100c7565b366100c757005b60006100d161031f565b90503660008037600080366000845af43d6000803e8080156100f2573d6000f35b3d6000fd5b005b34801561010557600080fd5b507fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a545b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b34801561015f57600080fd5b5061017361016e366004610bb4565b61045d565b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200161014a565b3480156101b057600080fd5b507f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c954610129565b3480156101e457600080fd5b507f27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b07454610129565b34801561021857600080fd5b506100f7610227366004610c59565b610911565b34801561023857600080fd5b507f9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de3545b60405190815260200161014a565b34801561027657600080fd5b507fd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d5460405163ffffffff909116815260200161014a565b6100f76102bc366004610c7d565b6109eb565b3480156102cd57600080fd5b507f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c75461025c565b34801561030157600080fd5b5061012961031f565b34801561031657600080fd5b50610129610ac1565b60008060007fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a5491507f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c75490508173ffffffffffffffffffffffffffffffffffffffff16635ab1bd536040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103db9190610d02565b73ffffffffffffffffffffffffffffffffffffffff166374b7510c826040518263ffffffff1660e01b815260040161041591815260200190565b602060405180830381865afa158015610432573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104569190610d02565b9250505090565b60006104877f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a015490565b156104f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f484f4c4f475241504845523a20616c726561647920696e697469616c697a656460448201526064015b60405180910390fd5b6000808380602001905181019061050a9190610d9c565b91509150600080600080858060200190518101906105289190610e00565b9350935093509350337f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955437f9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de355817f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c755827fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55837fd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d55807f27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b074556000808473ffffffffffffffffffffffffffffffffffffffff16635ab1bd536040518163ffffffff1660e01b8152600401602060405180830381865afa158015610650573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106749190610d02565b73ffffffffffffffffffffffffffffffffffffffff166374b7510c856040518263ffffffff1660e01b81526004016106ae91815260200190565b602060405180830381865afa1580156106cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ef9190610d02565b73ffffffffffffffffffffffffffffffffffffffff16634ddf47d460e01b8860405160240161071e9190610e5e565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009094169390931790925290516107a79190610eaf565b600060405180830381855af49150503d80600081146107e2576040519150601f19603f3d011682016040523d82523d6000602084013e6107e7565b606091505b50915091506000818060200190518101906108029190610ecb565b905082801561085257507fffffffff0000000000000000000000000000000000000000000000000000000081167f4ddf47d400000000000000000000000000000000000000000000000000000000145b6108b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f484f4c4f47524150483a20696e697469616c697a6174696f6e206661696c656460448201526064016104ea565b6108e160017f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a0155565b507f4ddf47d4000000000000000000000000000000000000000000000000000000009a9950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016104ea565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aa1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016104ea565b808260003760008082600034875af13d6000803e8080156100f2573d6000f35b6000610aeb7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95490565b905090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715610b6657610b66610af0565b604052919050565b600067ffffffffffffffff821115610b8857610b88610af0565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600060208284031215610bc657600080fd5b813567ffffffffffffffff811115610bdd57600080fd5b8201601f81018413610bee57600080fd5b8035610c01610bfc82610b6e565b610b1f565b818152856020838501011115610c1657600080fd5b81602084016020830137600091810160200191909152949350505050565b73ffffffffffffffffffffffffffffffffffffffff81168114610c5657600080fd5b50565b600060208284031215610c6b57600080fd5b8135610c7681610c34565b9392505050565b600080600060408486031215610c9257600080fd5b8335610c9d81610c34565b9250602084013567ffffffffffffffff80821115610cba57600080fd5b818601915086601f830112610cce57600080fd5b813581811115610cdd57600080fd5b876020828501011115610cef57600080fd5b6020830194508093505050509250925092565b600060208284031215610d1457600080fd5b8151610c7681610c34565b60005b83811015610d3a578181015183820152602001610d22565b83811115610d49576000848401525b50505050565b600082601f830112610d6057600080fd5b8151610d6e610bfc82610b6e565b818152846020838601011115610d8357600080fd5b610d94826020830160208701610d1f565b949350505050565b60008060408385031215610daf57600080fd5b825167ffffffffffffffff80821115610dc757600080fd5b610dd386838701610d4f565b93506020850151915080821115610de957600080fd5b50610df685828601610d4f565b9150509250929050565b60008060008060808587031215610e1657600080fd5b845163ffffffff81168114610e2a57600080fd5b6020860151909450610e3b81610c34565b604086015160608701519194509250610e5381610c34565b939692955090935050565b6020815260008251806020840152610e7d816040850160208701610d1f565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60008251610ec1818460208701610d1f565b9190910192915050565b600060208284031215610edd57600080fd5b81517fffffffff0000000000000000000000000000000000000000000000000000000081168114610c7657600080fdfea164736f6c634300080d000aa164736f6c634300080d000a", "devdoc": { "author": "https://github.com/holographxyz", "details": "The contract provides methods that allow for the creation of Holograph Protocol compliant smart contracts, that are capable of minting holographable assets", diff --git a/deployments/develop/optimismTestnetGoerli/solcInputs/c71d96e115e745dd34ef9239c385494d.json b/deployments/develop/optimismTestnetGoerli/solcInputs/c71d96e115e745dd34ef9239c385494d.json new file mode 100644 index 000000000..2f9c65ed5 --- /dev/null +++ b/deployments/develop/optimismTestnetGoerli/solcInputs/c71d96e115e745dd34ef9239c385494d.json @@ -0,0 +1,465 @@ +{ + "language": "Solidity", + "sources": { + "contracts/abstract/Admin.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nabstract contract Admin {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.admin')) - 1)\n */\n bytes32 constant _adminSlot = 0x3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c9;\n\n modifier onlyAdmin() {\n require(msg.sender == getAdmin(), \"HOLOGRAPH: admin only function\");\n _;\n }\n\n constructor() {}\n\n function admin() public view returns (address) {\n return getAdmin();\n }\n\n function getAdmin() public view returns (address adminAddress) {\n assembly {\n adminAddress := sload(_adminSlot)\n }\n }\n\n function setAdmin(address adminAddress) public onlyAdmin {\n assembly {\n sstore(_adminSlot, adminAddress)\n }\n }\n\n function adminCall(address target, bytes calldata data) external payable onlyAdmin {\n assembly {\n calldatacopy(0, data.offset, data.length)\n let result := call(gas(), target, callvalue(), 0, data.length, 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/abstract/EIP712.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/cryptography/draft-EIP712.sol)\n\npragma solidity 0.8.13;\n\nimport \"../library/ECDSA.sol\";\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\n *\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\n *\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\n * ({_hashTypedDataV4}).\n *\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\n * the chain id to protect against replay attacks on an eventual fork of the chain.\n *\n * NOTE: This contract implements the version of the encoding known as \"v4\", as implemented by the JSON RPC method\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\n *\n * _Available since v3.4._\n */\nabstract contract EIP712 {\n /* solhint-disable var-name-mixedcase */\n // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to\n // invalidate the cached domain separator if the chain id changes.\n // WE CANNOT USE immutable VALUES SINCE IT BREAKS OUT CREATE2 COMPUTATIONS ON DEPLOYER SCRIPTS\n // AFTER MAKING NECESARRY CHANGES, WE CAN ADD IT BACK IN\n bytes32 private _CACHED_DOMAIN_SEPARATOR;\n uint256 private _CACHED_CHAIN_ID;\n address private _CACHED_THIS;\n\n bytes32 private _HASHED_NAME;\n bytes32 private _HASHED_VERSION;\n bytes32 private _TYPE_HASH;\n\n /* solhint-enable var-name-mixedcase */\n\n /**\n * @dev Initializes the domain separator and parameter caches.\n *\n * The meaning of `name` and `version` is specified in\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\n *\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\n * - `version`: the current major version of the signing domain.\n *\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\n * contract upgrade].\n */\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n function _eip712_init(string memory name, string memory version) internal {\n bytes32 hashedName = keccak256(bytes(name));\n bytes32 hashedVersion = keccak256(bytes(version));\n bytes32 typeHash = keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\");\n _HASHED_NAME = hashedName;\n _HASHED_VERSION = hashedVersion;\n _CACHED_CHAIN_ID = block.chainid;\n _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion);\n _CACHED_THIS = address(this);\n _TYPE_HASH = typeHash;\n }\n\n /**\n * @dev Returns the domain separator for the current chain.\n */\n function _domainSeparatorV4() internal view returns (bytes32) {\n if (address(this) == _CACHED_THIS && block.chainid == _CACHED_CHAIN_ID) {\n return _CACHED_DOMAIN_SEPARATOR;\n } else {\n return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION);\n }\n }\n\n function _buildDomainSeparator(\n bytes32 typeHash,\n bytes32 nameHash,\n bytes32 versionHash\n ) private view returns (bytes32) {\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\n }\n\n /**\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\n * function returns the hash of the fully encoded EIP712 message for this domain.\n *\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\n *\n * ```solidity\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\n * keccak256(\"Mail(address to,string contents)\"),\n * mailTo,\n * keccak256(bytes(mailContents))\n * )));\n * address signer = ECDSA.recover(digest, signature);\n * ```\n */\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\n return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);\n }\n}\n" + }, + "contracts/abstract/ERC1155H.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Initializable.sol\";\n\nabstract contract ERC1155H is Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holographer')) - 1)\n */\n bytes32 constant _holographerSlot = 0xe9fcff60011c1a99f7b7244d1f2d9da93d79ea8ef3654ce590d775575255b2bd;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.owner')) - 1)\n */\n bytes32 constant _ownerSlot = 0xb56711ba6bd3ded7639fc335ee7524fe668a79d7558c85992e3f8494cf772777;\n\n modifier onlyHolographer() {\n require(msg.sender == holographer(), \"ERC1155: holographer only\");\n _;\n }\n\n modifier onlyOwner() {\n require(msgSender() == _getOwner(), \"ERC1155: owner only function\");\n _;\n }\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external virtual override returns (bytes4) {\n return _init(initPayload);\n }\n\n function _init(bytes memory /* initPayload*/) internal returns (bytes4) {\n require(!_isInitialized(), \"ERC1155: already initialized\");\n address _holographer = msg.sender;\n address currentOwner;\n assembly {\n sstore(_holographerSlot, _holographer)\n currentOwner := sload(_ownerSlot)\n }\n require(currentOwner != address(0), \"HOLOGRAPH: owner not set\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @dev The Holographer passes original msg.sender via calldata. This function extracts it.\n */\n function msgSender() internal view returns (address sender) {\n assembly {\n switch eq(caller(), sload(_holographerSlot))\n case 0 {\n sender := caller()\n }\n default {\n sender := calldataload(sub(calldatasize(), 0x20))\n }\n }\n }\n\n /**\n * @dev Address of Holograph ERC1155 standards enforcer smart contract.\n */\n function holographer() internal view returns (address _holographer) {\n assembly {\n _holographer := sload(_holographerSlot)\n }\n }\n\n function supportsInterface(bytes4) external pure virtual returns (bool) {\n return false;\n }\n\n /**\n * @dev Address of initial creator/owner of the collection.\n */\n function owner() external view virtual returns (address) {\n return _getOwner();\n }\n\n function isOwner() external view returns (bool) {\n return (msgSender() == _getOwner());\n }\n\n function isOwner(address wallet) external view returns (bool) {\n return wallet == _getOwner();\n }\n\n function _getOwner() internal view returns (address ownerAddress) {\n assembly {\n ownerAddress := sload(_ownerSlot)\n }\n }\n\n function _setOwner(address ownerAddress) internal {\n assembly {\n sstore(_ownerSlot, ownerAddress)\n }\n }\n\n function withdraw() external virtual onlyOwner {\n payable(_getOwner()).transfer(address(this).balance);\n }\n\n event FundsReceived(address indexed source, uint256 amount);\n\n /**\n * @dev This function emits an event to indicate native gas token receipt. Do not rely on this to work.\n * Please use custom payable functions for accepting native value.\n */\n receive() external payable virtual {\n emit FundsReceived(msgSender(), msg.value);\n }\n\n /**\n * @dev Return true for any un-implemented event hooks\n */\n fallback() external payable virtual {\n assembly {\n switch eq(sload(_holographerSlot), caller())\n case 1 {\n mstore(0x80, 0x0000000000000000000000000000000000000000000000000000000000000001)\n return(0x80, 0x20)\n }\n default {\n revert(0x00, 0x00)\n }\n }\n }\n}\n" + }, + "contracts/abstract/ERC20H.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Initializable.sol\";\n\nabstract contract ERC20H is Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holographer')) - 1)\n */\n bytes32 constant _holographerSlot = 0xe9fcff60011c1a99f7b7244d1f2d9da93d79ea8ef3654ce590d775575255b2bd;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.owner')) - 1)\n */\n bytes32 constant _ownerSlot = 0xb56711ba6bd3ded7639fc335ee7524fe668a79d7558c85992e3f8494cf772777;\n\n modifier onlyHolographer() {\n require(msg.sender == holographer(), \"ERC20: holographer only\");\n _;\n }\n\n modifier onlyOwner() {\n require(msgSender() == _getOwner(), \"ERC20: owner only function\");\n _;\n }\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external virtual override returns (bytes4) {\n return _init(initPayload);\n }\n\n function _init(bytes memory /* initPayload*/) internal returns (bytes4) {\n require(!_isInitialized(), \"ERC20: already initialized\");\n address _holographer = msg.sender;\n address currentOwner;\n assembly {\n sstore(_holographerSlot, _holographer)\n currentOwner := sload(_ownerSlot)\n }\n require(currentOwner != address(0), \"HOLOGRAPH: owner not set\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @dev The Holographer passes original msg.sender via calldata. This function extracts it.\n */\n function msgSender() internal view returns (address sender) {\n assembly {\n switch eq(caller(), sload(_holographerSlot))\n case 0 {\n sender := caller()\n }\n default {\n sender := calldataload(sub(calldatasize(), 0x20))\n }\n }\n }\n\n /**\n * @dev Address of Holograph ERC20 standards enforcer smart contract.\n */\n function holographer() internal view returns (address _holographer) {\n assembly {\n _holographer := sload(_holographerSlot)\n }\n }\n\n function supportsInterface(bytes4) external pure virtual returns (bool) {\n return false;\n }\n\n /**\n * @dev Address of initial creator/owner of the token contract.\n */\n function owner() external view virtual returns (address) {\n return _getOwner();\n }\n\n function isOwner() external view returns (bool) {\n return (msgSender() == _getOwner());\n }\n\n function isOwner(address wallet) external view returns (bool) {\n return wallet == _getOwner();\n }\n\n function _getOwner() internal view returns (address ownerAddress) {\n assembly {\n ownerAddress := sload(_ownerSlot)\n }\n }\n\n function _setOwner(address ownerAddress) internal {\n assembly {\n sstore(_ownerSlot, ownerAddress)\n }\n }\n\n function withdraw() external virtual onlyOwner {\n payable(_getOwner()).transfer(address(this).balance);\n }\n\n event FundsReceived(address indexed source, uint256 amount);\n\n /**\n * @dev This function emits an event to indicate native gas token receipt. Do not rely on this to work.\n * Please use custom payable functions for accepting native value.\n */\n receive() external payable virtual {\n emit FundsReceived(msgSender(), msg.value);\n }\n\n /**\n * @dev Return true for any un-implemented event hooks\n */\n fallback() external payable virtual {\n assembly {\n switch eq(sload(_holographerSlot), caller())\n case 1 {\n mstore(0x80, 0x0000000000000000000000000000000000000000000000000000000000000001)\n return(0x80, 0x20)\n }\n default {\n revert(0x00, 0x00)\n }\n }\n }\n}\n" + }, + "contracts/abstract/ERC721H.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Initializable.sol\";\n\nabstract contract ERC721H is Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holographer')) - 1)\n */\n bytes32 constant _holographerSlot = 0xe9fcff60011c1a99f7b7244d1f2d9da93d79ea8ef3654ce590d775575255b2bd;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.owner')) - 1)\n */\n bytes32 constant _ownerSlot = 0xb56711ba6bd3ded7639fc335ee7524fe668a79d7558c85992e3f8494cf772777;\n\n modifier onlyHolographer() {\n require(msg.sender == holographer(), \"ERC721: holographer only\");\n _;\n }\n\n modifier onlyOwner() {\n require(msgSender() == _getOwner(), \"ERC721: owner only function\");\n _;\n }\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external virtual override returns (bytes4) {\n return _init(initPayload);\n }\n\n function _init(bytes memory /* initPayload*/) internal returns (bytes4) {\n require(!_isInitialized(), \"ERC721: already initialized\");\n address _holographer = msg.sender;\n address currentOwner;\n assembly {\n sstore(_holographerSlot, _holographer)\n currentOwner := sload(_ownerSlot)\n }\n require(currentOwner != address(0), \"HOLOGRAPH: owner not set\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @dev The Holographer passes original msg.sender via calldata. This function extracts it.\n */\n function msgSender() internal view returns (address sender) {\n assembly {\n switch eq(caller(), sload(_holographerSlot))\n case 0 {\n sender := caller()\n }\n default {\n sender := calldataload(sub(calldatasize(), 0x20))\n }\n }\n }\n\n /**\n * @dev Address of Holograph ERC721 standards enforcer smart contract.\n */\n function holographer() internal view returns (address _holographer) {\n assembly {\n _holographer := sload(_holographerSlot)\n }\n }\n\n function supportsInterface(bytes4) external pure virtual returns (bool) {\n return false;\n }\n\n /**\n * @dev Address of initial creator/owner of the collection.\n */\n function owner() external view virtual returns (address) {\n return _getOwner();\n }\n\n function isOwner() external view returns (bool) {\n return (msgSender() == _getOwner());\n }\n\n function isOwner(address wallet) external view returns (bool) {\n return wallet == _getOwner();\n }\n\n function _getOwner() internal view returns (address ownerAddress) {\n assembly {\n ownerAddress := sload(_ownerSlot)\n }\n }\n\n function _setOwner(address ownerAddress) internal {\n assembly {\n sstore(_ownerSlot, ownerAddress)\n }\n }\n\n function withdraw() external virtual onlyOwner {\n payable(_getOwner()).transfer(address(this).balance);\n }\n\n event FundsReceived(address indexed source, uint256 amount);\n\n /**\n * @dev This function emits an event to indicate native gas token receipt. Do not rely on this to work.\n * Please use custom payable functions for accepting native value.\n */\n receive() external payable virtual {\n emit FundsReceived(msgSender(), msg.value);\n }\n\n /**\n * @dev Return true for any un-implemented event hooks\n */\n fallback() external payable virtual {\n assembly {\n switch eq(sload(_holographerSlot), caller())\n case 1 {\n mstore(0x80, 0x0000000000000000000000000000000000000000000000000000000000000001)\n return(0x80, 0x20)\n }\n default {\n revert(0x00, 0x00)\n }\n }\n }\n}\n" + }, + "contracts/abstract/GenericH.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Initializable.sol\";\n\nabstract contract GenericH is Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holographer')) - 1)\n */\n bytes32 constant _holographerSlot = 0xe9fcff60011c1a99f7b7244d1f2d9da93d79ea8ef3654ce590d775575255b2bd;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.owner')) - 1)\n */\n bytes32 constant _ownerSlot = 0xb56711ba6bd3ded7639fc335ee7524fe668a79d7558c85992e3f8494cf772777;\n\n modifier onlyHolographer() {\n require(msg.sender == holographer(), \"GENERIC: holographer only\");\n _;\n }\n\n modifier onlyOwner() {\n require(msgSender() == _getOwner(), \"GENERIC: owner only function\");\n _;\n }\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external virtual override returns (bytes4) {\n return _init(initPayload);\n }\n\n function _init(bytes memory /* initPayload*/) internal returns (bytes4) {\n require(!_isInitialized(), \"GENERIC: already initialized\");\n address _holographer = msg.sender;\n address currentOwner;\n assembly {\n sstore(_holographerSlot, _holographer)\n currentOwner := sload(_ownerSlot)\n }\n require(currentOwner != address(0), \"HOLOGRAPH: owner not set\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @dev The Holographer passes original msg.sender via calldata. This function extracts it.\n */\n function msgSender() internal view returns (address sender) {\n assembly {\n switch eq(caller(), sload(_holographerSlot))\n case 0 {\n sender := caller()\n }\n default {\n sender := calldataload(sub(calldatasize(), 0x20))\n }\n }\n }\n\n /**\n * @dev Address of Holograph GENERIC standards enforcer smart contract.\n */\n function holographer() internal view returns (address _holographer) {\n assembly {\n _holographer := sload(_holographerSlot)\n }\n }\n\n function supportsInterface(bytes4) external pure virtual returns (bool) {\n return false;\n }\n\n /**\n * @dev Address of initial creator/owner of the contract.\n */\n function owner() external view virtual returns (address) {\n return _getOwner();\n }\n\n function isOwner() external view returns (bool) {\n return (msgSender() == _getOwner());\n }\n\n function isOwner(address wallet) external view returns (bool) {\n return wallet == _getOwner();\n }\n\n function _getOwner() internal view returns (address ownerAddress) {\n assembly {\n ownerAddress := sload(_ownerSlot)\n }\n }\n\n function _setOwner(address ownerAddress) internal {\n assembly {\n sstore(_ownerSlot, ownerAddress)\n }\n }\n\n function withdraw() external virtual onlyOwner {\n payable(_getOwner()).transfer(address(this).balance);\n }\n\n event FundsReceived(address indexed source, uint256 amount);\n\n /**\n * @dev This function emits an event to indicate native gas token receipt. Do not rely on this to work.\n * Please use custom payable functions for accepting native value.\n */\n receive() external payable virtual {\n emit FundsReceived(msgSender(), msg.value);\n }\n\n /**\n * @dev Return true for any un-implemented event hooks\n */\n fallback() external payable virtual {\n assembly {\n switch eq(sload(_holographerSlot), caller())\n case 1 {\n mstore(0x80, 0x0000000000000000000000000000000000000000000000000000000000000001)\n return(0x80, 0x20)\n }\n default {\n revert(0x00, 0x00)\n }\n }\n }\n}\n" + }, + "contracts/abstract/HLGERC20H.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Initializable.sol\";\n\nabstract contract HLGERC20H is Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holographer')) - 1)\n */\n bytes32 constant _holographerSlot = 0xe9fcff60011c1a99f7b7244d1f2d9da93d79ea8ef3654ce590d775575255b2bd;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.owner')) - 1)\n */\n bytes32 constant _ownerSlot = 0xb56711ba6bd3ded7639fc335ee7524fe668a79d7558c85992e3f8494cf772777;\n\n modifier onlyHolographer() {\n require(msg.sender == holographer(), \"ERC20: holographer only\");\n _;\n }\n\n modifier onlyOwner() {\n if (msg.sender == holographer()) {\n require(msgSender() == _getOwner(), \"ERC20: owner only function\");\n } else {\n require(msg.sender == _getOwner(), \"ERC20: owner only function\");\n }\n _;\n }\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external virtual override returns (bytes4) {\n return _init(initPayload);\n }\n\n function _init(bytes memory /* initPayload*/) internal returns (bytes4) {\n require(!_isInitialized(), \"ERC20: already initialized\");\n address _holographer = msg.sender;\n address currentOwner;\n assembly {\n sstore(_holographerSlot, _holographer)\n currentOwner := sload(_ownerSlot)\n }\n require(currentOwner != address(0), \"HOLOGRAPH: owner not set\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @dev The Holographer passes original msg.sender via calldata. This function extracts it.\n */\n function msgSender() internal pure returns (address sender) {\n assembly {\n sender := calldataload(sub(calldatasize(), 0x20))\n }\n }\n\n /**\n * @dev Address of Holograph ERC20 standards enforcer smart contract.\n */\n function holographer() internal view returns (address _holographer) {\n assembly {\n _holographer := sload(_holographerSlot)\n }\n }\n\n function supportsInterface(bytes4) external pure returns (bool) {\n return false;\n }\n\n /**\n * @dev Address of initial creator/owner of the token contract.\n */\n function owner() external view returns (address) {\n return _getOwner();\n }\n\n function isOwner() external view returns (bool) {\n if (msg.sender == holographer()) {\n return msgSender() == _getOwner();\n } else {\n return msg.sender == _getOwner();\n }\n }\n\n function isOwner(address wallet) external view returns (bool) {\n return wallet == _getOwner();\n }\n\n function _getOwner() internal view returns (address ownerAddress) {\n assembly {\n ownerAddress := sload(_ownerSlot)\n }\n }\n\n function _setOwner(address ownerAddress) internal {\n assembly {\n sstore(_ownerSlot, ownerAddress)\n }\n }\n\n function withdraw() external virtual onlyOwner {\n payable(_getOwner()).transfer(address(this).balance);\n }\n\n /**\n * @dev This function is unreachable unless custom contract address is called directly.\n * Please use custom payable functions for accepting native value.\n */\n receive() external payable {\n revert(\"ERC20: unreachable code\");\n }\n\n /**\n * @dev Return true for any un-implemented event hooks\n */\n fallback() external payable {\n assembly {\n switch eq(sload(_holographerSlot), caller())\n case 1 {\n mstore(0x80, 0x0000000000000000000000000000000000000000000000000000000000000001)\n return(0x80, 0x20)\n }\n default {\n revert(0x00, 0x00)\n }\n }\n }\n}\n" + }, + "contracts/abstract/Initializable.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../interface/InitializableInterface.sol\";\n\n/**\n * @title Initializable\n * @author https://github.com/holographxyz\n * @notice Use init instead of constructor\n * @dev This allows for use of init function to make one time initializations without the need for a constructor\n */\nabstract contract Initializable is InitializableInterface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.initialized')) - 1)\n */\n bytes32 constant _initializedSlot = 0x4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a01;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external virtual returns (bytes4);\n\n function _isInitialized() internal view returns (bool initialized) {\n assembly {\n initialized := sload(_initializedSlot)\n }\n }\n\n function _setInitialized() internal {\n assembly {\n sstore(_initializedSlot, 0x0000000000000000000000000000000000000000000000000000000000000001)\n }\n }\n}\n" + }, + "contracts/abstract/NonReentrant.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nabstract contract NonReentrant {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.reentrant')) - 1)\n */\n bytes32 constant _reentrantSlot = 0x04b524dd539523930d3901481aa9455d7752b49add99e1647adb8b09a3137279;\n\n modifier nonReentrant() {\n require(getStatus() != 2, \"HOLOGRAPH: reentrant call\");\n setStatus(2);\n _;\n setStatus(1);\n }\n\n constructor() {}\n\n function getStatus() internal view returns (uint256 status) {\n assembly {\n status := sload(_reentrantSlot)\n }\n }\n\n function setStatus(uint256 status) internal {\n assembly {\n sstore(_reentrantSlot, status)\n }\n }\n}\n" + }, + "contracts/abstract/Owner.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nabstract contract Owner {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.owner')) - 1)\n */\n bytes32 constant _ownerSlot = 0xb56711ba6bd3ded7639fc335ee7524fe668a79d7558c85992e3f8494cf772777;\n\n /**\n * @dev Event emitted when contract owner is changed.\n */\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n modifier onlyOwner() virtual {\n require(msg.sender == getOwner(), \"HOLOGRAPH: owner only function\");\n _;\n }\n\n function owner() external view virtual returns (address) {\n return getOwner();\n }\n\n constructor() {}\n\n function getOwner() public view returns (address ownerAddress) {\n assembly {\n ownerAddress := sload(_ownerSlot)\n }\n }\n\n function setOwner(address ownerAddress) public virtual onlyOwner {\n address previousOwner = getOwner();\n assembly {\n sstore(_ownerSlot, ownerAddress)\n }\n emit OwnershipTransferred(previousOwner, ownerAddress);\n }\n\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0), \"HOLOGRAPH: zero address\");\n assembly {\n sstore(_ownerSlot, newOwner)\n }\n }\n\n function ownerCall(address target, bytes calldata data) external payable onlyOwner {\n assembly {\n calldatacopy(0, data.offset, data.length)\n let result := call(gas(), target, callvalue(), 0, data.length, 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/abstract/StrictERC1155H.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../interface/HolographedERC1155.sol\";\n\nimport \"./ERC1155H.sol\";\n\nabstract contract StrictERC1155H is ERC1155H, HolographedERC1155 {\n /**\n * @dev Dummy variable to prevent empty functions from making \"switch to pure\" warnings.\n */\n bool private _success;\n\n function bridgeIn(\n uint32 /* _chainId*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool) {\n _success = true;\n return true;\n }\n\n function bridgeOut(\n uint32 /* _chainId*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bytes memory _data) {\n _success = true;\n _data = abi.encode(holographer());\n }\n\n function afterApprove(\n address /* _owner*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeApprove(\n address /* _owner*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterApprovalAll(\n address /* _to*/,\n bool /* _approved*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeApprovalAll(\n address /* _to*/,\n bool /* _approved*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterBurn(\n address /* _owner*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeBurn(\n address /* _owner*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterMint(\n address /* _owner*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeMint(\n address /* _owner*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterSafeTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeSafeTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterOnERC1155Received(\n address /* _operator*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeOnERC1155Received(\n address /* _operator*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n}\n" + }, + "contracts/abstract/StrictERC20H.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../interface/HolographedERC20.sol\";\n\nimport \"./ERC20H.sol\";\n\nabstract contract StrictERC20H is ERC20H, HolographedERC20 {\n /**\n * @dev Dummy variable to prevent empty functions from making \"switch to pure\" warnings.\n */\n bool private _success;\n\n function bridgeIn(\n uint32 /* _chainId*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool) {\n _success = true;\n return true;\n }\n\n function bridgeOut(\n uint32 /* _chainId*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bytes memory _data) {\n /**\n * @dev This is just here to suppress unused parameter warning\n */\n _data = abi.encodePacked(holographer());\n _success = true;\n }\n\n function afterApprove(\n address /* _owner*/,\n address /* _to*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeApprove(\n address /* _owner*/,\n address /* _to*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterOnERC20Received(\n address /* _token*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeOnERC20Received(\n address /* _token*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterBurn(\n address /* _owner*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeBurn(\n address /* _owner*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterMint(\n address /* _owner*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeMint(\n address /* _owner*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterSafeTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeSafeTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function onAllowance(\n address /* _owner*/,\n address /* _to*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = false;\n return _success;\n }\n}\n" + }, + "contracts/abstract/StrictERC721H.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../interface/HolographedERC721.sol\";\n\nimport \"./ERC721H.sol\";\n\nabstract contract StrictERC721H is ERC721H, HolographedERC721 {\n /**\n * @dev Dummy variable to prevent empty functions from making \"switch to pure\" warnings.\n */\n bool private _success;\n\n function bridgeIn(\n uint32 /* _chainId*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool) {\n _success = true;\n return true;\n }\n\n function bridgeOut(\n uint32 /* _chainId*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/\n ) external virtual onlyHolographer returns (bytes memory _data) {\n _success = true;\n _data = abi.encode(holographer());\n }\n\n function afterApprove(\n address /* _owner*/,\n address /* _to*/,\n uint256 /* _tokenId*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeApprove(\n address /* _owner*/,\n address /* _to*/,\n uint256 /* _tokenId*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterApprovalAll(\n address /* _sender*/,\n address /* _to*/,\n bool /* _approved*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeApprovalAll(\n address /* _sender*/,\n address /* _to*/,\n bool /* _approved*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterBurn(\n address /* _owner*/,\n uint256 /* _tokenId*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeBurn(\n address /* _owner*/,\n uint256 /* _tokenId*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterMint(\n address /* _owner*/,\n uint256 /* _tokenId*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeMint(\n address /* _owner*/,\n uint256 /* _tokenId*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterSafeTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeSafeTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterOnERC721Received(\n address /* _operator*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeOnERC721Received(\n address /* _operator*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function onIsApprovedForAll(\n address /* _wallet*/,\n address /* _operator*/\n ) external view virtual onlyHolographer returns (bool approved) {\n approved = _success;\n return false;\n }\n\n function contractURI() external view virtual onlyHolographer returns (string memory contractJSON) {\n contractJSON = _success ? \"\" : \"\";\n }\n}\n" + }, + "contracts/drops/interface/IDropsPriceOracle.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\ninterface IDropsPriceOracle {\n function convertUsdToWei(uint256 usdAmount) external view returns (uint256 weiAmount);\n}\n" + }, + "contracts/drops/interface/IHolographDropERC721.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {IMetadataRenderer} from \"./IMetadataRenderer.sol\";\n\nimport {AddressMintDetails} from \"../struct/AddressMintDetails.sol\";\nimport {SaleDetails} from \"../struct/SaleDetails.sol\";\n\n/// @notice Interface for HOLOGRAPH Drops contract\ninterface IHolographDropERC721 {\n // Access errors\n\n /// @notice Only admin can access this function\n error Access_OnlyAdmin();\n /// @notice Missing the given role or admin access\n error Access_MissingRoleOrAdmin(bytes32 role);\n /// @notice Withdraw is not allowed by this user\n error Access_WithdrawNotAllowed();\n /// @notice Cannot withdraw funds due to ETH send failure.\n error Withdraw_FundsSendFailure();\n /// @notice Mint fee send failure\n error MintFee_FundsSendFailure();\n\n /// @notice Call to external metadata renderer failed.\n error ExternalMetadataRenderer_CallFailed();\n\n /// @notice Thrown when the operator for the contract is not allowed\n /// @dev Used when strict enforcement of marketplaces for creator royalties is desired.\n error OperatorNotAllowed(address operator);\n\n /// @notice Thrown when there is no active market filter DAO address supported for the current chain\n /// @dev Used for enabling and disabling filter for the given chain.\n error MarketFilterDAOAddressNotSupportedForChain();\n\n /// @notice Used when the operator filter registry external call fails\n /// @dev Used for bubbling error up to clients.\n error RemoteOperatorFilterRegistryCallFailed();\n\n // Sale/Purchase errors\n /// @notice Sale is inactive\n error Sale_Inactive();\n /// @notice Presale is inactive\n error Presale_Inactive();\n /// @notice Presale merkle root is invalid\n error Presale_MerkleNotApproved();\n /// @notice Wrong price for purchase\n error Purchase_WrongPrice(uint256 correctPrice);\n /// @notice NFT sold out\n error Mint_SoldOut();\n /// @notice Too many purchase for address\n error Purchase_TooManyForAddress();\n /// @notice Too many presale for address\n error Presale_TooManyForAddress();\n\n // Admin errors\n /// @notice Royalty percentage too high\n error Setup_RoyaltyPercentageTooHigh(uint16 maxRoyaltyBPS);\n /// @notice Invalid admin upgrade address\n error Admin_InvalidUpgradeAddress(address proposedAddress);\n /// @notice Unable to finalize an edition not marked as open (size set to uint64_max_value)\n error Admin_UnableToFinalizeNotOpenEdition();\n\n /// @notice Event emitted for mint fee payout\n /// @param mintFeeAmount amount of the mint fee\n /// @param mintFeeRecipient recipient of the mint fee\n /// @param success if the payout succeeded\n event MintFeePayout(uint256 mintFeeAmount, address mintFeeRecipient, bool success);\n\n /// @notice Event emitted for each sale\n /// @param to address sale was made to\n /// @param quantity quantity of the minted nfts\n /// @param pricePerToken price for each token\n /// @param firstPurchasedTokenId first purchased token ID (to get range add to quantity for max)\n event Sale(\n address indexed to,\n uint256 indexed quantity,\n uint256 indexed pricePerToken,\n uint256 firstPurchasedTokenId\n );\n\n /// @notice Sales configuration has been changed\n /// @dev To access new sales configuration, use getter function.\n /// @param changedBy Changed by user\n event SalesConfigChanged(address indexed changedBy);\n\n /// @notice Event emitted when the funds recipient is changed\n /// @param newAddress new address for the funds recipient\n /// @param changedBy address that the recipient is changed by\n event FundsRecipientChanged(address indexed newAddress, address indexed changedBy);\n\n /// @notice Event emitted when the funds are withdrawn from the minting contract\n /// @param withdrawnBy address that issued the withdraw\n /// @param withdrawnTo address that the funds were withdrawn to\n /// @param amount amount that was withdrawn\n /// @param feeRecipient user getting withdraw fee (if any)\n /// @param feeAmount amount of the fee getting sent (if any)\n event FundsWithdrawn(\n address indexed withdrawnBy,\n address indexed withdrawnTo,\n uint256 amount,\n address feeRecipient,\n uint256 feeAmount\n );\n\n /// @notice Event emitted when an open mint is finalized and further minting is closed forever on the contract.\n /// @param sender address sending close mint\n /// @param numberOfMints number of mints the contract is finalized at\n event OpenMintFinalized(address indexed sender, uint256 numberOfMints);\n\n /// @notice Event emitted when metadata renderer is updated.\n /// @param sender address of the updater\n /// @param renderer new metadata renderer address\n event UpdatedMetadataRenderer(address sender, IMetadataRenderer renderer);\n\n /// @notice Admin function to update the sales configuration settings\n /// @param publicSalePrice public sale price in ether\n /// @param maxSalePurchasePerAddress Max # of purchases (public) per address allowed\n /// @param publicSaleStart unix timestamp when the public sale starts\n /// @param publicSaleEnd unix timestamp when the public sale ends (set to 0 to disable)\n /// @param presaleStart unix timestamp when the presale starts\n /// @param presaleEnd unix timestamp when the presale ends\n /// @param presaleMerkleRoot merkle root for the presale information\n function setSaleConfiguration(\n uint104 publicSalePrice,\n uint32 maxSalePurchasePerAddress,\n uint64 publicSaleStart,\n uint64 publicSaleEnd,\n uint64 presaleStart,\n uint64 presaleEnd,\n bytes32 presaleMerkleRoot\n ) external;\n\n /// @notice External purchase function (payable in eth)\n /// @param quantity to purchase\n /// @return first minted token ID\n function purchase(uint256 quantity) external payable returns (uint256);\n\n /// @notice External purchase presale function (takes a merkle proof and matches to root) (payable in eth)\n /// @param quantity to purchase\n /// @param maxQuantity can purchase (verified by merkle root)\n /// @param pricePerToken price per token allowed (verified by merkle root)\n /// @param merkleProof input for merkle proof leaf verified by merkle root\n /// @return first minted token ID\n function purchasePresale(\n uint256 quantity,\n uint256 maxQuantity,\n uint256 pricePerToken,\n bytes32[] memory merkleProof\n ) external payable returns (uint256);\n\n /// @notice Function to return the global sales details for the given drop\n function saleDetails() external view returns (SaleDetails memory);\n\n /// @notice Function to return the specific sales details for a given address\n /// @param minter address for minter to return mint information for\n function mintedPerAddress(address minter) external view returns (AddressMintDetails memory);\n\n /// @notice This is the opensea/public owner setting that can be set by the contract admin\n function owner() external view returns (address);\n\n /// @notice Update the metadata renderer\n /// @param newRenderer new address for renderer\n /// @param setupRenderer data to call to bootstrap data for the new renderer (optional)\n function setMetadataRenderer(IMetadataRenderer newRenderer, bytes memory setupRenderer) external;\n\n /// @notice This is an admin mint function to mint a quantity to a specific address\n /// @param to address to mint to\n /// @param quantity quantity to mint\n /// @return the id of the first minted NFT\n function adminMint(address to, uint256 quantity) external returns (uint256);\n\n /// @notice This is an admin mint function to mint a single nft each to a list of addresses\n /// @param to list of addresses to mint an NFT each to\n /// @return the id of the first minted NFT\n function adminMintAirdrop(address[] memory to) external returns (uint256);\n\n /// @dev Getter for admin role associated with the contract to handle metadata\n /// @return boolean if address is admin\n function isAdmin(address user) external view returns (bool);\n}\n" + }, + "contracts/drops/interface/IMetadataRenderer.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\ninterface IMetadataRenderer {\n function tokenURI(uint256) external view returns (string memory);\n\n function contractURI() external view returns (string memory);\n\n function initializeWithData(bytes memory initData) external;\n}\n" + }, + "contracts/drops/interface/IOperatorFilterRegistry.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\ninterface IOperatorFilterRegistry {\n function isOperatorAllowed(address registrant, address operator) external view returns (bool);\n\n function register(address registrant) external;\n\n function registerAndSubscribe(address registrant, address subscription) external;\n\n function registerAndCopyEntries(address registrant, address registrantToCopy) external;\n\n function updateOperator(address registrant, address operator, bool filtered) external;\n\n function updateOperators(address registrant, address[] calldata operators, bool filtered) external;\n\n function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external;\n\n function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external;\n\n function subscribe(address registrant, address registrantToSubscribe) external;\n\n function unsubscribe(address registrant, bool copyExistingEntries) external;\n\n function subscriptionOf(address addr) external returns (address registrant);\n\n function subscribers(address registrant) external returns (address[] memory);\n\n function subscriberAt(address registrant, uint256 index) external returns (address);\n\n function copyEntriesOf(address registrant, address registrantToCopy) external;\n\n function isOperatorFiltered(address registrant, address operator) external returns (bool);\n\n function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool);\n\n function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool);\n\n function filteredOperators(address addr) external returns (address[] memory);\n\n function filteredCodeHashes(address addr) external returns (bytes32[] memory);\n\n function filteredOperatorAt(address registrant, uint256 index) external returns (address);\n\n function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32);\n\n function isRegistered(address addr) external returns (bool);\n\n function codeHashOf(address addr) external returns (bytes32);\n\n function unregister(address registrant) external;\n}\n" + }, + "contracts/drops/library/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nlibrary Address {\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "contracts/drops/library/MerkleProof.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nlibrary MerkleProof {\n /**\n * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree\n * defined by `root`. For this, a `proof` must be provided, containing\n * sibling hashes on the branch from the leaf to the root of the tree. Each\n * pair of leaves and each pair of pre-images are assumed to be sorted.\n */\n function verify(bytes32[] memory proof, bytes32 root, bytes32 leaf) internal pure returns (bool) {\n return processProof(proof, leaf) == root;\n }\n\n /**\n * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up\n * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt\n * hash matches the root of the tree. When processing the proof, the pairs\n * of leafs & pre-images are assumed to be sorted.\n *\n * _Available since v4.4._\n */\n function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {\n bytes32 computedHash = leaf;\n for (uint256 i = 0; i < proof.length; i++) {\n bytes32 proofElement = proof[i];\n if (computedHash <= proofElement) {\n // Hash(current computed hash + current element of the proof)\n computedHash = _efficientHash(computedHash, proofElement);\n } else {\n // Hash(current element of the proof + current computed hash)\n computedHash = _efficientHash(proofElement, computedHash);\n }\n }\n return computedHash;\n }\n\n function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {\n assembly {\n mstore(0x00, a)\n mstore(0x20, b)\n value := keccak256(0x00, 0x40)\n }\n }\n}\n" + }, + "contracts/drops/library/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nlibrary Strings {\n bytes16 private constant _HEX_SYMBOLS = \"0123456789abcdef\";\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n // Inspired by OraclizeAPI's implementation - MIT licence\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n if (value == 0) {\n return \"0\";\n }\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n bytes memory buffer = new bytes(digits);\n while (value != 0) {\n digits -= 1;\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n value /= 10;\n }\n return string(buffer);\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n if (value == 0) {\n return \"0x00\";\n }\n uint256 temp = value;\n uint256 length = 0;\n while (temp != 0) {\n length++;\n temp >>= 8;\n }\n return toHexString(value, length);\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n}\n" + }, + "contracts/drops/metadata/DropsMetadataRenderer.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IMetadataRenderer} from \"../interface/IMetadataRenderer.sol\";\n\nimport {Strings} from \"../library/Strings.sol\";\n\nimport {MetadataRenderAdminCheck} from \"./MetadataRenderAdminCheck.sol\";\n\n/// @notice Drops metadata system\ncontract DropsMetadataRenderer is Initializable, IMetadataRenderer, MetadataRenderAdminCheck {\n error MetadataFrozen();\n\n /// Event to mark updated metadata information\n event MetadataUpdated(\n address indexed target,\n string metadataBase,\n string metadataExtension,\n string contractURI,\n uint256 freezeAt\n );\n\n /// @notice Hash to mark updated provenance hash\n event ProvenanceHashUpdated(address indexed target, bytes32 provenanceHash);\n\n /// @notice Struct to store metadata info and update data\n struct MetadataURIInfo {\n string base;\n string extension;\n string contractURI;\n uint256 freezeAt;\n }\n\n /// @notice NFT metadata by contract\n mapping(address => MetadataURIInfo) public metadataBaseByContract;\n\n /// @notice Optional provenance hashes for NFT metadata by contract\n mapping(address => bytes32) public provenanceHashes;\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @dev A blank init function is required to be able to call genesisDeriveFutureAddress to get the deterministic address\n * @dev Since no data is required to be intialized the selector is just returned and _setInitialized() does not need to be called\n */\n function init(bytes memory /* initPayload */) external pure override returns (bytes4) {\n return Initializable.init.selector;\n }\n\n /// @notice Standard init for drop metadata from root drop contract\n /// @param data passed in for initialization\n function initializeWithData(bytes memory data) external {\n // data format: string baseURI, string newContractURI\n (string memory initialBaseURI, string memory initialContractURI) = abi.decode(data, (string, string));\n _updateMetadataDetails(msg.sender, initialBaseURI, \"\", initialContractURI, 0);\n }\n\n /// @notice Update the provenance hash (optional) for a given nft\n /// @param target target address to update\n /// @param provenanceHash provenance hash to set\n function updateProvenanceHash(address target, bytes32 provenanceHash) external requireSenderAdmin(target) {\n provenanceHashes[target] = provenanceHash;\n emit ProvenanceHashUpdated(target, provenanceHash);\n }\n\n /// @notice Update metadata base URI and contract URI\n /// @param baseUri new base URI\n /// @param newContractUri new contract URI (can be an empty string)\n function updateMetadataBase(\n address target,\n string memory baseUri,\n string memory newContractUri\n ) external requireSenderAdmin(target) {\n _updateMetadataDetails(target, baseUri, \"\", newContractUri, 0);\n }\n\n /// @notice Update metadata base URI, extension, contract URI and freezing detailsUpdate metadata base URI, extension, contract URI and freezing detailsUpdate metadata base URI, extension, contract URI and freezing detailsUpdate metadata base URI, extension, contract URI and freezing detailsUpdate metadata base URI, extension, contract URI and freezing detailsUpdate metadata base URI, extension, contract URI and freezing detailsUpdate metadata base URI, extension, contract URI and freezing detailsUpdate metadata base URI, extension, contract URI and freezing details\n /// @param target target contract to update metadata for\n /// @param metadataBase new base URI to update metadata with\n /// @param metadataExtension new extension to append to base metadata URI\n /// @param freezeAt time to freeze the contract metadata at (set to 0 to disable)\n function updateMetadataBaseWithDetails(\n address target,\n string memory metadataBase,\n string memory metadataExtension,\n string memory newContractURI,\n uint256 freezeAt\n ) external requireSenderAdmin(target) {\n _updateMetadataDetails(target, metadataBase, metadataExtension, newContractURI, freezeAt);\n }\n\n /// @notice Internal metadata update function\n /// @param metadataBase Base URI to update metadata for\n /// @param metadataExtension Extension URI to update metadata for\n /// @param freezeAt timestamp to freeze metadata (set to 0 to disable freezing)\n function _updateMetadataDetails(\n address target,\n string memory metadataBase,\n string memory metadataExtension,\n string memory newContractURI,\n uint256 freezeAt\n ) internal {\n if (freezeAt != 0 && freezeAt > block.timestamp) {\n revert MetadataFrozen();\n }\n\n metadataBaseByContract[target] = MetadataURIInfo({\n base: metadataBase,\n extension: metadataExtension,\n contractURI: newContractURI,\n freezeAt: freezeAt\n });\n emit MetadataUpdated({\n target: target,\n metadataBase: metadataBase,\n metadataExtension: metadataExtension,\n contractURI: newContractURI,\n freezeAt: freezeAt\n });\n }\n\n /// @notice A contract URI for the given drop contract\n /// @dev reverts if a contract uri is not provided\n /// @return contract uri for the contract metadata\n function contractURI() external view override returns (string memory) {\n string memory uri = metadataBaseByContract[msg.sender].contractURI;\n if (bytes(uri).length == 0) revert();\n return uri;\n }\n\n /// @notice A token URI for the given drops contract\n /// @dev reverts if a contract uri is not set\n /// @return token URI for the given token ID and contract (set by msg.sender)\n function tokenURI(uint256 tokenId) external view override returns (string memory) {\n MetadataURIInfo memory info = metadataBaseByContract[msg.sender];\n\n if (bytes(info.base).length == 0) revert();\n\n return string(abi.encodePacked(info.base, Strings.toString(tokenId), info.extension));\n }\n}\n" + }, + "contracts/drops/metadata/EditionsMetadataRenderer.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport \"../../abstract/Initializable.sol\";\n\nimport {IMetadataRenderer} from \"../interface/IMetadataRenderer.sol\";\nimport {IHolographDropERC721} from \"../interface/IHolographDropERC721.sol\";\nimport {ERC721Metadata} from \"../../interface/ERC721Metadata.sol\";\nimport {NFTMetadataRenderer} from \"../utils/NFTMetadataRenderer.sol\";\nimport {MetadataRenderAdminCheck} from \"./MetadataRenderAdminCheck.sol\";\n\nimport {Configuration} from \"../struct/Configuration.sol\";\n\ninterface DropConfigGetter {\n function config() external view returns (Configuration memory config);\n}\n\n/// @notice EditionsMetadataRenderer for editions support\ncontract EditionsMetadataRenderer is Initializable, IMetadataRenderer, MetadataRenderAdminCheck {\n /// @notice Storage for token edition information\n struct TokenEditionInfo {\n string description;\n string imageURI;\n string animationURI;\n }\n\n /// @notice Event for updated Media URIs\n event MediaURIsUpdated(address indexed target, address sender, string imageURI, string animationURI);\n\n /// @notice Event for a new edition initialized\n /// @dev admin function indexer feedback\n event EditionInitialized(address indexed target, string description, string imageURI, string animationURI);\n\n /// @notice Description updated for this edition\n /// @dev admin function indexer feedback\n event DescriptionUpdated(address indexed target, address sender, string newDescription);\n\n /// @notice Token information mapping storage\n mapping(address => TokenEditionInfo) public tokenInfos;\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @dev A blank init function is required to be able to call genesisDeriveFutureAddress to get the deterministic address\n * @dev Since no data is required to be intialized the selector is just returned and _setInitialized() does not need to be called\n */\n function init(bytes memory /* initPayload */) external pure override returns (bytes4) {\n return InitializableInterface.init.selector;\n }\n\n /// @notice Update media URIs\n /// @param target target for contract to update metadata for\n /// @param imageURI new image uri address\n /// @param animationURI new animation uri address\n function updateMediaURIs(\n address target,\n string memory imageURI,\n string memory animationURI\n ) external requireSenderAdmin(target) {\n tokenInfos[target].imageURI = imageURI;\n tokenInfos[target].animationURI = animationURI;\n emit MediaURIsUpdated({target: target, sender: msg.sender, imageURI: imageURI, animationURI: animationURI});\n }\n\n /// @notice Admin function to update description\n /// @param target target description\n /// @param newDescription new description\n function updateDescription(address target, string memory newDescription) external requireSenderAdmin(target) {\n tokenInfos[target].description = newDescription;\n\n emit DescriptionUpdated({target: target, sender: msg.sender, newDescription: newDescription});\n }\n\n /// @notice Default initializer for edition data from a specific contract\n /// @param data data to init with\n function initializeWithData(bytes memory data) external {\n // data format: description, imageURI, animationURI\n (string memory description, string memory imageURI, string memory animationURI) = abi.decode(\n data,\n (string, string, string)\n );\n\n tokenInfos[msg.sender] = TokenEditionInfo({\n description: description,\n imageURI: imageURI,\n animationURI: animationURI\n });\n emit EditionInitialized({\n target: msg.sender,\n description: description,\n imageURI: imageURI,\n animationURI: animationURI\n });\n }\n\n /// @notice Contract URI information getter\n /// @return contract uri (if set)\n function contractURI() external view override returns (string memory) {\n address target = msg.sender;\n TokenEditionInfo storage editionInfo = tokenInfos[target];\n Configuration memory config = DropConfigGetter(target).config();\n\n return\n NFTMetadataRenderer.encodeContractURIJSON({\n name: ERC721Metadata(target).name(),\n description: editionInfo.description,\n imageURI: editionInfo.imageURI,\n animationURI: editionInfo.animationURI,\n royaltyBPS: uint256(config.royaltyBPS),\n royaltyRecipient: config.fundsRecipient\n });\n }\n\n /// @notice Token URI information getter\n /// @param tokenId to get uri for\n /// @return contract uri (if set)\n function tokenURI(uint256 tokenId) external view override returns (string memory) {\n address target = msg.sender;\n\n TokenEditionInfo memory info = tokenInfos[target];\n IHolographDropERC721 media = IHolographDropERC721(target);\n\n uint256 maxSupply = media.saleDetails().maxSupply;\n\n // For open editions, set max supply to 0 for renderer to remove the edition max number\n // This will be added back on once the open edition is \"finalized\"\n if (maxSupply == type(uint64).max) {\n maxSupply = 0;\n }\n\n return\n NFTMetadataRenderer.createMetadataEdition({\n name: ERC721Metadata(target).name(),\n description: info.description,\n imageURI: info.imageURI,\n animationURI: info.animationURI,\n tokenOfEdition: tokenId,\n editionSize: maxSupply\n });\n }\n}\n" + }, + "contracts/drops/metadata/MetadataRenderAdminCheck.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {IHolographDropERC721} from \"../interface/IHolographDropERC721.sol\";\n\ncontract MetadataRenderAdminCheck {\n error Access_OnlyAdmin();\n\n /// @notice Modifier to require the sender to be an admin\n /// @param target address that the user wants to modify\n modifier requireSenderAdmin(address target) {\n if (target != msg.sender && !IHolographDropERC721(target).isAdmin(msg.sender)) {\n revert Access_OnlyAdmin();\n }\n\n _;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleArbitrumNova.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOracleArbitrumNova is Admin, Initializable, IDropsPriceOracle {\n address constant WETH = 0x0000000000000000000000000000000000000000; // 18 decimals\n address constant USDC = 0x0000000000000000000000000000000000000000; // 6 decimals\n address constant USDT = 0x0000000000000000000000000000000000000000; // 6 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n\n IUniswapV2Pair constant UniV2UsdcPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n IUniswapV2Pair constant UniV2UsdtPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external view returns (uint256 weiAmount) {\n weiAmount =\n (_getSushiUSDC(usdAmount) + _getSushiUSDT(usdAmount) + _getUniUSDC(usdAmount) + _getUniUSDT(usdAmount)) /\n 4;\n }\n\n function _getSushiUSDC(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdcPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getSushiUSDT(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdtPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUniUSDC(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = UniV2UsdcPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUniUSDT(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = UniV2UsdtPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleArbitrumOne.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOracleArbitrumOne is Admin, Initializable, IDropsPriceOracle {\n address constant WETH = 0x82aF49447D8a07e3bd95BD0d56f35241523fBab1; // 18 decimals\n address constant USDC = 0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8; // 6 decimals\n address constant USDT = 0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9; // 6 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0x905dfCD5649217c42684f23958568e533C711Aa3);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0xCB0E5bFa72bBb4d16AB5aA0c60601c438F04b4ad);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external view returns (uint256 weiAmount) {\n weiAmount = (_getSushiUSDC(usdAmount) + _getSushiUSDT(usdAmount)) / 2;\n }\n\n function _getSushiUSDC(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdcPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDC\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getSushiUSDT(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdtPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleArbitrumTestnetGoerli.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOracleArbitrumTestnetGoerli is Admin, Initializable, IDropsPriceOracle {\n address constant WETH = 0x0000000000000000000000000000000000000000; // 18 decimals\n address constant USDC = 0x0000000000000000000000000000000000000000; // 6 decimals\n address constant USDT = 0x0000000000000000000000000000000000000000; // 6 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n\n IUniswapV2Pair constant UniV2UsdcPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n IUniswapV2Pair constant UniV2UsdtPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external pure returns (uint256 weiAmount) {\n weiAmount = (_getSushiUSDC(usdAmount) + _getSushiUSDT(usdAmount)) / 2;\n }\n\n function _getSushiUSDC(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdcPool.getReserves();\n uint112 _reserve0 = 14248413024234;\n uint112 _reserve1 = 8237558200010903232972;\n // x is always native token / WETH\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getSushiUSDT(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdtPool.getReserves();\n uint112 _reserve0 = 7190540826553156156218;\n uint112 _reserve1 = 12394808861997;\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleAvalanche.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {ILBPair} from \"./interface/ILBPair.sol\";\nimport {ILBRouter} from \"./interface/ILBRouter.sol\";\n\ncontract DropsPriceOracleAvalanche is Admin, Initializable, IDropsPriceOracle {\n address constant WAVAX = 0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7; // 18 decimals\n address constant USDC = 0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E; // 6 decimals\n address constant USDT = 0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7; // 6 decimals\n\n ILBRouter constant TraderJoeRouter = ILBRouter(0xb4315e873dBcf96Ffd0acd8EA43f689D8c20fB30);\n ILBPair constant TraderJoeUsdcPool = ILBPair(0xD446eb1660F766d533BeCeEf890Df7A69d26f7d1);\n ILBPair constant TraderJoeUsdtPool = ILBPair(0x87EB2F90d7D0034571f343fb7429AE22C1Bd9F72);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external view returns (uint256 weiAmount) {\n if (usdAmount == 0) {\n weiAmount = 0;\n return weiAmount;\n }\n weiAmount = (_getTraderJoeUSDC(usdAmount) + _getTraderJoeUSDT(usdAmount)) / 2;\n }\n\n function _getTraderJoeUSDC(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint128 amountIn, uint128 amountOutLeft, uint128 fee) = TraderJoeRouter.getSwapIn(\n TraderJoeUsdcPool,\n uint128(usdAmount),\n true\n );\n weiAmount = amountIn + fee;\n }\n\n function _getTraderJoeUSDT(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint128 amountIn, uint128 amountOutLeft, uint128 fee) = TraderJoeRouter.getSwapIn(\n TraderJoeUsdtPool,\n uint128(usdAmount),\n true\n );\n weiAmount = amountIn + fee;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleAvalancheTestnet.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOracleAvalancheTestnet is Admin, Initializable, IDropsPriceOracle {\n address constant WAVAX = 0xd00ae08403B9bbb9124bB305C09058E32C39A48c;\n address constant USDC = 0x5425890298aed601595a70AB815c96711a31Bc65; // 6 decimals\n address constant USDT = 0x0000000000000000000000000000000000000000; // 6 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0x1B92bf7394d317A758d953F6428445A8977e195C);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external pure returns (uint256 weiAmount) {\n weiAmount = (_getSushiUSDC(usdAmount) + _getSushiUSDT(usdAmount)) / 2;\n }\n\n function _getSushiUSDC(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdcPool.getReserves();\n uint112 _reserve0 = 133224784402692878349;\n uint112 _reserve1 = 2205199060;\n // x is always native token / WAVAX\n uint256 x = _reserve0;\n // y is always USD token / USDC\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getSushiUSDT(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdtPool.getReserves();\n uint112 _reserve0 = 2205199060;\n uint112 _reserve1 = 133224784402692878349;\n // x is always native token / WAVAX\n uint256 x = _reserve1;\n // y is always USD token / USDT\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleBinanceSmartChain.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOracleBinanceSmartChain is Admin, Initializable, IDropsPriceOracle {\n address constant WBNB = 0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c;\n address constant USDC = 0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d; // 18 decimals\n address constant USDT = 0x55d398326f99059fF775485246999027B3197955; // 18 decimals\n address constant BUSD = 0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56; // 18 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0xc7632B7b2d768bbb30a404E13E1dE48d1439ec21);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0x2905817b020fD35D9d09672946362b62766f0d69);\n IUniswapV2Pair constant SushiV2BusdPool = IUniswapV2Pair(0xDc558D64c29721d74C4456CfB4363a6e6660A9Bb);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external view returns (uint256 weiAmount) {\n weiAmount = (_getUSDC(usdAmount) + _getUSDT(usdAmount) + _getBUSD(usdAmount)) / 3;\n }\n\n function _getUSDC(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n usdAmount = usdAmount * (10 ** (18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdcPool.getReserves();\n // x is always native token / WBNB\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUSDT(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n usdAmount = usdAmount * (10 ** (18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdtPool.getReserves();\n // x is always native token / WBNB\n uint256 x = _reserve1;\n // y is always USD token / USDT\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getBUSD(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n usdAmount = usdAmount * (10 ** (18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2BusdPool.getReserves();\n // x is always native token / WBNB\n uint256 x = _reserve0;\n // y is always USD token / BUSD\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleBinanceSmartChainTestnet.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOracleBinanceSmartChainTestnet is Admin, Initializable, IDropsPriceOracle {\n address constant WBNB = 0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd;\n address constant USDC = 0x0000000000000000000000000000000000000000; // 18 decimals\n address constant USDT = 0x337610d27c682E347C9cD60BD4b3b107C9d34dDd; // 18 decimals\n address constant BUSD = 0xeD24FC36d5Ee211Ea25A80239Fb8C4Cfd80f12Ee; // 18 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0x622A814A1c842D34F9828370d9015Dc9d4c5b6F1);\n IUniswapV2Pair constant SushiV2BusdPool = IUniswapV2Pair(0x9A0eeceDA5c0203924484F5467cEE4321cf6A189);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external pure returns (uint256 weiAmount) {\n weiAmount = (_getUSDC(usdAmount) + _getUSDT(usdAmount) + _getBUSD(usdAmount)) / 3;\n }\n\n function _getUSDC(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n usdAmount = usdAmount * (10 ** (18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdcPool.getReserves();\n uint112 _reserve0 = 13021882855694508203763;\n uint112 _reserve1 = 40694382259814793835;\n // x is always native token / WBNB\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUSDT(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n usdAmount = usdAmount * (10 ** (18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdtPool.getReserves();\n uint112 _reserve0 = 27194218672878436248359;\n uint112 _reserve1 = 85236077287017749564;\n // x is always native token / WBNB\n uint256 x = _reserve1;\n // y is always USD token / USDT\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getBUSD(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n usdAmount = usdAmount * (10 ** (18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2BusdPool.getReserves();\n uint112 _reserve0 = 18888866298338593382;\n uint112 _reserve1 = 6055244885106491861952;\n // x is always native token / WBNB\n uint256 x = _reserve0;\n // y is always USD token / BUSD\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleEthereum.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOracleEthereum is Admin, Initializable, IDropsPriceOracle {\n address constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; // 18 decimals\n address constant USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48; // 6 decimals\n address constant USDT = 0xdAC17F958D2ee523a2206206994597C13D831ec7; // 6 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0x397FF1542f962076d0BFE58eA045FfA2d347ACa0);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0x06da0fd433C1A5d7a4faa01111c044910A184553);\n\n IUniswapV2Pair constant UniV2UsdcPool = IUniswapV2Pair(0xB4e16d0168e52d35CaCD2c6185b44281Ec28C9Dc);\n IUniswapV2Pair constant UniV2UsdtPool = IUniswapV2Pair(0x0d4a11d5EEaaC28EC3F61d100daF4d40471f1852);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external view returns (uint256 weiAmount) {\n weiAmount =\n (_getSushiUSDC(usdAmount) + _getSushiUSDT(usdAmount) + _getUniUSDC(usdAmount) + _getUniUSDT(usdAmount)) /\n 4;\n }\n\n function _getSushiUSDC(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdcPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getSushiUSDT(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdtPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUniUSDC(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = UniV2UsdcPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUniUSDT(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = UniV2UsdtPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleEthereumTestnetGoerli.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOracleEthereumTestnetGoerli is Admin, Initializable, IDropsPriceOracle {\n address constant WETH = 0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6; // 18 decimals\n address constant USDC = 0x07865c6E87B9F70255377e024ace6630C1Eaa37F; // 6 decimals\n address constant USDT = 0x0000000000000000000000000000000000000000; // 6 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n\n IUniswapV2Pair constant UniV2UsdcPool = IUniswapV2Pair(0xB4e16d0168e52d35CaCD2c6185b44281Ec28C9Dc);\n IUniswapV2Pair constant UniV2UsdtPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external pure returns (uint256 weiAmount) {\n weiAmount =\n (_getSushiUSDC(usdAmount) + _getSushiUSDT(usdAmount) + _getUniUSDC(usdAmount) + _getUniUSDT(usdAmount)) /\n 4;\n }\n\n function _getSushiUSDC(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdcPool.getReserves();\n uint112 _reserve0 = 14248413024234;\n uint112 _reserve1 = 8237558200010903232972;\n // x is always native token / WETH\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getSushiUSDT(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdtPool.getReserves();\n uint112 _reserve0 = 7190540826553156156218;\n uint112 _reserve1 = 12394808861997;\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUniUSDC(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = UniV2UsdcPool.getReserves();\n uint112 _reserve0 = 27969935741431;\n uint112 _reserve1 = 16175569695347837629371;\n // x is always native token / WETH\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUniUSDT(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = UniV2UsdtPool.getReserves();\n uint112 _reserve0 = 16492332449237327237450;\n uint112 _reserve1 = 28443279643692;\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleOptimism.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOracleOptimism is Admin, Initializable, IDropsPriceOracle {\n address constant WETH = 0x4200000000000000000000000000000000000006; // 18 decimals\n address constant USDC = 0x7F5c764cBc14f9669B88837ca1490cCa17c31607; // 6 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0x7086622E6Db990385B102D79CB1218947fb549a9);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external view returns (uint256 weiAmount) {\n weiAmount = _getSushiUSDC(usdAmount);\n }\n\n function _getSushiUSDC(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdcPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDC\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleOptimismTestnetGoerli.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOracleOptimismTestnetGoerli is Admin, Initializable, IDropsPriceOracle {\n address constant WETH = 0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6; // 18 decimals\n address constant USDC = 0x07865c6E87B9F70255377e024ace6630C1Eaa37F; // 6 decimals\n address constant USDT = 0x0000000000000000000000000000000000000000; // 6 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n\n IUniswapV2Pair constant UniV2UsdcPool = IUniswapV2Pair(0xB4e16d0168e52d35CaCD2c6185b44281Ec28C9Dc);\n IUniswapV2Pair constant UniV2UsdtPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external pure returns (uint256 weiAmount) {\n weiAmount =\n (_getSushiUSDC(usdAmount) + _getSushiUSDT(usdAmount) + _getUniUSDC(usdAmount) + _getUniUSDT(usdAmount)) /\n 4;\n }\n\n function _getSushiUSDC(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdcPool.getReserves();\n uint112 _reserve0 = 14248413024234;\n uint112 _reserve1 = 8237558200010903232972;\n // x is always native token / WETH\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getSushiUSDT(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdtPool.getReserves();\n uint112 _reserve0 = 7190540826553156156218;\n uint112 _reserve1 = 12394808861997;\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUniUSDC(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = UniV2UsdcPool.getReserves();\n uint112 _reserve0 = 27969935741431;\n uint112 _reserve1 = 16175569695347837629371;\n // x is always native token / WETH\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUniUSDT(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = UniV2UsdtPool.getReserves();\n uint112 _reserve0 = 16492332449237327237450;\n uint112 _reserve1 = 28443279643692;\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOraclePolygon.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOraclePolygon is Admin, Initializable, IDropsPriceOracle {\n address constant WMATIC = 0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270; // 18 decimals\n address constant USDC = 0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174; // 6 decimals\n address constant USDT = 0xc2132D05D31c914a87C6611C10748AEb04B58e8F; // 6 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0xcd353F79d9FADe311fC3119B841e1f456b54e858);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0x55FF76BFFC3Cdd9D5FdbBC2ece4528ECcE45047e);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external view returns (uint256 weiAmount) {\n weiAmount = (_getUSDC(usdAmount) + _getUSDT(usdAmount)) / 2;\n }\n\n function _getUSDC(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdcPool.getReserves();\n // x is always native token / WMATIC\n uint256 x = _reserve0;\n // y is always USD token / USDC\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUSDT(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdtPool.getReserves();\n // x is always native token / WMATIC\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOraclePolygonTestnet.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOraclePolygonTestnet is Admin, Initializable, IDropsPriceOracle {\n address constant WMATIC = 0x5B67676a984807a212b1c59eBFc9B3568a474F0a; // 18 decimals\n address constant USDC = 0x742DfA5Aa70a8212857966D491D67B09Ce7D6ec7; // 6 decimals\n address constant USDT = 0x0000000000000000000000000000000000000000; // 6 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0x412D4b3C56836ff78F1C8197c6718A6DFf3702F5);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external pure returns (uint256 weiAmount) {\n weiAmount = (_getUSDC(usdAmount) + _getUSDT(usdAmount)) / 2;\n }\n\n function _getUSDC(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdcPool.getReserves();\n uint112 _reserve0 = 185186616552407552407159;\n uint112 _reserve1 = 207981749778;\n // x is always native token / WMATIC\n uint256 x = _reserve0;\n // y is always USD token / USDC\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUSDT(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdtPool.getReserves();\n uint112 _reserve0 = 13799757434002573084812;\n uint112 _reserve1 = 15484391886;\n // x is always native token / WMATIC\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DummyDropsPriceOracle.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DummyDropsPriceOracle is Admin, Initializable, IDropsPriceOracle {\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external pure returns (uint256 weiAmount) {\n uint112 _reserve0 = 8237558200010903232972;\n uint112 _reserve1 = 14248413024234;\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDC\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/interface/ILBPair.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\ninterface ILBPair {\n function tokenX() external view returns (address);\n\n function tokenY() external view returns (address);\n\n function getReservesAndId() external view returns (uint256 reserveX, uint256 reserveY, uint256 activeId);\n}\n" + }, + "contracts/drops/oracle/interface/ILBRouter.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {ILBPair} from \"./ILBPair.sol\";\n\ninterface ILBRouter {\n function getSwapIn(\n ILBPair LBPair,\n uint128 amountOut,\n bool swapForY\n ) external view returns (uint128 amountIn, uint128 amountOutLeft, uint128 fee);\n}\n" + }, + "contracts/drops/oracle/interface/IUniswapV2Pair.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\ninterface IUniswapV2Pair {\n event Approval(address indexed owner, address indexed spender, uint256 value);\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n function name() external pure returns (string memory);\n\n function symbol() external pure returns (string memory);\n\n function decimals() external pure returns (uint8);\n\n function totalSupply() external view returns (uint256);\n\n function balanceOf(address owner) external view returns (uint256);\n\n function allowance(address owner, address spender) external view returns (uint256);\n\n function approve(address spender, uint256 value) external returns (bool);\n\n function transfer(address to, uint256 value) external returns (bool);\n\n function transferFrom(address from, address to, uint256 value) external returns (bool);\n\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n\n function PERMIT_TYPEHASH() external pure returns (bytes32);\n\n function nonces(address owner) external view returns (uint256);\n\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n event Mint(address indexed sender, uint256 amount0, uint256 amount1);\n event Burn(address indexed sender, uint256 amount0, uint256 amount1, address indexed to);\n event Swap(\n address indexed sender,\n uint256 amount0In,\n uint256 amount1In,\n uint256 amount0Out,\n uint256 amount1Out,\n address indexed to\n );\n event Sync(uint112 reserve0, uint112 reserve1);\n\n function MINIMUM_LIQUIDITY() external pure returns (uint256);\n\n function factory() external view returns (address);\n\n function token0() external view returns (address);\n\n function token1() external view returns (address);\n\n function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);\n\n function price0CumulativeLast() external view returns (uint256);\n\n function price1CumulativeLast() external view returns (uint256);\n\n function kLast() external view returns (uint256);\n\n function mint(address to) external returns (uint256 liquidity);\n\n function burn(address to) external returns (uint256 amount0, uint256 amount1);\n\n function swap(uint256 amount0Out, uint256 amount1Out, address to, bytes calldata data) external;\n\n function skim(address to) external;\n\n function sync() external;\n\n function initialize(address, address) external;\n}\n" + }, + "contracts/drops/oracle/interface/IUniswapV3Pair.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\ninterface IUniswapV3PoolImmutables {\n /// @notice The contract that deployed the pool, which must adhere to the IUniswapV3Factory interface\n /// @return The contract address\n function factory() external view returns (address);\n\n /// @notice The first of the two tokens of the pool, sorted by address\n /// @return The token contract address\n function token0() external view returns (address);\n\n /// @notice The second of the two tokens of the pool, sorted by address\n /// @return The token contract address\n function token1() external view returns (address);\n\n /// @notice The pool's fee in hundredths of a bip, i.e. 1e-6\n /// @return The fee\n function fee() external view returns (uint24);\n\n /// @notice The pool tick spacing\n /// @dev Ticks can only be used at multiples of this value, minimum of 1 and always positive\n /// e.g.: a tickSpacing of 3 means ticks can be initialized every 3rd tick, i.e., ..., -6, -3, 0, 3, 6, ...\n /// This value is an int24 to avoid casting even though it is always positive.\n /// @return The tick spacing\n function tickSpacing() external view returns (int24);\n\n /// @notice The maximum amount of position liquidity that can use any tick in the range\n /// @dev This parameter is enforced per tick to prevent liquidity from overflowing a uint128 at any point, and\n /// also prevents out-of-range liquidity from being used to prevent adding in-range liquidity to a pool\n /// @return The max amount of liquidity per tick\n function maxLiquidityPerTick() external view returns (uint128);\n}\n\ninterface IUniswapV3PoolState {\n /// @notice The 0th storage slot in the pool stores many values, and is exposed as a single method to save gas\n /// when accessed externally.\n /// @return sqrtPriceX96 The current price of the pool as a sqrt(token1/token0) Q64.96 value\n /// tick The current tick of the pool, i.e. according to the last tick transition that was run.\n /// This value may not always be equal to SqrtTickMath.getTickAtSqrtRatio(sqrtPriceX96) if the price is on a tick\n /// boundary.\n /// observationIndex The index of the last oracle observation that was written,\n /// observationCardinality The current maximum number of observations stored in the pool,\n /// observationCardinalityNext The next maximum number of observations, to be updated when the observation.\n /// feeProtocol The protocol fee for both tokens of the pool.\n /// Encoded as two 4 bit values, where the protocol fee of token1 is shifted 4 bits and the protocol fee of token0\n /// is the lower 4 bits. Used as the denominator of a fraction of the swap fee, e.g. 4 means 1/4th of the swap fee.\n /// unlocked Whether the pool is currently locked to reentrancy\n function slot0()\n external\n view\n returns (\n uint160 sqrtPriceX96,\n int24 tick,\n uint16 observationIndex,\n uint16 observationCardinality,\n uint16 observationCardinalityNext,\n uint8 feeProtocol,\n bool unlocked\n );\n\n /// @notice The fee growth as a Q128.128 fees of token0 collected per unit of liquidity for the entire life of the pool\n /// @dev This value can overflow the uint256\n function feeGrowthGlobal0X128() external view returns (uint256);\n\n /// @notice The fee growth as a Q128.128 fees of token1 collected per unit of liquidity for the entire life of the pool\n /// @dev This value can overflow the uint256\n function feeGrowthGlobal1X128() external view returns (uint256);\n\n /// @notice The amounts of token0 and token1 that are owed to the protocol\n /// @dev Protocol fees will never exceed uint128 max in either token\n function protocolFees() external view returns (uint128 token0, uint128 token1);\n\n /// @notice The currently in range liquidity available to the pool\n /// @dev This value has no relationship to the total liquidity across all ticks\n function liquidity() external view returns (uint128);\n\n /// @notice Look up information about a specific tick in the pool\n /// @param tick The tick to look up\n /// @return liquidityGross the total amount of position liquidity that uses the pool either as tick lower or\n /// tick upper,\n /// liquidityNet how much liquidity changes when the pool price crosses the tick,\n /// feeGrowthOutside0X128 the fee growth on the other side of the tick from the current tick in token0,\n /// feeGrowthOutside1X128 the fee growth on the other side of the tick from the current tick in token1,\n /// tickCumulativeOutside the cumulative tick value on the other side of the tick from the current tick\n /// secondsPerLiquidityOutsideX128 the seconds spent per liquidity on the other side of the tick from the current tick,\n /// secondsOutside the seconds spent on the other side of the tick from the current tick,\n /// initialized Set to true if the tick is initialized, i.e. liquidityGross is greater than 0, otherwise equal to false.\n /// Outside values can only be used if the tick is initialized, i.e. if liquidityGross is greater than 0.\n /// In addition, these values are only relative and must be used only in comparison to previous snapshots for\n /// a specific position.\n function ticks(\n int24 tick\n )\n external\n view\n returns (\n uint128 liquidityGross,\n int128 liquidityNet,\n uint256 feeGrowthOutside0X128,\n uint256 feeGrowthOutside1X128,\n int56 tickCumulativeOutside,\n uint160 secondsPerLiquidityOutsideX128,\n uint32 secondsOutside,\n bool initialized\n );\n\n /// @notice Returns 256 packed tick initialized boolean values. See TickBitmap for more information\n function tickBitmap(int16 wordPosition) external view returns (uint256);\n\n /// @notice Returns the information about a position by the position's key\n /// @param key The position's key is a hash of a preimage composed by the owner, tickLower and tickUpper\n /// @return _liquidity The amount of liquidity in the position,\n /// Returns feeGrowthInside0LastX128 fee growth of token0 inside the tick range as of the last mint/burn/poke,\n /// Returns feeGrowthInside1LastX128 fee growth of token1 inside the tick range as of the last mint/burn/poke,\n /// Returns tokensOwed0 the computed amount of token0 owed to the position as of the last mint/burn/poke,\n /// Returns tokensOwed1 the computed amount of token1 owed to the position as of the last mint/burn/poke\n function positions(\n bytes32 key\n )\n external\n view\n returns (\n uint128 _liquidity,\n uint256 feeGrowthInside0LastX128,\n uint256 feeGrowthInside1LastX128,\n uint128 tokensOwed0,\n uint128 tokensOwed1\n );\n\n /// @notice Returns data about a specific observation index\n /// @param index The element of the observations array to fetch\n /// @dev You most likely want to use #observe() instead of this method to get an observation as of some amount of time\n /// ago, rather than at a specific index in the array.\n /// @return blockTimestamp The timestamp of the observation,\n /// Returns tickCumulative the tick multiplied by seconds elapsed for the life of the pool as of the observation timestamp,\n /// Returns secondsPerLiquidityCumulativeX128 the seconds per in range liquidity for the life of the pool as of the observation timestamp,\n /// Returns initialized whether the observation has been initialized and the values are safe to use\n function observations(\n uint256 index\n )\n external\n view\n returns (uint32 blockTimestamp, int56 tickCumulative, uint160 secondsPerLiquidityCumulativeX128, bool initialized);\n}\n\ninterface IUniswapV3PoolDerivedState {\n /// @notice Returns the cumulative tick and liquidity as of each timestamp `secondsAgo` from the current block timestamp\n /// @dev To get a time weighted average tick or liquidity-in-range, you must call this with two values, one representing\n /// the beginning of the period and another for the end of the period. E.g., to get the last hour time-weighted average tick,\n /// you must call it with secondsAgos = [3600, 0].\n /// @dev The time weighted average tick represents the geometric time weighted average price of the pool, in\n /// log base sqrt(1.0001) of token1 / token0. The TickMath library can be used to go from a tick value to a ratio.\n /// @param secondsAgos From how long ago each cumulative tick and liquidity value should be returned\n /// @return tickCumulatives Cumulative tick values as of each `secondsAgos` from the current block timestamp\n /// @return secondsPerLiquidityCumulativeX128s Cumulative seconds per liquidity-in-range value as of each `secondsAgos` from the current block\n /// timestamp\n function observe(\n uint32[] calldata secondsAgos\n ) external view returns (int56[] memory tickCumulatives, uint160[] memory secondsPerLiquidityCumulativeX128s);\n\n /// @notice Returns a snapshot of the tick cumulative, seconds per liquidity and seconds inside a tick range\n /// @dev Snapshots must only be compared to other snapshots, taken over a period for which a position existed.\n /// I.e., snapshots cannot be compared if a position is not held for the entire period between when the first\n /// snapshot is taken and the second snapshot is taken.\n /// @param tickLower The lower tick of the range\n /// @param tickUpper The upper tick of the range\n /// @return tickCumulativeInside The snapshot of the tick accumulator for the range\n /// @return secondsPerLiquidityInsideX128 The snapshot of seconds per liquidity for the range\n /// @return secondsInside The snapshot of seconds per liquidity for the range\n function snapshotCumulativesInside(\n int24 tickLower,\n int24 tickUpper\n ) external view returns (int56 tickCumulativeInside, uint160 secondsPerLiquidityInsideX128, uint32 secondsInside);\n}\n\ninterface IUniswapV3PoolActions {\n /// @notice Sets the initial price for the pool\n /// @dev Price is represented as a sqrt(amountToken1/amountToken0) Q64.96 value\n /// @param sqrtPriceX96 the initial sqrt price of the pool as a Q64.96\n function initialize(uint160 sqrtPriceX96) external;\n\n /// @notice Adds liquidity for the given recipient/tickLower/tickUpper position\n /// @dev The caller of this method receives a callback in the form of IUniswapV3MintCallback#uniswapV3MintCallback\n /// in which they must pay any token0 or token1 owed for the liquidity. The amount of token0/token1 due depends\n /// on tickLower, tickUpper, the amount of liquidity, and the current price.\n /// @param recipient The address for which the liquidity will be created\n /// @param tickLower The lower tick of the position in which to add liquidity\n /// @param tickUpper The upper tick of the position in which to add liquidity\n /// @param amount The amount of liquidity to mint\n /// @param data Any data that should be passed through to the callback\n /// @return amount0 The amount of token0 that was paid to mint the given amount of liquidity. Matches the value in the callback\n /// @return amount1 The amount of token1 that was paid to mint the given amount of liquidity. Matches the value in the callback\n function mint(\n address recipient,\n int24 tickLower,\n int24 tickUpper,\n uint128 amount,\n bytes calldata data\n ) external returns (uint256 amount0, uint256 amount1);\n\n /// @notice Collects tokens owed to a position\n /// @dev Does not recompute fees earned, which must be done either via mint or burn of any amount of liquidity.\n /// Collect must be called by the position owner. To withdraw only token0 or only token1, amount0Requested or\n /// amount1Requested may be set to zero. To withdraw all tokens owed, caller may pass any value greater than the\n /// actual tokens owed, e.g. type(uint128).max. Tokens owed may be from accumulated swap fees or burned liquidity.\n /// @param recipient The address which should receive the fees collected\n /// @param tickLower The lower tick of the position for which to collect fees\n /// @param tickUpper The upper tick of the position for which to collect fees\n /// @param amount0Requested How much token0 should be withdrawn from the fees owed\n /// @param amount1Requested How much token1 should be withdrawn from the fees owed\n /// @return amount0 The amount of fees collected in token0\n /// @return amount1 The amount of fees collected in token1\n function collect(\n address recipient,\n int24 tickLower,\n int24 tickUpper,\n uint128 amount0Requested,\n uint128 amount1Requested\n ) external returns (uint128 amount0, uint128 amount1);\n\n /// @notice Burn liquidity from the sender and account tokens owed for the liquidity to the position\n /// @dev Can be used to trigger a recalculation of fees owed to a position by calling with an amount of 0\n /// @dev Fees must be collected separately via a call to #collect\n /// @param tickLower The lower tick of the position for which to burn liquidity\n /// @param tickUpper The upper tick of the position for which to burn liquidity\n /// @param amount How much liquidity to burn\n /// @return amount0 The amount of token0 sent to the recipient\n /// @return amount1 The amount of token1 sent to the recipient\n function burn(int24 tickLower, int24 tickUpper, uint128 amount) external returns (uint256 amount0, uint256 amount1);\n\n /// @notice Swap token0 for token1, or token1 for token0\n /// @dev The caller of this method receives a callback in the form of IUniswapV3SwapCallback#uniswapV3SwapCallback\n /// @param recipient The address to receive the output of the swap\n /// @param zeroForOne The direction of the swap, true for token0 to token1, false for token1 to token0\n /// @param amountSpecified The amount of the swap, which implicitly configures the swap as exact input (positive), or exact output (negative)\n /// @param sqrtPriceLimitX96 The Q64.96 sqrt price limit. If zero for one, the price cannot be less than this\n /// value after the swap. If one for zero, the price cannot be greater than this value after the swap\n /// @param data Any data to be passed through to the callback\n /// @return amount0 The delta of the balance of token0 of the pool, exact when negative, minimum when positive\n /// @return amount1 The delta of the balance of token1 of the pool, exact when negative, minimum when positive\n function swap(\n address recipient,\n bool zeroForOne,\n int256 amountSpecified,\n uint160 sqrtPriceLimitX96,\n bytes calldata data\n ) external returns (int256 amount0, int256 amount1);\n\n /// @notice Receive token0 and/or token1 and pay it back, plus a fee, in the callback\n /// @dev The caller of this method receives a callback in the form of IUniswapV3FlashCallback#uniswapV3FlashCallback\n /// @dev Can be used to donate underlying tokens pro-rata to currently in-range liquidity providers by calling\n /// with 0 amount{0,1} and sending the donation amount(s) from the callback\n /// @param recipient The address which will receive the token0 and token1 amounts\n /// @param amount0 The amount of token0 to send\n /// @param amount1 The amount of token1 to send\n /// @param data Any data to be passed through to the callback\n function flash(address recipient, uint256 amount0, uint256 amount1, bytes calldata data) external;\n\n /// @notice Increase the maximum number of price and liquidity observations that this pool will store\n /// @dev This method is no-op if the pool already has an observationCardinalityNext greater than or equal to\n /// the input observationCardinalityNext.\n /// @param observationCardinalityNext The desired minimum number of observations for the pool to store\n function increaseObservationCardinalityNext(uint16 observationCardinalityNext) external;\n}\n\ninterface IUniswapV3PoolOwnerActions {\n /// @notice Set the denominator of the protocol's % share of the fees\n /// @param feeProtocol0 new protocol fee for token0 of the pool\n /// @param feeProtocol1 new protocol fee for token1 of the pool\n function setFeeProtocol(uint8 feeProtocol0, uint8 feeProtocol1) external;\n\n /// @notice Collect the protocol fee accrued to the pool\n /// @param recipient The address to which collected protocol fees should be sent\n /// @param amount0Requested The maximum amount of token0 to send, can be 0 to collect fees in only token1\n /// @param amount1Requested The maximum amount of token1 to send, can be 0 to collect fees in only token0\n /// @return amount0 The protocol fee collected in token0\n /// @return amount1 The protocol fee collected in token1\n function collectProtocol(\n address recipient,\n uint128 amount0Requested,\n uint128 amount1Requested\n ) external returns (uint128 amount0, uint128 amount1);\n}\n\ninterface IUniswapV3PoolEvents {\n /// @notice Emitted exactly once by a pool when #initialize is first called on the pool\n /// @dev Mint/Burn/Swap cannot be emitted by the pool before Initialize\n /// @param sqrtPriceX96 The initial sqrt price of the pool, as a Q64.96\n /// @param tick The initial tick of the pool, i.e. log base 1.0001 of the starting price of the pool\n event Initialize(uint160 sqrtPriceX96, int24 tick);\n\n /// @notice Emitted when liquidity is minted for a given position\n /// @param sender The address that minted the liquidity\n /// @param owner The owner of the position and recipient of any minted liquidity\n /// @param tickLower The lower tick of the position\n /// @param tickUpper The upper tick of the position\n /// @param amount The amount of liquidity minted to the position range\n /// @param amount0 How much token0 was required for the minted liquidity\n /// @param amount1 How much token1 was required for the minted liquidity\n event Mint(\n address sender,\n address indexed owner,\n int24 indexed tickLower,\n int24 indexed tickUpper,\n uint128 amount,\n uint256 amount0,\n uint256 amount1\n );\n\n /// @notice Emitted when fees are collected by the owner of a position\n /// @dev Collect events may be emitted with zero amount0 and amount1 when the caller chooses not to collect fees\n /// @param owner The owner of the position for which fees are collected\n /// @param tickLower The lower tick of the position\n /// @param tickUpper The upper tick of the position\n /// @param amount0 The amount of token0 fees collected\n /// @param amount1 The amount of token1 fees collected\n event Collect(\n address indexed owner,\n address recipient,\n int24 indexed tickLower,\n int24 indexed tickUpper,\n uint128 amount0,\n uint128 amount1\n );\n\n /// @notice Emitted when a position's liquidity is removed\n /// @dev Does not withdraw any fees earned by the liquidity position, which must be withdrawn via #collect\n /// @param owner The owner of the position for which liquidity is removed\n /// @param tickLower The lower tick of the position\n /// @param tickUpper The upper tick of the position\n /// @param amount The amount of liquidity to remove\n /// @param amount0 The amount of token0 withdrawn\n /// @param amount1 The amount of token1 withdrawn\n event Burn(\n address indexed owner,\n int24 indexed tickLower,\n int24 indexed tickUpper,\n uint128 amount,\n uint256 amount0,\n uint256 amount1\n );\n\n /// @notice Emitted by the pool for any swaps between token0 and token1\n /// @param sender The address that initiated the swap call, and that received the callback\n /// @param recipient The address that received the output of the swap\n /// @param amount0 The delta of the token0 balance of the pool\n /// @param amount1 The delta of the token1 balance of the pool\n /// @param sqrtPriceX96 The sqrt(price) of the pool after the swap, as a Q64.96\n /// @param liquidity The liquidity of the pool after the swap\n /// @param tick The log base 1.0001 of price of the pool after the swap\n event Swap(\n address indexed sender,\n address indexed recipient,\n int256 amount0,\n int256 amount1,\n uint160 sqrtPriceX96,\n uint128 liquidity,\n int24 tick\n );\n\n /// @notice Emitted by the pool for any flashes of token0/token1\n /// @param sender The address that initiated the swap call, and that received the callback\n /// @param recipient The address that received the tokens from flash\n /// @param amount0 The amount of token0 that was flashed\n /// @param amount1 The amount of token1 that was flashed\n /// @param paid0 The amount of token0 paid for the flash, which can exceed the amount0 plus the fee\n /// @param paid1 The amount of token1 paid for the flash, which can exceed the amount1 plus the fee\n event Flash(\n address indexed sender,\n address indexed recipient,\n uint256 amount0,\n uint256 amount1,\n uint256 paid0,\n uint256 paid1\n );\n\n /// @notice Emitted by the pool for increases to the number of observations that can be stored\n /// @dev observationCardinalityNext is not the observation cardinality until an observation is written at the index\n /// just before a mint/swap/burn.\n /// @param observationCardinalityNextOld The previous value of the next observation cardinality\n /// @param observationCardinalityNextNew The updated value of the next observation cardinality\n event IncreaseObservationCardinalityNext(uint16 observationCardinalityNextOld, uint16 observationCardinalityNextNew);\n\n /// @notice Emitted when the protocol fee is changed by the pool\n /// @param feeProtocol0Old The previous value of the token0 protocol fee\n /// @param feeProtocol1Old The previous value of the token1 protocol fee\n /// @param feeProtocol0New The updated value of the token0 protocol fee\n /// @param feeProtocol1New The updated value of the token1 protocol fee\n event SetFeeProtocol(uint8 feeProtocol0Old, uint8 feeProtocol1Old, uint8 feeProtocol0New, uint8 feeProtocol1New);\n\n /// @notice Emitted when the collected protocol fees are withdrawn by the factory owner\n /// @param sender The address that collects the protocol fees\n /// @param recipient The address that receives the collected protocol fees\n /// @param amount0 The amount of token0 protocol fees that is withdrawn\n /// @param amount0 The amount of token1 protocol fees that is withdrawn\n event CollectProtocol(address indexed sender, address indexed recipient, uint128 amount0, uint128 amount1);\n}\n\ninterface IUniswapV3Pool is\n IUniswapV3PoolImmutables,\n IUniswapV3PoolState,\n IUniswapV3PoolDerivedState,\n IUniswapV3PoolActions,\n IUniswapV3PoolOwnerActions,\n IUniswapV3PoolEvents\n{}\n\ninterface IUniswapV3Pair is IUniswapV3Pool {}\n" + }, + "contracts/drops/oracle/interface/IUniswapV3Quoter.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\ninterface IUniswapV3Quoter {\n /// @notice Returns the amount out received for a given exact input swap without executing the swap\n /// @param path The path of the swap, i.e. each token pair and the pool fee\n /// @param amountIn The amount of the first token to swap\n /// @return amountOut The amount of the last token that would be received\n function quoteExactInput(bytes memory path, uint256 amountIn) external returns (uint256 amountOut);\n\n /// @notice Returns the amount out received for a given exact input but for a swap of a single pool\n /// @param tokenIn The token being swapped in\n /// @param tokenOut The token being swapped out\n /// @param fee The fee of the token pool to consider for the pair\n /// @param amountIn The desired input amount\n /// @param sqrtPriceLimitX96 The price limit of the pool that cannot be exceeded by the swap\n /// @return amountOut The amount of `tokenOut` that would be received\n function quoteExactInputSingle(\n address tokenIn,\n address tokenOut,\n uint24 fee,\n uint256 amountIn,\n uint160 sqrtPriceLimitX96\n ) external returns (uint256 amountOut);\n\n /// @notice Returns the amount in required for a given exact output swap without executing the swap\n /// @param path The path of the swap, i.e. each token pair and the pool fee\n /// @param amountOut The amount of the last token to receive\n /// @return amountIn The amount of first token required to be paid\n function quoteExactOutput(bytes memory path, uint256 amountOut) external returns (uint256 amountIn);\n\n /// @notice Returns the amount in required to receive the given exact output amount but for a swap of a single pool\n /// @param tokenIn The token being swapped in\n /// @param tokenOut The token being swapped out\n /// @param fee The fee of the token pool to consider for the pair\n /// @param amountOut The desired output amount\n /// @param sqrtPriceLimitX96 The price limit of the pool that cannot be exceeded by the swap\n /// @return amountIn The amount required as the input for the swap in order to receive `amountOut`\n function quoteExactOutputSingle(\n address tokenIn,\n address tokenOut,\n uint24 fee,\n uint256 amountOut,\n uint160 sqrtPriceLimitX96\n ) external returns (uint256 amountIn);\n}\n" + }, + "contracts/drops/proxy/DropsMetadataRendererProxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../../abstract/Admin.sol\";\nimport \"../../abstract/Initializable.sol\";\n\ncontract DropsMetadataRendererProxy is Admin, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.dropsMetadataRenderer')) - 1)\n */\n bytes32 constant _dropsMetadataRendererSlot = 0xe1d18664c68b1eedd4e2fc65b2d42097f2cd8cd4c2f1a9a6418986c9f5da3817;\n\n constructor() {}\n\n function init(bytes memory data) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address dropsMetadataRenderer, bytes memory initCode) = abi.decode(data, (address, bytes));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_dropsMetadataRendererSlot, dropsMetadataRenderer)\n }\n (bool success, bytes memory returnData) = dropsMetadataRenderer.delegatecall(\n abi.encodeWithSignature(\"init(bytes)\", initCode)\n );\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == Initializable.init.selector, \"initialization failed\");\n _setInitialized();\n return Initializable.init.selector;\n }\n\n function getDropsMetadataRenderer() external view returns (address dropsMetadataRenderer) {\n assembly {\n dropsMetadataRenderer := sload(_dropsMetadataRendererSlot)\n }\n }\n\n function setDropsMetadataRenderer(address dropsMetadataRenderer) external onlyAdmin {\n assembly {\n sstore(_dropsMetadataRendererSlot, dropsMetadataRenderer)\n }\n }\n\n receive() external payable {}\n\n fallback() external payable {\n assembly {\n let dropsMetadataRenderer := sload(_dropsMetadataRendererSlot)\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), dropsMetadataRenderer, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/drops/proxy/DropsPriceOracleProxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../../abstract/Admin.sol\";\nimport \"../../abstract/Initializable.sol\";\n\ncontract DropsPriceOracleProxy is Admin, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.dropsPriceOracle')) - 1)\n */\n bytes32 constant _dropsPriceOracleSlot = 0x26600f0171e5a2b86874be26285c66444b2a6fa5f62114757214d5e732aded36;\n\n constructor() {}\n\n function init(bytes memory data) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address dropsPriceOracle, bytes memory initCode) = abi.decode(data, (address, bytes));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_dropsPriceOracleSlot, dropsPriceOracle)\n }\n (bool success, bytes memory returnData) = dropsPriceOracle.delegatecall(\n abi.encodeWithSignature(\"init(bytes)\", initCode)\n );\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == Initializable.init.selector, \"initialization failed\");\n _setInitialized();\n return Initializable.init.selector;\n }\n\n function getDropsPriceOracle() external view returns (address dropsPriceOracle) {\n assembly {\n dropsPriceOracle := sload(_dropsPriceOracleSlot)\n }\n }\n\n function setDropsPriceOracle(address dropsPriceOracle) external onlyAdmin {\n assembly {\n sstore(_dropsPriceOracleSlot, dropsPriceOracle)\n }\n }\n\n receive() external payable {}\n\n fallback() external payable {\n assembly {\n let dropsPriceOracle := sload(_dropsPriceOracleSlot)\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), dropsPriceOracle, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/drops/proxy/EditionsMetadataRendererProxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../../abstract/Admin.sol\";\nimport \"../../abstract/Initializable.sol\";\n\ncontract EditionsMetadataRendererProxy is Admin, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.editionsMetadataRenderer')) - 1)\n */\n bytes32 constant _editionsMetadataRendererSlot = 0x747f2428bc473d14fd9642872693b7bc7ad3f58057c4c084ce1f541a26e4bcb1;\n\n constructor() {}\n\n function init(bytes memory data) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address editionsMetadataRenderer, bytes memory initCode) = abi.decode(data, (address, bytes));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_editionsMetadataRendererSlot, editionsMetadataRenderer)\n }\n (bool success, bytes memory returnData) = editionsMetadataRenderer.delegatecall(\n abi.encodeWithSignature(\"init(bytes)\", initCode)\n );\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == Initializable.init.selector, \"initialization failed\");\n _setInitialized();\n return Initializable.init.selector;\n }\n\n function getEditionsMetadataRenderer() external view returns (address editionsMetadataRenderer) {\n assembly {\n editionsMetadataRenderer := sload(_editionsMetadataRendererSlot)\n }\n }\n\n function setEditionsMetadataRenderer(address editionsMetadataRenderer) external onlyAdmin {\n assembly {\n sstore(_editionsMetadataRendererSlot, editionsMetadataRenderer)\n }\n }\n\n receive() external payable {}\n\n fallback() external payable {\n assembly {\n let editionsMetadataRenderer := sload(_editionsMetadataRendererSlot)\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), editionsMetadataRenderer, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/drops/proxy/HolographDropERC721Proxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../../abstract/Admin.sol\";\nimport \"../../abstract/Initializable.sol\";\n\nimport \"../../interface/HolographRegistryInterface.sol\";\n\ncontract HolographDropERC721Proxy is Admin, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.contractType')) - 1)\n */\n bytes32 constant _contractTypeSlot = 0x0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c7;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\n */\n bytes32 constant _registrySlot = 0xce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7;\n\n constructor() {}\n\n function init(bytes memory data) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (bytes32 contractType, address registry, bytes memory initCode) = abi.decode(data, (bytes32, address, bytes));\n assembly {\n sstore(_contractTypeSlot, contractType)\n sstore(_registrySlot, registry)\n }\n (bool success, bytes memory returnData) = getHolographDropERC721Source().delegatecall(\n abi.encodeWithSignature(\"init(bytes)\", initCode)\n );\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == Initializable.init.selector, \"initialization failed\");\n\n _setInitialized();\n return Initializable.init.selector;\n }\n\n function getHolographDropERC721Source() public view returns (address) {\n HolographRegistryInterface registry;\n bytes32 contractType;\n assembly {\n registry := sload(_registrySlot)\n contractType := sload(_contractTypeSlot)\n }\n return registry.getContractTypeAddress(contractType);\n }\n\n receive() external payable {}\n\n fallback() external payable {\n address HolographDropERC721Source = getHolographDropERC721Source();\n assembly {\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), HolographDropERC721Source, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/drops/struct/AddressMintDetails.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\n/// @notice Return type of specific mint counts and details per address\nstruct AddressMintDetails {\n /// Number of total mints from the given address\n uint256 totalMints;\n /// Number of presale mints from the given address\n uint256 presaleMints;\n /// Number of public mints from the given address\n uint256 publicMints;\n}\n" + }, + "contracts/drops/struct/Configuration.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {IMetadataRenderer} from \"../interface/IMetadataRenderer.sol\";\n\n/// @notice General configuration for NFT Minting and bookkeeping\nstruct Configuration {\n /// @dev Metadata renderer (uint160)\n IMetadataRenderer metadataRenderer;\n /// @dev Total size of edition that can be minted (uint160+64 = 224)\n uint64 editionSize;\n /// @dev Royalty amount in bps (uint224+16 = 240)\n uint16 royaltyBPS;\n /// @dev Funds recipient for sale (new slot, uint160)\n address payable fundsRecipient;\n}\n" + }, + "contracts/drops/struct/DropsInitializer.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {SalesConfiguration} from \"./SalesConfiguration.sol\";\n\n/// @param erc721TransferHelper Transfer helper contract\n/// @param marketFilterAddress Market filter address - Manage subscription to the for marketplace filtering based off royalty payouts.\n/// @param initialOwner User that owns and can mint the edition, gets royalty and sales payouts and can update the base url if needed.\n/// @param fundsRecipient Wallet/user that receives funds from sale\n/// @param editionSize Number of editions that can be minted in total. If type(uint64).max, unlimited editions can be minted as an open edition.\n/// @param royaltyBPS BPS of the royalty set on the contract. Can be 0 for no royalty.\n/// @param salesConfiguration The initial SalesConfiguration\n/// @param metadataRenderer Renderer contract to use\n/// @param metadataRendererInit Renderer data initial contract\nstruct DropsInitializer {\n address erc721TransferHelper;\n address marketFilterAddress;\n address initialOwner;\n address payable fundsRecipient;\n uint64 editionSize;\n uint16 royaltyBPS;\n bool enableOpenSeaRoyaltyRegistry;\n SalesConfiguration salesConfiguration;\n address metadataRenderer;\n bytes metadataRendererInit;\n}\n" + }, + "contracts/drops/struct/SaleDetails.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\n/// @notice Return value for sales details to use with front-ends\nstruct SaleDetails {\n // Synthesized status variables for sale and presale\n bool publicSaleActive;\n bool presaleActive;\n // Price for public sale\n uint256 publicSalePrice;\n // Timed sale actions for public sale\n uint64 publicSaleStart;\n uint64 publicSaleEnd;\n // Timed sale actions for presale\n uint64 presaleStart;\n uint64 presaleEnd;\n // Merkle root (includes address, quantity, and price data for each entry)\n bytes32 presaleMerkleRoot;\n // Limit public sale to a specific number of mints per wallet\n uint256 maxSalePurchasePerAddress;\n // Information about the rest of the supply\n // Total that have been minted\n uint256 totalMinted;\n // The total supply available\n uint256 maxSupply;\n}\n" + }, + "contracts/drops/struct/SalesConfiguration.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\n/// @notice Sales states and configuration\n/// @dev Uses 3 storage slots\nstruct SalesConfiguration {\n /// @dev Public sale price (max ether value > 1000 ether with this value)\n uint104 publicSalePrice;\n /// @notice Purchase mint limit per address (if set to 0 === unlimited mints)\n /// @dev Max purchase number per txn (90+32 = 122)\n uint32 maxSalePurchasePerAddress;\n /// @dev uint64 type allows for dates into 292 billion years\n /// @notice Public sale start timestamp (136+64 = 186)\n uint64 publicSaleStart;\n /// @notice Public sale end timestamp (186+64 = 250)\n uint64 publicSaleEnd;\n /// @notice Presale start timestamp\n /// @dev new storage slot\n uint64 presaleStart;\n /// @notice Presale end timestamp\n uint64 presaleEnd;\n /// @notice Presale merkle root\n bytes32 presaleMerkleRoot;\n}\n" + }, + "contracts/drops/token/HolographDropERC721.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport {ERC721H} from \"../../abstract/ERC721H.sol\";\nimport {NonReentrant} from \"../../abstract/NonReentrant.sol\";\n\nimport {HolographERC721Interface} from \"../../interface/HolographERC721Interface.sol\";\nimport {HolographerInterface} from \"../../interface/HolographerInterface.sol\";\nimport {HolographInterface} from \"../../interface/HolographInterface.sol\";\n\nimport {AddressMintDetails} from \"../struct/AddressMintDetails.sol\";\nimport {Configuration} from \"../struct/Configuration.sol\";\nimport {DropsInitializer} from \"../struct/DropsInitializer.sol\";\nimport {SaleDetails} from \"../struct/SaleDetails.sol\";\nimport {SalesConfiguration} from \"../struct/SalesConfiguration.sol\";\n\nimport {Address} from \"../library/Address.sol\";\nimport {MerkleProof} from \"../library/MerkleProof.sol\";\n\nimport {IMetadataRenderer} from \"../interface/IMetadataRenderer.sol\";\nimport {IOperatorFilterRegistry} from \"../interface/IOperatorFilterRegistry.sol\";\nimport {IHolographDropERC721} from \"../interface/IHolographDropERC721.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\n\n/**\n * @dev This contract subscribes to the following HolographERC721 events:\n * - beforeSafeTransfer\n * - beforeTransfer\n * - onIsApprovedForAll\n * - customContractURI\n *\n * Do not enable or subscribe to any other events unless you modified your source code for them.\n */\ncontract HolographDropERC721 is NonReentrant, ERC721H, IHolographDropERC721 {\n /**\n * CONTRACT VARIABLES\n * all variables, without custom storage slots, are defined here\n */\n\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.osRegistryEnabled')) - 1)\n */\n bytes32 constant _osRegistryEnabledSlot = 0x5c835f3b6bd322d9a084ffdeac746df2b96cce308e7f0612f4ff4f9c490734cc;\n\n /**\n * @dev Address of the operator filter registry\n */\n IOperatorFilterRegistry public constant openseaOperatorFilterRegistry =\n IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E);\n\n /**\n * @dev Address of the price oracle proxy\n */\n IDropsPriceOracle public constant dropsPriceOracle = IDropsPriceOracle(0xA3Db09EEC42BAfF7A50fb8F9aF90A0e035Ef3302);\n\n /**\n * @dev Internal reference used for minting incremental token ids.\n */\n uint224 private _currentTokenId;\n\n /**\n * @dev HOLOGRAPH transfer helper address for auto-approval\n */\n address public erc721TransferHelper;\n\n /**\n * @dev Address of the market filter registry\n */\n address public marketFilterAddress;\n\n /**\n * @notice Configuration for NFT minting contract storage\n */\n Configuration public config;\n\n /**\n * @notice Sales configuration\n */\n SalesConfiguration public salesConfig;\n\n /**\n * @dev Mapping for presale mint counts by address to allow public mint limit\n */\n mapping(address => uint256) public presaleMintsByAddress;\n\n /**\n * @dev Mapping for presale mint counts by address to allow public mint limit\n */\n mapping(address => uint256) public totalMintsByAddress;\n\n /**\n * CUSTOM ERRORS\n */\n\n /**\n * @notice Thrown when there is no active market filter address supported for the current chain\n * @dev Used for enabling and disabling filter for the given chain.\n */\n error MarketFilterAddressNotSupportedForChain();\n\n /**\n * MODIFIERS\n */\n\n /**\n * @notice Allows user to mint tokens at a quantity\n */\n modifier canMintTokens(uint256 quantity) {\n if (config.editionSize != 0 && quantity + _currentTokenId > config.editionSize) {\n revert Mint_SoldOut();\n }\n\n _;\n }\n\n /**\n * @notice Presale active\n */\n modifier onlyPresaleActive() {\n if (!_presaleActive()) {\n revert Presale_Inactive();\n }\n\n _;\n }\n\n /**\n * @notice Public sale active\n */\n modifier onlyPublicSaleActive() {\n if (!_publicSaleActive()) {\n revert Sale_Inactive();\n }\n\n _;\n }\n\n /**\n * CONTRACT INITIALIZERS\n * init function is used instead of constructor\n */\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n\n DropsInitializer memory initializer = abi.decode(initPayload, (DropsInitializer));\n\n erc721TransferHelper = initializer.erc721TransferHelper;\n if (initializer.marketFilterAddress != address(0)) {\n marketFilterAddress = initializer.marketFilterAddress;\n }\n\n // Setup the owner role\n _setOwner(initializer.initialOwner);\n\n // Setup config variables\n config = Configuration({\n metadataRenderer: IMetadataRenderer(initializer.metadataRenderer),\n editionSize: initializer.editionSize,\n royaltyBPS: initializer.royaltyBPS,\n fundsRecipient: initializer.fundsRecipient\n });\n\n salesConfig = initializer.salesConfiguration;\n\n // TODO: Need to make sure to initialize the metadata renderer\n if (initializer.metadataRenderer != address(0)) {\n IMetadataRenderer(initializer.metadataRenderer).initializeWithData(initializer.metadataRendererInit);\n }\n\n if (initializer.enableOpenSeaRoyaltyRegistry && Address.isContract(address(openseaOperatorFilterRegistry))) {\n if (marketFilterAddress == address(0)) {\n // this is a default filter that can be used for OS royalty filtering\n // marketFilterAddress = 0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6;\n // we just register to OS royalties and let OS handle it for us with their default filter contract\n HolographERC721Interface(holographer()).sourceExternalCall(\n address(openseaOperatorFilterRegistry),\n abi.encodeWithSelector(IOperatorFilterRegistry.register.selector, holographer())\n );\n } else {\n // allow user to specify custom filtering contract address\n HolographERC721Interface(holographer()).sourceExternalCall(\n address(openseaOperatorFilterRegistry),\n abi.encodeWithSelector(\n IOperatorFilterRegistry.registerAndSubscribe.selector,\n holographer(),\n marketFilterAddress\n )\n );\n }\n assembly {\n sstore(_osRegistryEnabledSlot, true)\n }\n }\n\n setStatus(1);\n\n return _init(initPayload);\n }\n\n /**\n * PUBLIC NON STATE CHANGING FUNCTIONS\n * static\n */\n\n /**\n * @notice Returns the version of the contract\n * @dev Used for contract versioning and validation\n * @return version string representing the version of the contract\n */\n function version() external pure returns (string memory) {\n return \"1.0.0\";\n }\n\n function supportsInterface(bytes4 interfaceId) external pure override returns (bool) {\n return interfaceId == type(IHolographDropERC721).interfaceId;\n }\n\n /**\n * PUBLIC NON STATE CHANGING FUNCTIONS\n * dynamic\n */\n\n function owner() external view override(ERC721H, IHolographDropERC721) returns (address) {\n return _getOwner();\n }\n\n function isAdmin(address user) external view returns (bool) {\n return (_getOwner() == user);\n }\n\n function beforeSafeTransfer(\n address _from,\n address /* _to*/,\n uint256 /* _tokenId*/,\n bytes calldata /* _data*/\n ) external view returns (bool) {\n if (\n _from != address(0) && // skip on mints\n _from != msgSender() // skip on transfers from sender\n ) {\n bool osRegistryEnabled;\n assembly {\n osRegistryEnabled := sload(_osRegistryEnabledSlot)\n }\n if (osRegistryEnabled) {\n try openseaOperatorFilterRegistry.isOperatorAllowed(address(this), msgSender()) returns (bool allowed) {\n return allowed;\n } catch {\n revert OperatorNotAllowed(msgSender());\n }\n }\n }\n return true;\n }\n\n function beforeTransfer(\n address _from,\n address /* _to*/,\n uint256 /* _tokenId*/,\n bytes calldata /* _data*/\n ) external view returns (bool) {\n if (\n _from != address(0) && // skip on mints\n _from != msgSender() // skip on transfers from sender\n ) {\n bool osRegistryEnabled;\n assembly {\n osRegistryEnabled := sload(_osRegistryEnabledSlot)\n }\n if (osRegistryEnabled) {\n try openseaOperatorFilterRegistry.isOperatorAllowed(address(this), msgSender()) returns (bool allowed) {\n return allowed;\n } catch {\n revert OperatorNotAllowed(msgSender());\n }\n }\n }\n return true;\n }\n\n function onIsApprovedForAll(address /* _wallet*/, address _operator) external view returns (bool approved) {\n approved = (erc721TransferHelper != address(0) && _operator == erc721TransferHelper);\n }\n\n /**\n * @notice Sale details\n * @return SaleDetails sale information details\n */\n function saleDetails() external view returns (SaleDetails memory) {\n return\n SaleDetails({\n publicSaleActive: _publicSaleActive(),\n presaleActive: _presaleActive(),\n publicSalePrice: salesConfig.publicSalePrice,\n publicSaleStart: salesConfig.publicSaleStart,\n publicSaleEnd: salesConfig.publicSaleEnd,\n presaleStart: salesConfig.presaleStart,\n presaleEnd: salesConfig.presaleEnd,\n presaleMerkleRoot: salesConfig.presaleMerkleRoot,\n totalMinted: _currentTokenId,\n maxSupply: config.editionSize,\n maxSalePurchasePerAddress: salesConfig.maxSalePurchasePerAddress\n });\n }\n\n /**\n * @dev Number of NFTs the user has minted per address\n * @param minter to get counts for\n */\n function mintedPerAddress(address minter) external view returns (AddressMintDetails memory) {\n return\n AddressMintDetails({\n presaleMints: presaleMintsByAddress[minter],\n publicMints: totalMintsByAddress[minter] - presaleMintsByAddress[minter],\n totalMints: totalMintsByAddress[minter]\n });\n }\n\n /**\n * @notice Contract URI Getter, proxies to metadataRenderer\n * @return Contract URI\n */\n function contractURI() external view returns (string memory) {\n return config.metadataRenderer.contractURI();\n }\n\n /**\n * @notice Getter for metadataRenderer contract\n */\n function metadataRenderer() external view returns (IMetadataRenderer) {\n return IMetadataRenderer(config.metadataRenderer);\n }\n\n /**\n * @notice Convert USD price to current price in native Ether\n */\n function getNativePrice() external view returns (uint256) {\n return _usdToWei(salesConfig.publicSalePrice);\n }\n\n /**\n * @notice Returns the name of the token through the holographer entrypoint\n */\n function name() external view returns (string memory) {\n return HolographERC721Interface(holographer()).name();\n }\n\n /**\n * @notice Token URI Getter, proxies to metadataRenderer\n * @param tokenId id of token to get URI for\n * @return Token URI\n */\n function tokenURI(uint256 tokenId) external view returns (string memory) {\n HolographERC721Interface H721 = HolographERC721Interface(holographer());\n require(H721.exists(tokenId), \"ERC721: token does not exist\");\n\n return config.metadataRenderer.tokenURI(tokenId);\n }\n\n /**\n * PUBLIC STATE CHANGING FUNCTIONS\n * available to all\n */\n\n function multicall(bytes[] memory data) public returns (bytes[] memory results) {\n results = new bytes[](data.length);\n for (uint256 i = 0; i < data.length; i++) {\n results[i] = Address.functionDelegateCall(address(this), abi.encodePacked(data[i], msgSender()));\n }\n }\n\n /**\n * @dev This allows the user to purchase/mint a edition at the given price in the contract.\n */\n function purchase(\n uint256 quantity\n ) external payable nonReentrant canMintTokens(quantity) onlyPublicSaleActive returns (uint256) {\n uint256 salePrice = _usdToWei(salesConfig.publicSalePrice);\n\n if (msg.value < salePrice * quantity) {\n revert Purchase_WrongPrice(salesConfig.publicSalePrice * quantity);\n }\n uint256 remainder = msg.value - (salePrice * quantity);\n\n // If max purchase per address == 0 there is no limit.\n // Any other number, the per address mint limit is that.\n if (\n salesConfig.maxSalePurchasePerAddress != 0 &&\n totalMintsByAddress[msgSender()] + quantity - presaleMintsByAddress[msgSender()] >\n salesConfig.maxSalePurchasePerAddress\n ) {\n revert Purchase_TooManyForAddress();\n }\n\n _mintNFTs(msgSender(), quantity);\n\n HolographERC721Interface H721 = HolographERC721Interface(holographer());\n uint256 chainPrepend = H721.sourceGetChainPrepend();\n uint256 firstMintedTokenId = (chainPrepend + uint256(_currentTokenId - quantity)) + 1;\n\n emit Sale({\n to: msgSender(),\n quantity: quantity,\n pricePerToken: salePrice,\n firstPurchasedTokenId: firstMintedTokenId\n });\n\n if (remainder > 0) {\n msgSender().call{value: remainder, gas: gasleft() > 210_000 ? 210_000 : gasleft()}(\"\");\n }\n\n return firstMintedTokenId;\n }\n\n /**\n * @notice Merkle-tree based presale purchase function\n * @param quantity quantity to purchase\n * @param maxQuantity max quantity that can be purchased via merkle proof #\n * @param pricePerToken price that each token is purchased at\n * @param merkleProof proof for presale mint\n */\n function purchasePresale(\n uint256 quantity,\n uint256 maxQuantity,\n uint256 pricePerToken,\n bytes32[] calldata merkleProof\n ) external payable nonReentrant canMintTokens(quantity) onlyPresaleActive returns (uint256) {\n if (\n !MerkleProof.verify(\n merkleProof,\n salesConfig.presaleMerkleRoot,\n keccak256(\n // address, uint256, uint256\n abi.encode(msgSender(), maxQuantity, pricePerToken)\n )\n )\n ) {\n revert Presale_MerkleNotApproved();\n }\n\n uint256 weiPricePerToken = _usdToWei(pricePerToken);\n if (msg.value < weiPricePerToken * quantity) {\n revert Purchase_WrongPrice(pricePerToken * quantity);\n }\n uint256 remainder = msg.value - (weiPricePerToken * quantity);\n\n presaleMintsByAddress[msgSender()] += quantity;\n if (presaleMintsByAddress[msgSender()] > maxQuantity) {\n revert Presale_TooManyForAddress();\n }\n\n _mintNFTs(msgSender(), quantity);\n\n HolographERC721Interface H721 = HolographERC721Interface(holographer());\n uint256 chainPrepend = H721.sourceGetChainPrepend();\n uint256 firstMintedTokenId = (chainPrepend + uint256(_currentTokenId - quantity)) + 1;\n\n emit Sale({\n to: msgSender(),\n quantity: quantity,\n pricePerToken: weiPricePerToken,\n firstPurchasedTokenId: firstMintedTokenId\n });\n\n if (remainder > 0) {\n msgSender().call{value: remainder, gas: gasleft() > 210_000 ? 210_000 : gasleft()}(\"\");\n }\n\n return firstMintedTokenId;\n }\n\n /**\n * PUBLIC STATE CHANGING FUNCTIONS\n * admin only\n */\n\n /**\n * @notice Proxy to update market filter settings in the main registry contracts\n * @notice Requires admin permissions\n * @param args Calldata args to pass to the registry\n */\n function updateMarketFilterSettings(bytes calldata args) external onlyOwner {\n HolographERC721Interface(holographer()).sourceExternalCall(address(openseaOperatorFilterRegistry), args);\n bool osRegistryEnabled = openseaOperatorFilterRegistry.isRegistered(holographer());\n assembly {\n sstore(_osRegistryEnabledSlot, osRegistryEnabled)\n }\n }\n\n /**\n * @notice Manage subscription for marketplace filtering based off royalty payouts.\n * @param enable Enable filtering to non-royalty payout marketplaces\n */\n function manageMarketFilterSubscription(bool enable) external onlyOwner {\n address self = holographer();\n if (marketFilterAddress == address(0)) {\n revert MarketFilterAddressNotSupportedForChain();\n }\n if (!openseaOperatorFilterRegistry.isRegistered(self) && enable) {\n HolographERC721Interface(self).sourceExternalCall(\n address(openseaOperatorFilterRegistry),\n abi.encodeWithSelector(IOperatorFilterRegistry.registerAndSubscribe.selector, self, marketFilterAddress)\n );\n } else if (enable) {\n HolographERC721Interface(self).sourceExternalCall(\n address(openseaOperatorFilterRegistry),\n abi.encodeWithSelector(IOperatorFilterRegistry.subscribe.selector, self, marketFilterAddress)\n );\n } else {\n HolographERC721Interface(self).sourceExternalCall(\n address(openseaOperatorFilterRegistry),\n abi.encodeWithSelector(IOperatorFilterRegistry.unsubscribe.selector, self, false)\n );\n HolographERC721Interface(self).sourceExternalCall(\n address(openseaOperatorFilterRegistry),\n abi.encodeWithSelector(IOperatorFilterRegistry.unregister.selector, self)\n );\n }\n bool osRegistryEnabled = openseaOperatorFilterRegistry.isRegistered(self);\n assembly {\n sstore(_osRegistryEnabledSlot, osRegistryEnabled)\n }\n }\n\n function modifyMarketFilterAddress(address newMarketFilterAddress) external onlyOwner {\n marketFilterAddress = newMarketFilterAddress;\n }\n\n /**\n * @notice Admin mint tokens to a recipient for free\n * @param recipient recipient to mint to\n * @param quantity quantity to mint\n */\n function adminMint(address recipient, uint256 quantity) external onlyOwner canMintTokens(quantity) returns (uint256) {\n _mintNFTs(recipient, quantity);\n\n return _currentTokenId;\n }\n\n /**\n * @dev Mints multiple editions to the given list of addresses.\n * @param recipients list of addresses to send the newly minted editions to\n */\n function adminMintAirdrop(\n address[] calldata recipients\n ) external onlyOwner canMintTokens(recipients.length) returns (uint256) {\n unchecked {\n for (uint256 i = 0; i < recipients.length; i++) {\n _mintNFTs(recipients[i], 1);\n }\n }\n\n return _currentTokenId;\n }\n\n /**\n * @notice Set a new metadata renderer\n * @param newRenderer new renderer address to use\n * @param setupRenderer data to setup new renderer with\n */\n function setMetadataRenderer(IMetadataRenderer newRenderer, bytes memory setupRenderer) external onlyOwner {\n config.metadataRenderer = newRenderer;\n\n if (setupRenderer.length > 0) {\n newRenderer.initializeWithData(setupRenderer);\n }\n\n emit UpdatedMetadataRenderer({sender: msgSender(), renderer: newRenderer});\n }\n\n /**\n * @dev This sets the sales configuration\n * @param publicSalePrice New public sale price\n * @param maxSalePurchasePerAddress Max # of purchases (public) per address allowed\n * @param publicSaleStart unix timestamp when the public sale starts\n * @param publicSaleEnd unix timestamp when the public sale ends (set to 0 to disable)\n * @param presaleStart unix timestamp when the presale starts\n * @param presaleEnd unix timestamp when the presale ends\n * @param presaleMerkleRoot merkle root for the presale information\n */\n function setSaleConfiguration(\n uint104 publicSalePrice,\n uint32 maxSalePurchasePerAddress,\n uint64 publicSaleStart,\n uint64 publicSaleEnd,\n uint64 presaleStart,\n uint64 presaleEnd,\n bytes32 presaleMerkleRoot\n ) external onlyOwner {\n salesConfig.publicSalePrice = publicSalePrice;\n salesConfig.maxSalePurchasePerAddress = maxSalePurchasePerAddress;\n salesConfig.publicSaleStart = publicSaleStart;\n salesConfig.publicSaleEnd = publicSaleEnd;\n salesConfig.presaleStart = presaleStart;\n salesConfig.presaleEnd = presaleEnd;\n salesConfig.presaleMerkleRoot = presaleMerkleRoot;\n\n emit SalesConfigChanged(msgSender());\n }\n\n /**\n * @notice Set a different funds recipient\n * @param newRecipientAddress new funds recipient address\n */\n function setFundsRecipient(address payable newRecipientAddress) external onlyOwner {\n if (newRecipientAddress == address(0)) {\n revert(\"Funds Recipient cannot be 0 address\");\n }\n config.fundsRecipient = newRecipientAddress;\n emit FundsRecipientChanged(newRecipientAddress, msgSender());\n }\n\n /**\n * @notice This withdraws ETH from the contract to the contract owner.\n */\n function withdraw() external override nonReentrant {\n if (config.fundsRecipient == address(0)) {\n revert(\"Funds Recipient address not set\");\n }\n address sender = msgSender();\n\n // Get fee amount\n uint256 funds = address(this).balance;\n address payable feeRecipient = payable(\n HolographInterface(HolographerInterface(holographer()).getHolograph()).getTreasury()\n );\n // for now set it to 0 since there is no fee\n uint256 holographFee = 0;\n\n // Check if withdraw is allowed for sender\n if (sender != config.fundsRecipient && sender != _getOwner() && sender != feeRecipient) {\n revert Access_WithdrawNotAllowed();\n }\n\n // Payout HOLOGRAPH fee\n if (holographFee > 0) {\n (bool successFee, ) = feeRecipient.call{value: holographFee, gas: 210_000}(\"\");\n if (!successFee) {\n revert Withdraw_FundsSendFailure();\n }\n funds -= holographFee;\n }\n\n // Payout recipient\n (bool successFunds, ) = config.fundsRecipient.call{value: funds, gas: 210_000}(\"\");\n if (!successFunds) {\n revert Withdraw_FundsSendFailure();\n }\n\n // Emit event for indexing\n emit FundsWithdrawn(sender, config.fundsRecipient, funds, feeRecipient, holographFee);\n }\n\n /**\n * @notice Admin function to finalize and open edition sale\n */\n function finalizeOpenEdition() external onlyOwner {\n if (config.editionSize != type(uint64).max) {\n revert Admin_UnableToFinalizeNotOpenEdition();\n }\n\n config.editionSize = uint64(_currentTokenId);\n emit OpenMintFinalized(msgSender(), config.editionSize);\n }\n\n /**\n * INTERNAL FUNCTIONS\n * non state changing\n */\n\n function _presaleActive() internal view returns (bool) {\n return salesConfig.presaleStart <= block.timestamp && salesConfig.presaleEnd > block.timestamp;\n }\n\n function _publicSaleActive() internal view returns (bool) {\n return salesConfig.publicSaleStart <= block.timestamp && salesConfig.publicSaleEnd > block.timestamp;\n }\n\n function _usdToWei(uint256 amount) internal view returns (uint256 weiAmount) {\n if (amount == 0) {\n return 0;\n }\n weiAmount = dropsPriceOracle.convertUsdToWei(amount);\n }\n\n /**\n * INTERNAL FUNCTIONS\n * state changing\n */\n\n function _mintNFTs(address recipient, uint256 quantity) internal {\n HolographERC721Interface H721 = HolographERC721Interface(holographer());\n uint256 chainPrepend = H721.sourceGetChainPrepend();\n uint224 tokenId = 0;\n for (uint256 i = 0; i < quantity; i++) {\n _currentTokenId += 1;\n while (\n H721.exists(chainPrepend + uint256(_currentTokenId)) || H721.burned(chainPrepend + uint256(_currentTokenId))\n ) {\n _currentTokenId += 1;\n }\n tokenId = _currentTokenId;\n H721.sourceMint(recipient, tokenId);\n // uint256 id = chainPrepend + uint256(tokenId);\n }\n }\n\n fallback() external payable override {\n assembly {\n // Allocate memory for the error message\n let errorMsg := mload(0x40)\n\n // Error message: \"Function not found\", properly padded with zeroes\n mstore(errorMsg, 0x46756e6374696f6e206e6f7420666f756e640000000000000000000000000000)\n\n // Revert with the error message\n revert(errorMsg, 20) // 20 is the length of the error message in bytes\n }\n }\n}\n" + }, + "contracts/drops/utils/NFTMetadataRenderer.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nlibrary Math {\n enum Rounding {\n Down, // Toward negative infinity\n Up, // Toward infinity\n Zero // Toward zero\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds up instead\n * of rounding down.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b - 1) / b can overflow on addition, so we distribute.\n return a == 0 ? 0 : (a - 1) / b + 1;\n }\n\n /**\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\n * with further edits by Uniswap Labs also under MIT license.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\n unchecked {\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = prod1 * 2^256 + prod0.\n uint256 prod0; // Least significant 256 bits of the product\n uint256 prod1; // Most significant 256 bits of the product\n assembly {\n let mm := mulmod(x, y, not(0))\n prod0 := mul(x, y)\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n }\n\n // Handle non-overflow cases, 256 by 256 division.\n if (prod1 == 0) {\n return prod0 / denominator;\n }\n\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\n require(denominator > prod1);\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [prod1 prod0].\n uint256 remainder;\n assembly {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n prod1 := sub(prod1, gt(remainder, prod0))\n prod0 := sub(prod0, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\n // See https://cs.stackexchange.com/q/138556/92363.\n\n // Does not overflow because the denominator cannot be zero at this stage in the function.\n uint256 twos = denominator & (~denominator + 1);\n assembly {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [prod1 prod0] by twos.\n prod0 := div(prod0, twos)\n\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from prod1 into prod0.\n prod0 |= prod1 * twos;\n\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv = 1 mod 2^4.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\n // in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\n // is no longer required.\n result = prod0 * inverse;\n return result;\n }\n }\n\n /**\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\n uint256 result = mulDiv(x, y, denominator);\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\n result += 1;\n }\n return result;\n }\n\n /**\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 128;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 64;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 32;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 16;\n }\n if (value >> 8 > 0) {\n value >>= 8;\n result += 8;\n }\n if (value >> 4 > 0) {\n value >>= 4;\n result += 4;\n }\n if (value >> 2 > 0) {\n value >>= 2;\n result += 2;\n }\n if (value >> 1 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log2(value);\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10 ** 64) {\n value /= 10 ** 64;\n result += 64;\n }\n if (value >= 10 ** 32) {\n value /= 10 ** 32;\n result += 32;\n }\n if (value >= 10 ** 16) {\n value /= 10 ** 16;\n result += 16;\n }\n if (value >= 10 ** 8) {\n value /= 10 ** 8;\n result += 8;\n }\n if (value >= 10 ** 4) {\n value /= 10 ** 4;\n result += 4;\n }\n if (value >= 10 ** 2) {\n value /= 10 ** 2;\n result += 2;\n }\n if (value >= 10 ** 1) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log10(value);\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256, rounded down, of a positive value.\n * Returns 0 if given 0.\n *\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n */\n function log256(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 16;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 8;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 4;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 2;\n }\n if (value >> 8 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log256(value);\n return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);\n }\n }\n}\n\nlibrary Strings {\n bytes16 private constant _SYMBOLS = \"0123456789abcdef\";\n uint8 private constant _ADDRESS_LENGTH = 20;\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n unchecked {\n uint256 length = Math.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n /// @solidity memory-safe-assembly\n assembly {\n ptr := add(buffer, add(32, length))\n }\n while (true) {\n ptr--;\n /// @solidity memory-safe-assembly\n assembly {\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n unchecked {\n return toHexString(value, Math.log256(value) + 1);\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\n }\n}\n\nlibrary Base64 {\n /**\n * @dev Base64 Encoding/Decoding Table\n */\n string internal constant _TABLE = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\n\n /**\n * @dev Converts a `bytes` to its Bytes64 `string` representation.\n */\n function encode(bytes memory data) internal pure returns (string memory) {\n /**\n * Inspired by Brecht Devos (Brechtpd) implementation - MIT licence\n * https://github.com/Brechtpd/base64/blob/e78d9fd951e7b0977ddca77d92dc85183770daf4/base64.sol\n */\n if (data.length == 0) return \"\";\n\n // Loads the table into memory\n string memory table = _TABLE;\n\n // Encoding takes 3 bytes chunks of binary data from `bytes` data parameter\n // and split into 4 numbers of 6 bits.\n // The final Base64 length should be `bytes` data length multiplied by 4/3 rounded up\n // - `data.length + 2` -> Round up\n // - `/ 3` -> Number of 3-bytes chunks\n // - `4 *` -> 4 characters for each chunk\n string memory result = new string(4 * ((data.length + 2) / 3));\n\n /// @solidity memory-safe-assembly\n assembly {\n // Prepare the lookup table (skip the first \"length\" byte)\n let tablePtr := add(table, 1)\n\n // Prepare result pointer, jump over length\n let resultPtr := add(result, 32)\n\n // Run over the input, 3 bytes at a time\n for {\n let dataPtr := data\n let endPtr := add(data, mload(data))\n } lt(dataPtr, endPtr) {\n\n } {\n // Advance 3 bytes\n dataPtr := add(dataPtr, 3)\n let input := mload(dataPtr)\n\n // To write each character, shift the 3 bytes (18 bits) chunk\n // 4 times in blocks of 6 bits for each character (18, 12, 6, 0)\n // and apply logical AND with 0x3F which is the number of\n // the previous character in the ASCII table prior to the Base64 Table\n // The result is then added to the table to get the character to write,\n // and finally write it in the result pointer but with a left shift\n // of 256 (1 byte) - 8 (1 ASCII char) = 248 bits\n\n mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F))))\n resultPtr := add(resultPtr, 1) // Advance\n\n mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F))))\n resultPtr := add(resultPtr, 1) // Advance\n\n mstore8(resultPtr, mload(add(tablePtr, and(shr(6, input), 0x3F))))\n resultPtr := add(resultPtr, 1) // Advance\n\n mstore8(resultPtr, mload(add(tablePtr, and(input, 0x3F))))\n resultPtr := add(resultPtr, 1) // Advance\n }\n\n // When data `bytes` is not exactly 3 bytes long\n // it is padded with `=` characters at the end\n switch mod(mload(data), 3)\n case 1 {\n mstore8(sub(resultPtr, 1), 0x3d)\n mstore8(sub(resultPtr, 2), 0x3d)\n }\n case 2 {\n mstore8(sub(resultPtr, 1), 0x3d)\n }\n }\n\n return result;\n }\n}\n\n/// NFT metadata library for rendering metadata associated with editions\nlibrary NFTMetadataRenderer {\n /// Generate edition metadata from storage information as base64-json blob\n /// Combines the media data and metadata\n /// @param name Name of NFT in metadata\n /// @param description Description of NFT in metadata\n /// @param imageURI URI of image to render for edition\n /// @param animationURI URI of animation to render for edition\n /// @param tokenOfEdition Token ID for specific token\n /// @param editionSize Size of entire edition to show\n function createMetadataEdition(\n string memory name,\n string memory description,\n string memory imageURI,\n string memory animationURI,\n uint256 tokenOfEdition,\n uint256 editionSize\n ) internal pure returns (string memory) {\n string memory _tokenMediaData = tokenMediaData(imageURI, animationURI);\n bytes memory json = createMetadataJSON(name, description, _tokenMediaData, tokenOfEdition, editionSize);\n return encodeMetadataJSON(json);\n }\n\n function encodeContractURIJSON(\n string memory name,\n string memory description,\n string memory imageURI,\n string memory animationURI,\n uint256 royaltyBPS,\n address royaltyRecipient\n ) internal pure returns (string memory) {\n bytes memory imageSpace = bytes(\"\");\n if (bytes(imageURI).length > 0) {\n imageSpace = abi.encodePacked('\", \"image\": \"', imageURI);\n }\n bytes memory animationSpace = bytes(\"\");\n if (bytes(animationURI).length > 0) {\n animationSpace = abi.encodePacked('\", \"animation_url\": \"', animationURI);\n }\n\n return\n string(\n encodeMetadataJSON(\n abi.encodePacked(\n '{\"name\": \"',\n name,\n '\", \"description\": \"',\n description,\n // this is for opensea since they don't respect ERC2981 right now\n '\", \"seller_fee_basis_points\": ',\n Strings.toString(royaltyBPS),\n ', \"fee_recipient\": \"',\n Strings.toHexString(uint256(uint160(royaltyRecipient)), 20),\n imageSpace,\n animationSpace,\n '\"}'\n )\n )\n );\n }\n\n /// Function to create the metadata json string for the nft edition\n /// @param name Name of NFT in metadata\n /// @param description Description of NFT in metadata\n /// @param mediaData Data for media to include in json object\n /// @param tokenOfEdition Token ID for specific token\n /// @param editionSize Size of entire edition to show\n function createMetadataJSON(\n string memory name,\n string memory description,\n string memory mediaData,\n uint256 tokenOfEdition,\n uint256 editionSize\n ) internal pure returns (bytes memory) {\n bytes memory editionSizeText;\n if (editionSize > 0) {\n editionSizeText = abi.encodePacked(\"/\", Strings.toString(editionSize));\n }\n return\n abi.encodePacked(\n '{\"name\": \"',\n name,\n \" \",\n Strings.toString(tokenOfEdition),\n editionSizeText,\n '\", \"',\n 'description\": \"',\n description,\n '\", \"',\n mediaData,\n 'properties\": {\"number\": ',\n Strings.toString(tokenOfEdition),\n ', \"name\": \"',\n name,\n '\"}}'\n );\n }\n\n /// Encodes the argument json bytes into base64-data uri format\n /// @param json Raw json to base64 and turn into a data-uri\n function encodeMetadataJSON(bytes memory json) internal pure returns (string memory) {\n return string(abi.encodePacked(\"data:application/json;base64,\", Base64.encode(json)));\n }\n\n /// Generates edition metadata from storage information as base64-json blob\n /// Combines the media data and metadata\n /// @param imageUrl URL of image to render for edition\n /// @param animationUrl URL of animation to render for edition\n function tokenMediaData(string memory imageUrl, string memory animationUrl) internal pure returns (string memory) {\n bool hasImage = bytes(imageUrl).length > 0;\n bool hasAnimation = bytes(animationUrl).length > 0;\n if (hasImage && hasAnimation) {\n return string(abi.encodePacked('image\": \"', imageUrl, '\", \"animation_url\": \"', animationUrl, '\", \"'));\n }\n if (hasImage) {\n return string(abi.encodePacked('image\": \"', imageUrl, '\", \"'));\n }\n if (hasAnimation) {\n return string(abi.encodePacked('animation_url\": \"', animationUrl, '\", \"'));\n }\n\n return \"\";\n }\n}\n" + }, + "contracts/enforcer/Holographer.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\n\nimport \"../interface/HolographInterface.sol\";\nimport \"../interface/HolographerInterface.sol\";\nimport \"../interface/HolographRegistryInterface.sol\";\nimport \"../interface/InitializableInterface.sol\";\n\n/**\n * @dev This contract is a binder. It puts together all the variables to make the underlying contracts functional and be bridgeable.\n */\ncontract Holographer is Admin, Initializable, HolographerInterface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.originChain')) - 1)\n */\n bytes32 constant _originChainSlot = 0xd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\n */\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.contractType')) - 1)\n */\n bytes32 constant _contractTypeSlot = 0x0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c7;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.sourceContract')) - 1)\n */\n bytes32 constant _sourceContractSlot = 0x27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b074;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.blockHeight')) - 1)\n */\n bytes32 constant _blockHeightSlot = 0x9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de3;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPHER: already initialized\");\n (bytes memory encoded, bytes memory initCode) = abi.decode(initPayload, (bytes, bytes));\n (uint32 originChain, address holograph, bytes32 contractType, address sourceContract) = abi.decode(\n encoded,\n (uint32, address, bytes32, address)\n );\n assembly {\n sstore(_adminSlot, caller())\n sstore(_blockHeightSlot, number())\n sstore(_contractTypeSlot, contractType)\n sstore(_holographSlot, holograph)\n sstore(_originChainSlot, originChain)\n sstore(_sourceContractSlot, sourceContract)\n }\n (bool success, bytes memory returnData) = HolographRegistryInterface(HolographInterface(holograph).getRegistry())\n .getReservedContractTypeAddress(contractType)\n .delegatecall(abi.encodeWithSelector(InitializableInterface.init.selector, initCode));\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == InitializableInterface.init.selector, \"HOLOGRAPH: initialization failed\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @dev Returns the contract type that is used for loading the Enforcer\n */\n function getContractType() external view returns (bytes32 contractType) {\n assembly {\n contractType := sload(_contractTypeSlot)\n }\n }\n\n /**\n * @dev Returns the block height of when the smart contract was deployed. Useful for retrieving deployment config for re-deployment on other EVM-compatible chains.\n */\n function getDeploymentBlock() external view returns (uint256 deploymentBlock) {\n assembly {\n deploymentBlock := sload(_blockHeightSlot)\n }\n }\n\n /**\n * @dev Returns a hardcoded address for the Holograph smart contract.\n */\n function getHolograph() external view returns (address holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n /**\n * @dev Returns a hardcoded address for the Holograph smart contract that controls and enforces the ERC standards.\n */\n function getHolographEnforcer() public view returns (address) {\n HolographInterface holograph;\n bytes32 contractType;\n assembly {\n holograph := sload(_holographSlot)\n contractType := sload(_contractTypeSlot)\n }\n return HolographRegistryInterface(holograph.getRegistry()).getReservedContractTypeAddress(contractType);\n }\n\n /**\n * @dev Returns the original chain that contract was deployed on.\n */\n function getOriginChain() external view returns (uint32 originChain) {\n assembly {\n originChain := sload(_originChainSlot)\n }\n }\n\n /**\n * @dev Returns a hardcoded address for the custom secure storage contract deployed in parallel with this contract deployment.\n */\n function getSourceContract() external view returns (address sourceContract) {\n assembly {\n sourceContract := sload(_sourceContractSlot)\n }\n }\n\n /**\n * @dev Purposefully left empty, to prevent running out of gas errors when receiving native token payments.\n */\n receive() external payable {}\n\n /**\n * @dev This takes the Enforcer's source code, runs it, and uses current address for storage slots.\n */\n fallback() external payable {\n address holographEnforcer = getHolographEnforcer();\n assembly {\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), holographEnforcer, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/enforcer/HolographERC20.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/EIP712.sol\";\nimport \"../abstract/Initializable.sol\";\nimport \"../abstract/NonReentrant.sol\";\nimport \"../abstract/Owner.sol\";\n\nimport \"../enum/HolographERC20Event.sol\";\nimport \"../enum/InterfaceType.sol\";\n\nimport \"../interface/ERC20.sol\";\nimport \"../interface/ERC20Burnable.sol\";\nimport \"../interface/HolographERC20Interface.sol\";\nimport \"../interface/ERC20Metadata.sol\";\nimport \"../interface/ERC20Permit.sol\";\nimport \"../interface/ERC20Receiver.sol\";\nimport \"../interface/ERC20Safer.sol\";\nimport \"../interface/ERC165.sol\";\nimport \"../interface/Holographable.sol\";\nimport \"../interface/HolographedERC20.sol\";\nimport \"../interface/HolographInterface.sol\";\nimport \"../interface/HolographerInterface.sol\";\nimport \"../interface/HolographRegistryInterface.sol\";\nimport \"../interface/InitializableInterface.sol\";\nimport \"../interface/HolographInterfacesInterface.sol\";\nimport \"../interface/Ownable.sol\";\n\n/**\n * @title Holograph Bridgeable ERC-20 Token\n * @author Holograph Foundation\n * @notice A smart contract for minting and managing Holograph Bridgeable ERC20 Tokens.\n * @dev The entire logic and functionality of the smart contract is self-contained.\n */\ncontract HolographERC20 is Admin, Owner, Initializable, NonReentrant, EIP712, HolographERC20Interface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\n */\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.sourceContract')) - 1)\n */\n bytes32 constant _sourceContractSlot = 0x27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b074;\n\n /**\n * @dev Configuration for events to trigger for source smart contract.\n */\n uint256 private _eventConfig;\n\n /**\n * @dev Mapping of all the addresse's balances.\n */\n mapping(address => uint256) private _balances;\n\n /**\n * @dev Mapping of all authorized operators, and capped amounts.\n */\n mapping(address => mapping(address => uint256)) private _allowances;\n\n /**\n * @dev Total number of token in circulation.\n */\n uint256 private _totalSupply;\n\n /**\n * @dev Token name.\n */\n string private _name;\n\n /**\n * @dev Token ticker symbol.\n */\n string private _symbol;\n\n /**\n * @dev Token number of decimal places.\n */\n uint8 private _decimals;\n\n /**\n * @dev List of used up nonces. Used in the ERC20Permit interface functionality.\n */\n mapping(address => uint256) private _nonces;\n\n /**\n * @notice Only allow calls from bridge smart contract.\n */\n modifier onlyBridge() {\n require(msg.sender == _holograph().getBridge(), \"ERC20: bridge only call\");\n _;\n }\n\n /**\n * @notice Only allow calls from source smart contract.\n */\n modifier onlySource() {\n address sourceContract;\n assembly {\n sourceContract := sload(_sourceContractSlot)\n }\n require(msg.sender == sourceContract, \"ERC20: source only call\");\n _;\n }\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"ERC20: already initialized\");\n InitializableInterface sourceContract;\n assembly {\n sstore(_reentrantSlot, 0x0000000000000000000000000000000000000000000000000000000000000001)\n sstore(_ownerSlot, caller())\n sourceContract := sload(_sourceContractSlot)\n }\n (\n string memory contractName,\n string memory contractSymbol,\n uint8 contractDecimals,\n uint256 eventConfig,\n string memory domainSeperator,\n string memory domainVersion,\n bool skipInit,\n bytes memory initCode\n ) = abi.decode(initPayload, (string, string, uint8, uint256, string, string, bool, bytes));\n _name = contractName;\n _symbol = contractSymbol;\n _decimals = contractDecimals;\n _eventConfig = eventConfig;\n if (!skipInit) {\n require(sourceContract.init(initCode) == InitializableInterface.init.selector, \"ERC20: could not init source\");\n }\n _setInitialized();\n _eip712_init(domainSeperator, domainVersion);\n return InitializableInterface.init.selector;\n }\n\n /**\n * @dev Purposefully left empty, to prevent running out of gas errors when receiving native token payments.\n */\n receive() external payable {}\n\n /**\n * @notice Fallback to the source contract.\n * @dev Any function call that is not covered here, will automatically be sent over to the source contract.\n */\n fallback() external payable {\n assembly {\n calldatacopy(0, 0, calldatasize())\n mstore(calldatasize(), caller())\n let result := call(gas(), sload(_sourceContractSlot), callvalue(), 0, add(calldatasize(), 0x20), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /*\n * @dev all calls to source contract go through this function in order to inject original msg.sender in calldata\n */\n function _sourceCall(bytes memory payload) private returns (bool output) {\n assembly {\n mstore(add(payload, add(mload(payload), 0x20)), caller())\n // offset memory position by 32 bytes to skip the 32 bytes where bytes length is stored\n // add 32 bytes to bytes length to include the appended msg.sender to calldata\n let result := call(\n gas(),\n sload(_sourceContractSlot),\n callvalue(),\n add(payload, 0x20),\n add(mload(payload), 0x20),\n 0,\n 0\n )\n let pos := mload(0x40)\n // reserve memory space for return data\n mstore(0x40, add(pos, returndatasize()))\n returndatacopy(pos, 0, returndatasize())\n switch result\n case 0 {\n revert(pos, returndatasize())\n }\n output := mload(pos)\n }\n }\n\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n /**\n * @dev Although EIP-165 is not required for ERC20 contracts, we still decided to implement it.\n *\n * This makes it easier for external smart contracts to easily identify a valid ERC20 token contract.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool) {\n HolographInterfacesInterface interfaces = HolographInterfacesInterface(_interfaces());\n ERC165 erc165Contract;\n assembly {\n erc165Contract := sload(_sourceContractSlot)\n }\n if (\n interfaces.supportsInterface(InterfaceType.ERC20, interfaceId) || erc165Contract.supportsInterface(interfaceId) // check global interfaces // check if source supports interface\n ) {\n return true;\n } else {\n return false;\n }\n }\n\n function allowance(address account, address spender) public view returns (uint256) {\n return _allowances[account][spender];\n }\n\n function balanceOf(address account) public view returns (uint256) {\n return _balances[account];\n }\n\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() public view returns (bytes32) {\n return _domainSeparatorV4();\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function nonces(address account) public view returns (uint256) {\n return _nonces[account];\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function totalSupply() public view returns (uint256) {\n return _totalSupply;\n }\n\n function approve(address spender, uint256 amount) public returns (bool) {\n if (_isEventRegistered(HolographERC20Event.beforeApprove)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC20.beforeApprove.selector, msg.sender, spender, amount))\n );\n }\n _approve(msg.sender, spender, amount);\n if (_isEventRegistered(HolographERC20Event.afterApprove)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC20.afterApprove.selector, msg.sender, spender, amount)));\n }\n return true;\n }\n\n function burn(uint256 amount) public {\n if (_isEventRegistered(HolographERC20Event.beforeBurn)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC20.beforeBurn.selector, msg.sender, amount)));\n }\n _burn(msg.sender, amount);\n if (_isEventRegistered(HolographERC20Event.afterBurn)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC20.afterBurn.selector, msg.sender, amount)));\n }\n }\n\n function _allowance(address account, address to, uint256 amount) internal {\n uint256 currentAllowance = _allowances[account][to];\n if (currentAllowance >= amount) {\n unchecked {\n _allowances[account][to] = currentAllowance - amount;\n }\n } else {\n if (_isEventRegistered(HolographERC20Event.onAllowance)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC20.onAllowance.selector, account, to, amount)),\n \"ERC20: amount exceeds allowance\"\n );\n _allowances[account][to] = 0;\n } else {\n revert(\"ERC20: amount exceeds allowance\");\n }\n }\n }\n\n function burnFrom(address account, uint256 amount) public returns (bool) {\n _allowance(account, msg.sender, amount);\n if (_isEventRegistered(HolographERC20Event.beforeBurn)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC20.beforeBurn.selector, account, amount)));\n }\n _burn(account, amount);\n if (_isEventRegistered(HolographERC20Event.afterBurn)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC20.afterBurn.selector, account, amount)));\n }\n return true;\n }\n\n function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {\n uint256 currentAllowance = _allowances[msg.sender][spender];\n require(currentAllowance >= subtractedValue, \"ERC20: decreased below zero\");\n uint256 newAllowance;\n unchecked {\n newAllowance = currentAllowance - subtractedValue;\n }\n if (_isEventRegistered(HolographERC20Event.beforeApprove)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC20.beforeApprove.selector, msg.sender, spender, newAllowance))\n );\n }\n _approve(msg.sender, spender, newAllowance);\n if (_isEventRegistered(HolographERC20Event.afterApprove)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC20.afterApprove.selector, msg.sender, spender, newAllowance))\n );\n }\n return true;\n }\n\n function bridgeIn(uint32 fromChain, bytes calldata payload) external onlyBridge returns (bytes4) {\n (address from, address to, uint256 amount, bytes memory data) = abi.decode(\n payload,\n (address, address, uint256, bytes)\n );\n _mint(to, amount);\n if (_isEventRegistered(HolographERC20Event.bridgeIn)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC20.bridgeIn.selector, fromChain, from, to, amount, data)),\n \"HOLOGRAPH: bridge in failed\"\n );\n }\n return Holographable.bridgeIn.selector;\n }\n\n function bridgeOut(\n uint32 toChain,\n address sender,\n bytes calldata payload\n ) external onlyBridge returns (bytes4 selector, bytes memory data) {\n (address from, address to, uint256 amount) = abi.decode(payload, (address, address, uint256));\n if (sender != from) {\n _allowance(from, sender, amount);\n }\n if (_isEventRegistered(HolographERC20Event.bridgeOut)) {\n /*\n * @dev making a bridgeOut call to source contract\n * assembly is used so that msg.sender can be injected in the calldata\n */\n bytes memory sourcePayload = abi.encodeWithSelector(\n HolographedERC20.bridgeOut.selector,\n toChain,\n from,\n to,\n amount\n );\n assembly {\n // it is important to add 32 bytes in order to accommodate the first 32 bytes being used for storing length of bytes\n mstore(add(sourcePayload, add(mload(sourcePayload), 0x20)), caller())\n let result := call(\n gas(),\n sload(_sourceContractSlot),\n callvalue(),\n // start reading data from memory position, plus 32 bytes, to skip bytes length indicator\n add(sourcePayload, 0x20),\n // add an additional 32 bytes to bytes length to include the appended caller address\n add(mload(sourcePayload), 0x20),\n 0,\n 0\n )\n // when reading back data, skip the first 32 bytes which is used to indicate bytes position in calldata\n // also subtract 32 bytes from returndatasize to accomodate the skipped first 32 bytes\n returndatacopy(data, 0x20, sub(returndatasize(), 0x20))\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n }\n }\n _burn(from, amount);\n return (Holographable.bridgeOut.selector, abi.encode(from, to, amount, data));\n }\n\n /**\n * @dev Allows the bridge to mint tokens (used for hTokens only).\n */\n function holographBridgeMint(address to, uint256 amount) external onlyBridge returns (bytes4) {\n _mint(to, amount);\n return HolographERC20Interface.holographBridgeMint.selector;\n }\n\n function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {\n uint256 currentAllowance = _allowances[msg.sender][spender];\n uint256 newAllowance;\n unchecked {\n newAllowance = currentAllowance + addedValue;\n }\n unchecked {\n require(newAllowance >= currentAllowance, \"ERC20: increased above max value\");\n }\n if (_isEventRegistered(HolographERC20Event.beforeApprove)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC20.beforeApprove.selector, msg.sender, spender, newAllowance))\n );\n }\n _approve(msg.sender, spender, newAllowance);\n if (_isEventRegistered(HolographERC20Event.afterApprove)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC20.afterApprove.selector, msg.sender, spender, newAllowance))\n );\n }\n return true;\n }\n\n function onERC20Received(\n address account,\n address sender,\n uint256 amount,\n bytes calldata data\n ) public returns (bytes4) {\n require(_isContract(account), \"ERC20: operator not contract\");\n if (_isEventRegistered(HolographERC20Event.beforeOnERC20Received)) {\n require(\n _sourceCall(\n abi.encodeWithSelector(\n HolographedERC20.beforeOnERC20Received.selector,\n account,\n sender,\n address(this),\n amount,\n data\n )\n )\n );\n }\n try ERC20(account).balanceOf(address(this)) returns (uint256) {\n // do nothing, just want to see if this reverts due to invalid erc-20 contract\n } catch {\n revert(\"ERC20: failed getting balance\");\n }\n if (_isEventRegistered(HolographERC20Event.afterOnERC20Received)) {\n require(\n _sourceCall(\n abi.encodeWithSelector(\n HolographedERC20.afterOnERC20Received.selector,\n account,\n sender,\n address(this),\n amount,\n data\n )\n )\n );\n }\n return ERC20Receiver.onERC20Received.selector;\n }\n\n function permit(\n address account,\n address spender,\n uint256 amount,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) public {\n require(block.timestamp <= deadline, \"ERC20: expired deadline\");\n bytes32 structHash = keccak256(\n abi.encode(\n 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9,\n account,\n spender,\n amount,\n _useNonce(account),\n deadline\n )\n );\n bytes32 hash = _hashTypedDataV4(structHash);\n address signer = _recover(r, s, v, hash);\n require(signer == account, \"ERC20: invalid signature\");\n if (_isEventRegistered(HolographERC20Event.beforeApprove)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC20.beforeApprove.selector, account, spender, amount)));\n }\n _approve(account, spender, amount);\n if (_isEventRegistered(HolographERC20Event.afterApprove)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC20.afterApprove.selector, account, spender, amount)));\n }\n }\n\n function safeTransfer(address recipient, uint256 amount) public returns (bool) {\n return safeTransfer(recipient, amount, \"\");\n }\n\n function safeTransfer(address recipient, uint256 amount, bytes memory data) public returns (bool) {\n if (_isEventRegistered(HolographERC20Event.beforeSafeTransfer)) {\n require(\n _sourceCall(\n abi.encodeWithSelector(HolographedERC20.beforeSafeTransfer.selector, msg.sender, recipient, amount, data)\n )\n );\n }\n _transfer(msg.sender, recipient, amount);\n if (_isEventRegistered(HolographERC20Event.afterSafeTransfer)) {\n require(\n _sourceCall(\n abi.encodeWithSelector(HolographedERC20.afterSafeTransfer.selector, msg.sender, recipient, amount, data)\n )\n );\n }\n return true;\n }\n\n function safeTransferFrom(address account, address recipient, uint256 amount) public returns (bool) {\n return safeTransferFrom(account, recipient, amount, \"\");\n }\n\n function safeTransferFrom(\n address account,\n address recipient,\n uint256 amount,\n bytes memory data\n ) public returns (bool) {\n if (account != msg.sender) {\n /*\n * @dev This is intentionally enabled to remove friction when operator or bridge needs to move tokens\n */\n if (msg.sender != _holograph().getBridge() && msg.sender != _holograph().getOperator()) {\n _allowance(account, msg.sender, amount);\n }\n }\n if (_isEventRegistered(HolographERC20Event.beforeSafeTransfer)) {\n require(\n _sourceCall(\n abi.encodeWithSelector(HolographedERC20.beforeSafeTransfer.selector, account, recipient, amount, data)\n )\n );\n }\n _transfer(account, recipient, amount);\n if (_isEventRegistered(HolographERC20Event.afterSafeTransfer)) {\n require(\n _sourceCall(\n abi.encodeWithSelector(HolographedERC20.afterSafeTransfer.selector, account, recipient, amount, data)\n )\n );\n }\n return true;\n }\n\n /**\n * @dev Allows for source smart contract to burn tokens.\n */\n function sourceBurn(address from, uint256 amount) external onlySource {\n _burn(from, amount);\n }\n\n /**\n * @dev Allows for source smart contract to mint tokens.\n */\n function sourceMint(address to, uint256 amount) external onlySource {\n _mint(to, amount);\n }\n\n /**\n * @dev Allows for source smart contract to mint a batch of token amounts.\n */\n function sourceMintBatch(address[] calldata wallets, uint256[] calldata amounts) external onlySource {\n for (uint256 i = 0; i < wallets.length; i++) {\n _mint(wallets[i], amounts[i]);\n }\n }\n\n /**\n * @dev Allows for source smart contract to transfer tokens.\n */\n function sourceTransfer(address from, address to, uint256 amount) external onlySource {\n _transfer(from, to, amount);\n }\n\n /**\n * @dev Allows for source smart contract to withdraw contract balance.\n */\n function sourceTransfer(address payable destination, uint256 amount) external onlySource {\n destination.transfer(amount);\n }\n\n /**\n * @dev Allows for source smart contract to make calls to external contracts\n */\n function sourceExternalCall(address target, bytes calldata data) external onlySource {\n assembly {\n calldatacopy(0, data.offset, data.length)\n let result := call(gas(), target, callvalue(), 0, data.length, 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n function transfer(address recipient, uint256 amount) public returns (bool) {\n if (_isEventRegistered(HolographERC20Event.beforeTransfer)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC20.beforeTransfer.selector, msg.sender, recipient, amount))\n );\n }\n _transfer(msg.sender, recipient, amount);\n if (_isEventRegistered(HolographERC20Event.afterTransfer)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC20.afterTransfer.selector, msg.sender, recipient, amount))\n );\n }\n return true;\n }\n\n function transferFrom(address account, address recipient, uint256 amount) public returns (bool) {\n if (account != msg.sender) {\n /*\n * @dev This is intentionally enabled to remove friction when operator or bridge needs to move tokens\n */\n if (msg.sender != _holograph().getBridge() && msg.sender != _holograph().getOperator()) {\n _allowance(account, msg.sender, amount);\n }\n }\n if (_isEventRegistered(HolographERC20Event.beforeTransfer)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC20.beforeTransfer.selector, account, recipient, amount))\n );\n }\n _transfer(account, recipient, amount);\n if (_isEventRegistered(HolographERC20Event.afterTransfer)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC20.afterTransfer.selector, account, recipient, amount)));\n }\n return true;\n }\n\n function _approve(address account, address spender, uint256 amount) private {\n require(account != address(0), \"ERC20: account is zero address\");\n require(spender != address(0), \"ERC20: spender is zero address\");\n _allowances[account][spender] = amount;\n emit Approval(account, spender, amount);\n }\n\n function _burn(address account, uint256 amount) private {\n require(account != address(0), \"ERC20: account is zero address\");\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n }\n _totalSupply -= amount;\n _registryTransfer(account, address(0), amount);\n }\n\n /**\n * @notice Mints tokens.\n * @dev Mint a specific amount of tokens to a specific address.\n * @param to Address to mint to.\n * @param amount Amount of tokens to mint.\n */\n function _mint(address to, uint256 amount) private {\n require(to != address(0), \"ERC20: minting to burn address\");\n _totalSupply += amount;\n _balances[to] += amount;\n _registryTransfer(address(0), to, amount);\n }\n\n function _transfer(address account, address recipient, uint256 amount) private {\n require(account != address(0), \"ERC20: account is zero address\");\n require(recipient != address(0), \"ERC20: recipient is zero address\");\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n }\n _balances[recipient] += amount;\n _registryTransfer(account, recipient, amount);\n }\n\n function _registryTransfer(address _from, address _to, uint256 _amount) private {\n emit Transfer(_from, _to, _amount);\n HolographRegistryInterface(_holograph().getRegistry()).holographableEvent(\n abi.encode(\n // keccak256(\"TransferERC20(address,address,uint256)\")\n bytes32(0x9b035625e569d1d2bf54830a290aefba7ab11610ba8490871dc62b86b63a8956),\n _from,\n _to,\n _amount\n )\n );\n }\n\n /**\n * @dev \"Consume a nonce\": return the current value and increment.\n *\n * _Available since v4.1._\n */\n function _useNonce(address account) private returns (uint256 current) {\n current = _nonces[account];\n _nonces[account]++;\n }\n\n function _isContract(address contractAddress) private view returns (bool) {\n bytes32 codehash;\n assembly {\n codehash := extcodehash(contractAddress)\n }\n return (codehash != 0x0 && codehash != 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470);\n }\n\n /**\n * @dev Internal function used for identifying signer\n */\n function _recover(bytes32 r, bytes32 s, uint8 v, bytes32 hash) private pure returns (address signer) {\n if (v < 27) {\n v += 27;\n }\n require(v == 27 || v == 28, \"ERC20: invalid v-value\");\n // prevent signature malleability by checking if s-value is in the upper range\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n // if s-value is in upper range, calculate a new s-value\n s = bytes32(0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - uint256(s));\n // flip the v-value\n if (v == 27) {\n v = 28;\n } else {\n v = 27;\n }\n // check if s-value is still in upper range\n require(\n uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0,\n \"ERC20: invalid s-value\"\n );\n }\n signer = ecrecover(hash, v, r, s);\n require(signer != address(0), \"ERC20: zero address signer\");\n }\n\n /**\n * @dev Get the interfaces contract address.\n */\n function _interfaces() private view returns (address) {\n return _holograph().getInterfaces();\n }\n\n function owner() public view override returns (address) {\n Ownable ownableContract;\n assembly {\n ownableContract := sload(_sourceContractSlot)\n }\n return ownableContract.owner();\n }\n\n function _holograph() private view returns (HolographInterface holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n function _isEventRegistered(HolographERC20Event _eventName) private view returns (bool) {\n return ((_eventConfig >> uint256(_eventName)) & uint256(1) == 1 ? true : false);\n }\n}\n" + }, + "contracts/enforcer/HolographERC721.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\nimport \"../abstract/Owner.sol\";\n\nimport \"../enum/HolographERC721Event.sol\";\nimport \"../enum/InterfaceType.sol\";\n\nimport \"../interface/ERC165.sol\";\nimport \"../interface/ERC721.sol\";\nimport \"../interface/HolographERC721Interface.sol\";\nimport \"../interface/ERC721Metadata.sol\";\nimport \"../interface/ERC721TokenReceiver.sol\";\nimport \"../interface/Holographable.sol\";\nimport \"../interface/HolographedERC721.sol\";\nimport \"../interface/HolographInterface.sol\";\nimport \"../interface/HolographerInterface.sol\";\nimport \"../interface/HolographRegistryInterface.sol\";\nimport \"../interface/InitializableInterface.sol\";\nimport \"../interface/HolographInterfacesInterface.sol\";\nimport \"../interface/HolographRoyaltiesInterface.sol\";\nimport \"../interface/Ownable.sol\";\n\n/**\n * @title Holograph Bridgeable ERC-721 Collection\n * @author Holograph Foundation\n * @notice A smart contract for minting and managing Holograph Bridgeable ERC721 NFTs.\n * @dev The entire logic and functionality of the smart contract is self-contained.\n */\ncontract HolographERC721 is Admin, Owner, HolographERC721Interface, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\n */\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.sourceContract')) - 1)\n */\n bytes32 constant _sourceContractSlot = 0x27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b074;\n\n /**\n * @dev Configuration for events to trigger for source smart contract.\n */\n uint256 private _eventConfig;\n\n /**\n * @dev Collection name.\n */\n string private _name;\n\n /**\n * @dev Collection symbol.\n */\n string private _symbol;\n\n /**\n * @dev Collection royalty base points.\n */\n uint16 private _bps;\n\n /**\n * @dev Array of all token ids in collection.\n */\n uint256[] private _allTokens;\n\n /**\n * @dev Map of token id to array index of _ownedTokens.\n */\n mapping(uint256 => uint256) private _ownedTokensIndex;\n\n /**\n * @dev Token id to wallet (owner) address map.\n */\n mapping(uint256 => address) private _tokenOwner;\n\n /**\n * @dev 1-to-1 map of token id that was assigned an approved operator address.\n */\n mapping(uint256 => address) private _tokenApprovals;\n\n /**\n * @dev Map of total tokens owner by a specific address.\n */\n mapping(address => uint256) private _ownedTokensCount;\n\n /**\n * @dev Map of array of token ids owned by a specific address.\n */\n mapping(address => uint256[]) private _ownedTokens;\n\n /**\n * @notice Map of full operator approval for a particular address.\n * @dev Usually utilised for supporting marketplace proxy wallets.\n */\n mapping(address => mapping(address => bool)) private _operatorApprovals;\n\n /**\n * @dev Mapping from token id to position in the allTokens array.\n */\n mapping(uint256 => uint256) private _allTokensIndex;\n\n /**\n * @dev Mapping of all token ids that have been burned. This is to prevent re-minting of same token ids.\n */\n mapping(uint256 => bool) private _burnedTokens;\n\n /**\n * @notice Only allow calls from bridge smart contract.\n */\n modifier onlyBridge() {\n require(msg.sender == _holograph().getBridge(), \"ERC721: bridge only call\");\n _;\n }\n\n /**\n * @notice Only allow calls from source smart contract.\n */\n modifier onlySource() {\n address sourceContract;\n assembly {\n sourceContract := sload(_sourceContractSlot)\n }\n require(msg.sender == sourceContract, \"ERC721: source only call\");\n _;\n }\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"ERC721: already initialized\");\n InitializableInterface sourceContract;\n assembly {\n sstore(_ownerSlot, caller())\n sourceContract := sload(_sourceContractSlot)\n }\n (\n string memory contractName,\n string memory contractSymbol,\n uint16 contractBps,\n uint256 eventConfig,\n bool skipInit,\n bytes memory initCode\n ) = abi.decode(initPayload, (string, string, uint16, uint256, bool, bytes));\n _name = contractName;\n _symbol = contractSymbol;\n _bps = contractBps;\n _eventConfig = eventConfig;\n if (!skipInit) {\n require(sourceContract.init(initCode) == InitializableInterface.init.selector, \"ERC721: could not init source\");\n (bool success, bytes memory returnData) = _royalties().delegatecall(\n abi.encodeWithSelector(\n HolographRoyaltiesInterface.initHolographRoyalties.selector,\n abi.encode(uint256(contractBps), uint256(0))\n )\n );\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == InitializableInterface.init.selector, \"ERC721: could not init royalties\");\n }\n\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @notice Gets a base64 encoded contract JSON file.\n * @return string The URI.\n */\n function contractURI() external view returns (string memory) {\n if (_isEventRegistered(HolographERC721Event.customContractURI)) {\n assembly {\n calldatacopy(0, 0, calldatasize())\n mstore(calldatasize(), caller())\n let result := staticcall(gas(), sload(_sourceContractSlot), 0, add(calldatasize(), 0x20), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n return HolographInterfacesInterface(_interfaces()).contractURI(_name, \"\", \"\", _bps, address(this));\n }\n\n /**\n * @notice Gets the name of the collection.\n * @return string The collection name.\n */\n function name() external view returns (string memory) {\n return _name;\n }\n\n /**\n * @notice Shows the interfaces the contracts support\n * @dev Must add new 4 byte interface Ids here to acknowledge support\n * @param interfaceId ERC165 style 4 byte interfaceId.\n * @return bool True if supported.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool) {\n HolographInterfacesInterface interfaces = HolographInterfacesInterface(_interfaces());\n ERC165 erc165Contract;\n assembly {\n erc165Contract := sload(_sourceContractSlot)\n }\n if (\n interfaces.supportsInterface(InterfaceType.ERC721, interfaceId) || // check global interfaces\n interfaces.supportsInterface(InterfaceType.ROYALTIES, interfaceId) || // check if royalties supports interface\n erc165Contract.supportsInterface(interfaceId) // check if source supports interface\n ) {\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * @notice Gets the collection's symbol.\n * @return string The symbol.\n */\n function symbol() external view returns (string memory) {\n return _symbol;\n }\n\n /**\n * @notice Get's the URI of the token.\n * @dev Defaults the the Arweave URI\n * @return string The URI.\n */\n function tokenURI(uint256 tokenId) external view returns (string memory) {\n assembly {\n calldatacopy(0, 0, calldatasize())\n mstore(calldatasize(), caller())\n let result := staticcall(gas(), sload(_sourceContractSlot), 0, add(calldatasize(), 0x20), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @notice Get list of tokens owned by wallet.\n * @param wallet The wallet address to get tokens for.\n * @return uint256[] Returns an array of token ids owned by wallet.\n */\n function tokensOfOwner(address wallet) external view returns (uint256[] memory) {\n return _ownedTokens[wallet];\n }\n\n /**\n * @notice Get set length list, starting from index, for tokens owned by wallet.\n * @param wallet The wallet address to get tokens for.\n * @param index The index to start enumeration from.\n * @param length The length of returned results.\n * @return tokenIds uint256[] Returns a set length array of token ids owned by wallet.\n */\n function tokensOfOwner(\n address wallet,\n uint256 index,\n uint256 length\n ) external view returns (uint256[] memory tokenIds) {\n uint256 supply = _ownedTokensCount[wallet];\n if (index + length > supply) {\n length = supply - index;\n }\n tokenIds = new uint256[](length);\n for (uint256 i = 0; i < length; i++) {\n tokenIds[i] = _ownedTokens[wallet][index + i];\n }\n }\n\n /**\n * @notice Adds a new address to the token's approval list.\n * @dev Requires the sender to be in the approved addresses.\n * @param to The address to approve.\n * @param tokenId The affected token.\n */\n function approve(address to, uint256 tokenId) external payable {\n address tokenOwner = _tokenOwner[tokenId];\n require(to != tokenOwner, \"ERC721: cannot approve self\");\n require(_isApprovedStrict(msg.sender, tokenId), \"ERC721: not approved sender\");\n if (_isEventRegistered(HolographERC721Event.beforeApprove)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC721.beforeApprove.selector, tokenOwner, to, tokenId)));\n }\n _tokenApprovals[tokenId] = to;\n emit Approval(tokenOwner, to, tokenId);\n if (_isEventRegistered(HolographERC721Event.afterApprove)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC721.afterApprove.selector, tokenOwner, to, tokenId)));\n }\n }\n\n /**\n * @notice Burns the token.\n * @dev The sender must be the owner or approved.\n * @param tokenId The token to burn.\n */\n function burn(uint256 tokenId) external {\n require(_isApproved(msg.sender, tokenId), \"ERC721: not approved sender\");\n address wallet = _tokenOwner[tokenId];\n if (_isEventRegistered(HolographERC721Event.beforeBurn)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC721.beforeBurn.selector, wallet, tokenId)));\n }\n _burn(wallet, tokenId);\n if (_isEventRegistered(HolographERC721Event.afterBurn)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC721.afterBurn.selector, wallet, tokenId)));\n }\n }\n\n function bridgeIn(uint32 fromChain, bytes calldata payload) external onlyBridge returns (bytes4) {\n (address from, address to, uint256 tokenId, bytes memory data) = abi.decode(\n payload,\n (address, address, uint256, bytes)\n );\n require(!_exists(tokenId), \"ERC721: token already exists\");\n delete _burnedTokens[tokenId];\n _mint(to, tokenId);\n if (_isEventRegistered(HolographERC721Event.bridgeIn)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC721.bridgeIn.selector, fromChain, from, to, tokenId, data)),\n \"HOLOGRAPH: bridge in failed\"\n );\n }\n return Holographable.bridgeIn.selector;\n }\n\n function bridgeOut(\n uint32 toChain,\n address sender,\n bytes calldata payload\n ) external onlyBridge returns (bytes4 selector, bytes memory data) {\n (address from, address to, uint256 tokenId) = abi.decode(payload, (address, address, uint256));\n require(to != address(0), \"ERC721: zero address\");\n require(_isApproved(sender, tokenId), \"ERC721: sender not approved\");\n require(from == _tokenOwner[tokenId], \"ERC721: from is not owner\");\n if (_isEventRegistered(HolographERC721Event.bridgeOut)) {\n /*\n * @dev making a bridgeOut call to source contract\n * assembly is used so that msg.sender can be injected in the calldata\n */\n bytes memory sourcePayload = abi.encodeWithSelector(\n HolographedERC721.bridgeOut.selector,\n toChain,\n from,\n to,\n tokenId\n );\n assembly {\n // it is important to add 32 bytes in order to accommodate the first 32 bytes being used for storing length of bytes\n mstore(add(sourcePayload, add(mload(sourcePayload), 0x20)), caller())\n let result := call(\n gas(),\n sload(_sourceContractSlot),\n callvalue(),\n // start reading data from memory position, plus 32 bytes, to skip bytes length indicator\n add(sourcePayload, 0x20),\n // add an additional 32 bytes to bytes length to include the appended caller address\n add(mload(sourcePayload), 0x20),\n 0,\n 0\n )\n // when reading back data, skip the first 32 bytes which is used to indicate bytes position in calldata\n // also subtract 32 bytes from returndatasize to accomodate the skipped first 32 bytes\n returndatacopy(data, 0x20, sub(returndatasize(), 0x20))\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n }\n }\n _burn(from, tokenId);\n return (Holographable.bridgeOut.selector, abi.encode(from, to, tokenId, data));\n }\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n * @param from cannot be the zero address.\n * @param to cannot be the zero address.\n * @param tokenId token must exist and be owned by `from`.\n */\n function safeTransferFrom(address from, address to, uint256 tokenId) external payable {\n safeTransferFrom(from, to, tokenId, \"\");\n }\n\n /**\n * @notice Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n * @dev Since it's not being used, the _data variable is commented out to avoid compiler warnings.\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n * @param from cannot be the zero address.\n * @param to cannot be the zero address.\n * @param tokenId token must exist and be owned by `from`.\n */\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public payable {\n require(_isApproved(msg.sender, tokenId), \"ERC721: not approved sender\");\n if (_isEventRegistered(HolographERC721Event.beforeSafeTransfer)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC721.beforeSafeTransfer.selector, from, to, tokenId, data))\n );\n }\n _transferFrom(from, to, tokenId);\n if (_isContract(to)) {\n require(\n ERC721TokenReceiver(to).onERC721Received(msg.sender, from, tokenId, data) ==\n ERC721TokenReceiver.onERC721Received.selector,\n \"ERC721: onERC721Received fail\"\n );\n }\n if (_isEventRegistered(HolographERC721Event.afterSafeTransfer)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC721.afterSafeTransfer.selector, from, to, tokenId, data))\n );\n }\n }\n\n /**\n * @notice Adds a new approved operator.\n * @dev Allows platforms to sell/transfer all your NFTs. Used with proxy contracts like OpenSea/Rarible.\n * @param to The address to approve.\n * @param approved Turn on or off approval status.\n */\n function setApprovalForAll(address to, bool approved) external {\n require(to != msg.sender, \"ERC721: cannot approve self\");\n if (_isEventRegistered(HolographERC721Event.beforeApprovalAll)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC721.beforeApprovalAll.selector, msg.sender, to, approved))\n );\n }\n _operatorApprovals[msg.sender][to] = approved;\n emit ApprovalForAll(msg.sender, to, approved);\n if (_isEventRegistered(HolographERC721Event.afterApprovalAll)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC721.afterApprovalAll.selector, msg.sender, to, approved))\n );\n }\n }\n\n /**\n * @dev Allows for source smart contract to burn a token.\n * Note: this is put in place to make sure that custom logic could be implemented for merging, gamification, etc.\n * Note: token cannot be burned if it's locked by bridge.\n */\n function sourceBurn(uint256 tokenId) external onlySource {\n address wallet = _tokenOwner[tokenId];\n _burn(wallet, tokenId);\n }\n\n /**\n * @dev Allows for source smart contract to mint a token.\n */\n function sourceMint(address to, uint224 tokenId) external onlySource {\n // uint32 is reserved for chain id to be used\n // we need to get current chain id, and prepend it to tokenId\n // this will prevent possible tokenId overlap if minting simultaneously on multiple chains is possible\n uint256 token = uint256(bytes32(abi.encodePacked(_chain(), tokenId)));\n require(!_burnedTokens[token], \"ERC721: can't mint burned token\");\n _mint(to, token);\n }\n\n /**\n * @dev Allows source to get the prepend for their tokenIds.\n */\n function sourceGetChainPrepend() external view onlySource returns (uint256) {\n return uint256(bytes32(abi.encodePacked(_chain(), uint224(0))));\n }\n\n /**\n * @dev Allows for source smart contract to mint a batch of tokens.\n */\n function sourceMintBatch(address to, uint224[] calldata tokenIds) external onlySource {\n require(tokenIds.length < 1000, \"ERC721: max batch size is 1000\");\n uint32 chain = _chain();\n uint256 token;\n for (uint256 i = 0; i < tokenIds.length; i++) {\n require(!_burnedTokens[token], \"ERC721: can't mint burned token\");\n token = uint256(bytes32(abi.encodePacked(chain, tokenIds[i])));\n require(!_burnedTokens[token], \"ERC721: can't mint burned token\");\n _mint(to, token);\n }\n }\n\n /**\n * @dev Allows for source smart contract to mint a batch of tokens.\n */\n function sourceMintBatch(address[] calldata wallets, uint224[] calldata tokenIds) external onlySource {\n require(wallets.length == tokenIds.length, \"ERC721: array length missmatch\");\n require(tokenIds.length < 1000, \"ERC721: max batch size is 1000\");\n uint32 chain = _chain();\n uint256 token;\n for (uint256 i = 0; i < tokenIds.length; i++) {\n token = uint256(bytes32(abi.encodePacked(chain, tokenIds[i])));\n require(!_burnedTokens[token], \"ERC721: can't mint burned token\");\n _mint(wallets[i], token);\n }\n }\n\n /**\n * @dev Allows for source smart contract to mint a batch of tokens.\n */\n function sourceMintBatchIncremental(address to, uint224 startingTokenId, uint256 length) external onlySource {\n uint256 token = uint256(bytes32(abi.encodePacked(_chain(), startingTokenId)));\n for (uint256 i = 0; i < length; i++) {\n require(!_burnedTokens[token], \"ERC721: can't mint burned token\");\n _mint(to, token);\n token++;\n }\n }\n\n /**\n * @dev Allows for source smart contract to transfer a token.\n * Note: this is put in place to make sure that custom logic could be implemented for merging, gamification, etc.\n * Note: token cannot be transfered if it's locked by bridge.\n */\n function sourceTransfer(address to, uint256 tokenId) external onlySource {\n require(!_burnedTokens[tokenId], \"ERC721: token has been burned\");\n address wallet = _tokenOwner[tokenId];\n _transferFrom(wallet, to, tokenId);\n }\n\n /**\n * @dev Allows for source smart contract to make calls to external contracts\n */\n function sourceExternalCall(address target, bytes calldata data) external onlySource {\n assembly {\n calldatacopy(0, data.offset, data.length)\n let result := call(gas(), target, callvalue(), 0, data.length, 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @notice Transfers `tokenId` token from `msg.sender` to `to`.\n * @dev WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\n * @param to cannot be the zero address.\n * @param tokenId token must be owned by `from`.\n */\n function transfer(address to, uint256 tokenId) external payable {\n transferFrom(msg.sender, to, tokenId, \"\");\n }\n\n /**\n * @notice Transfers `tokenId` token from `from` to `to`.\n * @dev WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\n * @param from cannot be the zero address.\n * @param to cannot be the zero address.\n * @param tokenId token must be owned by `from`.\n */\n function transferFrom(address from, address to, uint256 tokenId) public payable {\n transferFrom(from, to, tokenId, \"\");\n }\n\n /**\n * @notice Transfers `tokenId` token from `from` to `to`.\n * @dev WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\n * @dev Since it's not being used, the _data variable is commented out to avoid compiler warnings.\n * @param from cannot be the zero address.\n * @param to cannot be the zero address.\n * @param tokenId token must be owned by `from`.\n * @param data additional data to pass.\n */\n function transferFrom(address from, address to, uint256 tokenId, bytes memory data) public payable {\n require(_isApproved(msg.sender, tokenId), \"ERC721: not approved sender\");\n if (_isEventRegistered(HolographERC721Event.beforeTransfer)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC721.beforeTransfer.selector, from, to, tokenId, data)));\n }\n _transferFrom(from, to, tokenId);\n if (_isEventRegistered(HolographERC721Event.afterTransfer)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC721.afterTransfer.selector, from, to, tokenId, data)));\n }\n }\n\n /**\n * @notice Get total number of tokens owned by wallet.\n * @dev Used to see total amount of tokens owned by a specific wallet.\n * @param wallet Address for which to get token balance.\n * @return uint256 Returns an integer, representing total amount of tokens held by address.\n */\n function balanceOf(address wallet) public view returns (uint256) {\n return _ownedTokensCount[wallet];\n }\n\n function burned(uint256 tokenId) public view returns (bool) {\n return _burnedTokens[tokenId];\n }\n\n /**\n * @notice Decimal places to have for totalSupply.\n * @dev Since ERC721s are single, we use 0 as the decimal places to make sure a round number for totalSupply.\n * @return uint256 Returns the number of decimal places to have for totalSupply.\n */\n function decimals() external pure returns (uint256) {\n return 0;\n }\n\n function exists(uint256 tokenId) public view returns (bool) {\n return _tokenOwner[tokenId] != address(0);\n }\n\n /**\n * @notice Gets the approved address for the token.\n * @dev Single operator set for a specific token. Usually used for one-time very specific authorisations.\n * @param tokenId Token id to get approved operator for.\n * @return address Approved address for token.\n */\n function getApproved(uint256 tokenId) external view returns (address) {\n return _tokenApprovals[tokenId];\n }\n\n /**\n * @notice Checks if the address is approved.\n * @dev Includes references to OpenSea and Rarible marketplace proxies.\n * @param wallet Address of the wallet.\n * @param operator Address of the marketplace operator.\n * @return bool True if approved.\n */\n function isApprovedForAll(address wallet, address operator) external view returns (bool) {\n return (_operatorApprovals[wallet][operator] || _sourceApproved(wallet, operator));\n }\n\n /**\n * @notice Checks who the owner of a token is.\n * @dev The token must exist.\n * @param tokenId The token to look up.\n * @return address Owner of the token.\n */\n function ownerOf(uint256 tokenId) external view returns (address) {\n address tokenOwner = _tokenOwner[tokenId];\n require(tokenOwner != address(0), \"ERC721: token does not exist\");\n return tokenOwner;\n }\n\n /**\n * @notice Get token by index.\n * @dev Used in conjunction with totalSupply function to iterate over all tokens in collection.\n * @param index Index of token in array.\n * @return uint256 Returns the token id of token located at that index.\n */\n function tokenByIndex(uint256 index) external view returns (uint256) {\n require(index < _allTokens.length, \"ERC721: index out of bounds\");\n return _allTokens[index];\n }\n\n /**\n * @notice Get set length list, starting from index, for all tokens.\n * @param index The index to start enumeration from.\n * @param length The length of returned results.\n * @return tokenIds uint256[] Returns a set length array of token ids minted.\n */\n function tokens(uint256 index, uint256 length) external view returns (uint256[] memory tokenIds) {\n uint256 supply = _allTokens.length;\n if (index + length > supply) {\n length = supply - index;\n }\n tokenIds = new uint256[](length);\n for (uint256 i = 0; i < length; i++) {\n tokenIds[i] = _allTokens[index + i];\n }\n }\n\n /**\n * @notice Get token from wallet by index instead of token id.\n * @dev Helpful for wallet token enumeration where token id info is not yet available. Use in conjunction with balanceOf function.\n * @param wallet Specific address for which to get token for.\n * @param index Index of token in array.\n * @return uint256 Returns the token id of token located at that index in specified wallet.\n */\n function tokenOfOwnerByIndex(address wallet, uint256 index) external view returns (uint256) {\n require(index < balanceOf(wallet), \"ERC721: index out of bounds\");\n return _ownedTokens[wallet][index];\n }\n\n /**\n * @notice Total amount of tokens in the collection.\n * @dev Ignores burned tokens.\n * @return uint256 Returns the total number of active (not burned) tokens.\n */\n function totalSupply() external view returns (uint256) {\n return _allTokens.length;\n }\n\n /**\n * @notice Empty function that is triggered by external contract on NFT transfer.\n * @dev We have this blank function in place to make sure that external contract sending in NFTs don't error out.\n * @dev Since it's not being used, the _operator variable is commented out to avoid compiler warnings.\n * @dev Since it's not being used, the _from variable is commented out to avoid compiler warnings.\n * @dev Since it's not being used, the _tokenId variable is commented out to avoid compiler warnings.\n * @dev Since it's not being used, the _data variable is commented out to avoid compiler warnings.\n * @return bytes4 Returns the interfaceId of onERC721Received.\n */\n function onERC721Received(\n address _operator,\n address _from,\n uint256 _tokenId,\n bytes calldata _data\n ) external returns (bytes4) {\n require(_isContract(_operator), \"ERC721: operator not contract\");\n if (_isEventRegistered(HolographERC721Event.beforeOnERC721Received)) {\n require(\n _sourceCall(\n abi.encodeWithSelector(\n HolographedERC721.beforeOnERC721Received.selector,\n _operator,\n _from,\n address(this),\n _tokenId,\n _data\n )\n )\n );\n }\n try HolographERC721Interface(_operator).ownerOf(_tokenId) returns (address tokenOwner) {\n require(tokenOwner == address(this), \"ERC721: contract not token owner\");\n } catch {\n revert(\"ERC721: token does not exist\");\n }\n if (_isEventRegistered(HolographERC721Event.afterOnERC721Received)) {\n require(\n _sourceCall(\n abi.encodeWithSelector(\n HolographedERC721.afterOnERC721Received.selector,\n _operator,\n _from,\n address(this),\n _tokenId,\n _data\n )\n )\n );\n }\n return ERC721TokenReceiver.onERC721Received.selector;\n }\n\n /**\n * @dev Add a newly minted token into managed list of tokens.\n * @param to Address of token owner for which to add the token.\n * @param tokenId Id of token to add.\n */\n function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {\n _ownedTokensIndex[tokenId] = _ownedTokensCount[to];\n _ownedTokensCount[to]++;\n _ownedTokens[to].push(tokenId);\n _allTokensIndex[tokenId] = _allTokens.length;\n _allTokens.push(tokenId);\n }\n\n /**\n * @notice Burns the token.\n * @dev All validation needs to be done before calling this function.\n * @param wallet Address of current token owner.\n * @param tokenId The token to burn.\n */\n function _burn(address wallet, uint256 tokenId) private {\n _clearApproval(tokenId);\n _tokenOwner[tokenId] = address(0);\n _registryTransfer(wallet, address(0), tokenId);\n _removeTokenFromOwnerEnumeration(wallet, tokenId);\n _burnedTokens[tokenId] = true;\n }\n\n /**\n * @notice Deletes a token from the approval list.\n * @dev Removes from count.\n * @param tokenId T.\n */\n function _clearApproval(uint256 tokenId) private {\n delete _tokenApprovals[tokenId];\n }\n\n /**\n * @notice Mints an NFT.\n * @dev Can to mint the token to the zero address and the token cannot already exist.\n * @param to Address to mint to.\n * @param tokenId The new token.\n */\n function _mint(address to, uint256 tokenId) private {\n require(tokenId > 0, \"ERC721: token id cannot be zero\");\n require(to != address(0), \"ERC721: minting to burn address\");\n require(!_exists(tokenId), \"ERC721: token already exists\");\n require(!_burnedTokens[tokenId], \"ERC721: token has been burned\");\n _tokenOwner[tokenId] = to;\n _registryTransfer(address(0), to, tokenId);\n _addTokenToOwnerEnumeration(to, tokenId);\n }\n\n function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {\n uint256 lastTokenIndex = _allTokens.length - 1;\n uint256 tokenIndex = _allTokensIndex[tokenId];\n uint256 lastTokenId = _allTokens[lastTokenIndex];\n _allTokens[tokenIndex] = lastTokenId;\n _allTokensIndex[lastTokenId] = tokenIndex;\n delete _allTokensIndex[tokenId];\n delete _allTokens[lastTokenIndex];\n _allTokens.pop();\n }\n\n /**\n * @dev Remove a token from managed list of tokens.\n * @param from Address of token owner for which to remove the token.\n * @param tokenId Id of token to remove.\n */\n function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {\n _removeTokenFromAllTokensEnumeration(tokenId);\n _ownedTokensCount[from]--;\n uint256 lastTokenIndex = _ownedTokensCount[from];\n uint256 tokenIndex = _ownedTokensIndex[tokenId];\n if (tokenIndex != lastTokenIndex) {\n uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];\n _ownedTokens[from][tokenIndex] = lastTokenId;\n _ownedTokensIndex[lastTokenId] = tokenIndex;\n }\n if (lastTokenIndex == 0) {\n delete _ownedTokens[from];\n } else {\n delete _ownedTokens[from][lastTokenIndex];\n _ownedTokens[from].pop();\n }\n }\n\n /**\n * @dev Primary private function that handles the transfer/mint/burn functionality.\n * @param from Address from where token is being transferred. Zero address means it is being minted.\n * @param to Address to whom the token is being transferred. Zero address means it is being burned.\n * @param tokenId Id of token that is being transferred/minted/burned.\n */\n function _transferFrom(address from, address to, uint256 tokenId) private {\n require(_tokenOwner[tokenId] == from, \"ERC721: token not owned\");\n require(to != address(0), \"ERC721: use burn instead\");\n _clearApproval(tokenId);\n _tokenOwner[tokenId] = to;\n _registryTransfer(from, to, tokenId);\n _removeTokenFromOwnerEnumeration(from, tokenId);\n _addTokenToOwnerEnumeration(to, tokenId);\n }\n\n function _chain() private view returns (uint32) {\n uint32 currentChain = HolographInterface(HolographerInterface(payable(address(this))).getHolograph())\n .getHolographChainId();\n if (currentChain != HolographerInterface(payable(address(this))).getOriginChain()) {\n return currentChain;\n }\n return uint32(0);\n }\n\n /**\n * @notice Checks if the token owner exists.\n * @dev If the address is the zero address no owner exists.\n * @param tokenId The affected token.\n * @return bool True if it exists.\n */\n function _exists(uint256 tokenId) private view returns (bool) {\n address tokenOwner = _tokenOwner[tokenId];\n return tokenOwner != address(0);\n }\n\n function _sourceApproved(address _tokenWallet, address _tokenSpender) internal view returns (bool approved) {\n if (_isEventRegistered(HolographERC721Event.onIsApprovedForAll)) {\n HolographedERC721 sourceContract;\n assembly {\n sourceContract := sload(_sourceContractSlot)\n }\n if (sourceContract.onIsApprovedForAll(_tokenWallet, _tokenSpender)) {\n approved = true;\n }\n }\n }\n\n /**\n * @notice Checks if the address is an approved one.\n * @dev Uses inlined checks for different usecases of approval.\n * @param spender Address of the spender.\n * @param tokenId The affected token.\n * @return bool True if approved.\n */\n function _isApproved(address spender, uint256 tokenId) private view returns (bool) {\n require(_exists(tokenId), \"ERC721: token does not exist\");\n address tokenOwner = _tokenOwner[tokenId];\n return (spender == tokenOwner ||\n _tokenApprovals[tokenId] == spender ||\n _operatorApprovals[tokenOwner][spender] ||\n _sourceApproved(tokenOwner, spender));\n }\n\n function _isApprovedStrict(address spender, uint256 tokenId) private view returns (bool) {\n require(_exists(tokenId), \"ERC721: token does not exist\");\n address tokenOwner = _tokenOwner[tokenId];\n return (spender == tokenOwner || _operatorApprovals[tokenOwner][spender] || _sourceApproved(tokenOwner, spender));\n }\n\n function _isContract(address contractAddress) private view returns (bool) {\n bytes32 codehash;\n assembly {\n codehash := extcodehash(contractAddress)\n }\n return (codehash != 0x0 && codehash != 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470);\n }\n\n /**\n * @dev Get the interfaces contract address.\n */\n function _interfaces() private view returns (address) {\n return _holograph().getInterfaces();\n }\n\n function owner() public view override returns (address) {\n assembly {\n calldatacopy(0, 0, calldatasize())\n mstore(calldatasize(), caller())\n let result := staticcall(gas(), sload(_sourceContractSlot), 0, add(calldatasize(), 0x20), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n function _holograph() private view returns (HolographInterface holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n /**\n * @dev Get the bridge contract address.\n */\n function _royalties() private view returns (address) {\n return\n HolographRegistryInterface(_holograph().getRegistry()).getContractTypeAddress(\n // \"HolographRoyalties\" front zero padded to be 32 bytes\n 0x0000000000000000000000000000486f6c6f6772617068526f79616c74696573\n );\n }\n\n function _registryTransfer(address _from, address _to, uint256 _tokenId) private {\n emit Transfer(_from, _to, _tokenId);\n HolographRegistryInterface(_holograph().getRegistry()).holographableEvent(\n abi.encode(\n // keccak256(\"TransferERC721(address,address,uint256)\")\n bytes32(0x351b8d13789e4d8d2717631559251955685881a31494dd0b8b19b4ef8530bb6d),\n _from,\n _to,\n _tokenId\n )\n );\n }\n\n /**\n * @dev Purposefully left empty, to prevent running out of gas errors when receiving native token payments.\n */\n event FundsReceived(address indexed source, uint256 amount);\n\n receive() external payable {\n emit FundsReceived(msg.sender, msg.value);\n }\n\n /**\n * @notice Fallback to the source contract.\n * @dev Any function call that is not covered here, will automatically be sent over to the source contract.\n */\n fallback() external payable {\n // Check if royalties support the function, send there, otherwise revert to source\n address _target;\n if (HolographInterfacesInterface(_interfaces()).supportsInterface(InterfaceType.ROYALTIES, msg.sig)) {\n _target = _royalties();\n assembly {\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), _target, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n } else {\n assembly {\n calldatacopy(0, 0, calldatasize())\n mstore(calldatasize(), caller())\n let result := call(gas(), sload(_sourceContractSlot), callvalue(), 0, add(calldatasize(), 0x20), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n }\n\n /*\n * @dev all calls to source contract go through this function in order to inject original msg.sender in calldata\n */\n function _sourceCall(bytes memory payload) private returns (bool output) {\n assembly {\n mstore(add(payload, add(mload(payload), 0x20)), caller())\n // offset memory position by 32 bytes to skip the 32 bytes where bytes length is stored\n // add 32 bytes to bytes length to include the appended msg.sender to calldata\n let result := call(\n gas(),\n sload(_sourceContractSlot),\n callvalue(),\n add(payload, 0x20),\n add(mload(payload), 0x20),\n 0,\n 0\n )\n let pos := mload(0x40)\n // reserve memory space for return data\n mstore(0x40, add(pos, returndatasize()))\n returndatacopy(pos, 0, returndatasize())\n switch result\n case 0 {\n revert(pos, returndatasize())\n }\n output := mload(pos)\n }\n }\n\n function _isEventRegistered(HolographERC721Event _eventName) private view returns (bool) {\n return ((_eventConfig >> uint256(_eventName)) & uint256(1) == 1 ? true : false);\n }\n}\n" + }, + "contracts/enforcer/HolographGeneric.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\nimport \"../abstract/Owner.sol\";\n\nimport \"../enum/HolographGenericEvent.sol\";\nimport \"../enum/InterfaceType.sol\";\n\nimport \"../interface/HolographGenericInterface.sol\";\nimport \"../interface/ERC165.sol\";\nimport \"../interface/Holographable.sol\";\nimport \"../interface/HolographedGeneric.sol\";\nimport \"../interface/HolographInterface.sol\";\nimport \"../interface/InitializableInterface.sol\";\nimport \"../interface/HolographInterfacesInterface.sol\";\nimport \"../interface/Ownable.sol\";\n\n/**\n * @title Holograph Bridgeable Generic Contract\n * @author Holograph Foundation\n * @notice A smart contract for creating custom bridgeable logic.\n * @dev The entire logic and functionality of the smart contract is self-contained.\n */\ncontract HolographGeneric is Admin, Owner, Initializable, HolographGenericInterface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\n */\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.sourceContract')) - 1)\n */\n bytes32 constant _sourceContractSlot = 0x27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b074;\n\n /**\n * @dev Configuration for events to trigger for source smart contract.\n */\n uint256 private _eventConfig;\n\n /**\n * @notice Only allow calls from bridge smart contract.\n */\n modifier onlyBridge() {\n require(msg.sender == _holograph().getBridge(), \"GENERIC: bridge only call\");\n _;\n }\n\n /**\n * @notice Only allow calls from source smart contract.\n */\n modifier onlySource() {\n address sourceContract;\n assembly {\n sourceContract := sload(_sourceContractSlot)\n }\n require(msg.sender == sourceContract, \"GENERIC: source only call\");\n _;\n }\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"GENERIC: already initialized\");\n InitializableInterface sourceContract;\n assembly {\n sstore(_ownerSlot, caller())\n sourceContract := sload(_sourceContractSlot)\n }\n (uint256 eventConfig, bool skipInit, bytes memory initCode) = abi.decode(initPayload, (uint256, bool, bytes));\n _eventConfig = eventConfig;\n if (!skipInit) {\n require(sourceContract.init(initCode) == InitializableInterface.init.selector, \"GENERIC: could not init source\");\n }\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @dev Allows for source smart contract to withdraw contract balance.\n */\n function sourceTransfer(address payable destination, uint256 amount) external onlySource {\n destination.transfer(amount);\n }\n\n /**\n * @dev Allows for source smart contract to make calls to external contracts\n */\n function sourceExternalCall(address target, bytes calldata data) external onlySource {\n assembly {\n calldatacopy(0, data.offset, data.length)\n let result := call(gas(), target, callvalue(), 0, data.length, 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @dev Purposefully left empty, to prevent running out of gas errors when receiving native token payments.\n */\n receive() external payable {}\n\n /**\n * @notice Fallback to the source contract.\n * @dev Any function call that is not covered here, will automatically be sent over to the source contract.\n */\n fallback() external payable {\n assembly {\n calldatacopy(0, 0, calldatasize())\n mstore(calldatasize(), caller())\n let result := call(gas(), sload(_sourceContractSlot), callvalue(), 0, add(calldatasize(), 0x20), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n function _sourceCall(bytes memory payload) private returns (bool output) {\n assembly {\n let pos := mload(0x40)\n mstore(0x40, add(pos, 0x20))\n mstore(add(payload, add(mload(payload), 0x20)), caller())\n // offset memory position by 32 bytes to skip the 32 bytes where bytes length is stored\n // add 32 bytes to bytes length to include the appended msg.sender to calldata\n let result := call(\n gas(),\n sload(_sourceContractSlot),\n callvalue(),\n add(payload, 0x20),\n add(mload(payload), 0x20),\n 0,\n 0\n )\n returndatacopy(pos, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n output := mload(pos)\n }\n }\n\n /**\n * @dev Although EIP-165 is not required for ERC20 contracts, we still decided to implement it.\n *\n * This makes it easier for external smart contracts to easily identify a valid ERC20 token contract.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool) {\n HolographInterfacesInterface interfaces = HolographInterfacesInterface(_interfaces());\n ERC165 erc165Contract;\n assembly {\n erc165Contract := sload(_sourceContractSlot)\n }\n if (\n interfaces.supportsInterface(InterfaceType.GENERIC, interfaceId) || erc165Contract.supportsInterface(interfaceId) // check global interfaces // check if source supports interface\n ) {\n return true;\n } else {\n return false;\n }\n }\n\n function bridgeIn(uint32 fromChain, bytes calldata payload) external onlyBridge returns (bytes4) {\n if (_isEventRegistered(HolographGenericEvent.bridgeIn)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedGeneric.bridgeIn.selector, fromChain, payload)),\n \"HOLOGRAPH: bridge in failed\"\n );\n }\n return Holographable.bridgeIn.selector;\n }\n\n function bridgeOut(\n uint32 toChain,\n address sender,\n bytes calldata payload\n ) external onlyBridge returns (bytes4 selector, bytes memory data) {\n if (_isEventRegistered(HolographGenericEvent.bridgeOut)) {\n bytes memory sourcePayload = abi.encodeWithSelector(\n HolographedGeneric.bridgeOut.selector,\n toChain,\n sender,\n payload\n );\n assembly {\n // it is important to add 32 bytes in order to accommodate the first 32 bytes being used for storing length of bytes\n mstore(add(sourcePayload, add(mload(sourcePayload), 0x20)), caller())\n let result := call(\n gas(),\n sload(_sourceContractSlot),\n callvalue(),\n // start reading data from memory position, plus 32 bytes, to skip bytes length indicator\n add(sourcePayload, 0x20),\n // add an additional 32 bytes to bytes length to include the appended caller address\n add(mload(sourcePayload), 0x20),\n 0,\n 0\n )\n // when reading back data, skip the first 32 bytes which is used to indicate bytes position in calldata\n // also subtract 32 bytes from returndatasize to accomodate the skipped first 32 bytes\n returndatacopy(data, 0x20, sub(returndatasize(), 0x20))\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n }\n }\n return (Holographable.bridgeOut.selector, data);\n }\n\n /**\n * @dev Allows for source smart contract to emit events.\n */\n function sourceEmit(bytes calldata eventData) external onlySource {\n assembly {\n calldatacopy(0, eventData.offset, eventData.length)\n log0(0, eventData.length)\n }\n }\n\n function sourceEmit(bytes32 eventId, bytes calldata eventData) external onlySource {\n assembly {\n calldatacopy(0, eventData.offset, eventData.length)\n log1(0, eventData.length, eventId)\n }\n }\n\n function sourceEmit(bytes32 eventId, bytes32 topic1, bytes calldata eventData) external onlySource {\n assembly {\n calldatacopy(0, eventData.offset, eventData.length)\n log2(0, eventData.length, eventId, topic1)\n }\n }\n\n function sourceEmit(bytes32 eventId, bytes32 topic1, bytes32 topic2, bytes calldata eventData) external onlySource {\n assembly {\n calldatacopy(0, eventData.offset, eventData.length)\n log3(0, eventData.length, eventId, topic1, topic2)\n }\n }\n\n function sourceEmit(\n bytes32 eventId,\n bytes32 topic1,\n bytes32 topic2,\n bytes32 topic3,\n bytes calldata eventData\n ) external onlySource {\n assembly {\n calldatacopy(0, eventData.offset, eventData.length)\n log4(0, eventData.length, eventId, topic1, topic2, topic3)\n }\n }\n\n /**\n * @dev Get the source smart contract as bridgeable interface.\n */\n function SourceGeneric() private view returns (HolographedGeneric sourceContract) {\n assembly {\n sourceContract := sload(_sourceContractSlot)\n }\n }\n\n /**\n * @dev Get the interfaces contract address.\n */\n function _interfaces() private view returns (address) {\n return _holograph().getInterfaces();\n }\n\n function owner() public view override returns (address) {\n Ownable ownableContract;\n assembly {\n ownableContract := sload(_sourceContractSlot)\n }\n return ownableContract.owner();\n }\n\n function _holograph() private view returns (HolographInterface holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n function _isEventRegistered(HolographGenericEvent _eventName) private view returns (bool) {\n return ((_eventConfig >> uint256(_eventName)) & uint256(1) == 1 ? true : false);\n }\n}\n" + }, + "contracts/enforcer/HolographRoyalties.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\nimport \"../abstract/Owner.sol\";\n\nimport \"../interface/ERC20.sol\";\nimport \"../interface/HolographerInterface.sol\";\nimport \"../interface/InitializableInterface.sol\";\nimport \"../interface/HolographRoyaltiesInterface.sol\";\n\nimport \"../struct/ZoraBidShares.sol\";\n\n/**\n * @title HolographRoyalties\n * @author Holograph Foundation\n * @notice A smart contract for providing royalty info, collecting royalties, and distributing it to configured payout wallets.\n * @dev This smart contract is not intended to be used directly. Apply it to any of your ERC721 or ERC1155 smart contracts through a delegatecall fallback.\n */\ncontract HolographRoyalties is Admin, Owner, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.ROYALTIES.defaultBp')) - 1)\n */\n bytes32 constant _defaultBpSlot = 0xff29fcf645501423fd56e0287670f6813a1e5db5cf706428bc8516381e7ffe81;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.ROYALTIES.defaultReceiver')) - 1)\n */\n bytes32 constant _defaultReceiverSlot = 0x00b381815b89a20a37ee91e8a0119be5e16f6d1668377e7ae457213a74a415bb;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.ROYALTIES.initialized')) - 1)\n */\n bytes32 constant _initializedPaidSlot = 0x91428d26cb4818e4e627ebb64c06b5a67b82f313516b5c903cf07a00681c95f6;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.ROYALTIES.payout.addresses')) - 1)\n */\n bytes32 constant _payoutAddressesSlot = 0xf31f2a3a453a7aa2f3054423a8c5474ac9817ea457b458152967bbcb12ed6a43;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.ROYALTIES.payout.bps')) - 1)\n */\n bytes32 constant _payoutBpsSlot = 0xa4023567d5b5f01c63e00d90785d7cd4ff057a237ad185c5ecade8f4059fb61a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.ROYALTIES.extendedCall')) - 1)\n * @dev extendedCall is an init config used to determine if payouts should be sent via a call or a transfer.\n */\n bytes32 constant _extendedCallSlot = 0x254926eafdecb56f669f96a3a752fbca17becd902481431df613768b1f903fa3;\n\n string constant _bpString = \"eip1967.Holograph.ROYALTIES.bp\";\n string constant _receiverString = \"eip1967.Holograph.ROYALTIES.receiver\";\n string constant _tokenAddressString = \"eip1967.Holograph.ROYALTIES.tokenAddress\";\n\n /**\n * @notice Event emitted when setting/updating royalty info/fees. This is used by Rarible V1.\n * @dev Emits event in order to comply with Rarible V1 royalty spec.\n * @param tokenId Specific token id for which royalty info is being set, set as 0 for all tokens inside of the smart contract.\n * @param recipients Address array of wallets that will receive tha royalties.\n * @param bps Uint256 array of base points(percentages) that each wallet(specified in recipients) will receive from the royalty payouts.\n * Make sure that all the base points add up to a total of 10000.\n */\n event SecondarySaleFees(uint256 tokenId, address[] recipients, uint256[] bps);\n\n /**\n * @dev Use this modifier to lock public functions that should not be accesible to non-owners.\n */\n modifier onlyOwner() override {\n require(isOwner(), \"ROYALTIES: caller not an owner\");\n _;\n }\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"ROYALTIES: already initialized\");\n assembly {\n sstore(_adminSlot, caller())\n sstore(_ownerSlot, caller())\n }\n uint256 bp = abi.decode(initPayload, (uint256));\n setRoyalties(0, payable(address(this)), bp);\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n function initHolographRoyalties(bytes memory initPayload) external returns (bytes4) {\n uint256 initialized;\n assembly {\n initialized := sload(_initializedPaidSlot)\n }\n require(initialized == 0, \"ROYALTIES: already initialized\");\n (uint256 bp, uint256 useExtenededCall) = abi.decode(initPayload, (uint256, uint256));\n if (useExtenededCall > 0) {\n useExtenededCall = 1;\n }\n assembly {\n sstore(_extendedCallSlot, useExtenededCall)\n }\n setRoyalties(0, payable(address(this)), bp);\n address payable[] memory addresses = new address payable[](1);\n addresses[0] = payable(Owner(HolographerInterface(address(this)).getSourceContract()).owner());\n uint256[] memory bps = new uint256[](1);\n bps[0] = 10000;\n _setPayoutAddresses(addresses);\n _setPayoutBps(bps);\n initialized = 1;\n assembly {\n sstore(_initializedPaidSlot, initialized)\n }\n return InitializableInterface.init.selector;\n }\n\n /**\n * @notice Check if message sender is a legitimate owner of the smart contract\n * @dev We check owner, admin, and identity for a more comprehensive coverage.\n * @return Returns true is message sender is an owner.\n */\n function isOwner() private view returns (bool) {\n return (msg.sender == getOwner() ||\n msg.sender == getAdmin() ||\n msg.sender == Owner(HolographerInterface(address(this)).getSourceContract()).owner());\n }\n\n /**\n * @dev This is here in place to prevent reverts in case contract is used outside of the protocol.\n */\n function getSourceContract() external view returns (address sourceContract) {\n sourceContract = address(this);\n }\n\n /**\n * @dev Gets the default royalty payment receiver address from storage slot.\n * @return receiver Wallet or smart contract that will receive the initial royalty payouts.\n */\n function _getDefaultReceiver() private view returns (address payable receiver) {\n assembly {\n receiver := sload(_defaultReceiverSlot)\n }\n }\n\n /**\n * @dev Sets the default royalty payment receiver address to storage slot.\n * @param receiver Wallet or smart contract that will receive the initial royalty payouts.\n */\n function _setDefaultReceiver(address receiver) private {\n assembly {\n sstore(_defaultReceiverSlot, receiver)\n }\n }\n\n /**\n * @dev Gets the default royalty base points(percentage) from storage slot.\n * @return bp Royalty base points(percentage) for royalty payouts.\n */\n function _getDefaultBp() private view returns (uint256 bp) {\n assembly {\n bp := sload(_defaultBpSlot)\n }\n }\n\n /**\n * @dev Sets the default royalty base points(percentage) to storage slot.\n * @param bp Uint256 of royalty percentage, provided in base points format.\n */\n function _setDefaultBp(uint256 bp) private {\n assembly {\n sstore(_defaultBpSlot, bp)\n }\n }\n\n /**\n * @dev Gets the royalty payment receiver address, for a particular token id, from storage slot.\n * @return receiver Wallet or smart contract that will receive the royalty payouts for a particular token id.\n */\n function _getReceiver(uint256 tokenId) private view returns (address payable receiver) {\n bytes32 slot = bytes32(uint256(keccak256(abi.encodePacked(_receiverString, tokenId))) - 1);\n assembly {\n receiver := sload(slot)\n }\n }\n\n /**\n * @dev Sets the royalty payment receiver address, for a particular token id, to storage slot.\n * @param tokenId Uint256 of the token id to set the receiver for.\n * @param receiver Wallet or smart contract that will receive the royalty payouts for a particular token id.\n */\n function _setReceiver(uint256 tokenId, address receiver) private {\n bytes32 slot = bytes32(uint256(keccak256(abi.encodePacked(_receiverString, tokenId))) - 1);\n assembly {\n sstore(slot, receiver)\n }\n }\n\n /**\n * @dev Gets the royalty base points(percentage), for a particular token id, from storage slot.\n * @return bp Royalty base points(percentage) for the royalty payouts of a specific token id.\n */\n function _getBp(uint256 tokenId) private view returns (uint256 bp) {\n bytes32 slot = bytes32(uint256(keccak256(abi.encodePacked(_bpString, tokenId))) - 1);\n assembly {\n bp := sload(slot)\n }\n }\n\n /**\n * @dev Sets the royalty base points(percentage), for a particular token id, to storage slot.\n * @param tokenId Uint256 of the token id to set the base points for.\n * @param bp Uint256 of royalty percentage, provided in base points format, for a particular token id.\n */\n function _setBp(uint256 tokenId, uint256 bp) private {\n bytes32 slot = bytes32(uint256(keccak256(abi.encodePacked(_bpString, tokenId))) - 1);\n assembly {\n sstore(slot, bp)\n }\n }\n\n function _getPayoutAddresses() private view returns (address payable[] memory addresses) {\n // The slot hash has been precomputed for gas optimizaion\n bytes32 slot = _payoutAddressesSlot;\n uint256 length;\n assembly {\n length := sload(slot)\n }\n addresses = new address payable[](length);\n address payable value;\n for (uint256 i = 0; i < length; i++) {\n slot = keccak256(abi.encodePacked(i, slot));\n assembly {\n value := sload(slot)\n }\n addresses[i] = value;\n }\n }\n\n function _setPayoutAddresses(address payable[] memory addresses) private {\n bytes32 slot = _payoutAddressesSlot;\n uint256 length = addresses.length;\n assembly {\n sstore(slot, length)\n }\n address payable value;\n for (uint256 i = 0; i < length; i++) {\n slot = keccak256(abi.encodePacked(i, slot));\n value = addresses[i];\n assembly {\n sstore(slot, value)\n }\n }\n }\n\n function _getPayoutBps() private view returns (uint256[] memory bps) {\n bytes32 slot = _payoutBpsSlot;\n uint256 length;\n assembly {\n length := sload(slot)\n }\n bps = new uint256[](length);\n uint256 value;\n for (uint256 i = 0; i < length; i++) {\n slot = keccak256(abi.encodePacked(i, slot));\n assembly {\n value := sload(slot)\n }\n bps[i] = value;\n }\n }\n\n function _setPayoutBps(uint256[] memory bps) private {\n bytes32 slot = _payoutBpsSlot;\n uint256 length = bps.length;\n assembly {\n sstore(slot, length)\n }\n uint256 value;\n for (uint256 i = 0; i < length; i++) {\n slot = keccak256(abi.encodePacked(i, slot));\n value = bps[i];\n assembly {\n sstore(slot, value)\n }\n }\n }\n\n function _getTokenAddress(string memory tokenName) private view returns (address tokenAddress) {\n bytes32 slot = bytes32(uint256(keccak256(abi.encodePacked(_tokenAddressString, tokenName))) - 1);\n assembly {\n tokenAddress := sload(slot)\n }\n }\n\n function _setTokenAddress(string memory tokenName, address tokenAddress) private {\n bytes32 slot = bytes32(uint256(keccak256(abi.encodePacked(_tokenAddressString, tokenName))) - 1);\n assembly {\n sstore(slot, tokenAddress)\n }\n }\n\n /**\n * @dev Private function that transfers ETH to all payout recipients.\n * @dev This contract is designed primarily to capture royalties, but is limited in payout logic.\n * @dev This function uses a push payment model, where the contract pushes the ETH to the recipients.\n * @dev The design is intended so that royalty distribution logic can be handled externally via payment distribution contracts.\n * @dev The recommended usage for royalty structures that require more complex payout logic to multiple recipients is to\n * set 100% ownership payout with the recipient being the payment distribution contract.\n */\n function _payoutEth() private {\n address payable[] memory addresses = _getPayoutAddresses();\n uint256[] memory bps = _getPayoutBps();\n uint256 length = addresses.length;\n uint256 balance = address(this).balance;\n uint256 sending;\n bool extendedCall;\n assembly {\n extendedCall := sload(_extendedCallSlot)\n }\n for (uint256 i = 0; i < length; i++) {\n sending = ((bps[i] * balance) / 10000);\n // only send value if it is greater than 0\n if (sending > 0) {\n // If the contract enabled extended call on init then use call to transfer, otherwise use transfer\n if (extendedCall == true) {\n (bool success, ) = addresses[i].call{value: sending}(\"\");\n require(success, \"ROYALTIES: Transfer failed\");\n } else {\n addresses[i].transfer(sending);\n }\n }\n }\n }\n\n /**\n * @dev Private function that transfers tokens to all payout recipients.\n * @dev ERC20 tokens that use fee on transfer are not supported.\n * @dev This contract is designed primarily to capture royalties, but is limited in payout logic.\n * @dev This function uses a push payment model, where the contract pushes the ETH to the recipients.\n * @dev The design is intended so that royalty distribution logic can be handled externally via payment distribution contracts.\n * @dev The recommended usage for royalty structures that require more complex payout logic to multiple recipients is to\n * set 100% ownership payout with the recipient being the payment distribution contract.\n *\n * @param tokenAddress Smart contract address of ERC20 token.\n */\n function _payoutToken(address tokenAddress) private {\n address payable[] memory addresses = _getPayoutAddresses();\n uint256[] memory bps = _getPayoutBps();\n uint256 length = addresses.length;\n ERC20 erc20 = ERC20(tokenAddress);\n uint256 balance = erc20.balanceOf(address(this));\n uint256 sending;\n for (uint256 i = 0; i < length; i++) {\n sending = ((bps[i] * balance) / 10000);\n // Some tokens revert when transferring a zero value amount this check ensures if one recipient's\n // amount is zero, the transfer will still succeed for the other recipients.\n if (sending > 0) {\n require(\n _callOptionalReturn(\n tokenAddress,\n erc20.transfer.selector,\n abi.encode(address(addresses[i]), uint256(sending))\n ),\n \"ROYALTIES: ERC20 transfer failed\"\n );\n }\n }\n }\n\n /**\n * @dev Private function that transfers multiple tokens to all payout recipients.\n * @dev Try to use _payoutToken and handle each token individually.\n * @dev ERC20 tokens that use fee on transfer are not supported.\n * @dev This contract is designed primarily to capture royalties, but is limited in payout logic.\n * @dev This function uses a push payment model, where the contract pushes the ETH to the recipients.\n * @dev The design is intended so that royalty distribution logic can be handled externally via payment distribution contracts.\n * @dev The recommended usage for royalty structures that require more complex payout logic to multiple recipients is to\n * set 100% ownership payout with the recipient being the payment distribution contract.\n *\n * @param tokenAddresses Array of smart contract addresses of ERC20 tokens.\n */\n function _payoutTokens(address[] memory tokenAddresses) private {\n address payable[] memory addresses = _getPayoutAddresses();\n uint256[] memory bps = _getPayoutBps();\n ERC20 erc20;\n uint256 balance;\n uint256 sending;\n for (uint256 t = 0; t < tokenAddresses.length; t++) {\n erc20 = ERC20(tokenAddresses[t]);\n balance = erc20.balanceOf(address(this));\n for (uint256 i = 0; i < addresses.length; i++) {\n sending = ((bps[i] * balance) / 10000);\n // Some tokens revert when transferring a zero value amount this check ensures if one recipient's\n // amount is zero, the transfer will still succeed for the other recipients.\n if (sending > 0) {\n require(\n _callOptionalReturn(\n tokenAddresses[t],\n erc20.transfer.selector,\n abi.encode(address(addresses[i]), uint256(sending))\n ),\n \"ROYALTIES: ERC20 transfer failed\"\n );\n }\n }\n }\n }\n\n /**\n * @dev This function validates that the call is being made by an authorised wallet.\n * @dev Will revert entire tranaction if it fails.\n */\n function _validatePayoutRequestor() private view {\n if (!isOwner()) {\n bool matched;\n address payable[] memory addresses = _getPayoutAddresses();\n address payable sender = payable(msg.sender);\n for (uint256 i = 0; i < addresses.length; i++) {\n if (addresses[i] == sender) {\n matched = true;\n break;\n }\n }\n require(matched, \"ROYALTIES: sender not authorized\");\n }\n }\n\n /**\n * @notice Set the wallets and percentages for royalty payouts.\n * Limited to 10 wallets to prevent out of gas errors.\n * For more complex royalty structures, set 100% ownership payout with the recipient being the payment distribution contract.\n * @dev Function can only we called by owner, admin, or identity wallet.\n * @dev Addresses and bps arrays must be equal length. Bps values added together must equal 10000 exactly.\n * @param addresses An array of all the addresses that will be receiving royalty payouts.\n * @param bps An array of the percentages that each address will receive from the royalty payouts.\n */\n function configurePayouts(address payable[] memory addresses, uint256[] memory bps) public onlyOwner {\n require(addresses.length == bps.length, \"ROYALTIES: missmatched lenghts\");\n require(addresses.length <= 10, \"ROYALTIES: max 10 addresses\");\n uint256 totalBp;\n for (uint256 i = 0; i < addresses.length; i++) {\n require(addresses[i] != address(0), \"ROYALTIES: payee is zero address\");\n require(bps[i] > 0, \"ROYALTIES: bp is zero\");\n totalBp = totalBp + bps[i];\n }\n require(totalBp == 10000, \"ROYALTIES: bps must equal 10000\");\n _setPayoutAddresses(addresses);\n _setPayoutBps(bps);\n }\n\n /**\n * @notice Show the wallets and percentages of payout recipients.\n * @dev These are the recipients that will be getting royalty payouts.\n * @return addresses An array of all the addresses that will be receiving royalty payouts.\n * @return bps An array of the percentages that each address will receive from the royalty payouts.\n */\n function getPayoutInfo() public view returns (address payable[] memory addresses, uint256[] memory bps) {\n addresses = _getPayoutAddresses();\n bps = _getPayoutBps();\n }\n\n /**\n * @notice Get payout of all ETH in smart contract.\n * @dev Distribute all the ETH(minus gas fees) to payout recipients.\n */\n function getEthPayout() public {\n _validatePayoutRequestor();\n _payoutEth();\n }\n\n /**\n * @notice Get payout for a specific token address. Token must have a positive balance!\n * @dev Contract owner, admin, identity wallet, and payout recipients can call this function.\n * @param tokenAddress An address of the token for which to issue payouts for.\n */\n function getTokenPayout(address tokenAddress) public {\n _validatePayoutRequestor();\n _payoutToken(tokenAddress);\n }\n\n /**\n * @notice Get payouts for tokens listed by address. Tokens must have a positive balance!\n * @dev Each token balance must be equal or greater than 10000. Otherwise calculating BP is difficult.\n * @param tokenAddresses An address array of tokens to issue payouts for.\n */\n function getTokensPayout(address[] memory tokenAddresses) public {\n _validatePayoutRequestor();\n _payoutTokens(tokenAddresses);\n }\n\n /**\n * @notice Set the royalty information for entire contract, or a specific token.\n * @dev Take great care to not make this function accessible by other public functions in your overlying smart contract.\n * @param tokenId Set a specific token id, or leave at 0 to set as default parameters.\n * @param receiver Wallet or smart contract that will receive the royalty payouts.\n * @param bp Uint256 of royalty percentage, provided in base points format.\n */\n function setRoyalties(uint256 tokenId, address payable receiver, uint256 bp) public onlyOwner {\n require(receiver != address(0), \"ROYALTIES: receiver is zero address\");\n require(bp <= 10000, \"ROYALTIES: base points over 100%\");\n if (tokenId == 0) {\n _setDefaultReceiver(receiver);\n _setDefaultBp(bp);\n } else {\n _setReceiver(tokenId, receiver);\n _setBp(tokenId, bp);\n }\n address[] memory receivers = new address[](1);\n receivers[0] = address(receiver);\n uint256[] memory bps = new uint256[](1);\n bps[0] = bp;\n emit SecondarySaleFees(tokenId, receivers, bps);\n }\n\n // IEIP2981\n function royaltyInfo(uint256 tokenId, uint256 value) public view returns (address, uint256) {\n if (_getReceiver(tokenId) == address(0)) {\n return (_getDefaultReceiver(), (_getDefaultBp() * value) / 10000);\n } else {\n return (_getReceiver(tokenId), (_getBp(tokenId) * value) / 10000);\n }\n }\n\n // Rarible V1\n function getFeeBps(uint256 tokenId) public view returns (uint256[] memory) {\n uint256[] memory bps = new uint256[](1);\n if (_getReceiver(tokenId) == address(0)) {\n bps[0] = _getDefaultBp();\n } else {\n bps[0] = _getBp(tokenId);\n }\n return bps;\n }\n\n // Rarible V1\n function getFeeRecipients(uint256 tokenId) public view returns (address payable[] memory) {\n address payable[] memory receivers = new address payable[](1);\n if (_getReceiver(tokenId) == address(0)) {\n receivers[0] = _getDefaultReceiver();\n } else {\n receivers[0] = _getReceiver(tokenId);\n }\n return receivers;\n }\n\n // Rarible V2(not being used since it creates a conflict with Manifold royalties)\n // struct Part {\n // address payable account;\n // uint96 value;\n // }\n\n // function getRoyalties(uint256 tokenId) public view returns (Part[] memory) {\n // return royalties[id];\n // }\n\n // Manifold\n function getRoyalties(uint256 tokenId) public view returns (address payable[] memory, uint256[] memory) {\n address payable[] memory receivers = new address payable[](1);\n uint256[] memory bps = new uint256[](1);\n if (_getReceiver(tokenId) == address(0)) {\n receivers[0] = _getDefaultReceiver();\n bps[0] = _getDefaultBp();\n } else {\n receivers[0] = _getReceiver(tokenId);\n bps[0] = _getBp(tokenId);\n }\n return (receivers, bps);\n }\n\n // Foundation\n function getFees(uint256 tokenId) public view returns (address payable[] memory, uint256[] memory) {\n address payable[] memory receivers = new address payable[](1);\n uint256[] memory bps = new uint256[](1);\n if (_getReceiver(tokenId) == address(0)) {\n receivers[0] = _getDefaultReceiver();\n bps[0] = _getDefaultBp();\n } else {\n receivers[0] = _getReceiver(tokenId);\n bps[0] = _getBp(tokenId);\n }\n return (receivers, bps);\n }\n\n // SuperRare\n // Hint taken from Manifold's RoyaltyEngine(https://github.com/manifoldxyz/royalty-registry-solidity/blob/main/contracts/RoyaltyEngineV1.sol)\n // To be quite honest, SuperRare is a closed marketplace. They're working on opening it up but looks like they want to use private smart contracts.\n // We'll just leave this here for just in case they open the flood gates.\n function tokenCreator(\n address,\n /* contractAddress*/\n uint256 tokenId\n ) public view returns (address) {\n address receiver = _getReceiver(tokenId);\n if (receiver == address(0)) {\n return _getDefaultReceiver();\n }\n return receiver;\n }\n\n // SuperRare\n function calculateRoyaltyFee(\n address,\n /* contractAddress */\n uint256 tokenId,\n uint256 amount\n ) public view returns (uint256) {\n if (_getReceiver(tokenId) == address(0)) {\n return (_getDefaultBp() * amount) / 10000;\n } else {\n return (_getBp(tokenId) * amount) / 10000;\n }\n }\n\n // Holograph\n // we indicate that this contract operates market functions\n function marketContract() public view returns (address) {\n return address(this);\n }\n\n // Holograph\n // we indicate that the receiver is the creator, to convince the smart contract to pay\n function tokenCreators(uint256 tokenId) public view returns (address) {\n address receiver = _getReceiver(tokenId);\n if (receiver == address(0)) {\n return _getDefaultReceiver();\n }\n return receiver;\n }\n\n // Holograph\n // we provide the percentage that needs to be paid out from the sale\n function bidSharesForToken(uint256 tokenId) public view returns (HolographBidShares memory bidShares) {\n // this information is outside of the scope of our\n bidShares.prevOwner.value = 0;\n bidShares.owner.value = 0;\n if (_getReceiver(tokenId) == address(0)) {\n bidShares.creator.value = _getDefaultBp() * (10 ** 16);\n } else {\n bidShares.creator.value = _getBp(tokenId) * (10 ** 16);\n }\n return bidShares;\n }\n\n /**\n * @notice Get the smart contract address of a token by common name.\n * @dev Used only to identify really major/common tokens. Avoid using due to gas usages.\n * @param tokenName The ticker symbol of the token. For example \"USDC\" or \"DAI\".\n * @return The smart contract address of the token ticker symbol. Or zero address if not found.\n */\n function getTokenAddress(string memory tokenName) public view returns (address) {\n return _getTokenAddress(tokenName);\n }\n\n /**\n * @notice Used to wrap function calls to check if they return without revert regardless of return type.\n * @dev Checks if wrapped function opcode is a revert, if it is then it reverts as well, if it's not then\n * it checks for return data, if return data exists, it is returned as a bool,\n * if return data does not exist (0 length) then success is expected and returns true\n * @return Returns true if the wrapped function call returns without a revert even if it doesn't return true.\n */\n function _callOptionalReturn(address target, bytes4 functionSignature, bytes memory payload) internal returns (bool) {\n bytes memory data = abi.encodePacked(functionSignature, payload);\n bool success = true;\n assembly {\n let result := call(gas(), target, callvalue(), add(data, 0x20), mload(data), 0, 0)\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n if gt(returndatasize(), 0) {\n returndatacopy(success, 0, 0x20)\n }\n }\n }\n return success;\n }\n}\n" + }, + "contracts/enum/ChainIdType.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nenum ChainIdType {\n UNDEFINED, // 0\n EVM, // 1\n HOLOGRAPH, // 2\n LAYERZERO, // 3\n HYPERLANE // 4\n}\n" + }, + "contracts/enum/HolographERC20Event.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nenum HolographERC20Event {\n UNDEFINED, // 0\n bridgeIn, // 1\n bridgeOut, // 2\n afterApprove, // 3\n beforeApprove, // 4\n afterOnERC20Received, // 5\n beforeOnERC20Received, // 6\n afterBurn, // 7\n beforeBurn, // 8\n afterMint, // 9\n beforeMint, // 10\n afterSafeTransfer, // 11\n beforeSafeTransfer, // 12\n afterTransfer, // 13\n beforeTransfer, // 14\n onAllowance // 15\n}\n" + }, + "contracts/enum/HolographERC721Event.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nenum HolographERC721Event {\n UNDEFINED, // 0\n bridgeIn, // 1\n bridgeOut, // 2\n afterApprove, // 3\n beforeApprove, // 4\n afterApprovalAll, // 5\n beforeApprovalAll, // 6\n afterBurn, // 7\n beforeBurn, // 8\n afterMint, // 9\n beforeMint, // 10\n afterSafeTransfer, // 11\n beforeSafeTransfer, // 12\n afterTransfer, // 13\n beforeTransfer, // 14\n beforeOnERC721Received, // 15\n afterOnERC721Received, // 16\n onIsApprovedForAll, // 17\n customContractURI // 18\n}\n" + }, + "contracts/enum/HolographGenericEvent.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nenum HolographGenericEvent {\n UNDEFINED, // 0\n bridgeIn, // 1\n bridgeOut // 2\n}\n" + }, + "contracts/enum/InterfaceType.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nenum InterfaceType {\n UNDEFINED, // 0\n ERC20, // 1\n ERC721, // 2\n ERC1155, // 3\n ROYALTIES, // 4\n GENERIC // 5\n}\n" + }, + "contracts/enum/TokenUriType.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nenum TokenUriType {\n UNDEFINED, // 0\n IPFS, // 1\n HTTPS, // 2\n ARWEAVE // 3\n}\n" + }, + "contracts/faucet/Faucet.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Initializable.sol\";\nimport \"../interface/HolographERC20Interface.sol\";\nimport \"../interface/InitializableInterface.sol\";\n\ncontract Faucet is Initializable {\n address public owner;\n HolographERC20Interface public token;\n\n uint256 public faucetDripAmount = 100 ether;\n uint256 public faucetCooldown = 24 hours;\n\n mapping(address => uint256) lastAccessTime;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"Faucet contract is already initialized\");\n (address _contractOwner, address _tokenInstance) = abi.decode(initPayload, (address, address));\n token = HolographERC20Interface(_tokenInstance);\n owner = _contractOwner;\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /// @notice Get tokens from faucet's own balance. Rate limited.\n function requestTokens() external {\n require(isAllowedToWithdraw(msg.sender), \"Come back later\");\n require(token.balanceOf(address(this)) >= faucetDripAmount, \"Faucet is empty\");\n lastAccessTime[msg.sender] = block.timestamp;\n token.transfer(msg.sender, faucetDripAmount);\n }\n\n /// @notice Update token address\n function setToken(address tokenAddress) external onlyOwner {\n token = HolographERC20Interface(tokenAddress);\n }\n\n /// @notice Grant tokens to receiver from faucet's own balance. Not rate limited.\n function grantTokens(address _address) external onlyOwner {\n require(token.balanceOf(address(this)) >= faucetDripAmount, \"Faucet is empty\");\n token.transfer(_address, faucetDripAmount);\n }\n\n function grantTokens(address _address, uint256 _amountWei) external onlyOwner {\n require(token.balanceOf(address(this)) >= _amountWei, \"Insufficient funds\");\n token.transfer(_address, _amountWei);\n }\n\n /// @notice Withdraw all funds from the faucet.\n function withdrawAllTokens(address _receiver) external onlyOwner {\n token.transfer(_receiver, token.balanceOf(address(this)));\n }\n\n /// @notice Withdraw amount of funds from the faucet. Amount is in wei.\n function withdrawTokens(address _receiver, uint256 _amountWei) external onlyOwner {\n require(token.balanceOf(address(this)) >= _amountWei, \"Insufficient funds\");\n token.transfer(_receiver, _amountWei);\n }\n\n /// @notice Configure the time between two drip requests. Time is in seconds.\n function setWithdrawCooldown(uint256 _waitTimeSeconds) external onlyOwner {\n faucetCooldown = _waitTimeSeconds;\n }\n\n /// @notice Configure the drip request amount. Amount is in wei.\n function setWithdrawAmount(uint256 _amountWei) external onlyOwner {\n faucetDripAmount = _amountWei;\n }\n\n /// @notice Check whether an address can request drip and is not on cooldown.\n function isAllowedToWithdraw(address _address) public view returns (bool) {\n if (lastAccessTime[_address] == 0) {\n return true;\n } else if (block.timestamp >= lastAccessTime[_address] + faucetCooldown) {\n return true;\n }\n return false;\n }\n\n /// @notice Get the last time the address withdrew tokens.\n function getLastAccessTime(address _address) public view returns (uint256) {\n return lastAccessTime[_address];\n }\n\n modifier onlyOwner() {\n require(msg.sender == owner, \"Caller is not the owner\");\n _;\n }\n}\n" + }, + "contracts/Holograph.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./abstract/Admin.sol\";\nimport \"./abstract/Initializable.sol\";\n\nimport \"./interface/InitializableInterface.sol\";\nimport \"./interface/HolographInterface.sol\";\n\n/**\n * @title Holograph Protocol\n * @author https://github.com/holographxyz\n * @notice This is the primary Holograph Protocol smart contract\n * @dev This contract stores a reference to all the primary modules and variables of the protocol\n */\ncontract Holograph is Admin, Initializable, HolographInterface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.bridge')) - 1)\n */\n bytes32 constant _bridgeSlot = 0xeb87cbb21687feb327e3d58c6c16d552231d12c7a0e8115042a4165fac8a77f9;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.chainId')) - 1)\n */\n bytes32 constant _chainIdSlot = 0x7651bfc11f7485d07ab2b41c1312e2007c8cb7efb0f7352a6dee4a1153eebab2;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.factory')) - 1)\n */\n bytes32 constant _factorySlot = 0xa49f20855ba576e09d13c8041c8039fa655356ea27f6c40f1ec46a4301cd5b23;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holographChainId')) - 1)\n */\n bytes32 constant _holographChainIdSlot = 0xd840a780c26e07edc6e1ee2eaa6f134ed5488dbd762614116653cee8542a3844;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.interfaces')) - 1)\n */\n bytes32 constant _interfacesSlot = 0xbd3084b8c09da87ad159c247a60e209784196be2530cecbbd8f337fdd1848827;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.operator')) - 1)\n */\n bytes32 constant _operatorSlot = 0x7caba557ad34138fa3b7e43fb574e0e6cc10481c3073e0dffbc560db81b5c60f;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\n */\n bytes32 constant _registrySlot = 0xce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.treasury')) - 1)\n */\n bytes32 constant _treasurySlot = 0x4215e7a38d75164ca078bbd61d0992cdeb1ba16f3b3ead5944966d3e4080e8b6;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.utilityToken')) - 1)\n */\n bytes32 constant _utilityTokenSlot = 0xbf76518d46db472b71aa7677a0908b8016f3dee568415ffa24055f9a670f9c37;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (\n uint32 holographChainId,\n address bridge,\n address factory,\n address interfaces,\n address operator,\n address registry,\n address treasury,\n address utilityToken\n ) = abi.decode(initPayload, (uint32, address, address, address, address, address, address, address));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_chainIdSlot, chainid())\n sstore(_holographChainIdSlot, holographChainId)\n sstore(_bridgeSlot, bridge)\n sstore(_factorySlot, factory)\n sstore(_interfacesSlot, interfaces)\n sstore(_operatorSlot, operator)\n sstore(_registrySlot, registry)\n sstore(_treasurySlot, treasury)\n sstore(_utilityTokenSlot, utilityToken)\n }\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @notice Get the address of the Holograph Bridge module\n * @dev Used for beaming holographable assets cross-chain\n */\n function getBridge() external view returns (address bridge) {\n assembly {\n bridge := sload(_bridgeSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Bridge module address\n * @param bridge address of the Holograph Bridge smart contract to use\n */\n function setBridge(address bridge) external onlyAdmin {\n assembly {\n sstore(_bridgeSlot, bridge)\n }\n }\n\n /**\n * @notice Get the chain ID that the Protocol was deployed on\n * @dev Useful for checking if/when a hard fork occurs\n */\n function getChainId() external view returns (uint256 chainId) {\n assembly {\n chainId := sload(_chainIdSlot)\n }\n }\n\n /**\n * @notice Update the chain ID\n * @dev Useful for updating once a hard fork has been mitigated\n * @param chainId EVM chain ID to use\n */\n function setChainId(uint256 chainId) external onlyAdmin {\n assembly {\n sstore(_chainIdSlot, chainId)\n }\n }\n\n /**\n * @notice Get the address of the Holograph Factory module\n * @dev Used for deploying holographable smart contracts\n */\n function getFactory() external view returns (address factory) {\n assembly {\n factory := sload(_factorySlot)\n }\n }\n\n /**\n * @notice Update the Holograph Factory module address\n * @param factory address of the Holograph Factory smart contract to use\n */\n function setFactory(address factory) external onlyAdmin {\n assembly {\n sstore(_factorySlot, factory)\n }\n }\n\n /**\n * @notice Get the Holograph chain Id\n * @dev Holograph uses an internal chain id mapping\n */\n function getHolographChainId() external view returns (uint32 holographChainId) {\n assembly {\n holographChainId := sload(_holographChainIdSlot)\n }\n }\n\n /**\n * @notice Update the Holograph chain ID\n * @dev Useful for updating once a hard fork was mitigated\n * @param holographChainId Holograph chain ID to use\n */\n function setHolographChainId(uint32 holographChainId) external onlyAdmin {\n assembly {\n sstore(_holographChainIdSlot, holographChainId)\n }\n }\n\n /**\n * @notice Get the address of the Holograph Interfaces module\n * @dev Holograph uses this contract to store data that needs to be accessed by a large portion of the modules\n */\n function getInterfaces() external view returns (address interfaces) {\n assembly {\n interfaces := sload(_interfacesSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Interfaces module address\n * @param interfaces address of the Holograph Interfaces smart contract to use\n */\n function setInterfaces(address interfaces) external onlyAdmin {\n assembly {\n sstore(_interfacesSlot, interfaces)\n }\n }\n\n /**\n * @notice Get the address of the Holograph Operator module\n * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module\n */\n function getOperator() external view returns (address operator) {\n assembly {\n operator := sload(_operatorSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Operator module address\n * @param operator address of the Holograph Operator smart contract to use\n */\n function setOperator(address operator) external onlyAdmin {\n assembly {\n sstore(_operatorSlot, operator)\n }\n }\n\n /**\n * @notice Get the Holograph Registry module\n * @dev This module stores a reference for all deployed holographable smart contracts\n */\n function getRegistry() external view returns (address registry) {\n assembly {\n registry := sload(_registrySlot)\n }\n }\n\n /**\n * @notice Update the Holograph Registry module address\n * @param registry address of the Holograph Registry smart contract to use\n */\n function setRegistry(address registry) external onlyAdmin {\n assembly {\n sstore(_registrySlot, registry)\n }\n }\n\n /**\n * @notice Get the Holograph Treasury module\n * @dev All of the Holograph Protocol assets are stored and managed by this module\n */\n function getTreasury() external view returns (address treasury) {\n assembly {\n treasury := sload(_treasurySlot)\n }\n }\n\n /**\n * @notice Update the Holograph Treasury module address\n * @param treasury address of the Holograph Treasury smart contract to use\n */\n function setTreasury(address treasury) external onlyAdmin {\n assembly {\n sstore(_treasurySlot, treasury)\n }\n }\n\n /**\n * @notice Get the Holograph Utility Token address\n * @dev This is the official utility token of the Holograph Protocol\n */\n function getUtilityToken() external view returns (address utilityToken) {\n assembly {\n utilityToken := sload(_utilityTokenSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Utility Token address\n * @param utilityToken address of the Holograph Utility Token smart contract to use\n */\n function setUtilityToken(address utilityToken) external onlyAdmin {\n assembly {\n sstore(_utilityTokenSlot, utilityToken)\n }\n }\n\n /**\n * @dev Purposefully reverts to prevent having any type of ether transfered into the contract\n */\n receive() external payable {\n revert();\n }\n\n /**\n * @dev Purposefully reverts to prevent any calls to undefined functions\n */\n fallback() external payable {\n revert();\n }\n}\n" + }, + "contracts/HolographBridge.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./abstract/Admin.sol\";\nimport \"./abstract/Initializable.sol\";\n\nimport \"./interface/HolographERC20Interface.sol\";\nimport \"./interface/Holographable.sol\";\nimport \"./interface/HolographInterface.sol\";\nimport \"./interface/HolographBridgeInterface.sol\";\nimport \"./interface/HolographFactoryInterface.sol\";\nimport \"./interface/HolographOperatorInterface.sol\";\nimport \"./interface/HolographRegistryInterface.sol\";\nimport \"./interface/InitializableInterface.sol\";\n\n/**\n * @title Holograph Bridge\n * @author https://github.com/holographxyz\n * @notice Beam any holographable contracts and assets across blockchains\n * @dev The contract abstracts all the complexities of making bridge requests and uses a universal interface to bridge any type of holographable assets\n */\ncontract HolographBridge is Admin, Initializable, HolographBridgeInterface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.factory')) - 1)\n */\n bytes32 constant _factorySlot = 0xa49f20855ba576e09d13c8041c8039fa655356ea27f6c40f1ec46a4301cd5b23;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\n */\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.jobNonce')) - 1)\n */\n bytes32 constant _jobNonceSlot = 0x1cda64803f3b43503042e00863791e8d996666552d5855a78d53ee1dd4b3286d;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.operator')) - 1)\n */\n bytes32 constant _operatorSlot = 0x7caba557ad34138fa3b7e43fb574e0e6cc10481c3073e0dffbc560db81b5c60f;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\n */\n bytes32 constant _registrySlot = 0xce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7;\n\n /**\n * @dev Allow calls only from Holograph Operator contract\n */\n modifier onlyOperator() {\n require(msg.sender == address(_operator()), \"HOLOGRAPH: operator only call\");\n _;\n }\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address factory, address holograph, address operator, address registry) = abi.decode(\n initPayload,\n (address, address, address, address)\n );\n assembly {\n sstore(_adminSlot, origin())\n sstore(_factorySlot, factory)\n sstore(_holographSlot, holograph)\n sstore(_operatorSlot, operator)\n sstore(_registrySlot, registry)\n }\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @notice Receive a beam from another chain\n * @dev This function can only be called by the Holograph Operator module\n * @param fromChain Holograph Chain ID where the brigeOutRequest was created\n * @param holographableContract address of the destination contract that the bridgeInRequest is targeted for\n * @param hToken address of the hToken contract that wrapped the origin chain native gas token\n * @param hTokenRecipient address of recipient for the hToken reward\n * @param hTokenValue exact amount of hToken reward in wei\n * @param doNotRevert boolean used to specify if the call should revert\n * @param bridgeInPayload actual abi encoded bytes of the data that the holographable contract bridgeIn function will receive\n */\n function bridgeInRequest(\n uint256 /* nonce*/,\n uint32 fromChain,\n address holographableContract,\n address hToken,\n address hTokenRecipient,\n uint256 hTokenValue,\n bool doNotRevert,\n bytes calldata bridgeInPayload\n ) external payable onlyOperator {\n /**\n * @dev check that the target contract is either Holograph Factory or a deployed holographable contract\n */\n require(\n _registry().isHolographedContract(holographableContract) || address(_factory()) == holographableContract,\n \"HOLOGRAPH: not holographed\"\n );\n /**\n * @dev make a bridgeIn function call to the holographable contract\n */\n bytes4 selector = Holographable(holographableContract).bridgeIn(fromChain, bridgeInPayload);\n /**\n * @dev ensure returned selector is bridgeIn function signature, to guarantee that the function was called and succeeded\n */\n require(selector == Holographable.bridgeIn.selector, \"HOLOGRAPH: bridge in failed\");\n /**\n * @dev check if a specific reward amount was assigned to this request\n */\n if (hTokenValue > 0 && hTokenRecipient != address(0)) {\n /**\n * @dev mint the specific hToken amount for hToken recipient\n * this value is equivalent to amount that is deposited on origin chain's hToken contract\n * recipient can beam the asset to origin chain and unwrap for native gas token at any time\n */\n require(\n HolographERC20Interface(hToken).holographBridgeMint(hTokenRecipient, hTokenValue) ==\n HolographERC20Interface.holographBridgeMint.selector,\n \"HOLOGRAPH: hToken mint failed\"\n );\n }\n /**\n * @dev allow the call to revert on demand, for example use case, look into the Holograph Operator's jobEstimator function\n */\n require(doNotRevert, \"HOLOGRAPH: reverted\");\n }\n\n /**\n * @notice Create a beam request for a destination chain\n * @dev This function works for deploying contracts and beaming supported holographable assets across chains\n * @param toChain Holograph Chain ID where the beam is being sent to\n * @param holographableContract address of the contract for which the bridge request is being made\n * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain\n * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\n */\n function bridgeOutRequest(\n uint32 toChain,\n address holographableContract,\n uint256 gasLimit,\n uint256 gasPrice,\n bytes calldata bridgeOutPayload\n ) external payable {\n /**\n * @dev check that the target contract is either Holograph Factory or a deployed holographable contract\n */\n require(\n _registry().isHolographedContract(holographableContract) || address(_factory()) == holographableContract,\n \"HOLOGRAPH: not holographed\"\n );\n /**\n * @dev make a bridgeOut function call to the holographable contract\n */\n (bytes4 selector, bytes memory returnedPayload) = Holographable(holographableContract).bridgeOut(\n toChain,\n msg.sender,\n bridgeOutPayload\n );\n /**\n * @dev ensure returned selector is bridgeOut function signature, to guarantee that the function was called and succeeded\n */\n require(selector == Holographable.bridgeOut.selector, \"HOLOGRAPH: bridge out failed\");\n /**\n * @dev pass the request, along with all data, to Holograph Operator, to handle the cross-chain messaging logic\n */\n _operator().send{value: msg.value}(\n gasLimit,\n gasPrice,\n toChain,\n msg.sender,\n _jobNonce(),\n holographableContract,\n returnedPayload\n );\n }\n\n /**\n * @notice Do not call this function, it will always revert\n * @dev Used by getBridgeOutRequestPayload function\n * It is purposefully inverted to always revert on a successful call\n * Marked as external and not private to allow use inside try/catch of getBridgeOutRequestPayload function\n * If this function does not revert and returns a string, it is the actual revert reason\n * @param sender address of actual sender that is planning to make a bridgeOutRequest call\n * @param toChain holograph chain id of destination chain\n * @param holographableContract address of the contract for which the bridge request is being made\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\n */\n function revertedBridgeOutRequest(\n address sender,\n uint32 toChain,\n address holographableContract,\n bytes calldata bridgeOutPayload\n ) external returns (string memory revertReason) {\n /**\n * @dev make a bridgeOut function call to the holographable contract inside of a try/catch\n */\n try Holographable(holographableContract).bridgeOut(toChain, sender, bridgeOutPayload) returns (\n bytes4 selector,\n bytes memory payload\n ) {\n /**\n * @dev ensure returned selector is bridgeOut function signature, to guarantee that the function was called and succeeded\n */\n if (selector != Holographable.bridgeOut.selector) {\n /**\n * @dev if selector does not match, then it means the request failed\n */\n return \"HOLOGRAPH: bridge out failed\";\n }\n assembly {\n /**\n * @dev the entire payload is sent back in a revert\n */\n revert(add(payload, 0x20), mload(payload))\n }\n } catch Error(string memory reason) {\n return reason;\n } catch {\n return \"HOLOGRAPH: unknown error\";\n }\n }\n\n /**\n * @notice Get the payload created by the bridgeOutRequest function\n * @dev Use this function to get the payload that will be generated by a bridgeOutRequest\n * Only use this with a static call\n * @param toChain Holograph Chain ID where the beam is being sent to\n * @param holographableContract address of the contract for which the bridge request is being made\n * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain\n * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\n * @return samplePayload bytes made up of the bridgeOutRequest payload\n */\n function getBridgeOutRequestPayload(\n uint32 toChain,\n address holographableContract,\n uint256 gasLimit,\n uint256 gasPrice,\n bytes calldata bridgeOutPayload\n ) external returns (bytes memory samplePayload) {\n /**\n * @dev check that the target contract is either Holograph Factory or a deployed holographable contract\n */\n require(\n _registry().isHolographedContract(holographableContract) || address(_factory()) == holographableContract,\n \"HOLOGRAPH: not holographed\"\n );\n bytes memory payload;\n /**\n * @dev the revertedBridgeOutRequest function is wrapped into a try/catch function\n */\n try this.revertedBridgeOutRequest(msg.sender, toChain, holographableContract, bridgeOutPayload) returns (\n string memory revertReason\n ) {\n /**\n * @dev a non reverted result is actually a revert\n */\n revert(revertReason);\n } catch (bytes memory realResponse) {\n /**\n * @dev a revert is actually success, so the return data is stored as payload\n */\n payload = realResponse;\n }\n uint256 jobNonce;\n assembly {\n jobNonce := sload(_jobNonceSlot)\n }\n /**\n * @dev extract hlgFee from operator\n */\n uint256 fee = 0;\n if (gasPrice < type(uint256).max && gasLimit < type(uint256).max) {\n (uint256 hlgFee, , uint256 dstGasPrice) = _operator().getMessageFee(\n toChain,\n gasLimit,\n gasPrice,\n bridgeOutPayload\n );\n if (gasPrice == 0) {\n gasPrice = dstGasPrice;\n }\n fee = hlgFee;\n }\n /**\n * @dev the data is abi encoded into actual bridgeOutRequest payload bytes\n */\n bytes memory encodedData = abi.encodeWithSelector(\n HolographBridgeInterface.bridgeInRequest.selector,\n /**\n * @dev the latest job nonce is incremented by one\n */\n jobNonce + 1,\n _holograph().getHolographChainId(),\n holographableContract,\n _registry().getHToken(_holograph().getHolographChainId()),\n address(0),\n fee,\n true,\n payload\n );\n /**\n * @dev this abi encodes the data just like in Holograph Operator\n */\n samplePayload = abi.encodePacked(encodedData, gasLimit, gasPrice);\n }\n\n /**\n * @notice Get the fees associated with sending specific payload\n * @dev Will provide exact costs on protocol and message side, combine the two to get total\n * @dev @param toChain holograph chain id of destination chain for payload\n * @dev @param gasLimit amount of gas to provide for executing payload on destination chain\n * @dev @param gasPrice maximum amount to pay for gas price, can be set to 0 and will be chose automatically\n * @dev @param crossChainPayload the entire packet being sent cross-chain\n * @return hlgFee the amount (in wei) of native gas token that will cost for finalizing job on destiantion chain\n * @return msgFee the amount (in wei) of native gas token that will cost for sending message to destiantion chain\n * @return dstGasPrice the amount (in wei) that destination message maximum gas price will be\n */\n function getMessageFee(uint32, uint256, uint256, bytes calldata) external view returns (uint256, uint256, uint256) {\n assembly {\n calldatacopy(0, 0, calldatasize())\n let result := staticcall(gas(), sload(_operatorSlot), 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @notice Get the address of the Holograph Factory module\n * @dev Used for deploying holographable smart contracts\n */\n function getFactory() external view returns (address factory) {\n assembly {\n factory := sload(_factorySlot)\n }\n }\n\n /**\n * @notice Update the Holograph Factory module address\n * @param factory address of the Holograph Factory smart contract to use\n */\n function setFactory(address factory) external onlyAdmin {\n assembly {\n sstore(_factorySlot, factory)\n }\n }\n\n /**\n * @notice Get the Holograph Protocol contract\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\n */\n function getHolograph() external view returns (address holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Protocol contract address\n * @param holograph address of the Holograph Protocol smart contract to use\n */\n function setHolograph(address holograph) external onlyAdmin {\n assembly {\n sstore(_holographSlot, holograph)\n }\n }\n\n /**\n * @notice Get the latest job nonce\n * @dev You can use the job nonce as a way to calculate total amount of bridge requests that have been made\n */\n function getJobNonce() external view returns (uint256 jobNonce) {\n assembly {\n jobNonce := sload(_jobNonceSlot)\n }\n }\n\n /**\n * @notice Get the address of the Holograph Operator module\n * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module\n */\n function getOperator() external view returns (address operator) {\n assembly {\n operator := sload(_operatorSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Operator module address\n * @param operator address of the Holograph Operator smart contract to use\n */\n function setOperator(address operator) external onlyAdmin {\n assembly {\n sstore(_operatorSlot, operator)\n }\n }\n\n /**\n * @notice Get the Holograph Registry module\n * @dev This module stores a reference for all deployed holographable smart contracts\n */\n function getRegistry() external view returns (address registry) {\n assembly {\n registry := sload(_registrySlot)\n }\n }\n\n /**\n * @notice Update the Holograph Registry module address\n * @param registry address of the Holograph Registry smart contract to use\n */\n function setRegistry(address registry) external onlyAdmin {\n assembly {\n sstore(_registrySlot, registry)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Factory Interface\n */\n function _factory() private view returns (HolographFactoryInterface factory) {\n assembly {\n factory := sload(_factorySlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Interface\n */\n function _holograph() private view returns (HolographInterface holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n /**\n * @dev Internal nonce, that increments on each call, used for randomness\n */\n function _jobNonce() private returns (uint256 jobNonce) {\n assembly {\n jobNonce := add(sload(_jobNonceSlot), 0x0000000000000000000000000000000000000000000000000000000000000001)\n sstore(_jobNonceSlot, jobNonce)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Operator Interface\n */\n function _operator() private view returns (HolographOperatorInterface operator) {\n assembly {\n operator := sload(_operatorSlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Registry Interface\n */\n function _registry() private view returns (HolographRegistryInterface registry) {\n assembly {\n registry := sload(_registrySlot)\n }\n }\n\n /**\n * @dev Purposefully reverts to prevent having any type of ether transfered into the contract\n */\n receive() external payable {\n revert();\n }\n\n /**\n * @dev Purposefully reverts to prevent any calls to undefined functions\n */\n fallback() external payable {\n revert();\n }\n}\n" + }, + "contracts/HolographFactory.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./abstract/Admin.sol\";\nimport \"./abstract/Initializable.sol\";\n\nimport \"./enforcer/Holographer.sol\";\n\nimport \"./interface/Holographable.sol\";\nimport \"./interface/HolographBridgeInterface.sol\";\nimport \"./interface/HolographFactoryInterface.sol\";\nimport \"./interface/HolographInterface.sol\";\nimport \"./interface/HolographRegistryInterface.sol\";\nimport \"./interface/InitializableInterface.sol\";\n\nimport \"./struct/BridgeSettings.sol\";\nimport \"./struct/DeploymentConfig.sol\";\nimport \"./struct/Verification.sol\";\n\nimport \"./library/Strings.sol\";\n\n/**\n * @title Holograph Factory\n * @author https://github.com/holographxyz\n * @notice Deploy holographable contracts\n * @dev The contract provides methods that allow for the creation of Holograph Protocol compliant smart contracts, that are capable of minting holographable assets\n */\ncontract HolographFactory is Admin, Initializable, Holographable, HolographFactoryInterface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\n */\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\n */\n bytes32 constant _registrySlot = 0xce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address holograph, address registry) = abi.decode(initPayload, (address, address));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_holographSlot, holograph)\n sstore(_registrySlot, registry)\n }\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @notice Deploy holographable contract via bridge request\n * @dev This function directly forwards the calldata to the deployHolographableContract function\n * It is used to allow for Holograph Bridge to make cross-chain deployments\n */\n function bridgeIn(uint32 /* fromChain*/, bytes calldata payload) external returns (bytes4) {\n (DeploymentConfig memory config, Verification memory signature, address signer) = abi.decode(\n payload,\n (DeploymentConfig, Verification, address)\n );\n HolographFactoryInterface(address(this)).deployHolographableContract(config, signature, signer);\n return Holographable.bridgeIn.selector;\n }\n\n /**\n * @notice Deploy holographable contract via bridge request\n * @dev This function directly returns the calldata\n * It is used to allow for Holograph Bridge to make cross-chain deployments\n */\n function bridgeOut(\n uint32 /* toChain*/,\n address /* sender*/,\n bytes calldata payload\n ) external pure returns (bytes4 selector, bytes memory data) {\n return (Holographable.bridgeOut.selector, payload);\n }\n\n function deployHolographableContractMultiChain(\n DeploymentConfig memory config,\n Verification memory signature,\n address signer,\n bool deployOnCurrentChain,\n BridgeSettings[] memory bridgeSettings\n ) external payable {\n if (deployOnCurrentChain) {\n deployHolographableContract(config, signature, signer);\n }\n bytes memory payload = abi.encode(config, signature, signer);\n HolographInterface holograph;\n assembly {\n holograph := sload(_holographSlot)\n }\n HolographBridgeInterface bridge = HolographBridgeInterface(holograph.getBridge());\n uint256 l = bridgeSettings.length;\n for (uint256 i = 0; i < l; i++) {\n bridge.bridgeOutRequest{value: bridgeSettings[i].value}(\n bridgeSettings[i].toChain,\n address(this),\n bridgeSettings[i].gasLimit,\n bridgeSettings[i].gasPrice,\n payload\n );\n }\n }\n\n /**\n * @notice Deploy a holographable smart contract\n * @dev Using this function allows to deploy smart contracts that have the same address across all EVM chains\n * @param config contract deployement configurations\n * @param signature that was created by the wallet that created the original payload\n * @param signer address of wallet that created the payload\n */\n function deployHolographableContract(\n DeploymentConfig memory config,\n Verification memory signature,\n address signer\n ) public {\n address registry;\n address holograph;\n assembly {\n holograph := sload(_holographSlot)\n registry := sload(_registrySlot)\n }\n /**\n * @dev the configuration is encoded and hashed along with signer address\n */\n bytes32 hash = keccak256(\n abi.encodePacked(\n config.contractType,\n config.chainType,\n config.salt,\n keccak256(config.byteCode),\n keccak256(config.initCode),\n signer\n )\n );\n /**\n * @dev the hash is validated against signature\n * this is to guarantee that the original creator's configuration has not been altered\n */\n require(_verifySigner(signature.r, signature.s, signature.v, hash, signer), \"HOLOGRAPH: invalid signature\");\n /**\n * @dev check that this contract has not already been deployed on this chain\n */\n bytes memory holographerBytecode = type(Holographer).creationCode;\n address holographerAddress = address(\n uint160(uint256(keccak256(abi.encodePacked(bytes1(0xff), address(this), hash, keccak256(holographerBytecode)))))\n );\n require(!_isContract(holographerAddress), \"HOLOGRAPH: already deployed\");\n /**\n * @dev convert hash into uint256 which will be used as the salt for create2\n */\n uint256 saltInt = uint256(hash);\n address sourceContractAddress;\n bytes memory sourceByteCode = config.byteCode;\n assembly {\n /**\n * @dev deploy the user created smart contract first\n */\n sourceContractAddress := create2(0, add(sourceByteCode, 0x20), mload(sourceByteCode), saltInt)\n }\n assembly {\n /**\n * @dev deploy the Holographer contract\n */\n holographerAddress := create2(0, add(holographerBytecode, 0x20), mload(holographerBytecode), saltInt)\n }\n /**\n * @dev initialize the Holographer contract\n */\n require(\n InitializableInterface(holographerAddress).init(\n abi.encode(abi.encode(config.chainType, holograph, config.contractType, sourceContractAddress), config.initCode)\n ) == InitializableInterface.init.selector,\n \"initialization failed\"\n );\n /**\n * @dev update the Holograph Registry with deployed contract address\n */\n HolographRegistryInterface(registry).setHolographedHashAddress(hash, holographerAddress);\n /**\n * @dev emit an event that on-chain indexers can easily read\n */\n emit BridgeableContractDeployed(holographerAddress, hash);\n }\n\n /**\n * @notice Get the Holograph Protocol contract\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\n */\n function getHolograph() external view returns (address holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Protocol contract address\n * @param holograph address of the Holograph Protocol smart contract to use\n */\n function setHolograph(address holograph) external onlyAdmin {\n assembly {\n sstore(_holographSlot, holograph)\n }\n }\n\n /**\n * @notice Get the Holograph Registry module\n * @dev This module stores a reference for all deployed holographable smart contracts\n */\n function getRegistry() external view returns (address registry) {\n assembly {\n registry := sload(_registrySlot)\n }\n }\n\n /**\n * @notice Update the Holograph Registry module address\n * @param registry address of the Holograph Registry smart contract to use\n */\n function setRegistry(address registry) external onlyAdmin {\n assembly {\n sstore(_registrySlot, registry)\n }\n }\n\n /**\n * @dev Internal function used for checking if a contract has been deployed at address\n */\n function _isContract(address contractAddress) private view returns (bool) {\n bytes32 codehash;\n assembly {\n codehash := extcodehash(contractAddress)\n }\n return (codehash != 0x0 && codehash != 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470);\n }\n\n /**\n * @dev Internal function used for verifying a signature\n */\n function _verifySigner(bytes32 r, bytes32 s, uint8 v, bytes32 hash, address signer) private pure returns (bool) {\n if (v < 27) {\n v += 27;\n }\n if (v != 27 && v != 28) {\n return false;\n }\n // prevent signature malleability by checking if s-value is in the upper range\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n // if s-value is in upper range, calculate a new s-value\n s = bytes32(0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - uint256(s));\n // flip the v-value\n if (v == 27) {\n v = 28;\n } else {\n v = 27;\n }\n // check if s-value is still in upper range\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return false;\n }\n }\n /**\n * @dev signature is checked against EIP-191 first, then directly, to support legacy wallets\n */\n return (signer != address(0) &&\n (ecrecover(keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", hash)), v, r, s) == signer ||\n (\n ecrecover(\n keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n66\", Strings.toHexString(uint256(hash), 32))),\n v,\n r,\n s\n )\n ) ==\n signer ||\n ecrecover(hash, v, r, s) == signer));\n }\n\n /**\n * @dev Purposefully reverts to prevent having any type of ether transfered into the contract\n */\n receive() external payable {\n revert();\n }\n\n /**\n * @dev Purposefully reverts to prevent any calls to undefined functions\n */\n fallback() external payable {\n revert();\n }\n}\n" + }, + "contracts/HolographGenesis.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./interface/InitializableInterface.sol\";\n\n/**\n * @dev In the beginning there was a smart contract...\n */\ncontract HolographGenesis {\n mapping(address => bool) private _approvedDeployers;\n\n event Message(string message);\n\n modifier onlyDeployer() {\n require(_approvedDeployers[msg.sender], \"HOLOGRAPH: deployer not approved\");\n _;\n }\n\n constructor() {\n _approvedDeployers[tx.origin] = true;\n emit Message(\"The future of NFTs is Holograph.\");\n }\n\n function deploy(\n uint256 chainId,\n bytes12 saltHash,\n bytes memory sourceCode,\n bytes memory initCode\n ) external onlyDeployer {\n require(chainId == block.chainid, \"HOLOGRAPH: incorrect chain id\");\n bytes32 salt = bytes32(abi.encodePacked(msg.sender, saltHash));\n address contractAddress = address(\n uint160(uint256(keccak256(abi.encodePacked(bytes1(0xff), address(this), salt, keccak256(sourceCode)))))\n );\n require(!_isContract(contractAddress), \"HOLOGRAPH: already deployed\");\n assembly {\n contractAddress := create2(0, add(sourceCode, 0x20), mload(sourceCode), salt)\n }\n require(_isContract(contractAddress), \"HOLOGRAPH: deployment failed\");\n require(\n InitializableInterface(contractAddress).init(initCode) == InitializableInterface.init.selector,\n \"HOLOGRAPH: initialization failed\"\n );\n }\n\n function approveDeployer(address newDeployer, bool approve) external onlyDeployer {\n _approvedDeployers[newDeployer] = approve;\n }\n\n function isApprovedDeployer(address deployer) external view returns (bool) {\n return _approvedDeployers[deployer];\n }\n\n function _isContract(address contractAddress) internal view returns (bool) {\n bytes32 codehash;\n assembly {\n codehash := extcodehash(contractAddress)\n }\n return (codehash != 0x0 && codehash != 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470);\n }\n}\n" + }, + "contracts/HolographInterfaces.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./abstract/Admin.sol\";\nimport \"./abstract/Initializable.sol\";\n\nimport \"./enum/ChainIdType.sol\";\nimport \"./enum/InterfaceType.sol\";\nimport \"./enum/TokenUriType.sol\";\n\nimport \"./interface/InitializableInterface.sol\";\n\nimport \"./library/Base64.sol\";\nimport \"./library/Strings.sol\";\n\n/**\n * @title Holograph Interfaces\n * @author https://github.com/holographxyz\n * @notice Get universal Holograph Protocol variables\n * @dev The contract stores a reference of all supported: chains, interfaces, functions, etc.\n */\ncontract HolographInterfaces is Admin, Initializable {\n /**\n * @dev Internal mapping of all InterfaceType interfaces\n */\n mapping(InterfaceType => mapping(bytes4 => bool)) private _supportedInterfaces;\n\n /**\n * @dev Internal mapping of all ChainIdType conversions\n */\n mapping(ChainIdType => mapping(uint256 => mapping(ChainIdType => uint256))) private _chainIdMap;\n\n /**\n * @dev Internal mapping of all TokenUriType prepends\n */\n mapping(TokenUriType => string) private _prependURI;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n address contractAdmin = abi.decode(initPayload, (address));\n assembly {\n sstore(_adminSlot, contractAdmin)\n }\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @notice Get a base64 encoded contract URI JSON string\n * @dev Used to dynamically generate contract JSON payload\n * @param name the name of the smart contract\n * @param imageURL string pointing to the primary contract image, can be: https, ipfs, or ar (arweave)\n * @param externalLink url to website/page related to smart contract\n * @param bps basis points used for specifying royalties percentage\n * @param contractAddress address of the smart contract\n * @return a base64 encoded json string representing the smart contract\n */\n function contractURI(\n string calldata name,\n string calldata imageURL,\n string calldata externalLink,\n uint16 bps,\n address contractAddress\n ) external pure returns (string memory) {\n return\n string(\n abi.encodePacked(\n \"data:application/json;base64,\",\n Base64.encode(\n abi.encodePacked(\n '{\"name\":\"',\n name,\n '\",\"description\":\"',\n name,\n '\",\"image\":\"',\n imageURL,\n '\",\"external_link\":\"',\n externalLink,\n '\",\"seller_fee_basis_points\":',\n Strings.uint2str(bps),\n ',\"fee_recipient\":\"0x',\n Strings.toAsciiString(contractAddress),\n '\"}'\n )\n )\n )\n );\n }\n\n /**\n * @notice Get the prepend to use for tokenURI\n * @dev Provides the prepend to use with TokenUriType URI\n */\n function getUriPrepend(TokenUriType uriType) external view returns (string memory prepend) {\n prepend = _prependURI[uriType];\n }\n\n /**\n * @notice Update the tokenURI prepend\n * @param uriType specify which TokenUriType to set for\n * @param prepend the string to use for the prepend\n */\n function updateUriPrepend(TokenUriType uriType, string calldata prepend) external onlyAdmin {\n _prependURI[uriType] = prepend;\n }\n\n /**\n * @notice Update the tokenURI prepends\n * @param uriTypes specify array of TokenUriTypes to set for\n * @param prepends array string to use for the prepends\n */\n function updateUriPrepends(TokenUriType[] calldata uriTypes, string[] calldata prepends) external onlyAdmin {\n for (uint256 i = 0; i < uriTypes.length; i++) {\n _prependURI[uriTypes[i]] = prepends[i];\n }\n }\n\n function getChainId(\n ChainIdType fromChainType,\n uint256 fromChainId,\n ChainIdType toChainType\n ) external view returns (uint256 toChainId) {\n return _chainIdMap[fromChainType][fromChainId][toChainType];\n }\n\n function updateChainIdMap(\n ChainIdType fromChainType,\n uint256 fromChainId,\n ChainIdType toChainType,\n uint256 toChainId\n ) external onlyAdmin {\n _chainIdMap[fromChainType][fromChainId][toChainType] = toChainId;\n }\n\n function updateChainIdMaps(\n ChainIdType[] calldata fromChainType,\n uint256[] calldata fromChainId,\n ChainIdType[] calldata toChainType,\n uint256[] calldata toChainId\n ) external onlyAdmin {\n uint256 length = fromChainType.length;\n for (uint256 i = 0; i < length; i++) {\n _chainIdMap[fromChainType[i]][fromChainId[i]][toChainType[i]] = toChainId[i];\n }\n }\n\n function supportsInterface(InterfaceType interfaceType, bytes4 interfaceId) external view returns (bool) {\n return _supportedInterfaces[interfaceType][interfaceId];\n }\n\n function updateInterface(InterfaceType interfaceType, bytes4 interfaceId, bool supported) external onlyAdmin {\n _supportedInterfaces[interfaceType][interfaceId] = supported;\n }\n\n function updateInterfaces(\n InterfaceType interfaceType,\n bytes4[] calldata interfaceIds,\n bool supported\n ) external onlyAdmin {\n for (uint256 i = 0; i < interfaceIds.length; i++) {\n _supportedInterfaces[interfaceType][interfaceIds[i]] = supported;\n }\n }\n\n /**\n * @dev Purposefully reverts to prevent having any type of ether transfered into the contract\n */\n receive() external payable {\n revert();\n }\n\n /**\n * @dev Purposefully reverts to prevent any calls to undefined functions\n */\n fallback() external payable {\n revert();\n }\n}\n" + }, + "contracts/HolographOperator.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./abstract/Admin.sol\";\nimport \"./abstract/Initializable.sol\";\n\nimport \"./interface/CrossChainMessageInterface.sol\";\nimport \"./interface/HolographBridgeInterface.sol\";\nimport \"./interface/HolographERC20Interface.sol\";\nimport \"./interface/HolographInterface.sol\";\nimport \"./interface/HolographOperatorInterface.sol\";\nimport \"./interface/HolographRegistryInterface.sol\";\nimport \"./interface/InitializableInterface.sol\";\nimport \"./interface/HolographInterfacesInterface.sol\";\nimport \"./interface/Ownable.sol\";\n\nimport \"./struct/OperatorJob.sol\";\n\n/**\n * @title Holograph Operator\n * @author https://github.com/holographxyz\n * @notice Participate in the Holograph Protocol by becoming an Operator\n * @dev This contract allows operators to bond utility tokens and help execute operator jobs\n */\ncontract HolographOperator is Admin, Initializable, HolographOperatorInterface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.bridge')) - 1)\n */\n bytes32 constant _bridgeSlot = 0xeb87cbb21687feb327e3d58c6c16d552231d12c7a0e8115042a4165fac8a77f9;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\n */\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.interfaces')) - 1)\n */\n bytes32 constant _interfacesSlot = 0xbd3084b8c09da87ad159c247a60e209784196be2530cecbbd8f337fdd1848827;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.jobNonce')) - 1)\n */\n bytes32 constant _jobNonceSlot = 0x1cda64803f3b43503042e00863791e8d996666552d5855a78d53ee1dd4b3286d;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.messagingModule')) - 1)\n */\n bytes32 constant _messagingModuleSlot = 0x54176250282e65985d205704ffce44a59efe61f7afd99e29fda50f55b48c061a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\n */\n bytes32 constant _registrySlot = 0xce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.utilityToken')) - 1)\n */\n bytes32 constant _utilityTokenSlot = 0xbf76518d46db472b71aa7677a0908b8016f3dee568415ffa24055f9a670f9c37;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.minGasPrice')) - 1)\n */\n bytes32 constant _minGasPriceSlot = 0x264d744422f7427cd080572c35c848b6cd3a36da6b47519af89ef13098b12fc0;\n\n /**\n * @dev Internal number (in seconds), used for defining a window for operator to execute the job\n */\n uint256 private _blockTime;\n\n /**\n * @dev Minimum amount of tokens needed for bonding\n */\n uint256 private _baseBondAmount;\n\n /**\n * @dev The multiplier used for calculating bonding amount for pods\n */\n uint256 private _podMultiplier;\n\n /**\n * @dev The threshold used for limiting number of operators in a pod\n */\n uint256 private _operatorThreshold;\n\n /**\n * @dev The threshold step used for increasing bond amount once threshold is reached\n */\n uint256 private _operatorThresholdStep;\n\n /**\n * @dev The threshold divisor used for increasing bond amount once threshold is reached\n */\n uint256 private _operatorThresholdDivisor;\n\n /**\n * @dev Internal counter of all cross-chain messages received\n */\n uint256 private _inboundMessageCounter;\n\n /**\n * @dev Internal mapping of operator job details for a specific job hash\n */\n mapping(bytes32 => uint256) private _operatorJobs;\n\n /**\n * @dev Internal mapping of operator job details for a specific job hash\n */\n mapping(bytes32 => bool) private _failedJobs;\n\n /**\n * @dev Internal mapping of operator addresses, used for temp storage when defining an operator job\n */\n mapping(uint256 => address) private _operatorTempStorage;\n\n /**\n * @dev Internal index used for storing/referencing operator temp storage\n */\n uint32 private _operatorTempStorageCounter;\n\n /**\n * @dev Multi-dimensional array of available operators\n */\n address[][] private _operatorPods;\n\n /**\n * @dev Internal mapping of bonded operators, to prevent double bonding\n */\n mapping(address => uint256) private _bondedOperators;\n\n /**\n * @dev Internal mapping of bonded operators, to prevent double bonding\n */\n mapping(address => uint256) private _operatorPodIndex;\n\n /**\n * @dev Internal mapping of bonded operator amounts\n */\n mapping(address => uint256) private _bondedAmounts;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (\n address bridge,\n address holograph,\n address interfaces,\n address registry,\n address utilityToken,\n uint256 minGasPrice\n ) = abi.decode(initPayload, (address, address, address, address, address, uint256));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_bridgeSlot, bridge)\n sstore(_holographSlot, holograph)\n sstore(_interfacesSlot, interfaces)\n sstore(_registrySlot, registry)\n sstore(_utilityTokenSlot, utilityToken)\n sstore(_minGasPriceSlot, minGasPrice)\n }\n _blockTime = 60; // 60 seconds allowed for execution\n unchecked {\n _baseBondAmount = 100 * (10 ** 18); // one single token unit * 100\n }\n // how much to increase bond amount per pod\n _podMultiplier = 2; // 1, 4, 16, 64\n // starting pod max amount\n _operatorThreshold = 1000;\n // how often to increase price per each operator\n _operatorThresholdStep = 10;\n // we want to multiply by decimals, but instead will have to divide\n _operatorThresholdDivisor = 100; // == * 0.01\n // set first operator for each pod as zero address\n _operatorPods = [[address(0)]];\n // mark zero address as bonded operator, to prevent abuse\n _bondedOperators[address(0)] = 1;\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @notice Recover failed job\n * @dev If a job fails, it can be manually recovered\n * @param bridgeInRequestPayload the entire cross chain message payload\n */\n function recoverJob(bytes calldata bridgeInRequestPayload) external payable {\n bytes32 hash = keccak256(bridgeInRequestPayload);\n require(_failedJobs[hash], \"HOLOGRAPH: invalid recovery job\");\n (bool success, ) = _bridge().call{value: msg.value}(bridgeInRequestPayload);\n require(success, \"HOLOGRAPH: recovery failed\");\n delete (_failedJobs[hash]);\n }\n\n /**\n * @notice Execute an available operator job\n * @dev When making this call, if operating criteria is not met, the call will revert\n * @param bridgeInRequestPayload the entire cross chain message payload\n */\n function executeJob(bytes calldata bridgeInRequestPayload) external payable {\n /**\n * @dev derive the payload hash for use in mappings\n */\n bytes32 hash = keccak256(bridgeInRequestPayload);\n /**\n * @dev check that job exists\n */\n require(_operatorJobs[hash] > 0, \"HOLOGRAPH: invalid job\");\n uint256 gasLimit = 0;\n uint256 gasPrice = 0;\n assembly {\n /**\n * @dev extract gasLimit\n */\n gasLimit := calldataload(sub(add(bridgeInRequestPayload.offset, bridgeInRequestPayload.length), 0x40))\n /**\n * @dev extract gasPrice\n */\n gasPrice := calldataload(sub(add(bridgeInRequestPayload.offset, bridgeInRequestPayload.length), 0x20))\n }\n /**\n * @dev unpack bitwise packed operator job details\n */\n OperatorJob memory job = getJobDetails(hash);\n /**\n * @dev to prevent replay attacks, remove job from mapping\n */\n delete _operatorJobs[hash];\n /**\n * @dev operators of last resort are allowed, but they will not receive HLG rewards of any sort\n */\n bool isBonded = _bondedAmounts[msg.sender] != 0;\n /**\n * @dev check that a specific operator was selected for the job\n */\n if (job.operator != address(0)) {\n /**\n * @dev switch pod to index based value\n */\n uint256 pod = job.pod - 1;\n /**\n * @dev check if sender is not the selected primary operator\n */\n if (job.operator != msg.sender) {\n /**\n * @dev sender is not selected operator, need to check if allowed to do job\n */\n uint256 elapsedTime = block.timestamp - uint256(job.startTimestamp);\n uint256 timeDifference = elapsedTime / job.blockTimes;\n /**\n * @dev validate that initial selected operator time slot is still active\n */\n require(timeDifference > 0, \"HOLOGRAPH: operator has time\");\n /**\n * @dev check that the selected missed the time slot due to a gas spike\n */\n require(gasPrice >= tx.gasprice, \"HOLOGRAPH: gas spike detected\");\n /**\n * @dev check if time is within fallback operator slots\n */\n if (timeDifference < 6) {\n uint256 podIndex = uint256(job.fallbackOperators[timeDifference - 1]);\n /**\n * @dev do a quick sanity check to make sure operator did not leave from index or is a zero address\n */\n if (podIndex > 0 && podIndex < _operatorPods[pod].length) {\n address fallbackOperator = _operatorPods[pod][podIndex];\n /**\n * @dev ensure that sender is currently valid backup operator\n */\n require(fallbackOperator == msg.sender, \"HOLOGRAPH: invalid fallback\");\n } else {\n require(_bondedOperators[msg.sender] == job.pod, \"HOLOGRAPH: pod only fallback\");\n }\n }\n /**\n * @dev time to reward the current operator\n */\n uint256 amount = _getBaseBondAmount(pod);\n /**\n * @dev select operator that failed to do the job, is slashed the pod base fee\n */\n _bondedAmounts[job.operator] -= amount;\n /**\n * @dev only allow HLG rewards to go to bonded operators\n * if operator is bonded, the slashed amount is sent to current operator\n * otherwise it's sent to HolographTreasury, can be burned or distributed from there\n */\n _utilityToken().transfer((isBonded ? msg.sender : address(_holograph().getTreasury())), amount);\n /**\n * @dev check if slashed operator has enough tokens bonded to stay\n */\n if (_bondedAmounts[job.operator] >= amount) {\n /**\n * @dev enough bond amount leftover, put operator back in\n */\n _operatorPods[pod].push(job.operator);\n _operatorPodIndex[job.operator] = _operatorPods[pod].length - 1;\n _bondedOperators[job.operator] = job.pod;\n } else {\n /**\n * @dev slashed operator does not have enough tokens bonded, return remaining tokens only\n */\n uint256 leftovers = _bondedAmounts[job.operator];\n if (leftovers > 0) {\n _bondedAmounts[job.operator] = 0;\n _utilityToken().transfer(job.operator, leftovers);\n }\n }\n } else {\n /**\n * @dev the selected operator is executing the job\n */\n _operatorPods[pod].push(msg.sender);\n _operatorPodIndex[job.operator] = _operatorPods[pod].length - 1;\n _bondedOperators[msg.sender] = job.pod;\n }\n }\n /**\n * @dev every executed job (even if failed) increments total message counter by one\n */\n ++_inboundMessageCounter;\n /**\n * @dev reward operator (with HLG) for executing the job\n * this is out of scope and is purposefully omitted from code\n * currently no rewards are issued\n */\n //_utilityToken().transfer((isBonded ? msg.sender : address(_utilityToken())), (10**18));\n /**\n * @dev always emit an event at end of job, this helps other operators keep track of job status\n */\n emit FinishedOperatorJob(hash, msg.sender);\n /**\n * @dev ensure that there is enough has left for the job\n */\n require(gasleft() > gasLimit, \"HOLOGRAPH: not enough gas left\");\n /**\n * @dev execute the job\n */\n try\n HolographOperatorInterface(address(this)).nonRevertingBridgeCall{value: msg.value}(\n msg.sender,\n bridgeInRequestPayload\n )\n {\n /// @dev do nothing\n } catch {\n /// @dev return any payed funds in case of revert\n payable(msg.sender).transfer(msg.value);\n _failedJobs[hash] = true;\n emit FailedOperatorJob(hash);\n }\n }\n\n /*\n * @dev Purposefully made to be external so that Operator can call it during executeJob function\n * Check the executeJob function to understand it's implementation\n */\n function nonRevertingBridgeCall(address msgSender, bytes calldata payload) external payable {\n require(msg.sender == address(this), \"HOLOGRAPH: operator only call\");\n assembly {\n /**\n * @dev remove gas price from end\n */\n calldatacopy(0, payload.offset, sub(payload.length, 0x20))\n /**\n * @dev hToken recipient is injected right before making the call\n */\n mstore(0x84, msgSender)\n /**\n * @dev make non-reverting call\n */\n let result := call(\n /// @dev gas limit is retrieved from last 32 bytes of payload in-memory value\n mload(sub(payload.length, 0x40)),\n /// @dev destination is bridge contract\n sload(_bridgeSlot),\n /// @dev any value is passed along\n callvalue(),\n /// @dev data is retrieved from 0 index memory position\n 0,\n /// @dev everything except for last 32 bytes (gas limit) is sent\n sub(payload.length, 0x40),\n 0,\n 0\n )\n if eq(result, 0) {\n revert(0, 0)\n }\n return(0, 0)\n }\n }\n\n /**\n * @notice Receive a cross-chain message\n * @dev This function is restricted for use by Holograph Messaging Module only\n */\n function crossChainMessage(bytes calldata bridgeInRequestPayload) external payable {\n require(\n msg.sender == address(_messagingModule()) || msg.sender == 0xE9e30A0aD0d8Af5cF2606ea720052E28D6fcbAAF,\n \"HOLOGRAPH: messaging only call\"\n ); // TODO: Schedule time to remove deprecated LayerZeroModule address after all in-flight LZ messages propagate\n uint256 gasPrice = 0;\n assembly {\n /**\n * @dev extract gasPrice\n */\n gasPrice := calldataload(sub(add(bridgeInRequestPayload.offset, bridgeInRequestPayload.length), 0x20))\n }\n bool underpriced = gasPrice < _minGasPrice();\n unchecked {\n bytes32 jobHash = keccak256(bridgeInRequestPayload);\n /**\n * @dev load and increment operator temp storage in one call\n */\n ++_operatorTempStorageCounter;\n /**\n * @dev use job hash, job nonce, block number, and block timestamp for generating a random number\n */\n uint256 random = uint256(keccak256(abi.encodePacked(jobHash, _jobNonce(), block.number, block.timestamp)));\n // use the left 128 bits of random number\n uint256 random1 = uint256(random >> 128);\n // use the right 128 bits of random number\n uint256 random2 = uint256(uint128(random));\n // combine the two new random numbers for use in additional pod operator selection logic\n random = uint256(keccak256(abi.encodePacked(random1 + random2)));\n /**\n * @dev divide by total number of pods, use modulus/remainder\n */\n uint256 pod = random1 % _operatorPods.length;\n /**\n * @dev identify the total number of available operators in pod\n */\n uint256 podSize = _operatorPods[pod].length;\n /**\n * @dev select a primary operator\n */\n uint256 operatorIndex = underpriced ? 0 : random2 % podSize;\n /**\n * @dev If operator index is 0, then it's open season! Anyone can execute this job. First come first serve\n * pop operator to ensure that they cannot be selected for any other job until this one completes\n * decrease pod size to accomodate popped operator\n */\n _operatorTempStorage[_operatorTempStorageCounter] = _operatorPods[pod][operatorIndex];\n _popOperator(pod, operatorIndex);\n if (podSize > 1) {\n podSize--;\n }\n _operatorJobs[jobHash] = uint256(\n ((pod + 1) << 248) |\n (uint256(_operatorTempStorageCounter) << 216) |\n (block.number << 176) |\n ((underpriced ? 0 : _randomBlockHash(random, podSize, 1)) << 160) |\n ((underpriced ? 0 : _randomBlockHash(random, podSize, 2)) << 144) |\n ((underpriced ? 0 : _randomBlockHash(random, podSize, 3)) << 128) |\n ((underpriced ? 0 : _randomBlockHash(random, podSize, 4)) << 112) |\n ((underpriced ? 0 : _randomBlockHash(random, podSize, 5)) << 96) |\n (block.timestamp << 16) |\n 0\n ); // 80 next available bit position && so far 176 bits used with only 128 left\n /**\n * @dev emit event to signal to operators that a job has become available\n */\n emit AvailableOperatorJob(jobHash, bridgeInRequestPayload);\n }\n }\n\n /**\n * @notice Calculate the amount of gas needed to execute a bridgeInRequest\n * @dev Use this function to estimate the amount of gas that will be used by the bridgeInRequest function\n * Set a specific gas limit when making this call, subtract return value, to get total gas used\n * Only use this with a static call\n * @param bridgeInRequestPayload abi encoded bytes making up the bridgeInRequest payload\n * @return the gas amount remaining after the static call is returned\n */\n function jobEstimator(bytes calldata bridgeInRequestPayload) external payable returns (uint256) {\n assembly {\n calldatacopy(0, bridgeInRequestPayload.offset, sub(bridgeInRequestPayload.length, 0x40))\n /**\n * @dev bridgeInRequest doNotRevert is purposefully set to false so a rever would happen\n */\n mstore8(0xE3, 0x00)\n let result := call(gas(), sload(_bridgeSlot), callvalue(), 0, sub(bridgeInRequestPayload.length, 0x40), 0, 0)\n /**\n * @dev if for some reason the call does not revert, it is force reverted\n */\n if eq(result, 1) {\n returndatacopy(0, 0, returndatasize())\n revert(0, returndatasize())\n }\n /**\n * @dev remaining gas is set as the return value\n */\n mstore(0x00, gas())\n return(0x00, 0x20)\n }\n }\n\n /**\n * @notice Send cross chain bridge request message\n * @dev This function is restricted to only be callable by Holograph Bridge\n * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain\n * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain\n * @param toChain Holograph Chain ID where the beam is being sent to\n * @param nonce incremented number used to ensure job hashes are unique\n * @param holographableContract address of the contract for which the bridge request is being made\n * @param bridgeOutPayload bytes made up of the bridgeOutRequest payload\n */\n function send(\n uint256 gasLimit,\n uint256 gasPrice,\n uint32 toChain,\n address msgSender,\n uint256 nonce,\n address holographableContract,\n bytes calldata bridgeOutPayload\n ) external payable {\n require(msg.sender == _bridge(), \"HOLOGRAPH: bridge only call\");\n CrossChainMessageInterface messagingModule = _messagingModule();\n uint256 hlgFee = messagingModule.getHlgFee(toChain, gasLimit, gasPrice, bridgeOutPayload);\n address hToken = _registry().getHToken(_holograph().getHolographChainId());\n require(hlgFee < msg.value, \"HOLOGRAPH: not enough value\");\n payable(hToken).transfer(hlgFee);\n bytes memory encodedData = abi.encodeWithSelector(\n HolographBridgeInterface.bridgeInRequest.selector,\n /**\n * @dev job nonce is an incremented value that is assigned to each bridge request to guarantee unique hashes\n */\n nonce,\n /**\n * @dev including the current holograph chain id (origin chain)\n */\n _holograph().getHolographChainId(),\n /**\n * @dev holographable contract have the same address across all chains, so our destination address will be the same\n */\n holographableContract,\n /**\n * @dev get the current chain's hToken for native gas token\n */\n hToken,\n /**\n * @dev recipient will be defined when operator picks up the job\n */\n address(0),\n /**\n * @dev value is set to zero for now\n */\n hlgFee,\n /**\n * @dev specify that function call should not revert\n */\n true,\n /**\n * @dev attach actual holographableContract function call\n */\n bridgeOutPayload\n );\n /**\n * @dev add gas variables to the back for later extraction\n */\n encodedData = abi.encodePacked(encodedData, gasLimit, gasPrice);\n /**\n * @dev Send the data to the current Holograph Messaging Module\n * This will be changed to dynamically select which messaging module to use based on destination network\n */\n messagingModule.send{value: msg.value - hlgFee}(\n gasLimit,\n gasPrice,\n toChain,\n msgSender,\n msg.value - hlgFee,\n encodedData\n );\n /**\n * @dev for easy indexing, an event is emitted with the payload hash for status tracking\n */\n emit CrossChainMessageSent(keccak256(encodedData));\n }\n\n /**\n * @notice Get the fees associated with sending specific payload\n * @dev Will provide exact costs on protocol and message side, combine the two to get total\n * @dev @param toChain holograph chain id of destination chain for payload\n * @dev @param gasLimit amount of gas to provide for executing payload on destination chain\n * @dev @param gasPrice maximum amount to pay for gas price, can be set to 0 and will be chose automatically\n * @dev @param crossChainPayload the entire packet being sent cross-chain\n * @return hlgFee the amount (in wei) of native gas token that will cost for finalizing job on destiantion chain\n * @return msgFee the amount (in wei) of native gas token that will cost for sending message to destiantion chain\n * @return dstGasPrice the amount (in wei) that destination message maximum gas price will be\n */\n function getMessageFee(uint32, uint256, uint256, bytes calldata) external view returns (uint256, uint256, uint256) {\n assembly {\n calldatacopy(0, 0, calldatasize())\n let result := staticcall(gas(), sload(_messagingModuleSlot), 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @notice Get the details for an available operator job\n * @dev The job hash is a keccak256 hash of the entire job payload\n * @param jobHash keccak256 hash of the job\n * @return an OperatorJob struct with details about a specific job\n */\n function getJobDetails(bytes32 jobHash) public view returns (OperatorJob memory) {\n uint256 packed = _operatorJobs[jobHash];\n /**\n * @dev The job is bitwise packed into a single 32 byte slot, this unpacks it before returning the struct\n */\n return\n OperatorJob(\n uint8(packed >> 248),\n uint16(_blockTime),\n _operatorTempStorage[uint32(packed >> 216)],\n uint40(packed >> 176),\n // TODO: move the bit-shifting around to have it be sequential\n uint64(packed >> 16),\n [\n uint16(packed >> 160),\n uint16(packed >> 144),\n uint16(packed >> 128),\n uint16(packed >> 112),\n uint16(packed >> 96)\n ]\n );\n }\n\n /**\n * @notice Get number of pods available\n * @dev This returns number of pods that have been opened via bonding\n */\n function getTotalPods() external view returns (uint256 totalPods) {\n return _operatorPods.length;\n }\n\n /**\n * @notice Get total number of operators in a pod\n * @dev Use in conjunction with paginated getPodOperators function\n * @param pod the pod to query\n * @return total operators in a pod\n */\n function getPodOperatorsLength(uint256 pod) external view returns (uint256) {\n require(_operatorPods.length >= pod, \"HOLOGRAPH: pod does not exist\");\n return _operatorPods[pod - 1].length;\n }\n\n /**\n * @notice Get list of operators in a pod\n * @dev Use paginated getPodOperators function instead if list gets too long\n * @param pod the pod to query\n * @return operators array list of operators in a pod\n */\n function getPodOperators(uint256 pod) external view returns (address[] memory operators) {\n require(_operatorPods.length >= pod, \"HOLOGRAPH: pod does not exist\");\n operators = _operatorPods[pod - 1];\n }\n\n /**\n * @notice Get paginated list of operators in a pod\n * @dev Use in conjunction with getPodOperatorsLength to know the total length of results\n * @param pod the pod to query\n * @param index the array index to start from\n * @param length the length of result set to be (will be shorter if reached end of array)\n * @return operators a paginated array of operators\n */\n function getPodOperators(\n uint256 pod,\n uint256 index,\n uint256 length\n ) external view returns (address[] memory operators) {\n require(_operatorPods.length >= pod, \"HOLOGRAPH: pod does not exist\");\n /**\n * @dev if pod 0 is selected, this will create a revert\n */\n pod--;\n /**\n * @dev get total length of pod operators\n */\n uint256 supply = _operatorPods[pod].length;\n /**\n * @dev check if length is out of bounds for this result set\n */\n if (index + length > supply) {\n /**\n * @dev adjust length to return remainder of the results\n */\n length = supply - index;\n }\n /**\n * @dev create in-memory array\n */\n operators = new address[](length);\n /**\n * @dev add operators to result set\n */\n for (uint256 i = 0; i < length; i++) {\n operators[i] = _operatorPods[pod][index + i];\n }\n }\n\n /**\n * @notice Check the base and current price for bonding to a particular pod\n * @dev Useful for understanding what is required for bonding to a pod\n * @param pod the pod to get bonding amounts for\n * @return base the base bond amount required for a pod\n * @return current the current bond amount required for a pod\n */\n function getPodBondAmounts(uint256 pod) external view returns (uint256 base, uint256 current) {\n base = _getBaseBondAmount(pod - 1);\n current = _getCurrentBondAmount(pod - 1);\n }\n\n /**\n * @notice Get an operator's currently bonded amount\n * @dev Useful for checking how much an operator has bonded\n * @param operator address of operator to check\n * @return amount total number of utility token bonded\n */\n function getBondedAmount(address operator) external view returns (uint256 amount) {\n return _bondedAmounts[operator];\n }\n\n /**\n * @notice Get an operator's currently bonded pod\n * @dev Useful for checking if an operator is currently bonded\n * @param operator address of operator to check\n * @return pod number that operator is bonded on, returns zero if not bonded or selected for job\n */\n function getBondedPod(address operator) external view returns (uint256 pod) {\n return _bondedOperators[operator];\n }\n\n /**\n * @notice Get an operator's currently bonded pod index\n * @dev Useful for checking if an operator is a fallback for active job\n * @param operator address of operator to check\n * @return index currently bonded pod's operator index, returns zero if not in pod or moved out for active job\n */\n function getBondedPodIndex(address operator) external view returns (uint256 index) {\n return _operatorPodIndex[operator];\n }\n\n /**\n * @notice Topup a bonded operator with more utility tokens\n * @dev Useful function if an operator got slashed and wants to add a safety buffer to not get unbonded\n * This function will not work if operator has currently been selected for a job\n * @param operator address of operator to topup\n * @param amount utility token amount to add\n */\n function topupUtilityToken(address operator, uint256 amount) external {\n /**\n * @dev check that an operator is currently bonded\n */\n require(_bondedOperators[operator] != 0, \"HOLOGRAPH: operator not bonded\");\n unchecked {\n /**\n * @dev add the additional amount to operator\n */\n _bondedAmounts[operator] += amount;\n }\n /**\n * @dev transfer tokens last, to prevent reentrancy attacks\n */\n require(_utilityToken().transferFrom(msg.sender, address(this), amount), \"HOLOGRAPH: token transfer failed\");\n }\n\n /**\n * @notice Bond utility tokens and become an operator\n * @dev An operator can only bond to one pod at a time, per network\n * @param operator address of operator to bond (can be an ownable smart contract)\n * @param amount utility token amount to bond (can be greater than minimum)\n * @param pod number of pod to bond to (can be for one that does not exist yet)\n */\n function bondUtilityToken(address operator, uint256 amount, uint256 pod) external {\n /**\n * @dev an operator can only bond to one pod at any give time per network\n */\n require(_bondedOperators[operator] == 0 && _bondedAmounts[operator] == 0, \"HOLOGRAPH: operator is bonded\");\n if (_isContract(operator)) {\n require(Ownable(operator).owner() != address(0), \"HOLOGRAPH: contract not ownable\");\n }\n unchecked {\n /**\n * @dev get the current bonding minimum for selected pod\n */\n uint256 current = _getCurrentBondAmount(pod - 1);\n require(current <= amount, \"HOLOGRAPH: bond amount too small\");\n /**\n * @dev check if selected pod is greater than currently existing pods\n */\n if (_operatorPods.length < pod) {\n /**\n * @dev activate pod(s) up until the selected pod\n */\n for (uint256 i = _operatorPods.length; i < pod; i++) {\n /**\n * @dev add zero address into pod to mitigate empty pod issues\n */\n _operatorPods.push([address(0)]);\n }\n }\n /**\n * @dev prevent bonding to a pod with more than uint16 max value\n */\n require(_operatorPods[pod - 1].length < type(uint16).max, \"HOLOGRAPH: too many operators\");\n _operatorPods[pod - 1].push(operator);\n _operatorPodIndex[operator] = _operatorPods[pod - 1].length - 1;\n _bondedOperators[operator] = pod;\n _bondedAmounts[operator] = amount;\n /**\n * @dev transfer tokens last, to prevent reentrancy attacks\n */\n require(_utilityToken().transferFrom(msg.sender, address(this), amount), \"HOLOGRAPH: token transfer failed\");\n }\n }\n\n /**\n * @notice Unbond HLG utility tokens and stop being an operator\n * @dev A bonded operator selected for a job cannot unbond until they complete the job, or are slashed\n * @param operator address of operator to unbond\n * @param recipient address where to send the bonded tokens\n */\n function unbondUtilityToken(address operator, address recipient) external {\n /**\n * @dev validate that operator is currently bonded\n */\n require(_bondedOperators[operator] != 0, \"HOLOGRAPH: operator not bonded\");\n /**\n * @dev check if sender is not actual operator\n */\n if (msg.sender != operator) {\n /**\n * @dev check if operator is a smart contract\n */\n require(_isContract(operator), \"HOLOGRAPH: operator not contract\");\n /**\n * @dev check if smart contract is owned by sender\n */\n require(Ownable(operator).owner() == msg.sender, \"HOLOGRAPH: sender not owner\");\n }\n /**\n * @dev get current bonded amount by operator\n */\n uint256 amount = _bondedAmounts[operator];\n /**\n * @dev unset operator bond amount before making a transfer\n */\n _bondedAmounts[operator] = 0;\n /**\n * @dev remove all operator references\n */\n _popOperator(_bondedOperators[operator] - 1, _operatorPodIndex[operator]);\n /**\n * @dev transfer tokens to recipient\n */\n require(_utilityToken().transfer(recipient, amount), \"HOLOGRAPH: token transfer failed\");\n }\n\n /**\n * @notice Get the address of the Holograph Bridge module\n * @dev Used for beaming holographable assets cross-chain\n */\n function getBridge() external view returns (address bridge) {\n assembly {\n bridge := sload(_bridgeSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Bridge module address\n * @param bridge address of the Holograph Bridge smart contract to use\n */\n function setBridge(address bridge) external onlyAdmin {\n assembly {\n sstore(_bridgeSlot, bridge)\n }\n }\n\n /**\n * @notice Get the Holograph Protocol contract\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\n */\n function getHolograph() external view returns (address holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Protocol contract address\n * @param holograph address of the Holograph Protocol smart contract to use\n */\n function setHolograph(address holograph) external onlyAdmin {\n assembly {\n sstore(_holographSlot, holograph)\n }\n }\n\n /**\n * @notice Get the address of the Holograph Interfaces module\n * @dev Holograph uses this contract to store data that needs to be accessed by a large portion of the modules\n */\n function getInterfaces() external view returns (address interfaces) {\n assembly {\n interfaces := sload(_interfacesSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Interfaces module address\n * @param interfaces address of the Holograph Interfaces smart contract to use\n */\n function setInterfaces(address interfaces) external onlyAdmin {\n assembly {\n sstore(_interfacesSlot, interfaces)\n }\n }\n\n /**\n * @notice Get the address of the Holograph Messaging Module\n * @dev All cross-chain message requests will get forwarded to this adress\n */\n function getMessagingModule() external view returns (address messagingModule) {\n assembly {\n messagingModule := sload(_messagingModuleSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Messaging Module address\n * @param messagingModule address of the LayerZero Endpoint to use\n */\n function setMessagingModule(address messagingModule) external onlyAdmin {\n assembly {\n sstore(_messagingModuleSlot, messagingModule)\n }\n }\n\n /**\n * @notice Get the Holograph Registry module\n * @dev This module stores a reference for all deployed holographable smart contracts\n */\n function getRegistry() external view returns (address registry) {\n assembly {\n registry := sload(_registrySlot)\n }\n }\n\n /**\n * @notice Update the Holograph Registry module address\n * @param registry address of the Holograph Registry smart contract to use\n */\n function setRegistry(address registry) external onlyAdmin {\n assembly {\n sstore(_registrySlot, registry)\n }\n }\n\n /**\n * @notice Get the Holograph Utility Token address\n * @dev This is the official utility token of the Holograph Protocol\n */\n function getUtilityToken() external view returns (address utilityToken) {\n assembly {\n utilityToken := sload(_utilityTokenSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Utility Token address\n * @param utilityToken address of the Holograph Utility Token smart contract to use\n */\n function setUtilityToken(address utilityToken) external onlyAdmin {\n assembly {\n sstore(_utilityTokenSlot, utilityToken)\n }\n }\n\n /**\n * @notice Get the Minimum Gas Price\n * @dev The minimum value required to execute a job without it being marked as under priced\n */\n function getMinGasPrice() external view returns (uint256 minGasPrice) {\n assembly {\n minGasPrice := sload(_minGasPriceSlot)\n }\n }\n\n /**\n * @notice Update the Minimum Gas Price\n * @param minGasPrice amount to set for minimum gas price\n */\n function setMinGasPrice(uint256 minGasPrice) external onlyAdmin {\n assembly {\n sstore(_minGasPriceSlot, minGasPrice)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Bridge Interface\n */\n function _bridge() private view returns (address bridge) {\n assembly {\n bridge := sload(_bridgeSlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Interface\n */\n function _holograph() private view returns (HolographInterface holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Interfaces Interface\n */\n function _interfaces() private view returns (HolographInterfacesInterface interfaces) {\n assembly {\n interfaces := sload(_interfacesSlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Messaging Module Interface\n */\n function _messagingModule() private view returns (CrossChainMessageInterface messagingModule) {\n assembly {\n messagingModule := sload(_messagingModuleSlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Registry Interface\n */\n function _registry() private view returns (HolographRegistryInterface registry) {\n assembly {\n registry := sload(_registrySlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Utility Token Interface\n */\n function _utilityToken() private view returns (HolographERC20Interface utilityToken) {\n assembly {\n utilityToken := sload(_utilityTokenSlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the minimum gas price allowed\n */\n function _minGasPrice() private view returns (uint256 minGasPrice) {\n assembly {\n minGasPrice := sload(_minGasPriceSlot)\n }\n }\n\n /**\n * @dev Internal nonce, that increments on each call, used for randomness\n */\n function _jobNonce() private returns (uint256 jobNonce) {\n assembly {\n jobNonce := add(sload(_jobNonceSlot), 0x0000000000000000000000000000000000000000000000000000000000000001)\n sstore(_jobNonceSlot, jobNonce)\n }\n }\n\n /**\n * @dev Internal function used to remove an operator from a particular pod\n */\n function _popOperator(uint256 pod, uint256 operatorIndex) private {\n /**\n * @dev only pop the operator if it's not a zero address\n */\n if (operatorIndex > 0) {\n unchecked {\n address operator = _operatorPods[pod][operatorIndex];\n /**\n * @dev mark operator as no longer bonded\n */\n _bondedOperators[operator] = 0;\n /**\n * @dev remove pod reference for operator\n */\n _operatorPodIndex[operator] = 0;\n uint256 lastIndex = _operatorPods[pod].length - 1;\n if (lastIndex != operatorIndex) {\n /**\n * @dev if operator is not last index, move last index to operator's current index\n */\n _operatorPods[pod][operatorIndex] = _operatorPods[pod][lastIndex];\n _operatorPodIndex[_operatorPods[pod][operatorIndex]] = operatorIndex;\n }\n /**\n * @dev delete last index\n */\n delete _operatorPods[pod][lastIndex];\n /**\n * @dev shorten array length\n */\n _operatorPods[pod].pop();\n }\n }\n }\n\n /**\n * @dev Internal function used for calculating the base bonding amount for a pod\n */\n function _getBaseBondAmount(uint256 pod) private view returns (uint256) {\n return (_podMultiplier ** pod) * _baseBondAmount;\n }\n\n /**\n * @dev Internal function used for calculating the current bonding amount for a pod\n */\n function _getCurrentBondAmount(uint256 pod) private view returns (uint256) {\n uint256 current = (_podMultiplier ** pod) * _baseBondAmount;\n if (pod >= _operatorPods.length) {\n return current;\n }\n uint256 threshold = _operatorThreshold / (2 ** pod);\n uint256 position = _operatorPods[pod].length;\n if (position > threshold) {\n position -= threshold;\n // current += (current / _operatorThresholdDivisor) * position;\n current += (current / _operatorThresholdDivisor) * (position / _operatorThresholdStep);\n }\n return current;\n }\n\n /**\n * @dev Internal function used for generating a random pod operator selection by using previously mined blocks\n */\n function _randomBlockHash(uint256 random, uint256 podSize, uint256 n) private view returns (uint256) {\n unchecked {\n return (random + uint256(blockhash(block.number - n))) % podSize;\n }\n }\n\n /**\n * @dev Internal function used for checking if a contract has been deployed at address\n */\n function _isContract(address contractAddress) private view returns (bool) {\n bytes32 codehash;\n assembly {\n codehash := extcodehash(contractAddress)\n }\n return (codehash != 0x0 && codehash != 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470);\n }\n\n /**\n * @dev Purposefully left empty to ensure ether transfers use least amount of gas possible\n */\n receive() external payable {}\n\n /**\n * @dev Purposefully reverts to prevent any calls to undefined functions\n */\n fallback() external payable {\n revert();\n }\n}\n" + }, + "contracts/HolographRegistry.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./abstract/Admin.sol\";\nimport \"./abstract/Initializable.sol\";\n\nimport \"./interface/HolographInterface.sol\";\nimport \"./interface/HolographRegistryInterface.sol\";\nimport \"./interface/InitializableInterface.sol\";\n\n/**\n * @title Holograph Registry\n * @author https://github.com/holographxyz\n * @notice View and validate all deployed holographable contracts\n * @dev Use this to: validate that contracts are Holograph Protocol compliant, get source code for supported standards, and interact with hTokens\n */\ncontract HolographRegistry is Admin, Initializable, HolographRegistryInterface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\n */\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.utilityToken')) - 1)\n */\n bytes32 constant _utilityTokenSlot = 0xbf76518d46db472b71aa7677a0908b8016f3dee568415ffa24055f9a670f9c37;\n\n /**\n * @dev Array of all Holographable contracts that were ever deployed on this chain\n */\n address[] private _holographableContracts;\n\n /**\n * @dev A mapping of hashes to contract addresses\n */\n mapping(bytes32 => address) private _holographedContractsHashMap;\n\n /**\n * @dev Storage slot for saving contract type to contract address references\n */\n mapping(bytes32 => address) private _contractTypeAddresses;\n\n /**\n * @dev Reserved type addresses for Admin\n * Note: this is used for defining default contracts\n */\n mapping(bytes32 => bool) private _reservedTypes;\n\n /**\n * @dev A list of smart contracts that are guaranteed secure and holographable\n */\n mapping(address => bool) private _holographedContracts;\n\n /**\n * @dev Mapping of all hTokens available for the different EVM chains\n */\n mapping(uint32 => address) private _hTokens;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address holograph, bytes32[] memory reservedTypes) = abi.decode(initPayload, (address, bytes32[]));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_holographSlot, holograph)\n }\n for (uint256 i = 0; i < reservedTypes.length; i++) {\n _reservedTypes[reservedTypes[i]] = true;\n }\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n function isHolographedContract(address smartContract) external view returns (bool) {\n return _holographedContracts[smartContract];\n }\n\n function isHolographedHashDeployed(bytes32 hash) external view returns (bool) {\n return _holographedContractsHashMap[hash] != address(0);\n }\n\n function holographableEvent(bytes calldata payload) external {\n if (_holographedContracts[msg.sender]) {\n emit HolographableContractEvent(msg.sender, payload);\n }\n }\n\n /**\n * @dev Allows to reference a deployed smart contract, and use it's code as reference inside of Holographers\n */\n function referenceContractTypeAddress(address contractAddress) external returns (bytes32) {\n bytes32 contractType;\n assembly {\n contractType := extcodehash(contractAddress)\n }\n require(\n (// check that bytecode is not empty\n contractType != 0x0 &&\n // check that hash is not for empty bytes\n contractType != 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470),\n \"HOLOGRAPH: empty contract\"\n );\n require(_contractTypeAddresses[contractType] == address(0), \"HOLOGRAPH: contract already set\");\n require(!_reservedTypes[contractType], \"HOLOGRAPH: reserved address type\");\n _contractTypeAddresses[contractType] = contractAddress;\n return contractType;\n }\n\n /**\n * @dev Returns the contract address for a contract type\n */\n function getContractTypeAddress(bytes32 contractType) external view returns (address) {\n return _contractTypeAddresses[contractType];\n }\n\n /**\n * @dev Sets the contract address for a contract type\n */\n function setContractTypeAddress(bytes32 contractType, address contractAddress) external onlyAdmin {\n require(_reservedTypes[contractType], \"HOLOGRAPH: not reserved type\");\n _contractTypeAddresses[contractType] = contractAddress;\n }\n\n /**\n * @notice Get the Holograph Protocol contract\n * @dev This contract stores a reference to all the primary modules and variables of the protocol\n */\n function getHolograph() external view returns (address holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Protocol contract address\n * @param holograph address of the Holograph Protocol smart contract to use\n */\n function setHolograph(address holograph) external onlyAdmin {\n assembly {\n sstore(_holographSlot, holograph)\n }\n }\n\n /**\n * @notice Get set length list, starting from index, for all holographable contracts\n * @param index The index to start enumeration from\n * @param length The length of returned results\n * @return contracts address[] Returns a set length array of holographable contracts deployed\n */\n function getHolographableContracts(uint256 index, uint256 length) external view returns (address[] memory contracts) {\n uint256 supply = _holographableContracts.length;\n if (index + length > supply) {\n length = supply - index;\n }\n contracts = new address[](length);\n for (uint256 i = 0; i < length; i++) {\n contracts[i] = _holographableContracts[index + i];\n }\n }\n\n /**\n * @notice Get total number of deployed holographable contracts\n */\n function getHolographableContractsLength() external view returns (uint256) {\n return _holographableContracts.length;\n }\n\n /**\n * @dev Returns the address for a holographed hash\n */\n function getHolographedHashAddress(bytes32 hash) external view returns (address) {\n return _holographedContractsHashMap[hash];\n }\n\n /**\n * @dev Allows Holograph Factory to register a deployed contract, referenced with deployment hash\n */\n function setHolographedHashAddress(bytes32 hash, address contractAddress) external {\n address holograph;\n assembly {\n holograph := sload(_holographSlot)\n }\n require(msg.sender == HolographInterface(holograph).getFactory(), \"HOLOGRAPH: factory only function\");\n _holographedContractsHashMap[hash] = contractAddress;\n _holographedContracts[contractAddress] = true;\n _holographableContracts.push(contractAddress);\n }\n\n /**\n * @dev Returns the hToken address for a given chain id\n */\n function getHToken(uint32 chainId) external view returns (address) {\n return _hTokens[chainId];\n }\n\n /**\n * @dev Sets the hToken address for a specific chain id\n */\n function setHToken(uint32 chainId, address hToken) external onlyAdmin {\n _hTokens[chainId] = hToken;\n }\n\n /**\n * @dev Returns the reserved contract address for a contract type\n */\n function getReservedContractTypeAddress(bytes32 contractType) external view returns (address contractTypeAddress) {\n if (_reservedTypes[contractType]) {\n contractTypeAddress = _contractTypeAddresses[contractType];\n }\n }\n\n /**\n * @dev Allows admin to update or toggle reserved type\n */\n function setReservedContractTypeAddress(bytes32 hash, bool reserved) external onlyAdmin {\n _reservedTypes[hash] = reserved;\n }\n\n /**\n * @dev Allows admin to update or toggle reserved types\n */\n function setReservedContractTypeAddresses(bytes32[] calldata hashes, bool[] calldata reserved) external onlyAdmin {\n for (uint256 i = 0; i < hashes.length; i++) {\n _reservedTypes[hashes[i]] = reserved[i];\n }\n }\n\n /**\n * @notice Get the Holograph Utility Token address\n * @dev This is the official utility token of the Holograph Protocol\n */\n function getUtilityToken() external view returns (address utilityToken) {\n assembly {\n utilityToken := sload(_utilityTokenSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Utility Token address\n * @param utilityToken address of the Holograph Utility Token smart contract to use\n */\n function setUtilityToken(address utilityToken) external onlyAdmin {\n assembly {\n sstore(_utilityTokenSlot, utilityToken)\n }\n }\n\n /**\n * @dev Purposefully reverts to prevent having any type of ether transfered into the contract\n */\n receive() external payable {\n revert();\n }\n\n /**\n * @dev Purposefully reverts to prevent any calls to undefined functions\n */\n fallback() external payable {\n revert();\n }\n}\n" + }, + "contracts/HolographTreasury.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./abstract/Admin.sol\";\nimport \"./abstract/Initializable.sol\";\n\nimport \"./interface/HolographERC20Interface.sol\";\nimport \"./interface/HolographERC721Interface.sol\";\nimport \"./interface/HolographInterface.sol\";\nimport \"./interface/HolographTreasuryInterface.sol\";\nimport \"./interface/HolographFactoryInterface.sol\";\nimport \"./interface/HolographOperatorInterface.sol\";\nimport \"./interface/HolographRegistryInterface.sol\";\nimport \"./interface/InitializableInterface.sol\";\n\nimport \"./struct/DeploymentConfig.sol\";\nimport \"./struct/Verification.sol\";\n\n/**\n * @title Holograph Treasury\n * @author https://github.com/holographxyz\n * @notice This contract holds and manages the protocol treasury\n * @dev As of now this is an empty zero logic contract and is still a work in progress\n */\ncontract HolographTreasury is Admin, Initializable, HolographTreasuryInterface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.bridge')) - 1)\n */\n bytes32 constant _bridgeSlot = 0xeb87cbb21687feb327e3d58c6c16d552231d12c7a0e8115042a4165fac8a77f9;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\n */\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.operator')) - 1)\n */\n bytes32 constant _operatorSlot = 0x7caba557ad34138fa3b7e43fb574e0e6cc10481c3073e0dffbc560db81b5c60f;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\n */\n bytes32 constant _registrySlot = 0xce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address bridge, address holograph, address operator, address registry) = abi.decode(\n initPayload,\n (address, address, address, address)\n );\n assembly {\n sstore(_adminSlot, origin())\n\n sstore(_bridgeSlot, bridge)\n sstore(_holographSlot, holograph)\n sstore(_operatorSlot, operator)\n sstore(_registrySlot, registry)\n }\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @notice Get the address of the Holograph Bridge module\n * @dev Used for beaming holographable assets cross-chain\n */\n function getBridge() external view returns (address bridge) {\n assembly {\n bridge := sload(_bridgeSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Bridge module address\n * @param bridge address of the Holograph Bridge smart contract to use\n */\n function setBridge(address bridge) external onlyAdmin {\n assembly {\n sstore(_bridgeSlot, bridge)\n }\n }\n\n /**\n * @notice Get the Holograph Protocol contract\n * @dev This contract stores a reference to all the primary modules and variables of the protocol\n */\n function getHolograph() external view returns (address holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Protocol contract address\n * @param holograph address of the Holograph Protocol smart contract to use\n */\n function setHolograph(address holograph) external onlyAdmin {\n assembly {\n sstore(_holographSlot, holograph)\n }\n }\n\n /**\n * @notice Get the address of the Holograph Operator module\n * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module\n */\n function getOperator() external view returns (address operator) {\n assembly {\n operator := sload(_operatorSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Operator module address\n * @param operator address of the Holograph Operator smart contract to use\n */\n function setOperator(address operator) external onlyAdmin {\n assembly {\n sstore(_operatorSlot, operator)\n }\n }\n\n /**\n * @notice Get the Holograph Registry module\n * @dev This module stores a reference for all deployed holographable smart contracts\n */\n function getRegistry() external view returns (address registry) {\n assembly {\n registry := sload(_registrySlot)\n }\n }\n\n /**\n * @notice Update the Holograph Registry module address\n * @param registry address of the Holograph Registry smart contract to use\n */\n function setRegistry(address registry) external onlyAdmin {\n assembly {\n sstore(_registrySlot, registry)\n }\n }\n\n function _bridge() private view returns (address bridge) {\n assembly {\n bridge := sload(_bridgeSlot)\n }\n }\n\n function _holograph() private view returns (address holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n function _operator() private view returns (address operator) {\n assembly {\n operator := sload(_operatorSlot)\n }\n }\n\n function _registry() private view returns (address registry) {\n assembly {\n registry := sload(_registrySlot)\n }\n }\n\n /**\n * @dev Purposefully left empty to ensure ether transfers use least amount of gas possible\n */\n receive() external payable {}\n\n /**\n * @dev Purposefully reverts to prevent any calls to undefined functions\n */\n fallback() external payable {\n revert();\n }\n}\n" + }, + "contracts/interface/CollectionURI.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\ninterface CollectionURI {\n function contractURI() external view returns (string memory);\n}\n" + }, + "contracts/interface/CrossChainMessageInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\ninterface CrossChainMessageInterface {\n function send(\n uint256 gasLimit,\n uint256 gasPrice,\n uint32 toChain,\n address msgSender,\n uint256 msgValue,\n bytes calldata crossChainPayload\n ) external payable;\n\n function getMessageFee(\n uint32 toChain,\n uint256 gasLimit,\n uint256 gasPrice,\n bytes calldata crossChainPayload\n ) external view returns (uint256 hlgFee, uint256 msgFee, uint256 dstGasPrice);\n\n function getHlgFee(\n uint32 toChain,\n uint256 gasLimit,\n uint256 gasPrice,\n bytes calldata crossChainPayload\n ) external view returns (uint256 hlgFee);\n}\n" + }, + "contracts/interface/ERC1271.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1271.sol)\n\npragma solidity 0.8.13;\n\n/**\n * @dev Interface of the ERC1271 standard signature validation method for\n * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271].\n *\n * _Available since v4.1._\n */\ninterface ERC1271 {\n /**\n * @dev Should return whether the signature provided is valid for the provided data\n * @param hash Hash of the data to be signed\n * @param signature Signature byte array associated with _data\n */\n function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue);\n}\n" + }, + "contracts/interface/ERC165.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity 0.8.13;\n\ninterface ERC165 {\n /// @notice Query if a contract implements an interface\n /// @param interfaceID The interface identifier, as specified in ERC-165\n /// @dev Interface identification is specified in ERC-165. This function\n /// uses less than 30,000 gas.\n /// @return `true` if the contract implements `interfaceID` and\n /// `interfaceID` is not 0xffffffff, `false` otherwise\n function supportsInterface(bytes4 interfaceID) external view returns (bool);\n}\n" + }, + "contracts/interface/ERC20.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity 0.8.13;\n\ninterface ERC20 {\n function totalSupply() external view returns (uint256);\n\n function balanceOf(address _owner) external view returns (uint256 balance);\n\n function transfer(address _to, uint256 _value) external returns (bool success);\n\n function transferFrom(address _from, address _to, uint256 _value) external returns (bool success);\n\n function approve(address _spender, uint256 _value) external returns (bool success);\n\n function allowance(address _owner, address _spender) external view returns (uint256 remaining);\n\n event Transfer(address indexed _from, address indexed _to, uint256 _value);\n\n event Approval(address indexed _owner, address indexed _spender, uint256 _value);\n}\n" + }, + "contracts/interface/ERC20Burnable.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity 0.8.13;\n\ninterface ERC20Burnable {\n function burn(uint256 amount) external;\n\n function burnFrom(address account, uint256 amount) external returns (bool);\n}\n" + }, + "contracts/interface/ERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity 0.8.13;\n\ninterface ERC20Metadata {\n function decimals() external view returns (uint8);\n\n function name() external view returns (string memory);\n\n function symbol() external view returns (string memory);\n}\n" + }, + "contracts/interface/ERC20Permit.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)\n\npragma solidity 0.8.13;\n\n/**\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n */\ninterface ERC20Permit {\n /**\n * @dev Sets `value` as the allowance of `spender` over ``account``'s tokens,\n * given ``account``'s signed approval.\n *\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n * ordering also apply here.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `deadline` must be a timestamp in the future.\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `account`\n * over the EIP712-formatted function arguments.\n * - the signature must use ``account``'s current nonce (see {nonces}).\n *\n * For more information on the signature format, see the\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n * section].\n */\n function permit(\n address account,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n /**\n * @dev Returns the current nonce for `account`. This value must be\n * included whenever a signature is generated for {permit}.\n *\n * Every successful call to {permit} increases ``account``'s nonce by one. This\n * prevents a signature from being used multiple times.\n */\n function nonces(address account) external view returns (uint256);\n\n /**\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n" + }, + "contracts/interface/ERC20Receiver.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity 0.8.13;\n\ninterface ERC20Receiver {\n function onERC20Received(\n address account,\n address recipient,\n uint256 amount,\n bytes memory data\n ) external returns (bytes4);\n}\n" + }, + "contracts/interface/ERC20Safer.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity 0.8.13;\n\ninterface ERC20Safer {\n function safeTransfer(address recipient, uint256 amount) external returns (bool);\n\n function safeTransfer(address recipient, uint256 amount, bytes memory data) external returns (bool);\n\n function safeTransferFrom(address account, address recipient, uint256 amount) external returns (bool);\n\n function safeTransferFrom(\n address account,\n address recipient,\n uint256 amount,\n bytes memory data\n ) external returns (bool);\n}\n" + }, + "contracts/interface/ERC721.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity 0.8.13;\n\n/// @title ERC-721 Non-Fungible Token Standard\n/// @dev See https://eips.ethereum.org/EIPS/eip-721\n/// Note: the ERC-165 identifier for this interface is 0x80ac58cd.\n/* is ERC165 */\ninterface ERC721 {\n /// @dev This emits when ownership of any NFT changes by any mechanism.\n /// This event emits when NFTs are created (`from` == 0) and destroyed\n /// (`to` == 0). Exception: during contract creation, any number of NFTs\n /// may be created and assigned without emitting Transfer. At the time of\n /// any transfer, the approved address for that NFT (if any) is reset to none.\n event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId);\n\n /// @dev This emits when the approved address for an NFT is changed or\n /// reaffirmed. The zero address indicates there is no approved address.\n /// When a Transfer event emits, this also indicates that the approved\n /// address for that NFT (if any) is reset to none.\n event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId);\n\n /// @dev This emits when an operator is enabled or disabled for an owner.\n /// The operator can manage all NFTs of the owner.\n event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved);\n\n /// @notice Count all NFTs assigned to an owner\n /// @dev NFTs assigned to the zero address are considered invalid, and this\n /// function throws for queries about the zero address.\n /// @param _owner An address for whom to query the balance\n /// @return The number of NFTs owned by `_owner`, possibly zero\n function balanceOf(address _owner) external view returns (uint256);\n\n /// @notice Find the owner of an NFT\n /// @dev NFTs assigned to zero address are considered invalid, and queries\n /// about them do throw.\n /// @param _tokenId The identifier for an NFT\n /// @return The address of the owner of the NFT\n function ownerOf(uint256 _tokenId) external view returns (address);\n\n /// @notice Transfers the ownership of an NFT from one address to another address\n /// @dev Throws unless `msg.sender` is the current owner, an authorized\n /// operator, or the approved address for this NFT. Throws if `_from` is\n /// not the current owner. Throws if `_to` is the zero address. Throws if\n /// `_tokenId` is not a valid NFT. When transfer is complete, this function\n /// checks if `_to` is a smart contract (code size > 0). If so, it calls\n /// `onERC721Received` on `_to` and throws if the return value is not\n /// `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`.\n /// @param _from The current owner of the NFT\n /// @param _to The new owner\n /// @param _tokenId The NFT to transfer\n /// @param data Additional data with no specified format, sent in call to `_to`\n function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes calldata data) external payable;\n\n /// @notice Transfers the ownership of an NFT from one address to another address\n /// @dev This works identically to the other function with an extra data parameter,\n /// except this function just sets data to \"\".\n /// @param _from The current owner of the NFT\n /// @param _to The new owner\n /// @param _tokenId The NFT to transfer\n function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable;\n\n /// @notice Transfer ownership of an NFT -- THE CALLER IS RESPONSIBLE\n /// TO CONFIRM THAT `_to` IS CAPABLE OF RECEIVING NFTS OR ELSE\n /// THEY MAY BE PERMANENTLY LOST\n /// @dev Throws unless `msg.sender` is the current owner, an authorized\n /// operator, or the approved address for this NFT. Throws if `_from` is\n /// not the current owner. Throws if `_to` is the zero address. Throws if\n /// `_tokenId` is not a valid NFT.\n /// @param _from The current owner of the NFT\n /// @param _to The new owner\n /// @param _tokenId The NFT to transfer\n function transferFrom(address _from, address _to, uint256 _tokenId) external payable;\n\n /// @notice Change or reaffirm the approved address for an NFT\n /// @dev The zero address indicates there is no approved address.\n /// Throws unless `msg.sender` is the current NFT owner, or an authorized\n /// operator of the current owner.\n /// @param _approved The new approved NFT controller\n /// @param _tokenId The NFT to approve\n function approve(address _approved, uint256 _tokenId) external payable;\n\n /// @notice Enable or disable approval for a third party (\"operator\") to manage\n /// all of `msg.sender`'s assets\n /// @dev Emits the ApprovalForAll event. The contract MUST allow\n /// multiple operators per owner.\n /// @param _operator Address to add to the set of authorized operators\n /// @param _approved True if the operator is approved, false to revoke approval\n function setApprovalForAll(address _operator, bool _approved) external;\n\n /// @notice Get the approved address for a single NFT\n /// @dev Throws if `_tokenId` is not a valid NFT.\n /// @param _tokenId The NFT to find the approved address for\n /// @return The approved address for this NFT, or the zero address if there is none\n function getApproved(uint256 _tokenId) external view returns (address);\n\n /// @notice Query if an address is an authorized operator for another address\n /// @param _owner The address that owns the NFTs\n /// @param _operator The address that acts on behalf of the owner\n /// @return True if `_operator` is an approved operator for `_owner`, false otherwise\n function isApprovedForAll(address _owner, address _operator) external view returns (bool);\n}\n" + }, + "contracts/interface/ERC721Enumerable.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity 0.8.13;\n\n/// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension\n/// @dev See https://eips.ethereum.org/EIPS/eip-721\n/// Note: the ERC-165 identifier for this interface is 0x780e9d63.\n/* is ERC721 */\ninterface ERC721Enumerable {\n /// @notice Count NFTs tracked by this contract\n /// @return A count of valid NFTs tracked by this contract, where each one of\n /// them has an assigned and queryable owner not equal to the zero address\n function totalSupply() external view returns (uint256);\n\n /// @notice Enumerate valid NFTs\n /// @dev Throws if `_index` >= `totalSupply()`.\n /// @param _index A counter less than `totalSupply()`\n /// @return The token identifier for the `_index`th NFT,\n /// (sort order not specified)\n function tokenByIndex(uint256 _index) external view returns (uint256);\n\n /// @notice Enumerate NFTs assigned to an owner\n /// @dev Throws if `_index` >= `balanceOf(_owner)` or if\n /// `_owner` is the zero address, representing invalid NFTs.\n /// @param _owner An address where we are interested in NFTs owned by them\n /// @param _index A counter less than `balanceOf(_owner)`\n /// @return The token identifier for the `_index`th NFT assigned to `_owner`,\n /// (sort order not specified)\n function tokenOfOwnerByIndex(address _owner, uint256 _index) external view returns (uint256);\n}\n" + }, + "contracts/interface/ERC721Metadata.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity 0.8.13;\n\n/// @title ERC-721 Non-Fungible Token Standard, optional metadata extension\n/// @dev See https://eips.ethereum.org/EIPS/eip-721\n/// Note: the ERC-165 identifier for this interface is 0x5b5e139f.\n/* is ERC721 */\ninterface ERC721Metadata {\n /// @notice A descriptive name for a collection of NFTs in this contract\n function name() external view returns (string memory _name);\n\n /// @notice An abbreviated name for NFTs in this contract\n function symbol() external view returns (string memory _symbol);\n\n /// @notice A distinct Uniform Resource Identifier (URI) for a given asset.\n /// @dev Throws if `_tokenId` is not a valid NFT. URIs are defined in RFC\n /// 3986. The URI may point to a JSON file that conforms to the \"ERC721\n /// Metadata JSON Schema\".\n function tokenURI(uint256 _tokenId) external view returns (string memory);\n}\n" + }, + "contracts/interface/ERC721TokenReceiver.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\n/// @dev Note: the ERC-165 identifier for this interface is 0x150b7a02.\ninterface ERC721TokenReceiver {\n /// @notice Handle the receipt of an NFT\n /// @dev The ERC721 smart contract calls this function on the recipient\n /// after a `transfer`. This function MAY throw to revert and reject the\n /// transfer. Return of other than the magic value MUST result in the\n /// transaction being reverted.\n /// Note: the contract address is always the message sender.\n /// @param _operator The address which called `safeTransferFrom` function\n /// @param _from The address which previously owned the token\n /// @param _tokenId The NFT identifier which is being transferred\n /// @param _data Additional data with no specified format\n /// @return `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`\n /// unless throwing\n function onERC721Received(\n address _operator,\n address _from,\n uint256 _tokenId,\n bytes calldata _data\n ) external returns (bytes4);\n}\n" + }, + "contracts/interface/Holographable.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\ninterface Holographable {\n function bridgeIn(uint32 fromChain, bytes calldata payload) external returns (bytes4);\n\n function bridgeOut(\n uint32 toChain,\n address sender,\n bytes calldata payload\n ) external returns (bytes4 selector, bytes memory data);\n}\n" + }, + "contracts/interface/HolographBridgeInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\n/**\n * @title Holograph Bridge\n * @author https://github.com/holographxyz\n * @notice Beam any holographable contracts and assets across blockchains\n * @dev The contract abstracts all the complexities of making bridge requests and uses a universal interface to bridge any type of holographable assets\n */\ninterface HolographBridgeInterface {\n /**\n * @notice Receive a beam from another chain\n * @dev This function can only be called by the Holograph Operator module\n * @param fromChain Holograph Chain ID where the brigeOutRequest was created\n * @param holographableContract address of the destination contract that the bridgeInRequest is targeted for\n * @param hToken address of the hToken contract that wrapped the origin chain native gas token\n * @param hTokenRecipient address of recipient for the hToken reward\n * @param hTokenValue exact amount of hToken reward in wei\n * @param doNotRevert boolean used to specify if the call should revert\n * @param bridgeInPayload actual abi encoded bytes of the data that the holographable contract bridgeIn function will receive\n */\n function bridgeInRequest(\n uint256 nonce,\n uint32 fromChain,\n address holographableContract,\n address hToken,\n address hTokenRecipient,\n uint256 hTokenValue,\n bool doNotRevert,\n bytes calldata bridgeInPayload\n ) external payable;\n\n /**\n * @notice Create a beam request for a destination chain\n * @dev This function works for deploying contracts and beaming supported holographable assets across chains\n * @param toChain Holograph Chain ID where the beam is being sent to\n * @param holographableContract address of the contract for which the bridge request is being made\n * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain\n * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\n */\n function bridgeOutRequest(\n uint32 toChain,\n address holographableContract,\n uint256 gasLimit,\n uint256 gasPrice,\n bytes calldata bridgeOutPayload\n ) external payable;\n\n /**\n * @notice Do not call this function, it will always revert\n * @dev Used by getBridgeOutRequestPayload function\n * It is purposefully inverted to always revert on a successful call\n * Marked as external and not private to allow use inside try/catch of getBridgeOutRequestPayload function\n * If this function does not revert and returns a string, it is the actual revert reason\n * @param sender address of actual sender that is planning to make a bridgeOutRequest call\n * @param toChain holograph chain id of destination chain\n * @param holographableContract address of the contract for which the bridge request is being made\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\n */\n function revertedBridgeOutRequest(\n address sender,\n uint32 toChain,\n address holographableContract,\n bytes calldata bridgeOutPayload\n ) external returns (string memory revertReason);\n\n /**\n * @notice Get the payload created by the bridgeOutRequest function\n * @dev Use this function to get the payload that will be generated by a bridgeOutRequest\n * Only use this with a static call\n * @param toChain Holograph Chain ID where the beam is being sent to\n * @param holographableContract address of the contract for which the bridge request is being made\n * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain\n * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\n * @return samplePayload bytes made up of the bridgeOutRequest payload\n */\n function getBridgeOutRequestPayload(\n uint32 toChain,\n address holographableContract,\n uint256 gasLimit,\n uint256 gasPrice,\n bytes calldata bridgeOutPayload\n ) external returns (bytes memory samplePayload);\n\n /**\n * @notice Get the fees associated with sending specific payload\n * @dev Will provide exact costs on protocol and message side, combine the two to get total\n * @param toChain holograph chain id of destination chain for payload\n * @param gasLimit amount of gas to provide for executing payload on destination chain\n * @param gasPrice maximum amount to pay for gas price, can be set to 0 and will be chose automatically\n * @param crossChainPayload the entire packet being sent cross-chain\n * @return hlgFee the amount (in wei) of native gas token that will cost for finalizing job on destiantion chain\n * @return msgFee the amount (in wei) of native gas token that will cost for sending message to destiantion chain\n * @return dstGasPrice the amount (in wei) that destination message maximum gas price will be\n */\n function getMessageFee(\n uint32 toChain,\n uint256 gasLimit,\n uint256 gasPrice,\n bytes calldata crossChainPayload\n ) external view returns (uint256 hlgFee, uint256 msgFee, uint256 dstGasPrice);\n\n /**\n * @notice Get the address of the Holograph Factory module\n * @dev Used for deploying holographable smart contracts\n */\n function getFactory() external view returns (address factory);\n\n /**\n * @notice Update the Holograph Factory module address\n * @param factory address of the Holograph Factory smart contract to use\n */\n function setFactory(address factory) external;\n\n /**\n * @notice Get the Holograph Protocol contract\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\n */\n function getHolograph() external view returns (address holograph);\n\n /**\n * @notice Update the Holograph Protocol contract address\n * @param holograph address of the Holograph Protocol smart contract to use\n */\n function setHolograph(address holograph) external;\n\n /**\n * @notice Get the latest job nonce\n * @dev You can use the job nonce as a way to calculate total amount of bridge requests that have been made\n */\n function getJobNonce() external view returns (uint256 jobNonce);\n\n /**\n * @notice Get the address of the Holograph Operator module\n * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module\n */\n function getOperator() external view returns (address operator);\n\n /**\n * @notice Update the Holograph Operator module address\n * @param operator address of the Holograph Operator smart contract to use\n */\n function setOperator(address operator) external;\n\n /**\n * @notice Get the Holograph Registry module\n * @dev This module stores a reference for all deployed holographable smart contracts\n */\n function getRegistry() external view returns (address registry);\n\n /**\n * @notice Update the Holograph Registry module address\n * @param registry address of the Holograph Registry smart contract to use\n */\n function setRegistry(address registry) external;\n}\n" + }, + "contracts/interface/HolographedERC1155.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\n/// @title Holograph ERC-1155 Non-Fungible Token Standard\n/// @dev See https://holograph.network/standard/ERC-1155\n/// Note: the ERC-165 identifier for this interface is 0xFFFFFFFF.\ninterface HolographedERC1155 {\n // event id = 1\n function bridgeIn(\n uint32 _chainId,\n address _from,\n address _to,\n uint256 _tokenId,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 2\n function bridgeOut(\n uint32 _chainId,\n address _from,\n address _to,\n uint256 _tokenId,\n uint256 _amount\n ) external returns (bytes memory _data);\n\n // event id = 3\n function afterApprove(address _owner, address _to, uint256 _tokenId, uint256 _amount) external returns (bool success);\n\n // event id = 4\n function beforeApprove(\n address _owner,\n address _to,\n uint256 _tokenId,\n uint256 _amount\n ) external returns (bool success);\n\n // event id = 5\n function afterApprovalAll(address _to, bool _approved) external returns (bool success);\n\n // event id = 6\n function beforeApprovalAll(address _to, bool _approved) external returns (bool success);\n\n // event id = 7\n function afterBurn(address _owner, uint256 _tokenId, uint256 _amount) external returns (bool success);\n\n // event id = 8\n function beforeBurn(address _owner, uint256 _tokenId, uint256 _amount) external returns (bool success);\n\n // event id = 9\n function afterMint(address _owner, uint256 _tokenId, uint256 _amount) external returns (bool success);\n\n // event id = 10\n function beforeMint(address _owner, uint256 _tokenId, uint256 _amount) external returns (bool success);\n\n // event id = 11\n function afterSafeTransfer(\n address _from,\n address _to,\n uint256 _tokenId,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 12\n function beforeSafeTransfer(\n address _from,\n address _to,\n uint256 _tokenId,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 13\n function afterTransfer(\n address _from,\n address _to,\n uint256 _tokenId,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 14\n function beforeTransfer(\n address _from,\n address _to,\n uint256 _tokenId,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 15\n function afterOnERC1155Received(\n address _operator,\n address _from,\n address _to,\n uint256 _tokenId,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 16\n function beforeOnERC1155Received(\n address _operator,\n address _from,\n address _to,\n uint256 _tokenId,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n}\n" + }, + "contracts/interface/HolographedERC20.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\n/// @title Holograph ERC-20 Fungible Token Standard\n/// @dev See https://holograph.network/standard/ERC-20\n/// Note: the ERC-165 identifier for this interface is 0xFFFFFFFF.\ninterface HolographedERC20 {\n // event id = 1\n function bridgeIn(\n uint32 _chainId,\n address _from,\n address _to,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 2\n function bridgeOut(\n uint32 _chainId,\n address _from,\n address _to,\n uint256 _amount\n ) external returns (bytes memory _data);\n\n // event id = 3\n function afterApprove(address _owner, address _to, uint256 _amount) external returns (bool success);\n\n // event id = 4\n function beforeApprove(address _owner, address _to, uint256 _amount) external returns (bool success);\n\n // event id = 5\n function afterOnERC20Received(\n address _token,\n address _from,\n address _to,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 6\n function beforeOnERC20Received(\n address _token,\n address _from,\n address _to,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 7\n function afterBurn(address _owner, uint256 _amount) external returns (bool success);\n\n // event id = 8\n function beforeBurn(address _owner, uint256 _amount) external returns (bool success);\n\n // event id = 9\n function afterMint(address _owner, uint256 _amount) external returns (bool success);\n\n // event id = 10\n function beforeMint(address _owner, uint256 _amount) external returns (bool success);\n\n // event id = 11\n function afterSafeTransfer(\n address _from,\n address _to,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 12\n function beforeSafeTransfer(\n address _from,\n address _to,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 13\n function afterTransfer(address _from, address _to, uint256 _amount) external returns (bool success);\n\n // event id = 14\n function beforeTransfer(address _from, address _to, uint256 _amount) external returns (bool success);\n\n // event id = 15\n function onAllowance(address _owner, address _to, uint256 _amount) external returns (bool success);\n}\n" + }, + "contracts/interface/HolographedERC721.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\n/// @title Holograph ERC-721 Non-Fungible Token Standard\n/// @dev See https://holograph.network/standard/ERC-721\n/// Note: the ERC-165 identifier for this interface is 0xFFFFFFFF.\ninterface HolographedERC721 {\n // event id = 1\n function bridgeIn(\n uint32 _chainId,\n address _from,\n address _to,\n uint256 _tokenId,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 2\n function bridgeOut(\n uint32 _chainId,\n address _from,\n address _to,\n uint256 _tokenId\n ) external returns (bytes memory _data);\n\n // event id = 3\n function afterApprove(address _owner, address _to, uint256 _tokenId) external returns (bool success);\n\n // event id = 4\n function beforeApprove(address _owner, address _to, uint256 _tokenId) external returns (bool success);\n\n // event id = 5\n function afterApprovalAll(address _sender, address _to, bool _approved) external returns (bool success);\n\n // event id = 6\n function beforeApprovalAll(address _sender, address _to, bool _approved) external returns (bool success);\n\n // event id = 7\n function afterBurn(address _owner, uint256 _tokenId) external returns (bool success);\n\n // event id = 8\n function beforeBurn(address _owner, uint256 _tokenId) external returns (bool success);\n\n // event id = 9\n function afterMint(address _owner, uint256 _tokenId) external returns (bool success);\n\n // event id = 10\n function beforeMint(address _owner, uint256 _tokenId) external returns (bool success);\n\n // event id = 11\n function afterSafeTransfer(\n address _from,\n address _to,\n uint256 _tokenId,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 12\n function beforeSafeTransfer(\n address _from,\n address _to,\n uint256 _tokenId,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 13\n function afterTransfer(\n address _from,\n address _to,\n uint256 _tokenId,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 14\n function beforeTransfer(\n address _from,\n address _to,\n uint256 _tokenId,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 15\n function afterOnERC721Received(\n address _operator,\n address _from,\n address _to,\n uint256 _tokenId,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 16\n function beforeOnERC721Received(\n address _operator,\n address _from,\n address _to,\n uint256 _tokenId,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 17\n function onIsApprovedForAll(address _wallet, address _operator) external view returns (bool approved);\n\n // event id = 18\n function contractURI() external view returns (string memory contractJSON);\n}\n" + }, + "contracts/interface/HolographedGeneric.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\n/// @title Holograph Generic Standard\ninterface HolographedGeneric {\n // event id = 1\n function bridgeIn(uint32 _chainId, bytes calldata _data) external returns (bool success);\n\n // event id = 2\n function bridgeOut(uint32 _chainId, address _sender, bytes calldata _payload) external returns (bytes memory _data);\n}\n" + }, + "contracts/interface/HolographERC20Interface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./ERC20.sol\";\nimport \"./ERC20Burnable.sol\";\nimport \"./ERC20Metadata.sol\";\nimport \"./ERC20Permit.sol\";\nimport \"./ERC20Receiver.sol\";\nimport \"./ERC20Safer.sol\";\nimport \"./ERC165.sol\";\nimport \"./Holographable.sol\";\n\ninterface HolographERC20Interface is\n ERC165,\n ERC20,\n ERC20Burnable,\n ERC20Metadata,\n ERC20Receiver,\n ERC20Safer,\n ERC20Permit,\n Holographable\n{\n function holographBridgeMint(address to, uint256 amount) external returns (bytes4);\n\n function sourceBurn(address from, uint256 amount) external;\n\n function sourceMint(address to, uint256 amount) external;\n\n function sourceMintBatch(address[] calldata wallets, uint256[] calldata amounts) external;\n\n function sourceTransfer(address from, address to, uint256 amount) external;\n\n function sourceTransfer(address payable destination, uint256 amount) external;\n\n function sourceExternalCall(address target, bytes calldata data) external;\n}\n" + }, + "contracts/interface/HolographERC721Interface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./CollectionURI.sol\";\nimport \"./ERC165.sol\";\nimport \"./ERC721.sol\";\nimport \"./ERC721Enumerable.sol\";\nimport \"./ERC721Metadata.sol\";\nimport \"./ERC721TokenReceiver.sol\";\nimport \"./Holographable.sol\";\n\ninterface HolographERC721Interface is\n ERC165,\n ERC721,\n ERC721Enumerable,\n ERC721Metadata,\n ERC721TokenReceiver,\n CollectionURI,\n Holographable\n{\n function approve(address to, uint256 tokenId) external payable;\n\n function burn(uint256 tokenId) external;\n\n function safeTransferFrom(address from, address to, uint256 tokenId) external payable;\n\n function setApprovalForAll(address to, bool approved) external;\n\n function sourceBurn(uint256 tokenId) external;\n\n function sourceMint(address to, uint224 tokenId) external;\n\n function sourceGetChainPrepend() external view returns (uint256);\n\n function sourceTransfer(address to, uint256 tokenId) external;\n\n function sourceExternalCall(address target, bytes calldata data) external;\n\n function transfer(address to, uint256 tokenId) external payable;\n\n function contractURI() external view returns (string memory);\n\n function getApproved(uint256 tokenId) external view returns (address);\n\n function isApprovedForAll(address wallet, address operator) external view returns (bool);\n\n function name() external view returns (string memory);\n\n function burned(uint256 tokenId) external view returns (bool);\n\n function decimals() external pure returns (uint256);\n\n function exists(uint256 tokenId) external view returns (bool);\n\n function ownerOf(uint256 tokenId) external view returns (address);\n\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n\n function symbol() external view returns (string memory);\n\n function tokenByIndex(uint256 index) external view returns (uint256);\n\n function tokenOfOwnerByIndex(address wallet, uint256 index) external view returns (uint256);\n\n function tokensOfOwner(address wallet) external view returns (uint256[] memory);\n\n function tokenURI(uint256 tokenId) external view returns (string memory);\n\n function totalSupply() external view returns (uint256);\n}\n" + }, + "contracts/interface/HolographerInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\ninterface HolographerInterface {\n function getContractType() external view returns (bytes32 contractType);\n\n function getDeploymentBlock() external view returns (uint256 deploymentBlock);\n\n function getHolograph() external view returns (address holograph);\n\n function getHolographEnforcer() external view returns (address);\n\n function getOriginChain() external view returns (uint32 originChain);\n\n function getSourceContract() external view returns (address sourceContract);\n}\n" + }, + "contracts/interface/HolographFactoryInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../struct/DeploymentConfig.sol\";\nimport \"../struct/Verification.sol\";\n\n/**\n * @title Holograph Factory\n * @author https://github.com/holographxyz\n * @notice Deploy holographable contracts\n * @dev The contract provides methods that allow for the creation of Holograph Protocol compliant smart contracts, that are capable of minting holographable assets\n */\ninterface HolographFactoryInterface {\n /**\n * @dev This event is fired every time that a bridgeable contract is deployed.\n */\n event BridgeableContractDeployed(address indexed contractAddress, bytes32 indexed hash);\n\n /**\n * @notice Deploy a holographable smart contract\n * @dev Using this function allows to deploy smart contracts that have the same address across all EVM chains\n * @param config contract deployement configurations\n * @param signature that was created by the wallet that created the original payload\n * @param signer address of wallet that created the payload\n */\n function deployHolographableContract(\n DeploymentConfig memory config,\n Verification memory signature,\n address signer\n ) external;\n\n /**\n * @notice Get the Holograph Protocol contract\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\n */\n function getHolograph() external view returns (address holograph);\n\n /**\n * @notice Update the Holograph Protocol contract address\n * @param holograph address of the Holograph Protocol smart contract to use\n */\n function setHolograph(address holograph) external;\n\n /**\n * @notice Get the Holograph Registry module\n * @dev This module stores a reference for all deployed holographable smart contracts\n */\n function getRegistry() external view returns (address registry);\n\n /**\n * @notice Update the Holograph Registry module address\n * @param registry address of the Holograph Registry smart contract to use\n */\n function setRegistry(address registry) external;\n}\n" + }, + "contracts/interface/HolographGenericInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./ERC165.sol\";\nimport \"./Holographable.sol\";\n\ninterface HolographGenericInterface is ERC165, Holographable {\n function sourceEmit(bytes calldata eventData) external;\n\n function sourceEmit(bytes32 eventId, bytes calldata eventData) external;\n\n function sourceEmit(bytes32 eventId, bytes32 topic1, bytes calldata eventData) external;\n\n function sourceEmit(bytes32 eventId, bytes32 topic1, bytes32 topic2, bytes calldata eventData) external;\n\n function sourceEmit(\n bytes32 eventId,\n bytes32 topic1,\n bytes32 topic2,\n bytes32 topic3,\n bytes calldata eventData\n ) external;\n}\n" + }, + "contracts/interface/HolographInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\n/**\n * @title Holograph Protocol\n * @author https://github.com/holographxyz\n * @notice This is the primary Holograph Protocol smart contract\n * @dev This contract stores a reference to all the primary modules and variables of the protocol\n */\ninterface HolographInterface {\n /**\n * @notice Get the address of the Holograph Bridge module\n * @dev Used for beaming holographable assets cross-chain\n */\n function getBridge() external view returns (address bridge);\n\n /**\n * @notice Update the Holograph Bridge module address\n * @param bridge address of the Holograph Bridge smart contract to use\n */\n function setBridge(address bridge) external;\n\n /**\n * @notice Get the chain ID that the Protocol was deployed on\n * @dev Useful for checking if/when a hard fork occurs\n */\n function getChainId() external view returns (uint256 chainId);\n\n /**\n * @notice Update the chain ID\n * @dev Useful for updating once a hard fork has been mitigated\n * @param chainId EVM chain ID to use\n */\n function setChainId(uint256 chainId) external;\n\n /**\n * @notice Get the address of the Holograph Factory module\n * @dev Used for deploying holographable smart contracts\n */\n function getFactory() external view returns (address factory);\n\n /**\n * @notice Update the Holograph Factory module address\n * @param factory address of the Holograph Factory smart contract to use\n */\n function setFactory(address factory) external;\n\n /**\n * @notice Get the Holograph chain Id\n * @dev Holograph uses an internal chain id mapping\n */\n function getHolographChainId() external view returns (uint32 holographChainId);\n\n /**\n * @notice Update the Holograph chain ID\n * @dev Useful for updating once a hard fork was mitigated\n * @param holographChainId Holograph chain ID to use\n */\n function setHolographChainId(uint32 holographChainId) external;\n\n /**\n * @notice Get the address of the Holograph Interfaces module\n * @dev Holograph uses this contract to store data that needs to be accessed by a large portion of the modules\n */\n function getInterfaces() external view returns (address interfaces);\n\n /**\n * @notice Update the Holograph Interfaces module address\n * @param interfaces address of the Holograph Interfaces smart contract to use\n */\n function setInterfaces(address interfaces) external;\n\n /**\n * @notice Get the address of the Holograph Operator module\n * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module\n */\n function getOperator() external view returns (address operator);\n\n /**\n * @notice Update the Holograph Operator module address\n * @param operator address of the Holograph Operator smart contract to use\n */\n function setOperator(address operator) external;\n\n /**\n * @notice Get the Holograph Registry module\n * @dev This module stores a reference for all deployed holographable smart contracts\n */\n function getRegistry() external view returns (address registry);\n\n /**\n * @notice Update the Holograph Registry module address\n * @param registry address of the Holograph Registry smart contract to use\n */\n function setRegistry(address registry) external;\n\n /**\n * @notice Get the Holograph Treasury module\n * @dev All of the Holograph Protocol assets are stored and managed by this module\n */\n function getTreasury() external view returns (address treasury);\n\n /**\n * @notice Update the Holograph Treasury module address\n * @param treasury address of the Holograph Treasury smart contract to use\n */\n function setTreasury(address treasury) external;\n\n /**\n * @notice Get the Holograph Utility Token address\n * @dev This is the official utility token of the Holograph Protocol\n */\n function getUtilityToken() external view returns (address utilityToken);\n\n /**\n * @notice Update the Holograph Utility Token address\n * @param utilityToken address of the Holograph Utility Token smart contract to use\n */\n function setUtilityToken(address utilityToken) external;\n}\n" + }, + "contracts/interface/HolographInterfacesInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../enum/ChainIdType.sol\";\nimport \"../enum/InterfaceType.sol\";\nimport \"../enum/TokenUriType.sol\";\n\ninterface HolographInterfacesInterface {\n function contractURI(\n string calldata name,\n string calldata imageURL,\n string calldata externalLink,\n uint16 bps,\n address contractAddress\n ) external pure returns (string memory);\n\n function getUriPrepend(TokenUriType uriType) external view returns (string memory prepend);\n\n function updateUriPrepend(TokenUriType uriType, string calldata prepend) external;\n\n function updateUriPrepends(TokenUriType[] calldata uriTypes, string[] calldata prepends) external;\n\n function getChainId(\n ChainIdType fromChainType,\n uint256 fromChainId,\n ChainIdType toChainType\n ) external view returns (uint256 toChainId);\n\n function updateChainIdMap(\n ChainIdType fromChainType,\n uint256 fromChainId,\n ChainIdType toChainType,\n uint256 toChainId\n ) external;\n\n function updateChainIdMaps(\n ChainIdType[] calldata fromChainType,\n uint256[] calldata fromChainId,\n ChainIdType[] calldata toChainType,\n uint256[] calldata toChainId\n ) external;\n\n function supportsInterface(InterfaceType interfaceType, bytes4 interfaceId) external view returns (bool);\n\n function updateInterface(InterfaceType interfaceType, bytes4 interfaceId, bool supported) external;\n\n function updateInterfaces(InterfaceType interfaceType, bytes4[] calldata interfaceIds, bool supported) external;\n}\n" + }, + "contracts/interface/HolographOperatorInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../struct/OperatorJob.sol\";\n\ninterface HolographOperatorInterface {\n /**\n * @dev Event is emitted for every time that a valid job is available.\n */\n event AvailableOperatorJob(bytes32 jobHash, bytes payload);\n\n /**\n * @dev Event is emitted for every time that a job is completed.\n */\n event FinishedOperatorJob(bytes32 jobHash, address operator);\n\n /**\n * @dev Event is emitted every time a cross-chain message is sent\n */\n event CrossChainMessageSent(bytes32 messageHash);\n\n /**\n * @dev Event is emitted if an operator job execution fails\n */\n event FailedOperatorJob(bytes32 jobHash);\n\n /**\n * @notice Execute an available operator job\n * @dev When making this call, if operating criteria is not met, the call will revert\n * @param bridgeInRequestPayload the entire cross chain message payload\n */\n function executeJob(bytes calldata bridgeInRequestPayload) external payable;\n\n function nonRevertingBridgeCall(address msgSender, bytes calldata payload) external payable;\n\n /**\n * @notice Receive a cross-chain message\n * @dev This function is restricted for use by Holograph Messaging Module only\n */\n function crossChainMessage(bytes calldata bridgeInRequestPayload) external payable;\n\n /**\n * @notice Calculate the amount of gas needed to execute a bridgeInRequest\n * @dev Use this function to estimate the amount of gas that will be used by the bridgeInRequest function\n * Set a specific gas limit when making this call, subtract return value, to get total gas used\n * Only use this with a static call\n * @param bridgeInRequestPayload abi encoded bytes making up the bridgeInRequest payload\n * @return the gas amount remaining after the static call is returned\n */\n function jobEstimator(bytes calldata bridgeInRequestPayload) external payable returns (uint256);\n\n /**\n * @notice Send cross chain bridge request message\n * @dev This function is restricted to only be callable by Holograph Bridge\n * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain\n * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain\n * @param toChain Holograph Chain ID where the beam is being sent to\n * @param nonce incremented number used to ensure job hashes are unique\n * @param holographableContract address of the contract for which the bridge request is being made\n * @param bridgeOutPayload bytes made up of the bridgeOutRequest payload\n */\n function send(\n uint256 gasLimit,\n uint256 gasPrice,\n uint32 toChain,\n address msgSender,\n uint256 nonce,\n address holographableContract,\n bytes calldata bridgeOutPayload\n ) external payable;\n\n /**\n * @notice Get the fees associated with sending specific payload\n * @dev Will provide exact costs on protocol and message side, combine the two to get total\n * @param toChain holograph chain id of destination chain for payload\n * @param gasLimit amount of gas to provide for executing payload on destination chain\n * @param gasPrice maximum amount to pay for gas price, can be set to 0 and will be chose automatically\n * @param crossChainPayload the entire packet being sent cross-chain\n * @return hlgFee the amount (in wei) of native gas token that will cost for finalizing job on destiantion chain\n * @return msgFee the amount (in wei) of native gas token that will cost for sending message to destiantion chain\n * @return dstGasPrice the amount (in wei) that destination message maximum gas price will be\n */\n function getMessageFee(\n uint32 toChain,\n uint256 gasLimit,\n uint256 gasPrice,\n bytes calldata crossChainPayload\n ) external view returns (uint256 hlgFee, uint256 msgFee, uint256 dstGasPrice);\n\n /**\n * @notice Get the details for an available operator job\n * @dev The job hash is a keccak256 hash of the entire job payload\n * @param jobHash keccak256 hash of the job\n * @return an OperatorJob struct with details about a specific job\n */\n function getJobDetails(bytes32 jobHash) external view returns (OperatorJob memory);\n\n /**\n * @notice Get number of pods available\n * @dev This returns number of pods that have been opened via bonding\n */\n function getTotalPods() external view returns (uint256 totalPods);\n\n /**\n * @notice Get total number of operators in a pod\n * @dev Use in conjunction with paginated getPodOperators function\n * @param pod the pod to query\n * @return total operators in a pod\n */\n function getPodOperatorsLength(uint256 pod) external view returns (uint256);\n\n /**\n * @notice Get list of operators in a pod\n * @dev Use paginated getPodOperators function instead if list gets too long\n * @param pod the pod to query\n * @return operators array list of operators in a pod\n */\n function getPodOperators(uint256 pod) external view returns (address[] memory operators);\n\n /**\n * @notice Get paginated list of operators in a pod\n * @dev Use in conjunction with getPodOperatorsLength to know the total length of results\n * @param pod the pod to query\n * @param index the array index to start from\n * @param length the length of result set to be (will be shorter if reached end of array)\n * @return operators a paginated array of operators\n */\n function getPodOperators(\n uint256 pod,\n uint256 index,\n uint256 length\n ) external view returns (address[] memory operators);\n\n /**\n * @notice Check the base and current price for bonding to a particular pod\n * @dev Useful for understanding what is required for bonding to a pod\n * @param pod the pod to get bonding amounts for\n * @return base the base bond amount required for a pod\n * @return current the current bond amount required for a pod\n */\n function getPodBondAmounts(uint256 pod) external view returns (uint256 base, uint256 current);\n\n /**\n * @notice Get an operator's currently bonded amount\n * @dev Useful for checking how much an operator has bonded\n * @param operator address of operator to check\n * @return amount total number of utility token bonded\n */\n function getBondedAmount(address operator) external view returns (uint256 amount);\n\n /**\n * @notice Get an operator's currently bonded pod\n * @dev Useful for checking if an operator is currently bonded\n * @param operator address of operator to check\n * @return pod number that operator is bonded on, returns zero if not bonded or selected for job\n */\n function getBondedPod(address operator) external view returns (uint256 pod);\n\n /**\n * @notice Get an operator's currently bonded pod index\n * @dev Useful for checking if an operator is a fallback for active job\n * @param operator address of operator to check\n * @return index currently bonded pod's operator index, returns zero if not in pod or moved out for active job\n */\n function getBondedPodIndex(address operator) external view returns (uint256 index);\n\n /**\n * @notice Topup a bonded operator with more utility tokens\n * @dev Useful function if an operator got slashed and wants to add a safety buffer to not get unbonded\n * @param operator address of operator to topup\n * @param amount utility token amount to add\n */\n function topupUtilityToken(address operator, uint256 amount) external;\n\n /**\n * @notice Bond utility tokens and become an operator\n * @dev An operator can only bond to one pod at a time, per network\n * @param operator address of operator to bond (can be an ownable smart contract)\n * @param amount utility token amount to bond (can be greater than minimum)\n * @param pod number of pod to bond to (can be for one that does not exist yet)\n */\n function bondUtilityToken(address operator, uint256 amount, uint256 pod) external;\n\n /**\n * @notice Unbond HLG utility tokens and stop being an operator\n * @dev A bonded operator selected for a job cannot unbond until they complete the job, or are slashed\n * @param operator address of operator to unbond\n * @param recipient address where to send the bonded tokens\n */\n function unbondUtilityToken(address operator, address recipient) external;\n\n /**\n * @notice Get the address of the Holograph Bridge module\n * @dev Used for beaming holographable assets cross-chain\n */\n function getBridge() external view returns (address bridge);\n\n /**\n * @notice Update the Holograph Bridge module address\n * @param bridge address of the Holograph Bridge smart contract to use\n */\n function setBridge(address bridge) external;\n\n /**\n * @notice Get the Holograph Protocol contract\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\n */\n function getHolograph() external view returns (address holograph);\n\n /**\n * @notice Update the Holograph Protocol contract address\n * @param holograph address of the Holograph Protocol smart contract to use\n */\n function setHolograph(address holograph) external;\n\n /**\n * @notice Get the address of the Holograph Interfaces module\n * @dev Holograph uses this contract to store data that needs to be accessed by a large portion of the modules\n */\n function getInterfaces() external view returns (address interfaces);\n\n /**\n * @notice Update the Holograph Interfaces module address\n * @param interfaces address of the Holograph Interfaces smart contract to use\n */\n function setInterfaces(address interfaces) external;\n\n /**\n * @notice Get the address of the Holograph Messaging Module\n * @dev All cross-chain message requests will get forwarded to this adress\n */\n function getMessagingModule() external view returns (address messagingModule);\n\n /**\n * @notice Update the Holograph Messaging Module address\n * @param messagingModule address of the LayerZero Endpoint to use\n */\n function setMessagingModule(address messagingModule) external;\n\n /**\n * @notice Get the Holograph Registry module\n * @dev This module stores a reference for all deployed holographable smart contracts\n */\n function getRegistry() external view returns (address registry);\n\n /**\n * @notice Update the Holograph Registry module address\n * @param registry address of the Holograph Registry smart contract to use\n */\n function setRegistry(address registry) external;\n\n /**\n * @notice Get the Holograph Utility Token address\n * @dev This is the official utility token of the Holograph Protocol\n */\n function getUtilityToken() external view returns (address utilityToken);\n\n /**\n * @notice Update the Holograph Utility Token address\n * @param utilityToken address of the Holograph Utility Token smart contract to use\n */\n function setUtilityToken(address utilityToken) external;\n\n /**\n * @notice Get the Minimum Gas Price\n * @dev This amount is used as the value that will define a job as underpriced is lower than\n */\n function getMinGasPrice() external view returns (uint256 minGasPrice);\n\n /**\n * @notice Update the Minimum Gas Price\n * @param minGasPrice amount to set for minimum gas price\n */\n function setMinGasPrice(uint256 minGasPrice) external;\n}\n" + }, + "contracts/interface/HolographRegistryInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\ninterface HolographRegistryInterface {\n event HolographableContractEvent(address indexed _holographableContract, bytes _payload);\n\n function isHolographedContract(address smartContract) external view returns (bool);\n\n function isHolographedHashDeployed(bytes32 hash) external view returns (bool);\n\n function referenceContractTypeAddress(address contractAddress) external returns (bytes32);\n\n function getContractTypeAddress(bytes32 contractType) external view returns (address);\n\n function setContractTypeAddress(bytes32 contractType, address contractAddress) external;\n\n function getHolograph() external view returns (address holograph);\n\n function setHolograph(address holograph) external;\n\n function getHolographableContracts(uint256 index, uint256 length) external view returns (address[] memory contracts);\n\n function getHolographableContractsLength() external view returns (uint256);\n\n function getHolographedHashAddress(bytes32 hash) external view returns (address);\n\n function setHolographedHashAddress(bytes32 hash, address contractAddress) external;\n\n function getHToken(uint32 chainId) external view returns (address);\n\n function setHToken(uint32 chainId, address hToken) external;\n\n function getReservedContractTypeAddress(bytes32 contractType) external view returns (address contractTypeAddress);\n\n function setReservedContractTypeAddress(bytes32 hash, bool reserved) external;\n\n function setReservedContractTypeAddresses(bytes32[] calldata hashes, bool[] calldata reserved) external;\n\n function getUtilityToken() external view returns (address utilityToken);\n\n function setUtilityToken(address utilityToken) external;\n\n function holographableEvent(bytes calldata payload) external;\n}\n" + }, + "contracts/interface/HolographRoyaltiesInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../struct/ZoraBidShares.sol\";\n\ninterface HolographRoyaltiesInterface {\n function initHolographRoyalties(bytes memory data) external returns (bytes4);\n\n function configurePayouts(address payable[] memory addresses, uint256[] memory bps) external;\n\n function getPayoutInfo() external view returns (address payable[] memory addresses, uint256[] memory bps);\n\n function getEthPayout() external;\n\n function getTokenPayout(address tokenAddress) external;\n\n function getTokensPayout(address[] memory tokenAddresses) external;\n\n function supportsInterface(bytes4 interfaceId) external pure returns (bool);\n\n function setRoyalties(uint256 tokenId, address payable receiver, uint256 bp) external;\n\n function royaltyInfo(uint256 tokenId, uint256 value) external view returns (address, uint256);\n\n function getFeeBps(uint256 tokenId) external view returns (uint256[] memory);\n\n function getFeeRecipients(uint256 tokenId) external view returns (address payable[] memory);\n\n function getRoyalties(uint256 tokenId) external view returns (address payable[] memory, uint256[] memory);\n\n function getFees(uint256 tokenId) external view returns (address payable[] memory, uint256[] memory);\n\n function tokenCreator(address /* contractAddress*/, uint256 tokenId) external view returns (address);\n\n function calculateRoyaltyFee(\n address /* contractAddress */,\n uint256 tokenId,\n uint256 amount\n ) external view returns (uint256);\n\n function marketContract() external view returns (address);\n\n function tokenCreators(uint256 tokenId) external view returns (address);\n\n function bidSharesForToken(uint256 tokenId) external view returns (HolographBidShares memory bidShares);\n\n function getStorageSlot(string calldata slot) external pure returns (bytes32);\n\n function getTokenAddress(string memory tokenName) external view returns (address);\n}\n" + }, + "contracts/interface/HolographTreasuryInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\ninterface HolographTreasuryInterface {\n // purposefully left blank\n}\n" + }, + "contracts/interface/InitializableInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\n/**\n * @title Initializable\n * @author https://github.com/holographxyz\n * @notice Use init instead of constructor\n * @dev This allows for use of init function to make one time initializations without the need of a constructor\n */\ninterface InitializableInterface {\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external returns (bytes4);\n}\n" + }, + "contracts/interface/LayerZeroEndpointInterface.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport \"./LayerZeroUserApplicationConfigInterface.sol\";\n\ninterface LayerZeroEndpointInterface is LayerZeroUserApplicationConfigInterface {\n // @notice send a LayerZero message to the specified address at a LayerZero endpoint.\n // @param _dstChainId - the destination chain identifier\n // @param _destination - the address on destination chain (in bytes). address length/format may vary by chains\n // @param _payload - a custom bytes payload to send to the destination contract\n // @param _refundAddress - if the source transaction is cheaper than the amount of value passed, refund the additional amount to this address\n // @param _zroPaymentAddress - the address of the ZRO token holder who would pay for the transaction\n // @param _adapterParams - parameters for custom functionality. e.g. receive airdropped native gas from the relayer on destination\n function send(\n uint16 _dstChainId,\n bytes calldata _destination,\n bytes calldata _payload,\n address payable _refundAddress,\n address _zroPaymentAddress,\n bytes calldata _adapterParams\n ) external payable;\n\n // @notice used by the messaging library to publish verified payload\n // @param _srcChainId - the source chain identifier\n // @param _srcAddress - the source contract (as bytes) at the source chain\n // @param _dstAddress - the address on destination chain\n // @param _nonce - the unbound message ordering nonce\n // @param _gasLimit - the gas limit for external contract execution\n // @param _payload - verified payload to send to the destination contract\n function receivePayload(\n uint16 _srcChainId,\n bytes calldata _srcAddress,\n address _dstAddress,\n uint64 _nonce,\n uint256 _gasLimit,\n bytes calldata _payload\n ) external;\n\n // @notice get the inboundNonce of a lzApp from a source chain which could be EVM or non-EVM chain\n // @param _srcChainId - the source chain identifier\n // @param _srcAddress - the source chain contract address\n function getInboundNonce(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (uint64);\n\n // @notice get the outboundNonce from this source chain which, consequently, is always an EVM\n // @param _srcAddress - the source chain contract address\n function getOutboundNonce(uint16 _dstChainId, address _srcAddress) external view returns (uint64);\n\n // @notice gets a quote in source native gas, for the amount that send() requires to pay for message delivery\n // @param _dstChainId - the destination chain identifier\n // @param _userApplication - the user app address on this EVM chain\n // @param _payload - the custom message to send over LayerZero\n // @param _payInZRO - if false, user app pays the protocol fee in native token\n // @param _adapterParam - parameters for the adapter service, e.g. send some dust native token to dstChain\n function estimateFees(\n uint16 _dstChainId,\n address _userApplication,\n bytes calldata _payload,\n bool _payInZRO,\n bytes calldata _adapterParam\n ) external view returns (uint256 nativeFee, uint256 zroFee);\n\n // @notice get this Endpoint's immutable source identifier\n function getChainId() external view returns (uint16);\n\n // @notice the interface to retry failed message on this Endpoint destination\n // @param _srcChainId - the source chain identifier\n // @param _srcAddress - the source chain contract address\n // @param _payload - the payload to be retried\n function retryPayload(uint16 _srcChainId, bytes calldata _srcAddress, bytes calldata _payload) external;\n\n // @notice query if any STORED payload (message blocking) at the endpoint.\n // @param _srcChainId - the source chain identifier\n // @param _srcAddress - the source chain contract address\n function hasStoredPayload(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool);\n\n // @notice query if the _libraryAddress is valid for sending msgs.\n // @param _userApplication - the user app address on this EVM chain\n function getSendLibraryAddress(address _userApplication) external view returns (address);\n\n // @notice query if the _libraryAddress is valid for receiving msgs.\n // @param _userApplication - the user app address on this EVM chain\n function getReceiveLibraryAddress(address _userApplication) external view returns (address);\n\n // @notice query if the non-reentrancy guard for send() is on\n // @return true if the guard is on. false otherwise\n function isSendingPayload() external view returns (bool);\n\n // @notice query if the non-reentrancy guard for receive() is on\n // @return true if the guard is on. false otherwise\n function isReceivingPayload() external view returns (bool);\n\n // @notice get the configuration of the LayerZero messaging library of the specified version\n // @param _version - messaging library version\n // @param _chainId - the chainId for the pending config change\n // @param _userApplication - the contract address of the user application\n // @param _configType - type of configuration. every messaging library has its own convention.\n function getConfig(\n uint16 _version,\n uint16 _chainId,\n address _userApplication,\n uint256 _configType\n ) external view returns (bytes memory);\n\n // @notice get the send() LayerZero messaging library version\n // @param _userApplication - the contract address of the user application\n function getSendVersion(address _userApplication) external view returns (uint16);\n\n // @notice get the lzReceive() LayerZero messaging library version\n // @param _userApplication - the contract address of the user application\n function getReceiveVersion(address _userApplication) external view returns (uint16);\n}\n" + }, + "contracts/interface/LayerZeroModuleInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\ninterface LayerZeroModuleInterface {\n function lzReceive(\n uint16 _srcChainId,\n bytes calldata _srcAddress,\n uint64 _nonce,\n bytes calldata _payload\n ) external payable;\n\n function getInterfaces() external view returns (address interfaces);\n\n function setInterfaces(address interfaces) external;\n\n function getLZEndpoint() external view returns (address lZEndpoint);\n\n function setLZEndpoint(address lZEndpoint) external;\n\n function getOperator() external view returns (address operator);\n\n function setOperator(address operator) external;\n}\n" + }, + "contracts/interface/LayerZeroOverrides.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\ninterface LayerZeroOverrides {\n // @dev defaultAppConfig struct\n struct ApplicationConfiguration {\n uint16 inboundProofLibraryVersion;\n uint64 inboundBlockConfirmations;\n address relayer;\n uint16 outboundProofType;\n uint64 outboundBlockConfirmations;\n address oracle;\n }\n\n struct DstPrice {\n uint128 dstPriceRatio; // 10^10\n uint128 dstGasPriceInWei;\n }\n\n struct DstConfig {\n uint128 dstNativeAmtCap;\n uint64 baseGas;\n uint64 gasPerByte;\n }\n\n // @dev using this to retrieve UltraLightNodeV2 address\n function defaultSendLibrary() external view returns (address);\n\n // @dev using this to extract defaultAppConfig\n function getAppConfig(\n uint16 destinationChainId,\n address userApplicationAddress\n ) external view returns (ApplicationConfiguration memory);\n\n // @dev using this to extract defaultAppConfig directly from storage slot\n function defaultAppConfig(\n uint16 destinationChainId\n )\n external\n view\n returns (\n uint16 inboundProofLibraryVersion,\n uint64 inboundBlockConfirmations,\n address relayer,\n uint16 outboundProofType,\n uint64 outboundBlockConfirmations,\n address oracle\n );\n\n // @dev access the mapping to get base price fee\n function dstPriceLookup(\n uint16 destinationChainId\n ) external view returns (uint128 dstPriceRatio, uint128 dstGasPriceInWei);\n\n // @dev access the mapping to get base gas and gas per byte\n function dstConfigLookup(\n uint16 destinationChainId,\n uint16 outboundProofType\n ) external view returns (uint128 dstNativeAmtCap, uint64 baseGas, uint64 gasPerByte);\n\n // @dev send message to LayerZero Endpoint\n function send(\n uint16 _dstChainId,\n bytes calldata _destination,\n bytes calldata _payload,\n address payable _refundAddress,\n address _zroPaymentAddress,\n bytes calldata _adapterParams\n ) external payable;\n\n // @dev estimate LayerZero message cost\n function estimateFees(\n uint16 _dstChainId,\n address _userApplication,\n bytes calldata _payload,\n bool _payInZRO,\n bytes calldata _adapterParam\n ) external view returns (uint256 nativeFee, uint256 zroFee);\n}\n" + }, + "contracts/interface/LayerZeroReceiverInterface.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\ninterface LayerZeroReceiverInterface {\n // @notice LayerZero endpoint will invoke this function to deliver the message on the destination\n // @param _srcChainId - the source endpoint identifier\n // @param _srcAddress - the source sending contract address from the source chain\n // @param _nonce - the ordered message nonce\n // @param _payload - the signed payload is the UA bytes has encoded to be sent\n function lzReceive(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes calldata _payload) external;\n}\n" + }, + "contracts/interface/LayerZeroUserApplicationConfigInterface.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\ninterface LayerZeroUserApplicationConfigInterface {\n // @notice set the configuration of the LayerZero messaging library of the specified version\n // @param _version - messaging library version\n // @param _chainId - the chainId for the pending config change\n // @param _configType - type of configuration. every messaging library has its own convention.\n // @param _config - configuration in the bytes. can encode arbitrary content.\n function setConfig(uint16 _version, uint16 _chainId, uint256 _configType, bytes calldata _config) external;\n\n // @notice set the send() LayerZero messaging library version to _version\n // @param _version - new messaging library version\n function setSendVersion(uint16 _version) external;\n\n // @notice set the lzReceive() LayerZero messaging library version to _version\n // @param _version - new messaging library version\n function setReceiveVersion(uint16 _version) external;\n\n // @notice Only when the UA needs to resume the message flow in blocking mode and clear the stored payload\n // @param _srcChainId - the chainId of the source chain\n // @param _srcAddress - the contract address of the source contract at the source chain\n function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external;\n}\n" + }, + "contracts/interface/Ownable.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\ninterface Ownable {\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n function owner() external view returns (address);\n\n function transferOwnership(address _newOwner) external;\n\n function isOwner() external view returns (bool);\n\n function isOwner(address wallet) external view returns (bool);\n}\n" + }, + "contracts/library/Base64.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nlibrary Base64 {\n bytes private constant base64stdchars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\n bytes private constant base64urlchars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_\";\n\n function encode(string memory _str) internal pure returns (string memory) {\n bytes memory _bs = bytes(_str);\n return encode(_bs);\n }\n\n function encode(bytes memory _bs) internal pure returns (string memory) {\n uint256 rem = _bs.length % 3;\n\n uint256 res_length = ((_bs.length + 2) / 3) * 4 - ((3 - rem) % 3);\n bytes memory res = new bytes(res_length);\n\n uint256 i = 0;\n uint256 j = 0;\n\n for (; i + 3 <= _bs.length; i += 3) {\n (res[j], res[j + 1], res[j + 2], res[j + 3]) = encode3(uint8(_bs[i]), uint8(_bs[i + 1]), uint8(_bs[i + 2]));\n\n j += 4;\n }\n\n if (rem != 0) {\n uint8 la0 = uint8(_bs[_bs.length - rem]);\n uint8 la1 = 0;\n\n if (rem == 2) {\n la1 = uint8(_bs[_bs.length - 1]);\n }\n\n (bytes1 b0, bytes1 b1, bytes1 b2 /* bytes1 b3*/, ) = encode3(la0, la1, 0);\n res[j] = b0;\n res[j + 1] = b1;\n if (rem == 2) {\n res[j + 2] = b2;\n }\n }\n\n return string(res);\n }\n\n function encode3(\n uint256 a0,\n uint256 a1,\n uint256 a2\n ) private pure returns (bytes1 b0, bytes1 b1, bytes1 b2, bytes1 b3) {\n uint256 n = (a0 << 16) | (a1 << 8) | a2;\n\n uint256 c0 = (n >> 18) & 63;\n uint256 c1 = (n >> 12) & 63;\n uint256 c2 = (n >> 6) & 63;\n uint256 c3 = (n) & 63;\n\n b0 = base64urlchars[c0];\n b1 = base64urlchars[c1];\n b2 = base64urlchars[c2];\n b3 = base64urlchars[c3];\n }\n}\n" + }, + "contracts/library/Bytes.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nlibrary Bytes {\n function getBoolean(uint192 _packedBools, uint192 _boolNumber) internal pure returns (bool) {\n uint192 flag = (_packedBools >> _boolNumber) & uint192(1);\n return (flag == 1 ? true : false);\n }\n\n function setBoolean(uint192 _packedBools, uint192 _boolNumber, bool _value) internal pure returns (uint192) {\n if (_value) {\n return _packedBools | (uint192(1) << _boolNumber);\n } else {\n return _packedBools & ~(uint192(1) << _boolNumber);\n }\n }\n\n function slice(bytes memory _bytes, uint256 _start, uint256 _length) internal pure returns (bytes memory) {\n require(_length + 31 >= _length, \"slice_overflow\");\n require(_bytes.length >= _start + _length, \"slice_outOfBounds\");\n bytes memory tempBytes;\n assembly {\n switch iszero(_length)\n case 0 {\n tempBytes := mload(0x40)\n let lengthmod := and(_length, 31)\n let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod)))\n let end := add(mc, _length)\n for {\n let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start)\n } lt(mc, end) {\n mc := add(mc, 0x20)\n cc := add(cc, 0x20)\n } {\n mstore(mc, mload(cc))\n }\n mstore(tempBytes, _length)\n mstore(0x40, and(add(mc, 31), not(31)))\n }\n default {\n tempBytes := mload(0x40)\n mstore(tempBytes, 0)\n mstore(0x40, add(tempBytes, 0x20))\n }\n }\n return tempBytes;\n }\n\n function trim(bytes32 source) internal pure returns (bytes memory) {\n uint256 temp = uint256(source);\n uint256 length = 0;\n while (temp != 0) {\n length++;\n temp >>= 8;\n }\n return slice(abi.encodePacked(source), 32 - length, length);\n }\n}\n" + }, + "contracts/library/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/cryptography/ECDSA.sol)\n\npragma solidity 0.8.13;\n\nimport \"./Strings.sol\";\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSA {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS,\n InvalidSignatureV\n }\n\n function _throwError(RecoverError error) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert(\"ECDSA: invalid signature\");\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert(\"ECDSA: invalid signature length\");\n } else if (error == RecoverError.InvalidSignatureS) {\n revert(\"ECDSA: invalid signature 's' value\");\n } else if (error == RecoverError.InvalidSignatureV) {\n revert(\"ECDSA: invalid signature 'v' value\");\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature` or error string. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\n // Check the signature length\n // - case 65: r,s,v signature (standard)\n // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._\n if (signature.length == 65) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n assembly {\n r := mload(add(signature, 0x20))\n s := mload(add(signature, 0x40))\n v := byte(0, mload(add(signature, 0x60)))\n }\n return tryRecover(hash, v, r, s);\n } else if (signature.length == 64) {\n bytes32 r;\n bytes32 vs;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n assembly {\n r := mload(add(signature, 0x20))\n vs := mload(add(signature, 0x40))\n }\n return tryRecover(hash, r, vs);\n } else {\n return (address(0), RecoverError.InvalidSignatureLength);\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, signature);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n *\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n *\n * _Available since v4.2._\n */\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n * `r` and `s` signature fields separately.\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS);\n }\n if (v != 27 && v != 28) {\n return (address(0), RecoverError.InvalidSignatureV);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature);\n }\n\n return (signer, RecoverError.NoError);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\n // 32 is the length in bytes of hash,\n // enforced by the type signature above\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", hash));\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from `s`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n\", Strings.toString(s.length), s));\n }\n\n /**\n * @dev Returns an Ethereum Signed Typed Data, created from a\n * `domainSeparator` and a `structHash`. This produces hash corresponding\n * to the one signed with the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\n * JSON-RPC method as part of EIP-712.\n *\n * See {recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n }\n}\n" + }, + "contracts/library/Strings.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nlibrary Strings {\n function toHexString(address account) internal pure returns (string memory) {\n return toHexString(uint256(uint160(account)));\n }\n\n function toHexString(uint256 value) internal pure returns (string memory) {\n if (value == 0) {\n return \"0x00\";\n }\n uint256 temp = value;\n uint256 length = 0;\n while (temp != 0) {\n length++;\n temp >>= 8;\n }\n return toHexString(value, length);\n }\n\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = bytes16(\"0123456789abcdef\")[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n\n function toAsciiString(address x) internal pure returns (string memory) {\n bytes memory s = new bytes(40);\n for (uint256 i = 0; i < 20; i++) {\n bytes1 b = bytes1(uint8(uint256(uint160(x)) / (2 ** (8 * (19 - i)))));\n bytes1 hi = bytes1(uint8(b) / 16);\n bytes1 lo = bytes1(uint8(b) - 16 * uint8(hi));\n s[2 * i] = char(hi);\n s[2 * i + 1] = char(lo);\n }\n return string(s);\n }\n\n function char(bytes1 b) internal pure returns (bytes1 c) {\n if (uint8(b) < 10) {\n return bytes1(uint8(b) + 0x30);\n } else {\n return bytes1(uint8(b) + 0x57);\n }\n }\n\n function uint2str(uint256 _i) internal pure returns (string memory _uint256AsString) {\n if (_i == 0) {\n return \"0\";\n }\n uint256 j = _i;\n uint256 len;\n while (j != 0) {\n len++;\n j /= 10;\n }\n bytes memory bstr = new bytes(len);\n uint256 k = len;\n while (_i != 0) {\n k = k - 1;\n uint8 temp = (48 + uint8(_i - (_i / 10) * 10));\n bytes1 b1 = bytes1(temp);\n bstr[k] = b1;\n _i /= 10;\n }\n return string(bstr);\n }\n\n function toString(uint256 value) internal pure returns (string memory) {\n if (value == 0) {\n return \"0\";\n }\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n bytes memory buffer = new bytes(digits);\n while (value != 0) {\n digits -= 1;\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n value /= 10;\n }\n return string(buffer);\n }\n}\n" + }, + "contracts/mock/ERC20Mock.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/EIP712.sol\";\nimport \"../abstract/NonReentrant.sol\";\n\nimport \"../interface/ERC20.sol\";\nimport \"../interface/ERC20Burnable.sol\";\nimport \"../interface/HolographERC20Interface.sol\";\nimport \"../interface/ERC20Metadata.sol\";\nimport \"../interface/ERC20Permit.sol\";\nimport \"../interface/ERC20Receiver.sol\";\nimport \"../interface/ERC20Safer.sol\";\nimport \"../interface/ERC165.sol\";\nimport \"../interface/ERC165.sol\";\n\nimport \"../library/ECDSA.sol\";\n\n/**\n * @title Mock ERC20 Token\n * @author Holograph Foundation\n * @notice Used for imitating the likes of WETH and WMATIC tokens.\n * @dev The entire logic and functionality of the smart contract is self-contained.\n */\ncontract ERC20Mock is\n ERC165,\n ERC20,\n ERC20Burnable,\n ERC20Metadata,\n ERC20Receiver,\n ERC20Safer,\n ERC20Permit,\n NonReentrant,\n EIP712\n{\n bool private _works;\n\n /**\n * @dev Mapping of all the addresse's balances.\n */\n mapping(address => uint256) private _balances;\n\n /**\n * @dev Mapping of all authorized operators, and capped amounts.\n */\n mapping(address => mapping(address => uint256)) private _allowances;\n\n /**\n * @dev Total number of token in circulation.\n */\n uint256 private _totalSupply;\n\n /**\n * @dev Token name.\n */\n string private _name;\n\n /**\n * @dev Token ticker symbol.\n */\n string private _symbol;\n\n /**\n * @dev Token number of decimal places.\n */\n uint8 private _decimals;\n\n /**\n * @dev List of all supported ERC165 interfaces.\n */\n mapping(bytes4 => bool) private _supportedInterfaces;\n\n /**\n * @dev List of used up nonces. Used in the ERC20Permit interface functionality.\n */\n mapping(address => uint256) private _nonces;\n\n /**\n * @dev Constructor does not accept any parameters.\n */\n constructor(\n string memory contractName,\n string memory contractSymbol,\n uint8 contractDecimals,\n string memory domainSeperator,\n string memory domainVersion\n ) {\n _works = true;\n _name = contractName;\n _symbol = contractSymbol;\n _decimals = contractDecimals;\n\n // ERC165\n _supportedInterfaces[ERC165.supportsInterface.selector] = true;\n\n // ERC20\n _supportedInterfaces[ERC20.allowance.selector] = true;\n _supportedInterfaces[ERC20.approve.selector] = true;\n _supportedInterfaces[ERC20.balanceOf.selector] = true;\n _supportedInterfaces[ERC20.totalSupply.selector] = true;\n _supportedInterfaces[ERC20.transfer.selector] = true;\n _supportedInterfaces[ERC20.transferFrom.selector] = true;\n _supportedInterfaces[\n ERC20.allowance.selector ^\n ERC20.approve.selector ^\n ERC20.balanceOf.selector ^\n ERC20.totalSupply.selector ^\n ERC20.transfer.selector ^\n ERC20.transferFrom.selector\n ] = true;\n\n // ERC20Metadata\n _supportedInterfaces[ERC20Metadata.name.selector] = true;\n _supportedInterfaces[ERC20Metadata.symbol.selector] = true;\n _supportedInterfaces[ERC20Metadata.decimals.selector] = true;\n _supportedInterfaces[\n ERC20Metadata.name.selector ^ ERC20Metadata.symbol.selector ^ ERC20Metadata.decimals.selector\n ] = true;\n\n // ERC20Burnable\n _supportedInterfaces[ERC20Burnable.burn.selector] = true;\n _supportedInterfaces[ERC20Burnable.burnFrom.selector] = true;\n _supportedInterfaces[ERC20Burnable.burn.selector ^ ERC20Burnable.burnFrom.selector] = true;\n\n // ERC20Safer\n // bytes4(keccak256(abi.encodePacked('safeTransfer(address,uint256)'))) == 0x423f6cef\n _supportedInterfaces[0x423f6cef] = true;\n // bytes4(keccak256(abi.encodePacked('safeTransfer(address,uint256,bytes)'))) == 0xeb795549\n _supportedInterfaces[0xeb795549] = true;\n // bytes4(keccak256(abi.encodePacked('safeTransferFrom(address,address,uint256)'))) == 0x42842e0e\n _supportedInterfaces[0x42842e0e] = true;\n // bytes4(keccak256(abi.encodePacked('safeTransferFrom(address,address,uint256,bytes)'))) == 0xb88d4fde\n _supportedInterfaces[0xb88d4fde] = true;\n _supportedInterfaces[bytes4(0x423f6cef) ^ bytes4(0xeb795549) ^ bytes4(0x42842e0e) ^ bytes4(0xb88d4fde)] = true;\n\n // ERC20Receiver\n _supportedInterfaces[ERC20Receiver.onERC20Received.selector] = true;\n\n // ERC20Permit\n _supportedInterfaces[ERC20Permit.permit.selector] = true;\n _supportedInterfaces[ERC20Permit.nonces.selector] = true;\n _supportedInterfaces[ERC20Permit.DOMAIN_SEPARATOR.selector] = true;\n _supportedInterfaces[\n ERC20Permit.permit.selector ^ ERC20Permit.nonces.selector ^ ERC20Permit.DOMAIN_SEPARATOR.selector\n ] = true;\n _eip712_init(domainSeperator, domainVersion);\n }\n\n function toggleWorks(bool active) external {\n _works = active;\n }\n\n function transferTokens(address payable token, address to, uint256 amount) external {\n ERC20(token).transfer(to, amount);\n }\n\n /**\n * @dev Purposefully left empty, to prevent running out of gas errors when receiving native token payments.\n */\n receive() external payable {}\n\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n /**\n * @dev Although EIP-165 is not required for ERC20 contracts, we still decided to implement it.\n *\n * This makes it easier for external smart contracts to easily identify a valid ERC20 token contract.\n */\n function supportsInterface(bytes4 interfaceId) public view returns (bool) {\n return _supportedInterfaces[interfaceId];\n }\n\n function allowance(address account, address spender) public view returns (uint256) {\n return _allowances[account][spender];\n }\n\n function balanceOf(address account) public view returns (uint256) {\n return _balances[account];\n }\n\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() public view returns (bytes32) {\n return _domainSeparatorV4();\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function nonces(address account) public view returns (uint256) {\n return _nonces[account];\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function totalSupply() public view returns (uint256) {\n return _totalSupply;\n }\n\n function approve(address spender, uint256 amount) public returns (bool) {\n _approve(msg.sender, spender, amount);\n return true;\n }\n\n function burn(uint256 amount) public {\n _burn(msg.sender, amount);\n }\n\n function burnFrom(address account, uint256 amount) public returns (bool) {\n uint256 currentAllowance = _allowances[account][msg.sender];\n require(currentAllowance >= amount, \"ERC20: amount exceeds allowance\");\n unchecked {\n _allowances[account][msg.sender] = currentAllowance - amount;\n }\n _burn(account, amount);\n return true;\n }\n\n function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {\n uint256 currentAllowance = _allowances[msg.sender][spender];\n require(currentAllowance >= subtractedValue, \"ERC20: decreased below zero\");\n uint256 newAllowance;\n unchecked {\n newAllowance = currentAllowance - subtractedValue;\n }\n _approve(msg.sender, spender, newAllowance);\n return true;\n }\n\n function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {\n uint256 currentAllowance = _allowances[msg.sender][spender];\n uint256 newAllowance;\n unchecked {\n newAllowance = currentAllowance + addedValue;\n }\n unchecked {\n require(newAllowance >= currentAllowance, \"ERC20: increased above max value\");\n }\n _approve(msg.sender, spender, newAllowance);\n return true;\n }\n\n function mint(address account, uint256 amount) external {\n _mint(account, amount);\n }\n\n function onERC20Received(\n address account,\n address /* sender*/,\n uint256 amount,\n bytes calldata /* data*/\n ) public returns (bytes4) {\n assembly {\n // used to drop \"change function to view\" compiler warning\n sstore(0x17fb676f92438402d8ef92193dd096c59ee1f4ba1bb57f67f3e6d2eef8aeed5e, amount)\n }\n if (_works) {\n require(_isContract(account), \"ERC20: operator not contract\");\n try ERC20(account).balanceOf(address(this)) returns (uint256 balance) {\n require(balance >= amount, \"ERC20: balance check failed\");\n } catch {\n revert(\"ERC20: failed getting balance\");\n }\n return ERC20Receiver.onERC20Received.selector;\n } else {\n return 0x00000000;\n }\n }\n\n function permit(\n address account,\n address spender,\n uint256 amount,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) public {\n require(block.timestamp <= deadline, \"ERC20: expired deadline\");\n // keccak256(\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\")\n // == 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9\n bytes32 structHash = keccak256(\n abi.encode(\n 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9,\n account,\n spender,\n amount,\n _useNonce(account),\n deadline\n )\n );\n bytes32 hash = _hashTypedDataV4(structHash);\n address signer = ECDSA.recover(hash, v, r, s);\n require(signer == account, \"ERC20: invalid signature\");\n _approve(account, spender, amount);\n }\n\n function safeTransfer(address recipient, uint256 amount) public returns (bool) {\n return safeTransfer(recipient, amount, \"\");\n }\n\n function safeTransfer(address recipient, uint256 amount, bytes memory data) public returns (bool) {\n _transfer(msg.sender, recipient, amount);\n require(_checkOnERC20Received(msg.sender, recipient, amount, data), \"ERC20: non ERC20Receiver\");\n return true;\n }\n\n function safeTransferFrom(address account, address recipient, uint256 amount) public returns (bool) {\n return safeTransferFrom(account, recipient, amount, \"\");\n }\n\n function safeTransferFrom(\n address account,\n address recipient,\n uint256 amount,\n bytes memory data\n ) public returns (bool) {\n if (account != msg.sender) {\n uint256 currentAllowance = _allowances[account][msg.sender];\n require(currentAllowance >= amount, \"ERC20: amount exceeds allowance\");\n unchecked {\n _allowances[account][msg.sender] = currentAllowance - amount;\n }\n }\n _transfer(account, recipient, amount);\n require(_checkOnERC20Received(account, recipient, amount, data), \"ERC20: non ERC20Receiver\");\n return true;\n }\n\n function transfer(address recipient, uint256 amount) public returns (bool) {\n _transfer(msg.sender, recipient, amount);\n return true;\n }\n\n function transferFrom(address account, address recipient, uint256 amount) public returns (bool) {\n if (account != msg.sender) {\n uint256 currentAllowance = _allowances[account][msg.sender];\n require(currentAllowance >= amount, \"ERC20: amount exceeds allowance\");\n unchecked {\n _allowances[account][msg.sender] = currentAllowance - amount;\n }\n }\n _transfer(account, recipient, amount);\n return true;\n }\n\n function _approve(address account, address spender, uint256 amount) internal {\n require(account != address(0), \"ERC20: account is zero address\");\n require(spender != address(0), \"ERC20: spender is zero address\");\n _allowances[account][spender] = amount;\n emit Approval(account, spender, amount);\n }\n\n function _burn(address account, uint256 amount) internal {\n require(account != address(0), \"ERC20: account is zero address\");\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n }\n _totalSupply -= amount;\n emit Transfer(account, address(0), amount);\n }\n\n function _checkOnERC20Received(\n address account,\n address recipient,\n uint256 amount,\n bytes memory data\n ) internal nonReentrant returns (bool) {\n if (_isContract(recipient)) {\n try ERC165(recipient).supportsInterface(0x01ffc9a7) returns (bool erc165support) {\n require(erc165support, \"ERC20: no ERC165 support\");\n // we have erc165 support\n if (ERC165(recipient).supportsInterface(0x534f5876)) {\n // we have eip-4524 support\n try ERC20Receiver(recipient).onERC20Received(msg.sender, account, amount, data) returns (bytes4 retval) {\n return retval == ERC20Receiver.onERC20Received.selector;\n } catch (bytes memory reason) {\n if (reason.length == 0) {\n revert(\"ERC20: non ERC20Receiver\");\n } else {\n assembly {\n revert(add(32, reason), mload(reason))\n }\n }\n }\n } else {\n revert(\"ERC20: eip-4524 not supported\");\n }\n } catch (bytes memory reason) {\n if (reason.length == 0) {\n revert(\"ERC20: no ERC165 support\");\n } else {\n assembly {\n revert(add(32, reason), mload(reason))\n }\n }\n }\n } else {\n return true;\n }\n }\n\n /**\n * @notice Mints tokens.\n * @dev Mint a specific amount of tokens to a specific address.\n * @param to Address to mint to.\n * @param amount Amount of tokens to mint.\n */\n function _mint(address to, uint256 amount) internal {\n require(to != address(0), \"ERC20: minting to burn address\");\n _totalSupply += amount;\n _balances[to] += amount;\n emit Transfer(address(0), to, amount);\n }\n\n function _transfer(address account, address recipient, uint256 amount) internal {\n require(account != address(0), \"ERC20: account is zero address\");\n require(recipient != address(0), \"ERC20: recipient is zero address\");\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n }\n _balances[recipient] += amount;\n emit Transfer(account, recipient, amount);\n }\n\n /**\n * @dev \"Consume a nonce\": return the current value and increment.\n *\n * _Available since v4.1._\n */\n function _useNonce(address account) internal returns (uint256 current) {\n current = _nonces[account];\n _nonces[account]++;\n }\n\n function _isContract(address contractAddress) private view returns (bool) {\n bytes32 codehash;\n assembly {\n codehash := extcodehash(contractAddress)\n }\n return (codehash != 0x0 && codehash != 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470);\n }\n}\n" + }, + "contracts/mock/LZEndpointMock.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../interface/LayerZeroReceiverInterface.sol\";\nimport \"../interface/LayerZeroEndpointInterface.sol\";\n\n/**\nmocking multi endpoint connection.\n- send() will short circuit to lzReceive() directly\n- no reentrancy guard. the real LayerZero endpoint on main net has a send and receive guard, respectively.\nif we run a ping-pong-like application, the recursive call might use all gas limit in the block.\n- not using any messaging library, hence all messaging library func, e.g. estimateFees, version, will not work\n*/\ncontract LZEndpointMock is LayerZeroEndpointInterface {\n mapping(address => address) public lzEndpointLookup;\n\n uint16 public mockChainId;\n address payable public mockOracle;\n address payable public mockRelayer;\n uint256 public mockBlockConfirmations;\n uint16 public mockLibraryVersion;\n uint256 public mockStaticNativeFee;\n uint16 public mockLayerZeroVersion;\n uint256 public nativeFee;\n uint256 public zroFee;\n bool nextMsgBLocked;\n\n struct StoredPayload {\n uint64 payloadLength;\n address dstAddress;\n bytes32 payloadHash;\n }\n\n struct QueuedPayload {\n address dstAddress;\n uint64 nonce;\n bytes payload;\n }\n\n // inboundNonce = [srcChainId][srcAddress].\n mapping(uint16 => mapping(bytes => uint64)) public inboundNonce;\n // outboundNonce = [dstChainId][srcAddress].\n mapping(uint16 => mapping(address => uint64)) public outboundNonce;\n // storedPayload = [srcChainId][srcAddress]\n mapping(uint16 => mapping(bytes => StoredPayload)) public storedPayload;\n // msgToDeliver = [srcChainId][srcAddress]\n mapping(uint16 => mapping(bytes => QueuedPayload[])) public msgsToDeliver;\n\n event UaForceResumeReceive(uint16 chainId, bytes srcAddress);\n event PayloadCleared(uint16 srcChainId, bytes srcAddress, uint64 nonce, address dstAddress);\n event PayloadStored(\n uint16 srcChainId,\n bytes srcAddress,\n address dstAddress,\n uint64 nonce,\n bytes payload,\n bytes reason\n );\n\n constructor(uint16 _chainId) {\n mockStaticNativeFee = 42;\n mockLayerZeroVersion = 1;\n mockChainId = _chainId;\n }\n\n // mock helper to set the value returned by `estimateNativeFees`\n function setEstimatedFees(uint256 _nativeFee, uint256 _zroFee) public {\n nativeFee = _nativeFee;\n zroFee = _zroFee;\n }\n\n function getChainId() external view override returns (uint16) {\n return mockChainId;\n }\n\n function setDestLzEndpoint(address destAddr, address lzEndpointAddr) external {\n lzEndpointLookup[destAddr] = lzEndpointAddr;\n }\n\n function send(\n uint16 _chainId,\n bytes calldata _destination,\n bytes calldata _payload,\n address payable, // _refundAddress\n address, // _zroPaymentAddress\n bytes memory _adapterParams\n ) external payable override {\n address destAddr = packedBytesToAddr(_destination);\n address lzEndpoint = lzEndpointLookup[destAddr];\n\n require(lzEndpoint != address(0), \"LayerZeroMock: destination LayerZero Endpoint not found\");\n\n uint64 nonce;\n {\n nonce = ++outboundNonce[_chainId][msg.sender];\n }\n\n // Mock the relayer paying the dstNativeAddr the amount of extra native token\n {\n uint256 extraGas;\n uint256 dstNative;\n address dstNativeAddr;\n assembly {\n extraGas := mload(add(_adapterParams, 34))\n dstNative := mload(add(_adapterParams, 66))\n dstNativeAddr := mload(add(_adapterParams, 86))\n }\n\n // to simulate actually sending the ether, add a transfer call and ensure the LZEndpointMock contract has an ether balance\n }\n\n bytes memory bytesSourceUserApplicationAddr = addrToPackedBytes(address(msg.sender)); // cast this address to bytes\n\n // not using the extra gas parameter because this is a single tx call, not split between different chains\n // LZEndpointMock(lzEndpoint).receivePayload(mockChainId, bytesSourceUserApplicationAddr, destAddr, nonce, extraGas, _payload);\n LZEndpointMock(lzEndpoint).receivePayload(\n mockChainId,\n bytesSourceUserApplicationAddr,\n destAddr,\n nonce,\n 0,\n _payload\n );\n }\n\n function receivePayload(\n uint16 _srcChainId,\n bytes calldata _srcAddress,\n address _dstAddress,\n uint64 _nonce,\n uint256 /*_gasLimit*/,\n bytes calldata _payload\n ) external override {\n StoredPayload storage sp = storedPayload[_srcChainId][_srcAddress];\n\n // assert and increment the nonce. no message shuffling\n require(_nonce == ++inboundNonce[_srcChainId][_srcAddress], \"LayerZero: wrong nonce\");\n\n // queue the following msgs inside of a stack to simulate a successful send on src, but not fully delivered on dst\n if (sp.payloadHash != bytes32(0)) {\n QueuedPayload[] storage msgs = msgsToDeliver[_srcChainId][_srcAddress];\n QueuedPayload memory newMsg = QueuedPayload(_dstAddress, _nonce, _payload);\n\n // warning, might run into gas issues trying to forward through a bunch of queued msgs\n // shift all the msgs over so we can treat this like a fifo via array.pop()\n if (msgs.length > 0) {\n // extend the array\n msgs.push(newMsg);\n\n // shift all the indexes up for pop()\n for (uint256 i = 0; i < msgs.length - 1; i++) {\n msgs[i + 1] = msgs[i];\n }\n\n // put the newMsg at the bottom of the stack\n msgs[0] = newMsg;\n } else {\n msgs.push(newMsg);\n }\n } else if (nextMsgBLocked) {\n storedPayload[_srcChainId][_srcAddress] = StoredPayload(\n uint64(_payload.length),\n _dstAddress,\n keccak256(_payload)\n );\n emit PayloadStored(_srcChainId, _srcAddress, _dstAddress, _nonce, _payload, bytes(\"\"));\n // ensure the next msgs that go through are no longer blocked\n nextMsgBLocked = false;\n } else {\n // we ignore the gas limit because this call is made in one tx due to being \"same chain\"\n // LayerZeroReceiverInterface(_dstAddress).lzReceive{gas: _gasLimit}(_srcChainId, _srcAddress, _nonce, _payload); // invoke lzReceive\n LayerZeroReceiverInterface(_dstAddress).lzReceive(_srcChainId, _srcAddress, _nonce, _payload); // invoke lzReceive\n }\n }\n\n // used to simulate messages received get stored as a payload\n function blockNextMsg() external {\n nextMsgBLocked = true;\n }\n\n function getLengthOfQueue(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (uint256) {\n return msgsToDeliver[_srcChainId][_srcAddress].length;\n }\n\n // @notice gets a quote in source native gas, for the amount that send() requires to pay for message delivery\n // @param _dstChainId - the destination chain identifier\n // @param _userApplication - the user app address on this EVM chain\n // @param _payload - the custom message to send over LayerZero\n // @param _payInZRO - if false, user app pays the protocol fee in native token\n // @param _adapterParam - parameters for the adapter service, e.g. send some dust native token to dstChain\n function estimateFees(\n uint16,\n address,\n bytes memory,\n bool,\n bytes memory\n ) external view override returns (uint256 _nativeFee, uint256 _zroFee) {\n _nativeFee = nativeFee;\n _zroFee = zroFee;\n }\n\n // give 20 bytes, return the decoded address\n function packedBytesToAddr(bytes calldata _b) public pure returns (address) {\n address addr;\n assembly {\n let ptr := mload(0x40)\n calldatacopy(ptr, sub(_b.offset, 2), add(_b.length, 2))\n addr := mload(sub(ptr, 10))\n }\n return addr;\n }\n\n // given an address, return the 20 bytes\n function addrToPackedBytes(address _a) public pure returns (bytes memory) {\n bytes memory data = abi.encodePacked(_a);\n return data;\n }\n\n function setConfig(\n uint16 /*_version*/,\n uint16 /*_chainId*/,\n uint256 /*_configType*/,\n bytes memory /*_config*/\n ) external override {}\n\n function getConfig(\n uint16 /*_version*/,\n uint16 /*_chainId*/,\n address /*_ua*/,\n uint256 /*_configType*/\n ) external pure override returns (bytes memory) {\n return \"\";\n }\n\n function setSendVersion(uint16 /*version*/) external override {}\n\n function setReceiveVersion(uint16 /*version*/) external override {}\n\n function getSendVersion(address /*_userApplication*/) external pure override returns (uint16) {\n return 1;\n }\n\n function getReceiveVersion(address /*_userApplication*/) external pure override returns (uint16) {\n return 1;\n }\n\n function getInboundNonce(uint16 _chainID, bytes calldata _srcAddress) external view override returns (uint64) {\n return inboundNonce[_chainID][_srcAddress];\n }\n\n function getOutboundNonce(uint16 _chainID, address _srcAddress) external view override returns (uint64) {\n return outboundNonce[_chainID][_srcAddress];\n }\n\n // simulates the relayer pushing through the rest of the msgs that got delayed due to the stored payload\n function _clearMsgQue(uint16 _srcChainId, bytes calldata _srcAddress) internal {\n QueuedPayload[] storage msgs = msgsToDeliver[_srcChainId][_srcAddress];\n\n // warning, might run into gas issues trying to forward through a bunch of queued msgs\n while (msgs.length > 0) {\n QueuedPayload memory payload = msgs[msgs.length - 1];\n LayerZeroReceiverInterface(payload.dstAddress).lzReceive(\n _srcChainId,\n _srcAddress,\n payload.nonce,\n payload.payload\n );\n msgs.pop();\n }\n }\n\n function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external override {\n StoredPayload storage sp = storedPayload[_srcChainId][_srcAddress];\n // revert if no messages are cached. safeguard malicious UA behaviour\n require(sp.payloadHash != bytes32(0), \"LayerZero: no stored payload\");\n require(sp.dstAddress == msg.sender, \"LayerZero: invalid caller\");\n\n // empty the storedPayload\n sp.payloadLength = 0;\n sp.dstAddress = address(0);\n sp.payloadHash = bytes32(0);\n\n emit UaForceResumeReceive(_srcChainId, _srcAddress);\n\n // resume the receiving of msgs after we force clear the \"stuck\" msg\n _clearMsgQue(_srcChainId, _srcAddress);\n }\n\n function retryPayload(uint16 _srcChainId, bytes calldata _srcAddress, bytes calldata _payload) external override {\n StoredPayload storage sp = storedPayload[_srcChainId][_srcAddress];\n require(sp.payloadHash != bytes32(0), \"LayerZero: no stored payload\");\n require(_payload.length == sp.payloadLength && keccak256(_payload) == sp.payloadHash, \"LayerZero: invalid payload\");\n\n address dstAddress = sp.dstAddress;\n // empty the storedPayload\n sp.payloadLength = 0;\n sp.dstAddress = address(0);\n sp.payloadHash = bytes32(0);\n\n uint64 nonce = inboundNonce[_srcChainId][_srcAddress];\n\n LayerZeroReceiverInterface(dstAddress).lzReceive(_srcChainId, _srcAddress, nonce, _payload);\n emit PayloadCleared(_srcChainId, _srcAddress, nonce, dstAddress);\n }\n\n function hasStoredPayload(uint16 _srcChainId, bytes calldata _srcAddress) external view override returns (bool) {\n StoredPayload storage sp = storedPayload[_srcChainId][_srcAddress];\n return sp.payloadHash != bytes32(0);\n }\n\n function isSendingPayload() external pure override returns (bool) {\n return false;\n }\n\n function isReceivingPayload() external pure override returns (bool) {\n return false;\n }\n\n function getSendLibraryAddress(address) external view override returns (address) {\n return address(this);\n }\n\n function getReceiveLibraryAddress(address) external view override returns (address) {\n return address(this);\n }\n}\n" + }, + "contracts/mock/Mock.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Initializable.sol\";\nimport \"../abstract/Owner.sol\";\n\nimport \"../interface/InitializableInterface.sol\";\n\ncontract Mock is Initializable, Owner {\n constructor() {}\n\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"MOCK: already initialized\");\n bytes32 arbitraryData = abi.decode(initPayload, (bytes32));\n bool shouldFail = false;\n assembly {\n // we leave slot 0 available for fallback calls\n sstore(0x01, arbitraryData)\n switch arbitraryData\n case 0 {\n shouldFail := 0x01\n }\n sstore(_ownerSlot, caller())\n }\n _setInitialized();\n if (shouldFail) {\n return bytes4(0x12345678);\n } else {\n return InitializableInterface.init.selector;\n }\n }\n\n function getStorage(uint256 slot) public view returns (bytes32 data) {\n assembly {\n data := sload(slot)\n }\n }\n\n function setStorage(uint256 slot, bytes32 data) public {\n assembly {\n sstore(slot, data)\n }\n }\n\n function mockCall(address target, bytes calldata data) public payable {\n assembly {\n calldatacopy(0, data.offset, data.length)\n let result := call(gas(), target, callvalue(), 0, data.length, 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n function mockStaticCall(address target, bytes calldata data) public view returns (bytes memory) {\n assembly {\n calldatacopy(0, data.offset, data.length)\n let result := staticcall(gas(), target, 0, data.length, 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n function mockDelegateCall(address target, bytes calldata data) public returns (bytes memory) {\n assembly {\n calldatacopy(0, data.offset, data.length)\n let result := delegatecall(gas(), target, 0, data.length, 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n receive() external payable {}\n\n fallback() external payable {\n assembly {\n calldatacopy(0, 0, calldatasize())\n let result := call(gas(), sload(0), callvalue(), 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/mock/MockERC721Receiver.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../interface/ERC721.sol\";\nimport \"../interface/ERC165.sol\";\nimport \"../interface/ERC721TokenReceiver.sol\";\n\ncontract MockERC721Receiver is ERC165, ERC721TokenReceiver {\n bool private _works;\n\n constructor() {\n _works = true;\n }\n\n function toggleWorks(bool active) external {\n _works = active;\n }\n\n function supportsInterface(bytes4 interfaceID) external pure returns (bool) {\n if (interfaceID == 0x01ffc9a7 || interfaceID == 0x150b7a02) {\n return true;\n } else {\n return false;\n }\n }\n\n function onERC721Received(\n address /*operator*/,\n address /*from*/,\n uint256 /*tokenId*/,\n bytes calldata /*data*/\n ) external view returns (bytes4) {\n if (_works) {\n return 0x150b7a02;\n } else {\n return 0x00000000;\n }\n }\n\n function transferNFT(address payable token, uint256 tokenId, address to) external {\n ERC721(token).safeTransferFrom(address(this), to, tokenId);\n }\n}\n" + }, + "contracts/mock/MockExternalCall.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\ncontract MockExternalCall {\n function callExternalFn(address contractAddress, bytes calldata encodedSignature) public {\n (bool success, ) = address(contractAddress).call(encodedSignature);\n require(success, \"Failed\");\n }\n}\n" + }, + "contracts/mock/MockHolographChild.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../Holograph.sol\";\n\ncontract MockHolographChild is Holograph {\n constructor() {}\n\n function emptyFunction() external pure returns (string memory) {\n return \"on purpose to remove verification conflict\";\n }\n}\n" + }, + "contracts/mock/MockHolographGenesisChild.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../HolographGenesis.sol\";\n\ncontract MockHolographGenesisChild is HolographGenesis {\n constructor() {}\n\n function approveDeployerMock(address newDeployer, bool approve) external onlyDeployer {\n return this.approveDeployer(newDeployer, approve);\n }\n\n function isApprovedDeployerMock(address deployer) external view returns (bool) {\n return this.isApprovedDeployer(deployer);\n }\n}\n" + }, + "contracts/mock/MockLZEndpoint.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\n\nimport \"../interface/HolographOperatorInterface.sol\";\nimport \"../interface/LayerZeroOverrides.sol\";\n\ncontract MockLZEndpoint is Admin {\n event LzEvent(uint16 _dstChainId, bytes _destination, bytes _payload);\n\n constructor() {\n assembly {\n sstore(_adminSlot, origin())\n }\n }\n\n function send(\n uint16 _dstChainId,\n bytes calldata _destination,\n bytes calldata _payload,\n address payable /* _refundAddress*/,\n address /* _zroPaymentAddress*/,\n bytes calldata /* _adapterParams*/\n ) external payable {\n // we really don't care about anything and just emit an event that we can leverage for multichain replication\n emit LzEvent(_dstChainId, _destination, _payload);\n }\n\n function estimateFees(\n uint16,\n address,\n bytes calldata,\n bool,\n bytes calldata\n ) external pure returns (uint256 nativeFee, uint256 zroFee) {\n nativeFee = 10 ** 15;\n zroFee = 10 ** 7;\n }\n\n function defaultSendLibrary() external view returns (address) {\n return address(this);\n }\n\n function getAppConfig(uint16, address) external view returns (LayerZeroOverrides.ApplicationConfiguration memory) {\n return LayerZeroOverrides.ApplicationConfiguration(0, 0, address(this), 0, 0, address(this));\n }\n\n function dstPriceLookup(uint16) external pure returns (uint128 dstPriceRatio, uint128 dstGasPriceInWei) {\n dstPriceRatio = 10 ** 10;\n dstGasPriceInWei = 1000000000;\n }\n\n function dstConfigLookup(\n uint16,\n uint16\n ) external pure returns (uint128 dstNativeAmtCap, uint64 baseGas, uint64 gasPerByte) {\n dstNativeAmtCap = 10 ** 18;\n baseGas = 50000;\n gasPerByte = 25;\n }\n\n function crossChainMessage(address target, uint256 gasLimit, bytes calldata payload) external {\n HolographOperatorInterface(target).crossChainMessage{gas: gasLimit}(payload);\n }\n}\n" + }, + "contracts/module/LayerZeroModule.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\n\nimport \"../enum/ChainIdType.sol\";\n\nimport \"../interface/CrossChainMessageInterface.sol\";\nimport \"../interface/HolographOperatorInterface.sol\";\nimport \"../interface/InitializableInterface.sol\";\nimport \"../interface/HolographInterfacesInterface.sol\";\nimport \"../interface/LayerZeroModuleInterface.sol\";\nimport \"../interface/LayerZeroOverrides.sol\";\n\nimport \"../struct/GasParameters.sol\";\n\nimport \"./OVM_GasPriceOracle.sol\";\n\n/**\n * @title Holograph LayerZero Module\n * @author https://github.com/holographxyz\n * @notice Holograph module for enabling LayerZero cross-chain messaging\n * @dev This contract abstracts all of the LayerZero specific logic into an isolated module\n */\ncontract LayerZeroModule is Admin, Initializable, CrossChainMessageInterface, LayerZeroModuleInterface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.bridge')) - 1)\n */\n bytes32 constant _bridgeSlot = 0xeb87cbb21687feb327e3d58c6c16d552231d12c7a0e8115042a4165fac8a77f9;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.interfaces')) - 1)\n */\n bytes32 constant _interfacesSlot = 0xbd3084b8c09da87ad159c247a60e209784196be2530cecbbd8f337fdd1848827;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.lZEndpoint')) - 1)\n */\n bytes32 constant _lZEndpointSlot = 0x56825e447adf54cdde5f04815fcf9b1dd26ef9d5c053625147c18b7c13091686;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.operator')) - 1)\n */\n bytes32 constant _operatorSlot = 0x7caba557ad34138fa3b7e43fb574e0e6cc10481c3073e0dffbc560db81b5c60f;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.gasParameters')) - 1)\n */\n bytes32 constant _gasParametersSlot = 0x15eee82a0af3c04e4b65c3842105c973a6b0fb2a68728bf035809e13b38ce8cf;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.gasParameters')) - 1)\n */\n bytes32 constant _optimismGasPriceOracleSlot = 0x46043c284a96474ab4a54c741ea0d0fce54e98eea878b99d4b85808fa6f71a5f;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (\n address bridge,\n address interfaces,\n address operator,\n address optimismGasPriceOracle,\n uint32[] memory chainIds,\n GasParameters[] memory gasParameters\n ) = abi.decode(initPayload, (address, address, address, address, uint32[], GasParameters[]));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_bridgeSlot, bridge)\n sstore(_interfacesSlot, interfaces)\n sstore(_operatorSlot, operator)\n sstore(_optimismGasPriceOracleSlot, optimismGasPriceOracle)\n }\n require(chainIds.length == gasParameters.length, \"HOLOGRAPH: wrong array lengths\");\n for (uint256 i = 0; i < chainIds.length; i++) {\n _setGasParameters(chainIds[i], gasParameters[i]);\n }\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @notice Receive cross-chain message from LayerZero\n * @dev This function only allows calls from the configured LayerZero endpoint address\n */\n function lzReceive(\n uint16 /* _srcChainId*/,\n bytes calldata _srcAddress,\n uint64 /* _nonce*/,\n bytes calldata _payload\n ) external payable {\n assembly {\n /**\n * @dev check if msg.sender is LayerZero Endpoint\n */\n switch eq(sload(_lZEndpointSlot), caller())\n case 0 {\n /**\n * @dev this is the assembly version of -> revert(\"HOLOGRAPH: LZ only endpoint\");\n */\n mstore(0x80, 0x08c379a000000000000000000000000000000000000000000000000000000000)\n mstore(0xa0, 0x0000002000000000000000000000000000000000000000000000000000000000)\n mstore(0xc0, 0x0000001b484f4c4f47524150483a204c5a206f6e6c7920656e64706f696e7400)\n mstore(0xe0, 0x0000000000000000000000000000000000000000000000000000000000000000)\n revert(0x80, 0xc4)\n }\n let ptr := mload(0x40)\n calldatacopy(add(ptr, 0x0c), _srcAddress.offset, _srcAddress.length)\n /**\n * @dev check if LZ from address is same as address(this)\n */\n switch eq(mload(ptr), address())\n case 0 {\n /**\n * @dev this is the assembly version of -> revert(\"HOLOGRAPH: unauthorized sender\");\n */\n mstore(0x80, 0x08c379a000000000000000000000000000000000000000000000000000000000)\n mstore(0xa0, 0x0000002000000000000000000000000000000000000000000000000000000000)\n mstore(0xc0, 0x0000001e484f4c4f47524150483a20756e617574686f72697a65642073656e64)\n mstore(0xe0, 0x6572000000000000000000000000000000000000000000000000000000000000)\n revert(0x80, 0xc4)\n }\n }\n /**\n * @dev if validation has passed, submit payload to Holograph Operator for converting into an operator job\n */\n _operator().crossChainMessage(_payload);\n }\n\n /**\n * @dev Need to add an extra function to get LZ gas amount needed for their internal cross-chain message verification\n */\n function send(\n uint256 /* gasLimit*/,\n uint256 /* gasPrice*/,\n uint32 toChain,\n address msgSender,\n uint256 msgValue,\n bytes calldata crossChainPayload\n ) external payable {\n require(msg.sender == address(_operator()), \"HOLOGRAPH: operator only call\");\n LayerZeroOverrides lZEndpoint;\n assembly {\n lZEndpoint := sload(_lZEndpointSlot)\n }\n GasParameters memory gasParameters = _gasParameters(toChain);\n // need to recalculate the gas amounts for LZ to deliver message\n lZEndpoint.send{value: msgValue}(\n uint16(_interfaces().getChainId(ChainIdType.HOLOGRAPH, uint256(toChain), ChainIdType.LAYERZERO)),\n abi.encodePacked(address(this), address(this)),\n crossChainPayload,\n payable(msgSender),\n address(this),\n abi.encodePacked(\n uint16(1),\n uint256(gasParameters.msgBaseGas + (crossChainPayload.length * gasParameters.msgGasPerByte))\n )\n );\n }\n\n function getMessageFee(\n uint32 toChain,\n uint256 gasLimit,\n uint256 gasPrice,\n bytes calldata crossChainPayload\n ) external view returns (uint256 hlgFee, uint256 msgFee, uint256 dstGasPrice) {\n uint16 lzDestChain = uint16(\n _interfaces().getChainId(ChainIdType.HOLOGRAPH, uint256(toChain), ChainIdType.LAYERZERO)\n );\n LayerZeroOverrides lz;\n assembly {\n lz := sload(_lZEndpointSlot)\n }\n // convert holograph chain id to lz chain id\n (uint128 dstPriceRatio, uint128 dstGasPriceInWei) = _getPricing(lz, lzDestChain);\n if (gasPrice == 0) {\n gasPrice = dstGasPriceInWei;\n }\n GasParameters memory gasParameters = _gasParameters(toChain);\n require(gasPrice > gasParameters.minGasPrice, \"HOLOGRAPH: gas price too low\");\n bytes memory adapterParams = abi.encodePacked(\n uint16(1),\n uint256(gasParameters.msgBaseGas + (crossChainPayload.length * gasParameters.msgGasPerByte))\n );\n gasLimit = gasLimit + gasParameters.jobBaseGas + (crossChainPayload.length * gasParameters.jobGasPerByte);\n gasLimit = gasLimit + (gasLimit / 10);\n require(gasLimit < gasParameters.maxGasLimit, \"HOLOGRAPH: gas limit over max\");\n (uint256 nativeFee, ) = lz.estimateFees(lzDestChain, address(this), crossChainPayload, false, adapterParams);\n hlgFee = ((gasPrice * gasLimit) * dstPriceRatio) / (10 ** 20);\n /*\n * @dev toChain is a ChainIdType.HOLOGRAPH, which can be found at https://github.com/holographxyz/networks/blob/main/src/networks.ts\n * chainId 7 == optimism\n * chainId 4000000015 == optimismTestnetGoerli\n */\n if (toChain == uint32(7) || toChain == uint32(4000000015)) {\n hlgFee += (_optimismGasPriceOracle().getL1Fee(crossChainPayload) * dstPriceRatio) / (10 ** 20);\n }\n msgFee = nativeFee;\n dstGasPrice = (dstGasPriceInWei * dstPriceRatio) / (10 ** 20);\n }\n\n function getHlgFee(\n uint32 toChain,\n uint256 gasLimit,\n uint256 gasPrice,\n bytes calldata crossChainPayload\n ) external view returns (uint256 hlgFee) {\n LayerZeroOverrides lz;\n assembly {\n lz := sload(_lZEndpointSlot)\n }\n uint16 lzDestChain = uint16(\n _interfaces().getChainId(ChainIdType.HOLOGRAPH, uint256(toChain), ChainIdType.LAYERZERO)\n );\n (uint128 dstPriceRatio, uint128 dstGasPriceInWei) = _getPricing(lz, lzDestChain);\n if (gasPrice == 0) {\n gasPrice = dstGasPriceInWei;\n }\n GasParameters memory gasParameters = _gasParameters(toChain);\n require(gasPrice > gasParameters.minGasPrice, \"HOLOGRAPH: gas price too low\");\n gasLimit = gasLimit + gasParameters.jobBaseGas + (crossChainPayload.length * gasParameters.jobGasPerByte);\n gasLimit = gasLimit + (gasLimit / 10);\n require(gasLimit < gasParameters.maxGasLimit, \"HOLOGRAPH: gas limit over max\");\n hlgFee = ((gasPrice * gasLimit) * dstPriceRatio) / (10 ** 20);\n /*\n * @dev toChain is a ChainIdType.HOLOGRAPH, which can be found at https://github.com/holographxyz/networks/blob/main/src/networks.ts\n * chainId 7 == optimism\n * chainId 4000000015 == optimismTestnetGoerli\n */\n if (toChain == uint32(7) || toChain == uint32(4000000015)) {\n hlgFee += (_optimismGasPriceOracle().getL1Fee(crossChainPayload) * dstPriceRatio) / (10 ** 20);\n }\n }\n\n function _getPricing(\n LayerZeroOverrides lz,\n uint16 lzDestChain\n ) private view returns (uint128 dstPriceRatio, uint128 dstGasPriceInWei) {\n return\n LayerZeroOverrides(LayerZeroOverrides(lz.defaultSendLibrary()).getAppConfig(lzDestChain, address(this)).relayer)\n .dstPriceLookup(lzDestChain);\n }\n\n /**\n * @notice Get the address of the Holograph Bridge module\n * @dev Used for beaming holographable assets cross-chain\n */\n function getBridge() external view returns (address bridge) {\n assembly {\n bridge := sload(_bridgeSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Bridge module address\n * @param bridge address of the Holograph Bridge smart contract to use\n */\n function setBridge(address bridge) external onlyAdmin {\n assembly {\n sstore(_bridgeSlot, bridge)\n }\n }\n\n /**\n * @notice Get the address of the Holograph Interfaces module\n * @dev Holograph uses this contract to store data that needs to be accessed by a large portion of the modules\n */\n function getInterfaces() external view returns (address interfaces) {\n assembly {\n interfaces := sload(_interfacesSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Interfaces module address\n * @param interfaces address of the Holograph Interfaces smart contract to use\n */\n function setInterfaces(address interfaces) external onlyAdmin {\n assembly {\n sstore(_interfacesSlot, interfaces)\n }\n }\n\n /**\n * @notice Get the address of the approved LayerZero Endpoint\n * @dev All lzReceive function calls allow only requests from this address\n */\n function getLZEndpoint() external view returns (address lZEndpoint) {\n assembly {\n lZEndpoint := sload(_lZEndpointSlot)\n }\n }\n\n /**\n * @notice Update the approved LayerZero Endpoint address\n * @param lZEndpoint address of the LayerZero Endpoint to use\n */\n function setLZEndpoint(address lZEndpoint) external onlyAdmin {\n assembly {\n sstore(_lZEndpointSlot, lZEndpoint)\n }\n }\n\n /**\n * @notice Get the address of the Holograph Operator module\n * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module\n */\n function getOperator() external view returns (address operator) {\n assembly {\n operator := sload(_operatorSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Operator module address\n * @param operator address of the Holograph Operator smart contract to use\n */\n function setOperator(address operator) external onlyAdmin {\n assembly {\n sstore(_operatorSlot, operator)\n }\n }\n\n /**\n * @notice Get the address of the Optimism Gas Price Oracle module\n * @dev Allows to properly calculate the L1 security fee for Optimism bridge transactions\n */\n function getOptimismGasPriceOracle() external view returns (address optimismGasPriceOracle) {\n assembly {\n optimismGasPriceOracle := sload(_optimismGasPriceOracleSlot)\n }\n }\n\n /**\n * @notice Update the Optimism Gas Price Oracle module address\n * @param optimismGasPriceOracle address of the Optimism Gas Price Oracle smart contract to use\n */\n function setOptimismGasPriceOracle(address optimismGasPriceOracle) external onlyAdmin {\n assembly {\n sstore(_optimismGasPriceOracleSlot, optimismGasPriceOracle)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Bridge Interface\n */\n function _bridge() private view returns (address bridge) {\n assembly {\n bridge := sload(_bridgeSlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Interfaces Interface\n */\n function _interfaces() private view returns (HolographInterfacesInterface interfaces) {\n assembly {\n interfaces := sload(_interfacesSlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Operator Interface\n */\n function _operator() private view returns (HolographOperatorInterface operator) {\n assembly {\n operator := sload(_operatorSlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the Optimism Gas Price Oracle Interface\n */\n function _optimismGasPriceOracle() private view returns (OVM_GasPriceOracle optimismGasPriceOracle) {\n assembly {\n optimismGasPriceOracle := sload(_optimismGasPriceOracleSlot)\n }\n }\n\n /**\n * @dev Purposefully reverts to prevent having any type of ether transfered into the contract\n */\n receive() external payable {\n revert();\n }\n\n /**\n * @dev Purposefully reverts to prevent any calls to undefined functions\n */\n fallback() external payable {\n revert();\n }\n\n /**\n * @notice Get the default or chain-specific GasParameters\n * @param chainId the Holograph ChainId to get gas parameters for, set to 0 for default\n */\n function getGasParameters(uint32 chainId) external view returns (GasParameters memory gasParameters) {\n return _gasParameters(chainId);\n }\n\n /**\n * @notice Update the default or chain-specific GasParameters\n * @param chainId the Holograph ChainId to set gas parameters for, set to 0 for default\n * @param gasParameters struct of all the gas parameters to set\n */\n function setGasParameters(uint32 chainId, GasParameters memory gasParameters) external onlyAdmin {\n _setGasParameters(chainId, gasParameters);\n }\n\n /**\n * @notice Update the default or chain-specific GasParameters\n * @param chainIds array of Holograph ChainId to set gas parameters for\n * @param gasParameters array of all the gas parameters to set\n */\n function setGasParameters(uint32[] memory chainIds, GasParameters[] memory gasParameters) external onlyAdmin {\n require(chainIds.length == gasParameters.length, \"HOLOGRAPH: wrong array lengths\");\n for (uint256 i = 0; i < chainIds.length; i++) {\n _setGasParameters(chainIds[i], gasParameters[i]);\n }\n }\n\n /**\n * @notice Internal function for setting the default or chain-specific GasParameters\n * @param chainId the Holograph ChainId to set gas parameters for, set to 0 for default\n * @param gasParameters struct of all the gas parameters to set\n */\n function _setGasParameters(uint32 chainId, GasParameters memory gasParameters) private {\n bytes32 slot = chainId == 0 ? _gasParametersSlot : keccak256(abi.encode(chainId, _gasParametersSlot));\n assembly {\n let pos := gasParameters\n for {\n let i := 0\n } lt(i, 6) {\n i := add(i, 1)\n } {\n sstore(add(slot, i), mload(pos))\n pos := add(pos, 32)\n }\n }\n }\n\n /**\n * @dev Internal function used for getting the default or chain-specific GasParameters\n * @param chainId the Holograph ChainId to get gas parameters for, set to 0 for default\n */\n function _gasParameters(uint32 chainId) private view returns (GasParameters memory gasParameters) {\n bytes32 slot = chainId == 0 ? _gasParametersSlot : keccak256(abi.encode(chainId, _gasParametersSlot));\n assembly {\n let pos := gasParameters\n for {\n let i := 0\n } lt(i, 6) {\n i := add(i, 1)\n } {\n mstore(pos, sload(add(slot, i)))\n pos := add(pos, 32)\n }\n }\n }\n}\n" + }, + "contracts/module/OVM_GasPriceOracle.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\n\n/**\n * @title OVM_GasPriceOracle\n * @dev This contract exposes the current l2 gas price, a measure of how congested the network\n * currently is. This measure is used by the Sequencer to determine what fee to charge for\n * transactions. When the system is more congested, the l2 gas price will increase and fees\n * will also increase as a result.\n *\n * All public variables are set while generating the initial L2 state. The\n * constructor doesn't run in practice as the L2 state generation script uses\n * the deployed bytecode instead of running the initcode.\n */\ncontract OVM_GasPriceOracle is Admin, Initializable {\n // Current L2 gas price\n uint256 public gasPrice;\n // Current L1 base fee\n uint256 public l1BaseFee;\n // Amortized cost of batch submission per transaction\n uint256 public overhead;\n // Value to scale the fee up by\n uint256 public scalar;\n // Number of decimals of the scalar\n uint256 public decimals;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (uint256 _gasPrice, uint256 _l1BaseFee, uint256 _overhead, uint256 _scalar, uint256 _decimals) = abi.decode(\n initPayload,\n (uint256, uint256, uint256, uint256, uint256)\n );\n gasPrice = _gasPrice;\n l1BaseFee = _l1BaseFee;\n overhead = _overhead;\n scalar = _scalar;\n decimals = _decimals;\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n event GasPriceUpdated(uint256);\n event L1BaseFeeUpdated(uint256);\n event OverheadUpdated(uint256);\n event ScalarUpdated(uint256);\n event DecimalsUpdated(uint256);\n\n /**\n * Allows the owner to modify the l2 gas price.\n * @param _gasPrice New l2 gas price.\n */\n function setGasPrice(uint256 _gasPrice) external onlyAdmin {\n gasPrice = _gasPrice;\n emit GasPriceUpdated(_gasPrice);\n }\n\n /**\n * Allows the owner to modify the l1 base fee.\n * @param _baseFee New l1 base fee\n */\n function setL1BaseFee(uint256 _baseFee) external onlyAdmin {\n l1BaseFee = _baseFee;\n emit L1BaseFeeUpdated(_baseFee);\n }\n\n /**\n * Allows the owner to modify the overhead.\n * @param _overhead New overhead\n */\n function setOverhead(uint256 _overhead) external onlyAdmin {\n overhead = _overhead;\n emit OverheadUpdated(_overhead);\n }\n\n /**\n * Allows the owner to modify the scalar.\n * @param _scalar New scalar\n */\n function setScalar(uint256 _scalar) external onlyAdmin {\n scalar = _scalar;\n emit ScalarUpdated(_scalar);\n }\n\n /**\n * Allows the owner to modify the decimals.\n * @param _decimals New decimals\n */\n function setDecimals(uint256 _decimals) external onlyAdmin {\n decimals = _decimals;\n emit DecimalsUpdated(_decimals);\n }\n\n /**\n * Computes the L1 portion of the fee\n * based on the size of the RLP encoded tx\n * and the current l1BaseFee\n * @param _data Unsigned RLP encoded tx, 6 elements\n * @return L1 fee that should be paid for the tx\n */\n function getL1Fee(bytes memory _data) external view returns (uint256) {\n uint256 l1GasUsed = getL1GasUsed(_data);\n uint256 l1Fee = l1GasUsed * l1BaseFee;\n uint256 divisor = 10 ** decimals;\n uint256 unscaled = l1Fee * scalar;\n uint256 scaled = unscaled / divisor;\n return scaled;\n }\n\n /**\n * Computes the amount of L1 gas used for a transaction\n * The overhead represents the per batch gas overhead of\n * posting both transaction and state roots to L1 given larger\n * batch sizes.\n * 4 gas for 0 byte\n * https://github.com/ethereum/go-ethereum/blob/9ada4a2e2c415e6b0b51c50e901336872e028872/params/protocol_params.go#L33\n * 16 gas for non zero byte\n * https://github.com/ethereum/go-ethereum/blob/9ada4a2e2c415e6b0b51c50e901336872e028872/params/protocol_params.go#L87\n * This will need to be updated if calldata gas prices change\n * Account for the transaction being unsigned\n * Padding is added to account for lack of signature on transaction\n * 1 byte for RLP V prefix\n * 1 byte for V\n * 1 byte for RLP R prefix\n * 32 bytes for R\n * 1 byte for RLP S prefix\n * 32 bytes for S\n * Total: 68 bytes of padding\n * @param _data Unsigned RLP encoded tx, 6 elements\n * @return Amount of L1 gas used for a transaction\n */\n function getL1GasUsed(bytes memory _data) public view returns (uint256) {\n uint256 total = 0;\n for (uint256 i = 0; i < _data.length; i++) {\n if (_data[i] == 0) {\n total += 4;\n } else {\n total += 16;\n }\n }\n uint256 unsigned = total + overhead;\n return unsigned + (68 * 16);\n }\n}\n" + }, + "contracts/proxy/CxipERC721Proxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\n\nimport \"../interface/InitializableInterface.sol\";\nimport \"../interface/HolographRegistryInterface.sol\";\n\ncontract CxipERC721Proxy is Admin, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.contractType')) - 1)\n */\n bytes32 constant _contractTypeSlot = 0x0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c7;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\n */\n bytes32 constant _registrySlot = 0xce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7;\n\n constructor() {}\n\n function init(bytes memory data) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (bytes32 contractType, address registry, bytes memory initCode) = abi.decode(data, (bytes32, address, bytes));\n assembly {\n sstore(_contractTypeSlot, contractType)\n sstore(_registrySlot, registry)\n }\n (bool success, bytes memory returnData) = getCxipERC721Source().delegatecall(\n abi.encodeWithSignature(\"init(bytes)\", initCode)\n );\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == InitializableInterface.init.selector, \"initialization failed\");\n\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n function getCxipERC721Source() public view returns (address) {\n HolographRegistryInterface registry;\n bytes32 contractType;\n assembly {\n registry := sload(_registrySlot)\n contractType := sload(_contractTypeSlot)\n }\n return registry.getContractTypeAddress(contractType);\n }\n\n receive() external payable {}\n\n fallback() external payable {\n address cxipErc721Source = getCxipERC721Source();\n assembly {\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), cxipErc721Source, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/proxy/HolographBridgeProxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\n\nimport \"../interface/InitializableInterface.sol\";\n\ncontract HolographBridgeProxy is Admin, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.bridge')) - 1)\n */\n bytes32 constant _bridgeSlot = 0xeb87cbb21687feb327e3d58c6c16d552231d12c7a0e8115042a4165fac8a77f9;\n\n constructor() {}\n\n function init(bytes memory data) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address bridge, bytes memory initCode) = abi.decode(data, (address, bytes));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_bridgeSlot, bridge)\n }\n (bool success, bytes memory returnData) = bridge.delegatecall(abi.encodeWithSignature(\"init(bytes)\", initCode));\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == InitializableInterface.init.selector, \"initialization failed\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n function getBridge() external view returns (address bridge) {\n assembly {\n bridge := sload(_bridgeSlot)\n }\n }\n\n function setBridge(address bridge) external onlyAdmin {\n assembly {\n sstore(_bridgeSlot, bridge)\n }\n }\n\n receive() external payable {}\n\n fallback() external payable {\n assembly {\n let bridge := sload(_bridgeSlot)\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), bridge, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/proxy/HolographFactoryProxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\n\nimport \"../interface/InitializableInterface.sol\";\n\ncontract HolographFactoryProxy is Admin, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.factory')) - 1)\n */\n bytes32 constant _factorySlot = 0xa49f20855ba576e09d13c8041c8039fa655356ea27f6c40f1ec46a4301cd5b23;\n\n constructor() {}\n\n function init(bytes memory data) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address factory, bytes memory initCode) = abi.decode(data, (address, bytes));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_factorySlot, factory)\n }\n (bool success, bytes memory returnData) = factory.delegatecall(abi.encodeWithSignature(\"init(bytes)\", initCode));\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == InitializableInterface.init.selector, \"initialization failed\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n function getFactory() external view returns (address factory) {\n assembly {\n factory := sload(_factorySlot)\n }\n }\n\n function setFactory(address factory) external onlyAdmin {\n assembly {\n sstore(_factorySlot, factory)\n }\n }\n\n receive() external payable {}\n\n fallback() external payable {\n assembly {\n let factory := sload(_factorySlot)\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), factory, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/proxy/HolographOperatorProxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\n\nimport \"../interface/InitializableInterface.sol\";\n\ncontract HolographOperatorProxy is Admin, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.operator')) - 1)\n */\n bytes32 constant _operatorSlot = 0x7caba557ad34138fa3b7e43fb574e0e6cc10481c3073e0dffbc560db81b5c60f;\n\n constructor() {}\n\n function init(bytes memory data) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address operator, bytes memory initCode) = abi.decode(data, (address, bytes));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_operatorSlot, operator)\n }\n (bool success, bytes memory returnData) = operator.delegatecall(abi.encodeWithSignature(\"init(bytes)\", initCode));\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == InitializableInterface.init.selector, \"initialization failed\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n function getOperator() external view returns (address operator) {\n assembly {\n operator := sload(_operatorSlot)\n }\n }\n\n function setOperator(address operator) external onlyAdmin {\n assembly {\n sstore(_operatorSlot, operator)\n }\n }\n\n receive() external payable {}\n\n fallback() external payable {\n assembly {\n let operator := sload(_operatorSlot)\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), operator, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/proxy/HolographRegistryProxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\n\nimport \"../interface/InitializableInterface.sol\";\n\ncontract HolographRegistryProxy is Admin, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\n */\n bytes32 constant _registrySlot = 0xce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7;\n\n constructor() {}\n\n function init(bytes memory data) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address registry, bytes memory initCode) = abi.decode(data, (address, bytes));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_registrySlot, registry)\n }\n (bool success, bytes memory returnData) = registry.delegatecall(abi.encodeWithSignature(\"init(bytes)\", initCode));\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == InitializableInterface.init.selector, \"initialization failed\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n function getRegistry() external view returns (address registry) {\n assembly {\n registry := sload(_registrySlot)\n }\n }\n\n function setRegistry(address registry) external onlyAdmin {\n assembly {\n sstore(_registrySlot, registry)\n }\n }\n\n receive() external payable {}\n\n fallback() external payable {\n assembly {\n let registry := sload(_registrySlot)\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), registry, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/proxy/HolographTreasuryProxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\n\nimport \"../interface/InitializableInterface.sol\";\n\ncontract HolographTreasuryProxy is Admin, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.treasury')) - 1)\n */\n bytes32 constant _treasurySlot = 0x4215e7a38d75164ca078bbd61d0992cdeb1ba16f3b3ead5944966d3e4080e8b6;\n\n constructor() {}\n\n function init(bytes memory data) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address treasury, bytes memory initCode) = abi.decode(data, (address, bytes));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_treasurySlot, treasury)\n }\n (bool success, bytes memory returnData) = treasury.delegatecall(abi.encodeWithSignature(\"init(bytes)\", initCode));\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == InitializableInterface.init.selector, \"initialization failed\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n function getTreasury() external view returns (address treasury) {\n assembly {\n treasury := sload(_treasurySlot)\n }\n }\n\n function setTreasury(address treasury) external onlyAdmin {\n assembly {\n sstore(_treasurySlot, treasury)\n }\n }\n\n receive() external payable {}\n\n fallback() external payable {\n assembly {\n let treasury := sload(_treasurySlot)\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), treasury, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/struct/BridgeSettings.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nstruct BridgeSettings {\n uint256 value;\n uint256 gasLimit;\n uint256 gasPrice;\n uint32 toChain;\n}\n" + }, + "contracts/struct/DeploymentConfig.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nstruct DeploymentConfig {\n bytes32 contractType;\n uint32 chainType;\n bytes32 salt;\n bytes byteCode;\n bytes initCode;\n}\n" + }, + "contracts/struct/GasParameters.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nstruct GasParameters {\n uint256 msgBaseGas;\n uint256 msgGasPerByte;\n uint256 jobBaseGas;\n uint256 jobGasPerByte;\n uint256 minGasPrice;\n uint256 maxGasLimit;\n}\n" + }, + "contracts/struct/OperatorJob.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nstruct OperatorJob {\n uint8 pod;\n uint16 blockTimes;\n address operator;\n uint40 startBlock;\n uint64 startTimestamp;\n uint16[5] fallbackOperators;\n}\n\n/*\n\nuint\t\tDigits\tMax value\n-----------------------------\nuint8\t\t3\t\t255\nuint16\t\t5\t\t65,535\nuint24\t\t8\t\t16,777,215\nuint32\t\t10\t\t4,294,967,295\nuint40\t\t13\t\t1,099,511,627,775\nuint48\t\t15\t\t281,474,976,710,655\nuint56\t\t17\t\t72,057,594,037,927,935\nuint64\t\t20\t\t18,446,744,073,709,551,615\nuint72\t\t22\t\t4,722,366,482,869,645,213,695\nuint80\t\t25\t\t1,208,925,819,614,629,174,706,175\nuint88\t\t27\t\t309,485,009,821,345,068,724,781,055\nuint96\t\t29\t\t79,228,162,514,264,337,593,543,950,335\n...\nuint128\t\t39\t\t340,282,366,920,938,463,463,374,607,431,768,211,455\n...\nuint256\t\t78\t\t115,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\n\n*/\n" + }, + "contracts/struct/Verification.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nstruct Verification {\n bytes32 r;\n bytes32 s;\n uint8 v;\n}\n" + }, + "contracts/struct/ZoraBidShares.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./ZoraDecimal.sol\";\n\nstruct HolographBidShares {\n // % of sale value that goes to the _previous_ owner of the nft\n HolographDecimal prevOwner;\n // % of sale value that goes to the original creator of the nft\n HolographDecimal creator;\n // % of sale value that goes to the seller (current owner) of the nft\n HolographDecimal owner;\n}\n" + }, + "contracts/struct/ZoraDecimal.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nstruct HolographDecimal {\n uint256 value;\n}\n" + }, + "contracts/token/CxipERC721.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/ERC721H.sol\";\n\nimport \"../enum/TokenUriType.sol\";\n\nimport \"../interface/HolographERC721Interface.sol\";\nimport \"../interface/HolographInterfacesInterface.sol\";\nimport \"../interface/HolographInterface.sol\";\nimport \"../interface/HolographerInterface.sol\";\n\n/**\n * @title CXIP ERC-721 Collection that is bridgeable via Holograph\n * @author Holograph Foundation\n * @notice A smart contract for minting and managing Holograph Bridgeable ERC721 NFTs.\n * @dev The entire logic and functionality of the smart contract is self-contained.\n */\ncontract CxipERC721 is ERC721H {\n /**\n * @dev Internal reference used for minting incremental token ids.\n */\n uint224 private _currentTokenId;\n\n /**\n * @dev Enum of type of token URI to use globally for the entire contract.\n */\n TokenUriType private _uriType;\n\n /**\n * @dev Enum mapping of type of token URI to use for specific tokenId.\n */\n mapping(uint256 => TokenUriType) private _tokenUriType;\n\n /**\n * @dev Mapping of IPFS URIs for tokenIds.\n */\n mapping(uint256 => mapping(TokenUriType => string)) private _tokenURIs;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n // we set this as default type since that's what Mint is currently using\n _uriType = TokenUriType.IPFS;\n address owner = abi.decode(initPayload, (address));\n _setOwner(owner);\n // run underlying initializer logic\n return _init(initPayload);\n }\n\n /**\n * @notice Get's the URI of the token.\n * @return string The URI.\n */\n function tokenURI(uint256 _tokenId) external view onlyHolographer returns (string memory) {\n TokenUriType uriType = _tokenUriType[_tokenId];\n if (uriType == TokenUriType.UNDEFINED) {\n uriType = _uriType;\n }\n return\n string(\n abi.encodePacked(\n HolographInterfacesInterface(\n HolographInterface(HolographerInterface(holographer()).getHolograph()).getInterfaces()\n ).getUriPrepend(uriType),\n _tokenURIs[_tokenId][uriType]\n )\n );\n }\n\n function cxipMint(\n uint224 tokenId,\n TokenUriType uriType,\n string calldata tokenUri\n ) external onlyHolographer onlyOwner {\n HolographERC721Interface H721 = HolographERC721Interface(holographer());\n uint256 chainPrepend = H721.sourceGetChainPrepend();\n if (tokenId == 0) {\n _currentTokenId += 1;\n while (\n H721.exists(chainPrepend + uint256(_currentTokenId)) || H721.burned(chainPrepend + uint256(_currentTokenId))\n ) {\n _currentTokenId += 1;\n }\n tokenId = _currentTokenId;\n }\n H721.sourceMint(msgSender(), tokenId);\n uint256 id = chainPrepend + uint256(tokenId);\n if (uriType == TokenUriType.UNDEFINED) {\n uriType = _uriType;\n }\n _tokenUriType[id] = uriType;\n _tokenURIs[id][uriType] = tokenUri;\n }\n\n function bridgeIn(\n uint32 /* _chainId*/,\n address /* _from*/,\n address /* _to*/,\n uint256 _tokenId,\n bytes calldata _data\n ) external onlyHolographer returns (bool) {\n (TokenUriType uriType, string memory tokenUri) = abi.decode(_data, (TokenUriType, string));\n _tokenUriType[_tokenId] = uriType;\n _tokenURIs[_tokenId][uriType] = tokenUri;\n return true;\n }\n\n function bridgeOut(\n uint32 /* _chainId*/,\n address /* _from*/,\n address /* _to*/,\n uint256 _tokenId\n ) external view onlyHolographer returns (bytes memory _data) {\n TokenUriType uriType = _tokenUriType[_tokenId];\n if (uriType == TokenUriType.UNDEFINED) {\n uriType = _uriType;\n }\n _data = abi.encode(uriType, _tokenURIs[_tokenId][uriType]);\n }\n\n function afterBurn(address /* _owner*/, uint256 _tokenId) external onlyHolographer returns (bool) {\n TokenUriType uriType = _tokenUriType[_tokenId];\n if (uriType == TokenUriType.UNDEFINED) {\n uriType = _uriType;\n }\n delete _tokenURIs[_tokenId][uriType];\n return true;\n }\n}\n" + }, + "contracts/token/HolographUtilityToken.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/HLGERC20H.sol\";\n\nimport \"../interface/ERC20.sol\";\nimport \"../interface/HolographERC20Interface.sol\";\nimport \"../interface/HolographInterface.sol\";\nimport \"../interface/HolographerInterface.sol\";\n\n/**\n * @title Holograph Utility Token.\n * @author Holograph Foundation\n * @notice A smart contract for minting and managing Holograph's ERC20 Utility Tokens.\n * @dev The entire logic and functionality of the smart contract is self-contained.\n */\ncontract HolographUtilityToken is HLGERC20H {\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n (address contractOwner, uint256 tokenAmount, uint256 targetChain, address tokenRecipient) = abi.decode(\n initPayload,\n (address, uint256, uint256, address)\n );\n _setOwner(contractOwner);\n /*\n * @dev Mint token only if target chain matches current chain. Or if no target chain has been selected.\n * Goal of this is to restrict minting on Ethereum only for mainnet deployment.\n */\n if (block.chainid == targetChain || targetChain == 0) {\n if (tokenAmount > 0) {\n HolographERC20Interface(msg.sender).sourceMint(tokenRecipient, tokenAmount);\n }\n }\n // run underlying initializer logic\n return _init(initPayload);\n }\n\n /**\n * @dev Temporarily placed to bypass bytecode conflicts\n */\n function isHLG() external pure returns (bool) {\n return true;\n }\n}\n" + }, + "contracts/token/hToken.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/HLGERC20H.sol\";\n\nimport \"../interface/ERC20.sol\";\nimport \"../interface/HolographERC20Interface.sol\";\nimport \"../interface/HolographInterface.sol\";\nimport \"../interface/HolographerInterface.sol\";\n\n/**\n * @title Holograph token (aka hToken), used to wrap and bridge native tokens across blockchains.\n * @author Holograph Foundation\n * @notice A smart contract for minting and managing Holograph's Bridgeable ERC20 Tokens.\n * @dev The entire logic and functionality of the smart contract is self-contained.\n */\ncontract hToken is HLGERC20H {\n /**\n * @dev Sample fee for unwrapping.\n */\n uint16 private _feeBp; // 10000 == 100.00%\n\n /**\n * @dev List of supported Wrapped Tokens (equivalent), on current-chain.\n */\n mapping(address => bool) private _supportedWrappers;\n\n /**\n * @dev Event that is triggered when native token is converted into hToken.\n */\n event Deposit(address indexed from, uint256 amount);\n\n /**\n * @dev Event that is triggered when ERC20 token is converted into hToken.\n */\n event TokenDeposit(address indexed token, address indexed from, uint256 amount);\n\n /**\n * @dev Event that is triggered when hToken is converted into native token.\n */\n event Withdrawal(address indexed to, uint256 amount);\n\n /**\n * @dev Event that is triggered when hToken is converted into ERC20 token.\n */\n event TokenWithdrawal(address indexed token, address indexed to, uint256 amount);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n (address contractOwner, uint16 fee) = abi.decode(initPayload, (address, uint16));\n _setOwner(contractOwner);\n _feeBp = fee;\n // run underlying initializer logic\n return _init(initPayload);\n }\n\n /**\n * @dev Send native token value, get back hToken equivalent.\n * @param recipient Address of where to send the hToken(s) to.\n */\n function holographNativeToken(address recipient) external payable onlyHolographer {\n require(\n (HolographerInterface(holographer()).getOriginChain() ==\n HolographInterface(HolographerInterface(holographer()).getHolograph()).getHolographChainId()),\n \"hToken: not native token\"\n );\n require(msg.value > 0, \"hToken: no value received\");\n address sender = msgSender();\n if (recipient == address(0)) {\n recipient = sender;\n }\n HolographERC20Interface(holographer()).sourceMint(recipient, msg.value);\n emit Deposit(sender, msg.value);\n }\n\n /**\n * @dev Send hToken, get back native token value equivalent.\n * @param recipient Address of where to send the native token(s) to.\n */\n function extractNativeToken(address payable recipient, uint256 amount) external onlyHolographer {\n address sender = msgSender();\n require(ERC20(address(this)).balanceOf(sender) >= amount, \"hToken: not enough hToken(s)\");\n require(\n (HolographerInterface(holographer()).getOriginChain() ==\n HolographInterface(HolographerInterface(holographer()).getHolograph()).getHolographChainId()),\n \"hToken: not on native chain\"\n );\n require(address(this).balance >= amount, \"hToken: not enough native tokens\");\n HolographERC20Interface(holographer()).sourceBurn(sender, amount);\n // HERE WE NEED TO ADD FEE MECHANISM TO EXTRACT xx.xxxx% FROM NATIVE TOKEN AMOUNT\n // THIS SHOULD GO SOMEWHERE TO REWARD CAPITAL PROVIDERS\n uint256 fee = (amount / 10000) * _feeBp;\n // for now we just leave fee in contract balance\n //\n // amount is updated to reflect fee subtraction\n amount = amount - fee;\n recipient.transfer(amount);\n emit Withdrawal(recipient, amount);\n }\n\n /**\n * @dev Send supported wrapped token, get back hToken equivalent.\n * @param recipient Address of where to send the hToken(s) to.\n */\n function holographWrappedToken(address token, address recipient, uint256 amount) external onlyHolographer {\n require(_supportedWrappers[token], \"hToken: unsupported token type\");\n ERC20 erc20 = ERC20(token);\n address sender = msgSender();\n require(erc20.allowance(sender, address(this)) >= amount, \"hToken: allowance too low\");\n uint256 previousBalance = erc20.balanceOf(address(this));\n require(erc20.transferFrom(sender, address(this), amount), \"hToken: ERC20 transfer failed\");\n uint256 currentBalance = erc20.balanceOf(address(this));\n uint256 difference = currentBalance - previousBalance;\n require(difference >= 0, \"hToken: no tokens transferred\");\n if (difference < amount) {\n // adjust for fee-based mechanisms\n // this allows for discrepancies to not fail the entire operation\n amount = difference;\n }\n if (recipient == address(0)) {\n recipient = sender;\n }\n HolographERC20Interface(holographer()).sourceMint(recipient, amount);\n emit TokenDeposit(token, sender, amount);\n }\n\n /**\n * @dev Send hToken, get back native token value equivalent.\n * @param recipient Address of where to send the native token(s) to.\n */\n function extractWrappedToken(address token, address payable recipient, uint256 amount) external onlyHolographer {\n require(_supportedWrappers[token], \"hToken: unsupported token type\");\n address sender = msgSender();\n require(ERC20(address(this)).balanceOf(sender) >= amount, \"hToken: not enough hToken(s)\");\n ERC20 erc20 = ERC20(token);\n uint256 previousBalance = erc20.balanceOf(address(this));\n require(previousBalance >= amount, \"hToken: not enough ERC20 tokens\");\n if (recipient == address(0)) {\n recipient = payable(sender);\n }\n // HERE WE NEED TO ADD FEE MECHANISM TO EXTRACT xx.xxxx% FROM NATIVE TOKEN AMOUNT\n // THIS SHOULD GO SOMEWHERE TO REWARD CAPITAL PROVIDERS\n uint256 fee = (amount / 10000) * _feeBp;\n uint256 adjustedAmount = amount - fee;\n // for now we just leave fee in contract balance\n erc20.transfer(recipient, adjustedAmount);\n uint256 currentBalance = erc20.balanceOf(address(this));\n uint256 difference = currentBalance - previousBalance;\n require(difference == adjustedAmount, \"hToken: incorrect new balance\");\n HolographERC20Interface(holographer()).sourceBurn(sender, amount);\n emit TokenWithdrawal(token, recipient, adjustedAmount);\n }\n\n function availableNativeTokens() external view onlyHolographer returns (uint256) {\n if (\n HolographerInterface(holographer()).getOriginChain() ==\n HolographInterface(HolographerInterface(holographer()).getHolograph()).getHolographChainId()\n ) {\n return address(this).balance;\n } else {\n return 0;\n }\n }\n\n function availableWrappedTokens(address token) external view onlyHolographer returns (uint256) {\n require(_supportedWrappers[token], \"hToken: unsupported token type\");\n return ERC20(token).balanceOf(address(this));\n }\n\n function updateSupportedWrapper(address token, bool supported) external onlyHolographer onlyOwner {\n _supportedWrappers[token] = supported;\n }\n\n /**\n * @dev Temporarily placed to bypass bytecode conflicts\n */\n function isHToken() external pure returns (bool) {\n return true;\n }\n}\n" + }, + "contracts/token/SampleERC20.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/StrictERC20H.sol\";\n\nimport \"../interface/HolographERC20Interface.sol\";\n\n/**\n * @title Sample ERC-20 token that is bridgeable via Holograph\n * @author Holograph Foundation\n * @notice A smart contract for minting and managing Holograph Bridgeable ERC20 Tokens.\n * @dev The entire logic and functionality of the smart contract is self-contained.\n */\ncontract SampleERC20 is StrictERC20H {\n /**\n * @dev Just a dummy value for now to test transferring of data.\n */\n mapping(address => bytes32) private _walletSalts;\n\n /**\n * @dev Temporary implementation to suppress compiler state mutability warnings.\n */\n bool private _dummy;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n // do your own custom logic here\n address contractOwner = abi.decode(initPayload, (address));\n _setOwner(contractOwner);\n // run underlying initializer logic\n return _init(initPayload);\n }\n\n /**\n * @dev Sample mint where anyone can mint any amounts of tokens.\n */\n function mint(address to, uint256 amount) external onlyHolographer onlyOwner {\n HolographERC20Interface(holographer()).sourceMint(to, amount);\n if (_walletSalts[to] == bytes32(0)) {\n _walletSalts[to] = keccak256(\n abi.encodePacked(to, amount, block.timestamp, block.number, blockhash(block.number - 1))\n );\n }\n }\n\n function bridgeIn(\n uint32 /* _chainId*/,\n address /* _from*/,\n address _to,\n uint256 /* _amount*/,\n bytes calldata _data\n ) external override onlyHolographer returns (bool) {\n bytes32 salt = abi.decode(_data, (bytes32));\n _walletSalts[_to] = salt;\n return true;\n }\n\n function bridgeOut(\n uint32 /* _chainId*/,\n address /* _from*/,\n address _to,\n uint256 /* _amount*/\n ) external override onlyHolographer returns (bytes memory _data) {\n _dummy = false;\n _data = abi.encode(_walletSalts[_to]);\n }\n}\n" + }, + "contracts/token/SampleERC721.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/StrictERC721H.sol\";\n\nimport \"../interface/HolographERC721Interface.sol\";\n\n/**\n * @title Sample ERC-721 Collection that is bridgeable via Holograph\n * @author Holograph Foundation\n * @notice A smart contract for minting and managing Holograph Bridgeable ERC721 NFTs.\n * @dev The entire logic and functionality of the smart contract is self-contained.\n */\ncontract SampleERC721 is StrictERC721H {\n /**\n * @dev Mapping of all token URIs.\n */\n mapping(uint256 => string) private _tokenURIs;\n\n /**\n * @dev Internal reference used for minting incremental token ids.\n */\n uint224 private _currentTokenId;\n\n /**\n * @dev Temporary implementation to suppress compiler state mutability warnings.\n */\n bool private _dummy;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n // do your own custom logic here\n address contractOwner = abi.decode(initPayload, (address));\n _setOwner(contractOwner);\n // run underlying initializer logic\n return _init(initPayload);\n }\n\n /**\n * @notice Get's the URI of the token.\n * @dev Defaults the the Arweave URI\n * @return string The URI.\n */\n function tokenURI(uint256 _tokenId) external view onlyHolographer returns (string memory) {\n return _tokenURIs[_tokenId];\n }\n\n /**\n * @dev Sample mint where anyone can mint specific token, with a custom URI\n */\n function mint(address to, uint224 tokenId, string calldata URI) external onlyHolographer onlyOwner {\n HolographERC721Interface H721 = HolographERC721Interface(holographer());\n if (tokenId == 0) {\n _currentTokenId += 1;\n while (H721.exists(uint256(_currentTokenId)) || H721.burned(uint256(_currentTokenId))) {\n _currentTokenId += 1;\n }\n tokenId = _currentTokenId;\n }\n H721.sourceMint(to, tokenId);\n uint256 id = H721.sourceGetChainPrepend() + uint256(tokenId);\n _tokenURIs[id] = URI;\n }\n\n function bridgeIn(\n uint32 /* _chainId*/,\n address /* _from*/,\n address /* _to*/,\n uint256 _tokenId,\n bytes calldata _data\n ) external override onlyHolographer returns (bool) {\n string memory URI = abi.decode(_data, (string));\n _tokenURIs[_tokenId] = URI;\n return true;\n }\n\n function bridgeOut(\n uint32 /* _chainId*/,\n address /* _from*/,\n address /* _to*/,\n uint256 _tokenId\n ) external override onlyHolographer returns (bytes memory _data) {\n _dummy = false;\n _data = abi.encode(_tokenURIs[_tokenId]);\n }\n\n function afterBurn(address /* _owner*/, uint256 _tokenId) external override onlyHolographer returns (bool) {\n delete _tokenURIs[_tokenId];\n return true;\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 999999 + }, + "metadata": { + "bytecodeHash": "none", + "useLiteralContent": true + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": ["ast"] + } + }, + "remappings": [ + "ds-test/=lib/forge-std/lib/ds-test/src/", + "erc721a-upgradeable/=erc721a-upgradeable/", + "forge-std/=lib/forge-std/src/" + ] + } +} diff --git a/deployments/develop/polygonTestnet/HolographFactory.json b/deployments/develop/polygonTestnet/HolographFactory.json index 4422d7e88..98a18ae4b 100644 --- a/deployments/develop/polygonTestnet/HolographFactory.json +++ b/deployments/develop/polygonTestnet/HolographFactory.json @@ -1,5 +1,5 @@ { - "address": "0xE70F94ED069Cca85c040Cd79FC7Ee0121690dE35", + "address": "0xaF27d972B6Ad681F72bB9acAe5382e829DAe61C5", "abi": [ { "inputs": [], @@ -386,44 +386,44 @@ "type": "receive" } ], - "transactionHash": "0xae3a7a0f9d1eddb95f522141f429e6e28930d3c11e9a9ad7136666bb70234909", + "transactionHash": "0xf96c416528f4a339e30a3686357ce951ac4e909884c23689d819965a47c108a4", "receipt": { "to": "0x0C8aF56F7650a6E3685188d212044338c21d3F73", "from": "0xd078E391cBAEAa6C5785124a7207ff57d64604b7", "contractAddress": null, - "transactionIndex": 1, - "gasUsed": "2506057", - "logsBloom": "0x00000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000001000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000020000000000000000001000000000000000000000000004000000000000000000001000000000000000000000000000008100000000000000000000000000000000000000000000000000010000000000000000000100000", - "blockHash": "0xf0320a01d426f46d0425f65e24d9c65484aa5465ae8063fbf6f75cc5a63c6186", - "transactionHash": "0xae3a7a0f9d1eddb95f522141f429e6e28930d3c11e9a9ad7136666bb70234909", + "transactionIndex": 5, + "gasUsed": "2725131", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000002000000000000000000000000000000000000000000000001000800000000000000000040100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000040000000004000000000000000000001000000000000000000000000000008100000000000000000000000000000000000000000000000000010000000000000000000100000", + "blockHash": "0xb3885249e0932437a2428e2bab528db19408f8c6d92d54e8c93c62380822006e", + "transactionHash": "0xf96c416528f4a339e30a3686357ce951ac4e909884c23689d819965a47c108a4", "logs": [ { - "transactionIndex": 1, - "blockNumber": 34373931, - "transactionHash": "0xae3a7a0f9d1eddb95f522141f429e6e28930d3c11e9a9ad7136666bb70234909", + "transactionIndex": 5, + "blockNumber": 37644755, + "transactionHash": "0xf96c416528f4a339e30a3686357ce951ac4e909884c23689d819965a47c108a4", "address": "0x0000000000000000000000000000000000001010", "topics": [ "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", "0x0000000000000000000000000000000000000000000000000000000000001010", "0x000000000000000000000000d078e391cbaeaa6c5785124a7207ff57d64604b7", - "0x000000000000000000000000c26880a0af2ea0c7e8130e6ec47af756465452e8" + "0x000000000000000000000000c275dc8be39f50d12f66b6a63629c39da5bae5bd" ], - "data": "0x000000000000000000000000000000000000000000000000000f40106106ec46000000000000000000000000000000000000000000000000902bbf0b1095f1b2000000000000000000000000000000000000000000001db7ed21bb82befe40f2000000000000000000000000000000000000000000000000901c7efaaf8f056c000000000000000000000000000000000000000000001db7ed30fb9320052d38", - "logIndex": 5, - "blockHash": "0xf0320a01d426f46d0425f65e24d9c65484aa5465ae8063fbf6f75cc5a63c6186" + "data": "0x000000000000000000000000000000000000000000000000001004bc12ea12740000000000000000000000000000000000000000000000008c249dda20aa65140000000000000000000000000000000000000000000011f2549958d65fc9a0120000000000000000000000000000000000000000000000008c14991e0dc052a00000000000000000000000000000000000000000000011f254a95d9272b3b286", + "logIndex": 28, + "blockHash": "0xb3885249e0932437a2428e2bab528db19408f8c6d92d54e8c93c62380822006e" } ], - "blockNumber": 34373931, - "cumulativeGasUsed": "2884731", + "blockNumber": 37644755, + "cumulativeGasUsed": "3379117", "status": 1, "byzantium": true }, "args": [], - "numDeployments": 4, - "solcInputHash": "c2684ac7ef00452775c6a94fe449842d", - "metadata": "{\"compiler\":{\"version\":\"0.8.13+commit.abaa5c0e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"BridgeableContractDeployed\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"adminCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"bridgeIn\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"bridgeOut\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"selector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"contractType\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"chainType\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"salt\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"byteCode\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"initCode\",\"type\":\"bytes\"}],\"internalType\":\"struct DeploymentConfig\",\"name\":\"config\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"}],\"internalType\":\"struct Verification\",\"name\":\"signature\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"}],\"name\":\"deployHolographableContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"contractType\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"chainType\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"salt\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"byteCode\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"initCode\",\"type\":\"bytes\"}],\"internalType\":\"struct DeploymentConfig\",\"name\":\"config\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"}],\"internalType\":\"struct Verification\",\"name\":\"signature\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"deployOnCurrentChain\",\"type\":\"bool\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"toChain\",\"type\":\"uint32\"}],\"internalType\":\"struct BridgeSettings[]\",\"name\":\"bridgeSettings\",\"type\":\"tuple[]\"}],\"name\":\"deployHolographableContractMultiChain\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"adminAddress\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getHolograph\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"holograph\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRegistry\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"registry\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"initPayload\",\"type\":\"bytes\"}],\"name\":\"init\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"adminAddress\",\"type\":\"address\"}],\"name\":\"setAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"holograph\",\"type\":\"address\"}],\"name\":\"setHolograph\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"registry\",\"type\":\"address\"}],\"name\":\"setRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"author\":\"https://github.com/holographxyz\",\"details\":\"The contract provides methods that allow for the creation of Holograph Protocol compliant smart contracts, that are capable of minting holographable assets\",\"kind\":\"dev\",\"methods\":{\"bridgeIn(uint32,bytes)\":{\"details\":\"This function directly forwards the calldata to the deployHolographableContract function It is used to allow for Holograph Bridge to make cross-chain deployments\"},\"bridgeOut(uint32,address,bytes)\":{\"details\":\"This function directly returns the calldata It is used to allow for Holograph Bridge to make cross-chain deployments\"},\"constructor\":{\"details\":\"Constructor is left empty and init is used instead\"},\"deployHolographableContract((bytes32,uint32,bytes32,bytes,bytes),(bytes32,bytes32,uint8),address)\":{\"details\":\"Using this function allows to deploy smart contracts that have the same address across all EVM chains\",\"params\":{\"config\":\"contract deployement configurations\",\"signature\":\"that was created by the wallet that created the original payload\",\"signer\":\"address of wallet that created the payload\"}},\"getHolograph()\":{\"details\":\"Used for storing a reference to all the primary modules and variables of the protocol\"},\"getRegistry()\":{\"details\":\"This module stores a reference for all deployed holographable smart contracts\"},\"init(bytes)\":{\"details\":\"This function is called by the deployer/factory when creating a contract\",\"params\":{\"initPayload\":\"abi encoded payload to use for contract initilaization\"}},\"setHolograph(address)\":{\"params\":{\"holograph\":\"address of the Holograph Protocol smart contract to use\"}},\"setRegistry(address)\":{\"params\":{\"registry\":\"address of the Holograph Registry smart contract to use\"}}},\"stateVariables\":{\"_holographSlot\":{\"details\":\"bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\"},\"_registrySlot\":{\"details\":\"bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\"}},\"title\":\"Holograph Factory\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"bridgeIn(uint32,bytes)\":{\"notice\":\"Deploy holographable contract via bridge request\"},\"bridgeOut(uint32,address,bytes)\":{\"notice\":\"Deploy holographable contract via bridge request\"},\"deployHolographableContract((bytes32,uint32,bytes32,bytes,bytes),(bytes32,bytes32,uint8),address)\":{\"notice\":\"Deploy a holographable smart contract\"},\"getHolograph()\":{\"notice\":\"Get the Holograph Protocol contract\"},\"getRegistry()\":{\"notice\":\"Get the Holograph Registry module\"},\"init(bytes)\":{\"notice\":\"Used internally to initialize the contract instead of through a constructor\"},\"setHolograph(address)\":{\"notice\":\"Update the Holograph Protocol contract address\"},\"setRegistry(address)\":{\"notice\":\"Update the Holograph Registry module address\"}},\"notice\":\"Deploy holographable contracts\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/HolographFactory.sol\":\"HolographFactory\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc721a-upgradeable/=erc721a-upgradeable/\",\":forge-std/=lib/forge-std/src/\"]},\"sources\":{\"contracts/HolographFactory.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nimport \\\"./abstract/Admin.sol\\\";\\nimport \\\"./abstract/Initializable.sol\\\";\\n\\nimport \\\"./enforcer/Holographer.sol\\\";\\n\\nimport \\\"./interface/Holographable.sol\\\";\\nimport \\\"./interface/HolographBridgeInterface.sol\\\";\\nimport \\\"./interface/HolographFactoryInterface.sol\\\";\\nimport \\\"./interface/HolographInterface.sol\\\";\\nimport \\\"./interface/HolographRegistryInterface.sol\\\";\\nimport \\\"./interface/InitializableInterface.sol\\\";\\n\\nimport \\\"./struct/BridgeSettings.sol\\\";\\nimport \\\"./struct/DeploymentConfig.sol\\\";\\nimport \\\"./struct/Verification.sol\\\";\\n\\n/**\\n * @title Holograph Factory\\n * @author https://github.com/holographxyz\\n * @notice Deploy holographable contracts\\n * @dev The contract provides methods that allow for the creation of Holograph Protocol compliant smart contracts, that are capable of minting holographable assets\\n */\\ncontract HolographFactory is Admin, Initializable, Holographable, HolographFactoryInterface {\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\\n */\\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\\n */\\n bytes32 constant _registrySlot = 0xce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7;\\n\\n /**\\n * @dev Constructor is left empty and init is used instead\\n */\\n constructor() {}\\n\\n /**\\n * @notice Used internally to initialize the contract instead of through a constructor\\n * @dev This function is called by the deployer/factory when creating a contract\\n * @param initPayload abi encoded payload to use for contract initilaization\\n */\\n function init(bytes memory initPayload) external override returns (bytes4) {\\n require(!_isInitialized(), \\\"HOLOGRAPH: already initialized\\\");\\n (address holograph, address registry) = abi.decode(initPayload, (address, address));\\n assembly {\\n sstore(_adminSlot, origin())\\n sstore(_holographSlot, holograph)\\n sstore(_registrySlot, registry)\\n }\\n _setInitialized();\\n return InitializableInterface.init.selector;\\n }\\n\\n /**\\n * @notice Deploy holographable contract via bridge request\\n * @dev This function directly forwards the calldata to the deployHolographableContract function\\n * It is used to allow for Holograph Bridge to make cross-chain deployments\\n */\\n function bridgeIn(\\n uint32, /* fromChain*/\\n bytes calldata payload\\n ) external returns (bytes4) {\\n (DeploymentConfig memory config, Verification memory signature, address signer) = abi.decode(\\n payload,\\n (DeploymentConfig, Verification, address)\\n );\\n HolographFactoryInterface(address(this)).deployHolographableContract(config, signature, signer);\\n return Holographable.bridgeIn.selector;\\n }\\n\\n /**\\n * @notice Deploy holographable contract via bridge request\\n * @dev This function directly returns the calldata\\n * It is used to allow for Holograph Bridge to make cross-chain deployments\\n */\\n function bridgeOut(\\n uint32, /* toChain*/\\n address, /* sender*/\\n bytes calldata payload\\n ) external pure returns (bytes4 selector, bytes memory data) {\\n return (Holographable.bridgeOut.selector, payload);\\n }\\n\\n function deployHolographableContractMultiChain(\\n DeploymentConfig memory config,\\n Verification memory signature,\\n address signer,\\n bool deployOnCurrentChain,\\n BridgeSettings[] memory bridgeSettings\\n ) external payable {\\n if (deployOnCurrentChain) {\\n deployHolographableContract(config, signature, signer);\\n }\\n bytes memory payload = abi.encode(config, signature, signer);\\n HolographInterface holograph;\\n assembly {\\n holograph := sload(_holographSlot)\\n }\\n HolographBridgeInterface bridge = HolographBridgeInterface(holograph.getBridge());\\n uint256 l = bridgeSettings.length;\\n for (uint256 i = 0; i < l; i++) {\\n bridge.bridgeOutRequest{value: bridgeSettings[i].value}(\\n bridgeSettings[i].toChain,\\n address(this),\\n bridgeSettings[i].gasLimit,\\n bridgeSettings[i].gasPrice,\\n payload\\n );\\n }\\n }\\n\\n /**\\n * @notice Deploy a holographable smart contract\\n * @dev Using this function allows to deploy smart contracts that have the same address across all EVM chains\\n * @param config contract deployement configurations\\n * @param signature that was created by the wallet that created the original payload\\n * @param signer address of wallet that created the payload\\n */\\n function deployHolographableContract(\\n DeploymentConfig memory config,\\n Verification memory signature,\\n address signer\\n ) public {\\n address registry;\\n address holograph;\\n assembly {\\n holograph := sload(_holographSlot)\\n registry := sload(_registrySlot)\\n }\\n /**\\n * @dev the configuration is encoded and hashed along with signer address\\n */\\n bytes32 hash = keccak256(\\n abi.encodePacked(\\n config.contractType,\\n config.chainType,\\n config.salt,\\n keccak256(config.byteCode),\\n keccak256(config.initCode),\\n signer\\n )\\n );\\n /**\\n * @dev the hash is validated against signature\\n * this is to guarantee that the original creator's configuration has not been altered\\n */\\n require(_verifySigner(signature.r, signature.s, signature.v, hash, signer), \\\"HOLOGRAPH: invalid signature\\\");\\n /**\\n * @dev check that this contract has not already been deployed on this chain\\n */\\n bytes memory holographerBytecode = type(Holographer).creationCode;\\n address holographerAddress = address(\\n uint160(uint256(keccak256(abi.encodePacked(bytes1(0xff), address(this), hash, keccak256(holographerBytecode)))))\\n );\\n require(!_isContract(holographerAddress), \\\"HOLOGRAPH: already deployed\\\");\\n /**\\n * @dev convert hash into uint256 which will be used as the salt for create2\\n */\\n uint256 saltInt = uint256(hash);\\n address sourceContractAddress;\\n bytes memory sourceByteCode = config.byteCode;\\n assembly {\\n /**\\n * @dev deploy the user created smart contract first\\n */\\n sourceContractAddress := create2(0, add(sourceByteCode, 0x20), mload(sourceByteCode), saltInt)\\n }\\n assembly {\\n /**\\n * @dev deploy the Holographer contract\\n */\\n holographerAddress := create2(0, add(holographerBytecode, 0x20), mload(holographerBytecode), saltInt)\\n }\\n /**\\n * @dev initialize the Holographer contract\\n */\\n require(\\n InitializableInterface(holographerAddress).init(\\n abi.encode(abi.encode(config.chainType, holograph, config.contractType, sourceContractAddress), config.initCode)\\n ) == InitializableInterface.init.selector,\\n \\\"initialization failed\\\"\\n );\\n /**\\n * @dev update the Holograph Registry with deployed contract address\\n */\\n HolographRegistryInterface(registry).setHolographedHashAddress(hash, holographerAddress);\\n /**\\n * @dev emit an event that on-chain indexers can easily read\\n */\\n emit BridgeableContractDeployed(holographerAddress, hash);\\n }\\n\\n /**\\n * @notice Get the Holograph Protocol contract\\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\\n */\\n function getHolograph() external view returns (address holograph) {\\n assembly {\\n holograph := sload(_holographSlot)\\n }\\n }\\n\\n /**\\n * @notice Update the Holograph Protocol contract address\\n * @param holograph address of the Holograph Protocol smart contract to use\\n */\\n function setHolograph(address holograph) external onlyAdmin {\\n assembly {\\n sstore(_holographSlot, holograph)\\n }\\n }\\n\\n /**\\n * @notice Get the Holograph Registry module\\n * @dev This module stores a reference for all deployed holographable smart contracts\\n */\\n function getRegistry() external view returns (address registry) {\\n assembly {\\n registry := sload(_registrySlot)\\n }\\n }\\n\\n /**\\n * @notice Update the Holograph Registry module address\\n * @param registry address of the Holograph Registry smart contract to use\\n */\\n function setRegistry(address registry) external onlyAdmin {\\n assembly {\\n sstore(_registrySlot, registry)\\n }\\n }\\n\\n /**\\n * @dev Internal function used for checking if a contract has been deployed at address\\n */\\n function _isContract(address contractAddress) private view returns (bool) {\\n bytes32 codehash;\\n assembly {\\n codehash := extcodehash(contractAddress)\\n }\\n return (codehash != 0x0 && codehash != 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470);\\n }\\n\\n /**\\n * @dev Internal function used for verifying a signature\\n */\\n function _verifySigner(\\n bytes32 r,\\n bytes32 s,\\n uint8 v,\\n bytes32 hash,\\n address signer\\n ) private pure returns (bool) {\\n if (v < 27) {\\n v += 27;\\n }\\n if (v != 27 && v != 28) {\\n return false;\\n }\\n // prevent signature malleability by checking if s-value is in the upper range\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n // if s-value is in upper range, calculate a new s-value\\n s = bytes32(0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - uint256(s));\\n // flip the v-value\\n if (v == 27) {\\n v = 28;\\n } else {\\n v = 27;\\n }\\n // check if s-value is still in upper range\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return false;\\n }\\n }\\n /**\\n * @dev signature is checked against EIP-191 first, then directly, to support legacy wallets\\n */\\n return (signer != address(0) &&\\n (ecrecover(keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash)), v, r, s) == signer ||\\n ecrecover(hash, v, r, s) == signer));\\n }\\n\\n /**\\n * @dev Purposefully reverts to prevent having any type of ether transfered into the contract\\n */\\n receive() external payable {\\n revert();\\n }\\n\\n /**\\n * @dev Purposefully reverts to prevent any calls to undefined functions\\n */\\n fallback() external payable {\\n revert();\\n }\\n}\\n\",\"keccak256\":\"0x8daccfb651b96557add6db9f587f21109fb5cf698f5db8566b92d936197c48f3\",\"license\":\"UNLICENSED\"},\"contracts/abstract/Admin.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nabstract contract Admin {\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.admin')) - 1)\\n */\\n bytes32 constant _adminSlot = 0x3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c9;\\n\\n modifier onlyAdmin() {\\n require(msg.sender == getAdmin(), \\\"HOLOGRAPH: admin only function\\\");\\n _;\\n }\\n\\n constructor() {}\\n\\n function admin() public view returns (address) {\\n return getAdmin();\\n }\\n\\n function getAdmin() public view returns (address adminAddress) {\\n assembly {\\n adminAddress := sload(_adminSlot)\\n }\\n }\\n\\n function setAdmin(address adminAddress) public onlyAdmin {\\n assembly {\\n sstore(_adminSlot, adminAddress)\\n }\\n }\\n\\n function adminCall(address target, bytes calldata data) external payable onlyAdmin {\\n assembly {\\n calldatacopy(0, data.offset, data.length)\\n let result := call(gas(), target, callvalue(), 0, data.length, 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n switch result\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x93552c9253b579c45113a150a6a3dfddb997afd939d09b49c34d040525734b1a\",\"license\":\"UNLICENSED\"},\"contracts/abstract/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nimport \\\"../interface/InitializableInterface.sol\\\";\\n\\n/**\\n * @title Initializable\\n * @author https://github.com/holographxyz\\n * @notice Use init instead of constructor\\n * @dev This allows for use of init function to make one time initializations without the need for a constructor\\n */\\nabstract contract Initializable is InitializableInterface {\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.initialized')) - 1)\\n */\\n bytes32 constant _initializedSlot = 0x4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a01;\\n\\n /**\\n * @dev Constructor is left empty and init is used instead\\n */\\n constructor() {}\\n\\n /**\\n * @notice Used internally to initialize the contract instead of through a constructor\\n * @dev This function is called by the deployer/factory when creating a contract\\n * @param initPayload abi encoded payload to use for contract initilaization\\n */\\n function init(bytes memory initPayload) external virtual returns (bytes4);\\n\\n function _isInitialized() internal view returns (bool initialized) {\\n assembly {\\n initialized := sload(_initializedSlot)\\n }\\n }\\n\\n function _setInitialized() internal {\\n assembly {\\n sstore(_initializedSlot, 0x0000000000000000000000000000000000000000000000000000000000000001)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa55dc367285f96952dec56adfbfb48b6a4be31aef9ba0d30ad8c91023a572462\",\"license\":\"UNLICENSED\"},\"contracts/enforcer/Holographer.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nimport \\\"../abstract/Admin.sol\\\";\\nimport \\\"../abstract/Initializable.sol\\\";\\n\\nimport \\\"../interface/HolographInterface.sol\\\";\\nimport \\\"../interface/HolographerInterface.sol\\\";\\nimport \\\"../interface/HolographRegistryInterface.sol\\\";\\nimport \\\"../interface/InitializableInterface.sol\\\";\\n\\n/**\\n * @dev This contract is a binder. It puts together all the variables to make the underlying contracts functional and be bridgeable.\\n */\\ncontract Holographer is Admin, Initializable, HolographerInterface {\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.originChain')) - 1)\\n */\\n bytes32 constant _originChainSlot = 0xd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d;\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\\n */\\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.contractType')) - 1)\\n */\\n bytes32 constant _contractTypeSlot = 0x0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c7;\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.sourceContract')) - 1)\\n */\\n bytes32 constant _sourceContractSlot = 0x27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b074;\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.blockHeight')) - 1)\\n */\\n bytes32 constant _blockHeightSlot = 0x9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de3;\\n\\n /**\\n * @dev Constructor is left empty and init is used instead\\n */\\n constructor() {}\\n\\n /**\\n * @notice Used internally to initialize the contract instead of through a constructor\\n * @dev This function is called by the deployer/factory when creating a contract\\n * @param initPayload abi encoded payload to use for contract initilaization\\n */\\n function init(bytes memory initPayload) external override returns (bytes4) {\\n require(!_isInitialized(), \\\"HOLOGRAPHER: already initialized\\\");\\n (bytes memory encoded, bytes memory initCode) = abi.decode(initPayload, (bytes, bytes));\\n (uint32 originChain, address holograph, bytes32 contractType, address sourceContract) = abi.decode(\\n encoded,\\n (uint32, address, bytes32, address)\\n );\\n assembly {\\n sstore(_adminSlot, caller())\\n sstore(_blockHeightSlot, number())\\n sstore(_contractTypeSlot, contractType)\\n sstore(_holographSlot, holograph)\\n sstore(_originChainSlot, originChain)\\n sstore(_sourceContractSlot, sourceContract)\\n }\\n (bool success, bytes memory returnData) = HolographRegistryInterface(HolographInterface(holograph).getRegistry())\\n .getReservedContractTypeAddress(contractType)\\n .delegatecall(abi.encodeWithSelector(InitializableInterface.init.selector, initCode));\\n bytes4 selector = abi.decode(returnData, (bytes4));\\n require(success && selector == InitializableInterface.init.selector, \\\"HOLOGRAPH: initialization failed\\\");\\n _setInitialized();\\n return InitializableInterface.init.selector;\\n }\\n\\n /**\\n * @dev Returns the contract type that is used for loading the Enforcer\\n */\\n function getContractType() external view returns (bytes32 contractType) {\\n assembly {\\n contractType := sload(_contractTypeSlot)\\n }\\n }\\n\\n /**\\n * @dev Returns the block height of when the smart contract was deployed. Useful for retrieving deployment config for re-deployment on other EVM-compatible chains.\\n */\\n function getDeploymentBlock() external view returns (uint256 deploymentBlock) {\\n assembly {\\n deploymentBlock := sload(_blockHeightSlot)\\n }\\n }\\n\\n /**\\n * @dev Returns a hardcoded address for the Holograph smart contract.\\n */\\n function getHolograph() external view returns (address holograph) {\\n assembly {\\n holograph := sload(_holographSlot)\\n }\\n }\\n\\n /**\\n * @dev Returns a hardcoded address for the Holograph smart contract that controls and enforces the ERC standards.\\n */\\n function getHolographEnforcer() public view returns (address) {\\n HolographInterface holograph;\\n bytes32 contractType;\\n assembly {\\n holograph := sload(_holographSlot)\\n contractType := sload(_contractTypeSlot)\\n }\\n return HolographRegistryInterface(holograph.getRegistry()).getReservedContractTypeAddress(contractType);\\n }\\n\\n /**\\n * @dev Returns the original chain that contract was deployed on.\\n */\\n function getOriginChain() external view returns (uint32 originChain) {\\n assembly {\\n originChain := sload(_originChainSlot)\\n }\\n }\\n\\n /**\\n * @dev Returns a hardcoded address for the custom secure storage contract deployed in parallel with this contract deployment.\\n */\\n function getSourceContract() external view returns (address sourceContract) {\\n assembly {\\n sourceContract := sload(_sourceContractSlot)\\n }\\n }\\n\\n /**\\n * @dev Purposefully left empty, to prevent running out of gas errors when receiving native token payments.\\n */\\n receive() external payable {}\\n\\n /**\\n * @dev This takes the Enforcer's source code, runs it, and uses current address for storage slots.\\n */\\n fallback() external payable {\\n address holographEnforcer = getHolographEnforcer();\\n assembly {\\n calldatacopy(0, 0, calldatasize())\\n let result := delegatecall(gas(), holographEnforcer, 0, calldatasize(), 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n switch result\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc31b575625e84743d9a14f282ef3894becece82a6f47ec945585ac5a0d1895f7\",\"license\":\"UNLICENSED\"},\"contracts/interface/HolographBridgeInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\n/**\\n * @title Holograph Bridge\\n * @author https://github.com/holographxyz\\n * @notice Beam any holographable contracts and assets across blockchains\\n * @dev The contract abstracts all the complexities of making bridge requests and uses a universal interface to bridge any type of holographable assets\\n */\\ninterface HolographBridgeInterface {\\n /**\\n * @notice Receive a beam from another chain\\n * @dev This function can only be called by the Holograph Operator module\\n * @param fromChain Holograph Chain ID where the brigeOutRequest was created\\n * @param holographableContract address of the destination contract that the bridgeInRequest is targeted for\\n * @param hToken address of the hToken contract that wrapped the origin chain native gas token\\n * @param hTokenRecipient address of recipient for the hToken reward\\n * @param hTokenValue exact amount of hToken reward in wei\\n * @param doNotRevert boolean used to specify if the call should revert\\n * @param bridgeInPayload actual abi encoded bytes of the data that the holographable contract bridgeIn function will receive\\n */\\n function bridgeInRequest(\\n uint256 nonce,\\n uint32 fromChain,\\n address holographableContract,\\n address hToken,\\n address hTokenRecipient,\\n uint256 hTokenValue,\\n bool doNotRevert,\\n bytes calldata bridgeInPayload\\n ) external payable;\\n\\n /**\\n * @notice Create a beam request for a destination chain\\n * @dev This function works for deploying contracts and beaming supported holographable assets across chains\\n * @param toChain Holograph Chain ID where the beam is being sent to\\n * @param holographableContract address of the contract for which the bridge request is being made\\n * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain\\n * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain\\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\\n */\\n function bridgeOutRequest(\\n uint32 toChain,\\n address holographableContract,\\n uint256 gasLimit,\\n uint256 gasPrice,\\n bytes calldata bridgeOutPayload\\n ) external payable;\\n\\n /**\\n * @notice Do not call this function, it will always revert\\n * @dev Used by getBridgeOutRequestPayload function\\n * It is purposefully inverted to always revert on a successful call\\n * Marked as external and not private to allow use inside try/catch of getBridgeOutRequestPayload function\\n * If this function does not revert and returns a string, it is the actual revert reason\\n * @param sender address of actual sender that is planning to make a bridgeOutRequest call\\n * @param toChain holograph chain id of destination chain\\n * @param holographableContract address of the contract for which the bridge request is being made\\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\\n */\\n function revertedBridgeOutRequest(\\n address sender,\\n uint32 toChain,\\n address holographableContract,\\n bytes calldata bridgeOutPayload\\n ) external returns (string memory revertReason);\\n\\n /**\\n * @notice Get the payload created by the bridgeOutRequest function\\n * @dev Use this function to get the payload that will be generated by a bridgeOutRequest\\n * Only use this with a static call\\n * @param toChain Holograph Chain ID where the beam is being sent to\\n * @param holographableContract address of the contract for which the bridge request is being made\\n * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain\\n * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain\\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\\n * @return samplePayload bytes made up of the bridgeOutRequest payload\\n */\\n function getBridgeOutRequestPayload(\\n uint32 toChain,\\n address holographableContract,\\n uint256 gasLimit,\\n uint256 gasPrice,\\n bytes calldata bridgeOutPayload\\n ) external returns (bytes memory samplePayload);\\n\\n /**\\n * @notice Get the fees associated with sending specific payload\\n * @dev Will provide exact costs on protocol and message side, combine the two to get total\\n * @param toChain holograph chain id of destination chain for payload\\n * @param gasLimit amount of gas to provide for executing payload on destination chain\\n * @param gasPrice maximum amount to pay for gas price, can be set to 0 and will be chose automatically\\n * @param crossChainPayload the entire packet being sent cross-chain\\n * @return hlgFee the amount (in wei) of native gas token that will cost for finalizing job on destiantion chain\\n * @return msgFee the amount (in wei) of native gas token that will cost for sending message to destiantion chain\\n * @return dstGasPrice the amount (in wei) that destination message maximum gas price will be\\n */\\n function getMessageFee(\\n uint32 toChain,\\n uint256 gasLimit,\\n uint256 gasPrice,\\n bytes calldata crossChainPayload\\n )\\n external\\n view\\n returns (\\n uint256 hlgFee,\\n uint256 msgFee,\\n uint256 dstGasPrice\\n );\\n\\n /**\\n * @notice Get the address of the Holograph Factory module\\n * @dev Used for deploying holographable smart contracts\\n */\\n function getFactory() external view returns (address factory);\\n\\n /**\\n * @notice Update the Holograph Factory module address\\n * @param factory address of the Holograph Factory smart contract to use\\n */\\n function setFactory(address factory) external;\\n\\n /**\\n * @notice Get the Holograph Protocol contract\\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\\n */\\n function getHolograph() external view returns (address holograph);\\n\\n /**\\n * @notice Update the Holograph Protocol contract address\\n * @param holograph address of the Holograph Protocol smart contract to use\\n */\\n function setHolograph(address holograph) external;\\n\\n /**\\n * @notice Get the latest job nonce\\n * @dev You can use the job nonce as a way to calculate total amount of bridge requests that have been made\\n */\\n function getJobNonce() external view returns (uint256 jobNonce);\\n\\n /**\\n * @notice Get the address of the Holograph Operator module\\n * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module\\n */\\n function getOperator() external view returns (address operator);\\n\\n /**\\n * @notice Update the Holograph Operator module address\\n * @param operator address of the Holograph Operator smart contract to use\\n */\\n function setOperator(address operator) external;\\n\\n /**\\n * @notice Get the Holograph Registry module\\n * @dev This module stores a reference for all deployed holographable smart contracts\\n */\\n function getRegistry() external view returns (address registry);\\n\\n /**\\n * @notice Update the Holograph Registry module address\\n * @param registry address of the Holograph Registry smart contract to use\\n */\\n function setRegistry(address registry) external;\\n}\\n\",\"keccak256\":\"0xa8e2efb427f7114bc2cd43d3cefd1e6be3ef10f7dce6b8acb6de66e50668824e\",\"license\":\"UNLICENSED\"},\"contracts/interface/HolographFactoryInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nimport \\\"../struct/DeploymentConfig.sol\\\";\\nimport \\\"../struct/Verification.sol\\\";\\n\\n/**\\n * @title Holograph Factory\\n * @author https://github.com/holographxyz\\n * @notice Deploy holographable contracts\\n * @dev The contract provides methods that allow for the creation of Holograph Protocol compliant smart contracts, that are capable of minting holographable assets\\n */\\ninterface HolographFactoryInterface {\\n /**\\n * @dev This event is fired every time that a bridgeable contract is deployed.\\n */\\n event BridgeableContractDeployed(address indexed contractAddress, bytes32 indexed hash);\\n\\n /**\\n * @notice Deploy a holographable smart contract\\n * @dev Using this function allows to deploy smart contracts that have the same address across all EVM chains\\n * @param config contract deployement configurations\\n * @param signature that was created by the wallet that created the original payload\\n * @param signer address of wallet that created the payload\\n */\\n function deployHolographableContract(\\n DeploymentConfig memory config,\\n Verification memory signature,\\n address signer\\n ) external;\\n\\n /**\\n * @notice Get the Holograph Protocol contract\\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\\n */\\n function getHolograph() external view returns (address holograph);\\n\\n /**\\n * @notice Update the Holograph Protocol contract address\\n * @param holograph address of the Holograph Protocol smart contract to use\\n */\\n function setHolograph(address holograph) external;\\n\\n /**\\n * @notice Get the Holograph Registry module\\n * @dev This module stores a reference for all deployed holographable smart contracts\\n */\\n function getRegistry() external view returns (address registry);\\n\\n /**\\n * @notice Update the Holograph Registry module address\\n * @param registry address of the Holograph Registry smart contract to use\\n */\\n function setRegistry(address registry) external;\\n}\\n\",\"keccak256\":\"0x44cd1db20207337ef6abde2d0f42837778d13fb62fe353b0ee9b293a601a0d71\",\"license\":\"UNLICENSED\"},\"contracts/interface/HolographInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\n/**\\n * @title Holograph Protocol\\n * @author https://github.com/holographxyz\\n * @notice This is the primary Holograph Protocol smart contract\\n * @dev This contract stores a reference to all the primary modules and variables of the protocol\\n */\\ninterface HolographInterface {\\n /**\\n * @notice Get the address of the Holograph Bridge module\\n * @dev Used for beaming holographable assets cross-chain\\n */\\n function getBridge() external view returns (address bridge);\\n\\n /**\\n * @notice Update the Holograph Bridge module address\\n * @param bridge address of the Holograph Bridge smart contract to use\\n */\\n function setBridge(address bridge) external;\\n\\n /**\\n * @notice Get the chain ID that the Protocol was deployed on\\n * @dev Useful for checking if/when a hard fork occurs\\n */\\n function getChainId() external view returns (uint256 chainId);\\n\\n /**\\n * @notice Update the chain ID\\n * @dev Useful for updating once a hard fork has been mitigated\\n * @param chainId EVM chain ID to use\\n */\\n function setChainId(uint256 chainId) external;\\n\\n /**\\n * @notice Get the address of the Holograph Factory module\\n * @dev Used for deploying holographable smart contracts\\n */\\n function getFactory() external view returns (address factory);\\n\\n /**\\n * @notice Update the Holograph Factory module address\\n * @param factory address of the Holograph Factory smart contract to use\\n */\\n function setFactory(address factory) external;\\n\\n /**\\n * @notice Get the Holograph chain Id\\n * @dev Holograph uses an internal chain id mapping\\n */\\n function getHolographChainId() external view returns (uint32 holographChainId);\\n\\n /**\\n * @notice Update the Holograph chain ID\\n * @dev Useful for updating once a hard fork was mitigated\\n * @param holographChainId Holograph chain ID to use\\n */\\n function setHolographChainId(uint32 holographChainId) external;\\n\\n /**\\n * @notice Get the address of the Holograph Interfaces module\\n * @dev Holograph uses this contract to store data that needs to be accessed by a large portion of the modules\\n */\\n function getInterfaces() external view returns (address interfaces);\\n\\n /**\\n * @notice Update the Holograph Interfaces module address\\n * @param interfaces address of the Holograph Interfaces smart contract to use\\n */\\n function setInterfaces(address interfaces) external;\\n\\n /**\\n * @notice Get the address of the Holograph Operator module\\n * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module\\n */\\n function getOperator() external view returns (address operator);\\n\\n /**\\n * @notice Update the Holograph Operator module address\\n * @param operator address of the Holograph Operator smart contract to use\\n */\\n function setOperator(address operator) external;\\n\\n /**\\n * @notice Get the Holograph Registry module\\n * @dev This module stores a reference for all deployed holographable smart contracts\\n */\\n function getRegistry() external view returns (address registry);\\n\\n /**\\n * @notice Update the Holograph Registry module address\\n * @param registry address of the Holograph Registry smart contract to use\\n */\\n function setRegistry(address registry) external;\\n\\n /**\\n * @notice Get the Holograph Treasury module\\n * @dev All of the Holograph Protocol assets are stored and managed by this module\\n */\\n function getTreasury() external view returns (address treasury);\\n\\n /**\\n * @notice Update the Holograph Treasury module address\\n * @param treasury address of the Holograph Treasury smart contract to use\\n */\\n function setTreasury(address treasury) external;\\n\\n /**\\n * @notice Get the Holograph Utility Token address\\n * @dev This is the official utility token of the Holograph Protocol\\n */\\n function getUtilityToken() external view returns (address utilityToken);\\n\\n /**\\n * @notice Update the Holograph Utility Token address\\n * @param utilityToken address of the Holograph Utility Token smart contract to use\\n */\\n function setUtilityToken(address utilityToken) external;\\n}\\n\",\"keccak256\":\"0x90b5643e77e914393c508d59b80f5739debfd72455029c0db041f92374b3f586\",\"license\":\"UNLICENSED\"},\"contracts/interface/HolographRegistryInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\ninterface HolographRegistryInterface {\\n function isHolographedContract(address smartContract) external view returns (bool);\\n\\n function isHolographedHashDeployed(bytes32 hash) external view returns (bool);\\n\\n function referenceContractTypeAddress(address contractAddress) external returns (bytes32);\\n\\n function getContractTypeAddress(bytes32 contractType) external view returns (address);\\n\\n function setContractTypeAddress(bytes32 contractType, address contractAddress) external;\\n\\n function getHolograph() external view returns (address holograph);\\n\\n function setHolograph(address holograph) external;\\n\\n function getHolographableContracts(uint256 index, uint256 length) external view returns (address[] memory contracts);\\n\\n function getHolographableContractsLength() external view returns (uint256);\\n\\n function getHolographedHashAddress(bytes32 hash) external view returns (address);\\n\\n function setHolographedHashAddress(bytes32 hash, address contractAddress) external;\\n\\n function getHToken(uint32 chainId) external view returns (address);\\n\\n function setHToken(uint32 chainId, address hToken) external;\\n\\n function getReservedContractTypeAddress(bytes32 contractType) external view returns (address contractTypeAddress);\\n\\n function setReservedContractTypeAddress(bytes32 hash, bool reserved) external;\\n\\n function setReservedContractTypeAddresses(bytes32[] calldata hashes, bool[] calldata reserved) external;\\n\\n function getUtilityToken() external view returns (address utilityToken);\\n\\n function setUtilityToken(address utilityToken) external;\\n}\\n\",\"keccak256\":\"0xaf69834caeee449c3d3d7c7da9bbd27368b448526d9b147482a319311288ad18\",\"license\":\"UNLICENSED\"},\"contracts/interface/Holographable.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\ninterface Holographable {\\n function bridgeIn(uint32 fromChain, bytes calldata payload) external returns (bytes4);\\n\\n function bridgeOut(\\n uint32 toChain,\\n address sender,\\n bytes calldata payload\\n ) external returns (bytes4 selector, bytes memory data);\\n}\\n\",\"keccak256\":\"0x4dd2fc1af269273c46156df8af5cedeed0dfb83f0bfa5696a8d64c768449285b\",\"license\":\"UNLICENSED\"},\"contracts/interface/HolographerInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\ninterface HolographerInterface {\\n function getContractType() external view returns (bytes32 contractType);\\n\\n function getDeploymentBlock() external view returns (uint256 deploymentBlock);\\n\\n function getHolograph() external view returns (address holograph);\\n\\n function getHolographEnforcer() external view returns (address);\\n\\n function getOriginChain() external view returns (uint32 originChain);\\n\\n function getSourceContract() external view returns (address sourceContract);\\n}\\n\",\"keccak256\":\"0x4274b9180266275a8df16b8e1f0956cc795fb1ab87db1c01264c343be3bea937\",\"license\":\"UNLICENSED\"},\"contracts/interface/InitializableInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\n/**\\n * @title Initializable\\n * @author https://github.com/holographxyz\\n * @notice Use init instead of constructor\\n * @dev This allows for use of init function to make one time initializations without the need of a constructor\\n */\\ninterface InitializableInterface {\\n /**\\n * @notice Used internally to initialize the contract instead of through a constructor\\n * @dev This function is called by the deployer/factory when creating a contract\\n * @param initPayload abi encoded payload to use for contract initilaization\\n */\\n function init(bytes memory initPayload) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0x0a76fae986c5c18110ce2b1818c84ec28b7bf7f8fb00d20b39b8d7225fbd892d\",\"license\":\"UNLICENSED\"},\"contracts/struct/BridgeSettings.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nstruct BridgeSettings {\\n uint256 value;\\n uint256 gasLimit;\\n uint256 gasPrice;\\n uint32 toChain;\\n}\\n\",\"keccak256\":\"0x405f453cf620c5e882cf6d915fd7d14c895877408a7fd7e298d6e751bd4a0ce1\",\"license\":\"UNLICENSED\"},\"contracts/struct/DeploymentConfig.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nstruct DeploymentConfig {\\n bytes32 contractType;\\n uint32 chainType;\\n bytes32 salt;\\n bytes byteCode;\\n bytes initCode;\\n}\\n\",\"keccak256\":\"0x5eb9e83676eb65fa424aa9ca79961e1602a749f264ea4f496a9c359dad0da726\",\"license\":\"UNLICENSED\"},\"contracts/struct/Verification.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nstruct Verification {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n}\\n\",\"keccak256\":\"0xd351869472bcb2497e0a771c6e7f7a0b794d099133c67f5f378a8f7839f9db92\",\"license\":\"UNLICENSED\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50612b68806100206000396000f3fe6080604052600436106100d65760003560e01c8063704b6c021161007f578063b7e0366111610059578063b7e036611461028d578063bf64a82d146102bb578063df6516bd146102ce578063f851a440146102ee57600080fd5b8063704b6c021461023a578063a8935c671461025a578063a91ee0dc1461026d57600080fd5b80634ddf47d4116100b05780634ddf47d4146101b25780635ab1bd53146101d25780636e9960c31461020657600080fd5b806308a1eb20146100e557806325d5cac81461013b5780634827ae0c1461015d57600080fd5b366100e057600080fd5b600080fd5b3480156100f157600080fd5b50610105610100366004611375565b610303565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020015b60405180910390f35b34801561014757600080fd5b5061015b6101563660046113ed565b6103ba565b005b34801561016957600080fd5b507fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a545b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610132565b3480156101be57600080fd5b506101056101cd36600461153f565b610499565b3480156101de57600080fd5b507fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e75461018d565b34801561021257600080fd5b507f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95461018d565b34801561024657600080fd5b5061015b6102553660046113ed565b610600565b61015b610268366004611697565b6106da565b34801561027957600080fd5b5061015b6102883660046113ed565b6108c1565b34801561029957600080fd5b506102ad6102a83660046117de565b61099b565b6040516101329291906118ac565b61015b6102c93660046118e7565b6109ef565b3480156102da57600080fd5b5061015b6102e9366004611907565b610aca565b3480156102fa57600080fd5b5061018d611015565b600080808061031485870187611907565b6040517fdf6516bd0000000000000000000000000000000000000000000000000000000081529295509093509150309063df6516bd9061035c9086908690869060040161196a565b600060405180830381600087803b15801561037657600080fd5b505af115801561038a573d6000803e3d6000fd5b507f08a1eb20000000000000000000000000000000000000000000000000000000009a9950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610475576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064015b60405180910390fd5b7fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55565b60006104c37f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a015490565b1561052a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a20616c726561647920696e697469616c697a65640000604482015260640161046c565b600080838060200190518101906105419190611a2c565b91509150327f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955817fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55807fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7556105d760017f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a0155565b507f4ddf47d4000000000000000000000000000000000000000000000000000000009392505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955565b81156106eb576106eb858585610aca565b60008585856040516020016107029392919061196a565b604051602081830303815290604052905060007fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a54905060008173ffffffffffffffffffffffffffffffffffffffff16630fffbaf36040518163ffffffff1660e01b8152600401602060405180830381865afa158015610786573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107aa9190611a66565b845190915060005b818110156108b5578273ffffffffffffffffffffffffffffffffffffffff1663e55856668783815181106107e8576107e8611a83565b60200260200101516000015188848151811061080657610806611a83565b602002602001015160600151308a868151811061082557610825611a83565b6020026020010151602001518b878151811061084357610843611a83565b6020026020010151604001518b6040518763ffffffff1660e01b8152600401610870959493929190611ab2565b6000604051808303818588803b15801561088957600080fd5b505af115801561089d573d6000803e3d6000fd5b505050505080806108ad90611b33565b9150506107b2565b50505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610977576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b7fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e755565b6000606063b7e0366160e01b848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250959c929b50919950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aa5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b808260003760008082600034875af13d6000803e808015610ac5573d6000f35b3d6000fd5b7fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a547fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e754845160208087015160408089015160608a015180519085012060808b01518051908601209251969796600096610bb796909594918b910195865260e09490941b7fffffffff0000000000000000000000000000000000000000000000000000000016602086015260248501929092526044840152606483015260601b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016608482015260980190565b604051602081830303815290604052805190602001209050610be88560000151866020015187604001518488611044565b610c4e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f484f4c4f47524150483a20696e76616c6964207369676e617475726500000000604482015260640161046c565b600060405180602001610c6090611306565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820381018352601f90910116604081815282516020808501919091207fff00000000000000000000000000000000000000000000000000000000000000828501527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b166021850152603584018790526055808501919091528251808503909101815260759093019091528151910120909150610d21816112cc565b15610d88576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f484f4c4f47524150483a20616c7265616479206465706c6f7965640000000000604482015260640161046c565b60608801518051849160009183906020830184f59150828551602087016000f560208c8101518d516040805163ffffffff9093169383019390935273ffffffffffffffffffffffffffffffffffffffff8b811693830193909352606082015284821660808201529195507f4ddf47d4000000000000000000000000000000000000000000000000000000009190861690634ddf47d49060a0016040516020818303038152906040528e60800151604051602001610e46929190611b6b565b6040516020818303038152906040526040518263ffffffff1660e01b8152600401610e719190611b90565b6020604051808303816000875af1158015610e90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eb49190611ba3565b7fffffffff000000000000000000000000000000000000000000000000000000001614610f3d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f696e697469616c697a6174696f6e206661696c65640000000000000000000000604482015260640161046c565b6040517f725229f60000000000000000000000000000000000000000000000000000000081526004810187905273ffffffffffffffffffffffffffffffffffffffff858116602483015289169063725229f690604401600060405180830381600087803b158015610fad57600080fd5b505af1158015610fc1573d6000803e3d6000fd5b505060405188925073ffffffffffffffffffffffffffffffffffffffff871691507fa802207d4c618b40db3b25b7b90e6f483e16b2c1f8d3610b15b345a718c6b41b90600090a35050505050505050505050565b600061103f7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95490565b905090565b6000601b8460ff1610156110605761105d601b85611be5565b93505b8360ff16601b1415801561107857508360ff16601c14155b15611085575060006112c3565b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0851115611122576110d7857ffffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141611c0a565b945060ff8416601b036110ed57601c93506110f2565b601b93505b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0851115611122575060006112c3565b73ffffffffffffffffffffffffffffffffffffffff8216158015906112c057506040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c810184905273ffffffffffffffffffffffffffffffffffffffff831690600190605c01604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600084529083018083525260ff881690820152606081018990526080810188905260a0016020604051602081039080840390855afa15801561120c573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff1614806112c0575060408051600081526020810180835285905260ff861691810191909152606081018790526080810186905273ffffffffffffffffffffffffffffffffffffffff83169060019060a0016020604051602081039080840390855afa15801561129e573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff16145b90505b95945050505050565b6000813f80158015906112ff57507fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708114155b9392505050565b610f3a80611c2283390190565b803563ffffffff8116811461132757600080fd5b919050565b60008083601f84011261133e57600080fd5b50813567ffffffffffffffff81111561135657600080fd5b60208301915083602082850101111561136e57600080fd5b9250929050565b60008060006040848603121561138a57600080fd5b61139384611313565b9250602084013567ffffffffffffffff8111156113af57600080fd5b6113bb8682870161132c565b9497909650939450505050565b73ffffffffffffffffffffffffffffffffffffffff811681146113ea57600080fd5b50565b6000602082840312156113ff57600080fd5b81356112ff816113c8565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516080810167ffffffffffffffff8111828210171561145c5761145c61140a565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156114a9576114a961140a565b604052919050565b600082601f8301126114c257600080fd5b813567ffffffffffffffff8111156114dc576114dc61140a565b61150d60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601611462565b81815284602083860101111561152257600080fd5b816020850160208301376000918101602001919091529392505050565b60006020828403121561155157600080fd5b813567ffffffffffffffff81111561156857600080fd5b611574848285016114b1565b949350505050565b600060a0828403121561158e57600080fd5b60405160a0810167ffffffffffffffff82821081831117156115b2576115b261140a565b81604052829350843583526115c960208601611313565b60208401526040850135604084015260608501359150808211156115ec57600080fd5b6115f8868387016114b1565b6060840152608085013591508082111561161157600080fd5b5061161e858286016114b1565b6080830152505092915050565b60006060828403121561163d57600080fd5b6040516060810181811067ffffffffffffffff821117156116605761166061140a565b80604052508091508235815260208301356020820152604083013560ff8116811461168a57600080fd5b6040919091015292915050565b600080600080600060e086880312156116af57600080fd5b853567ffffffffffffffff808211156116c757600080fd5b6116d389838a0161157c565b9650602091506116e589838a0161162b565b95506080808901356116f6816113c8565b955060a0890135801515811461170b57600080fd5b945060c08901358281111561171f57600080fd5b8901601f81018b1361173057600080fd5b8035838111156117425761174261140a565b611750858260051b01611462565b818152858101945060079190911b82018501908c82111561177057600080fd5b918501915b818310156117cb5783838e03121561178d5760008081fd5b611795611439565b8335815286840135878201526040808501359082015260606117b8818601611313565b9082015285529385019391830191611775565b8096505050505050509295509295909350565b600080600080606085870312156117f457600080fd5b6117fd85611313565b9350602085013561180d816113c8565b9250604085013567ffffffffffffffff81111561182957600080fd5b6118358782880161132c565b95989497509550505050565b6000815180845260005b818110156118675760208185018101518683018201520161184b565b81811115611879576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b7fffffffff00000000000000000000000000000000000000000000000000000000831681526040602082015260006115746040830184611841565b6000806000604084860312156118fc57600080fd5b8335611393816113c8565b600080600060a0848603121561191c57600080fd5b833567ffffffffffffffff81111561193357600080fd5b61193f8682870161157c565b93505061194f856020860161162b565b9150608084013561195f816113c8565b809150509250925092565b60a08152835160a082015263ffffffff60208501511660c0820152604084015160e08201526000606085015160a06101008401526119ac610140840182611841565b905060808601517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60848303016101208501526119e88282611841565b92505050835160208301526020840151604083015260ff6040850151166060830152611574608083018473ffffffffffffffffffffffffffffffffffffffff169052565b60008060408385031215611a3f57600080fd5b8251611a4a816113c8565b6020840151909250611a5b816113c8565b809150509250929050565b600060208284031215611a7857600080fd5b81516112ff816113c8565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b63ffffffff8616815273ffffffffffffffffffffffffffffffffffffffff8516602082015283604082015282606082015260a060808201526000611af960a0830184611841565b979650505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611b6457611b64611b04565b5060010190565b604081526000611b7e6040830185611841565b82810360208401526112c38185611841565b6020815260006112ff6020830184611841565b600060208284031215611bb557600080fd5b81517fffffffff00000000000000000000000000000000000000000000000000000000811681146112ff57600080fd5b600060ff821660ff84168060ff03821115611c0257611c02611b04565b019392505050565b600082821015611c1c57611c1c611b04565b50039056fe608060405234801561001057600080fd5b50610f1a806100206000396000f3fe6080604052600436106100c05760003560e01c806380d1cb3511610074578063c51a29e01161004e578063c51a29e0146102c1578063c8a4c3d5146102f5578063f851a4401461030a576100c7565b806380d1cb351461022c578063913a0ef21461026a578063bf64a82d146102ae576100c7565b80636e9960c3116100a55780636e9960c3146101a45780636faf275b146101d8578063704b6c021461020c576100c7565b80634827ae0c146100f95780634ddf47d414610153576100c7565b366100c757005b60006100d161031f565b90503660008037600080366000845af43d6000803e8080156100f2573d6000f35b3d6000fd5b005b34801561010557600080fd5b507fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a545b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b34801561015f57600080fd5b5061017361016e366004610bb4565b61045d565b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200161014a565b3480156101b057600080fd5b507f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c954610129565b3480156101e457600080fd5b507f27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b07454610129565b34801561021857600080fd5b506100f7610227366004610c59565b610911565b34801561023857600080fd5b507f9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de3545b60405190815260200161014a565b34801561027657600080fd5b507fd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d5460405163ffffffff909116815260200161014a565b6100f76102bc366004610c7d565b6109eb565b3480156102cd57600080fd5b507f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c75461025c565b34801561030157600080fd5b5061012961031f565b34801561031657600080fd5b50610129610ac1565b60008060007fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a5491507f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c75490508173ffffffffffffffffffffffffffffffffffffffff16635ab1bd536040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103db9190610d02565b73ffffffffffffffffffffffffffffffffffffffff166374b7510c826040518263ffffffff1660e01b815260040161041591815260200190565b602060405180830381865afa158015610432573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104569190610d02565b9250505090565b60006104877f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a015490565b156104f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f484f4c4f475241504845523a20616c726561647920696e697469616c697a656460448201526064015b60405180910390fd5b6000808380602001905181019061050a9190610d9c565b91509150600080600080858060200190518101906105289190610e00565b9350935093509350337f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955437f9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de355817f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c755827fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55837fd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d55807f27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b074556000808473ffffffffffffffffffffffffffffffffffffffff16635ab1bd536040518163ffffffff1660e01b8152600401602060405180830381865afa158015610650573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106749190610d02565b73ffffffffffffffffffffffffffffffffffffffff166374b7510c856040518263ffffffff1660e01b81526004016106ae91815260200190565b602060405180830381865afa1580156106cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ef9190610d02565b73ffffffffffffffffffffffffffffffffffffffff16634ddf47d460e01b8860405160240161071e9190610e5e565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009094169390931790925290516107a79190610eaf565b600060405180830381855af49150503d80600081146107e2576040519150601f19603f3d011682016040523d82523d6000602084013e6107e7565b606091505b50915091506000818060200190518101906108029190610ecb565b905082801561085257507fffffffff0000000000000000000000000000000000000000000000000000000081167f4ddf47d400000000000000000000000000000000000000000000000000000000145b6108b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f484f4c4f47524150483a20696e697469616c697a6174696f6e206661696c656460448201526064016104ea565b6108e160017f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a0155565b507f4ddf47d4000000000000000000000000000000000000000000000000000000009a9950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016104ea565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aa1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016104ea565b808260003760008082600034875af13d6000803e8080156100f2573d6000f35b6000610aeb7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95490565b905090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715610b6657610b66610af0565b604052919050565b600067ffffffffffffffff821115610b8857610b88610af0565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600060208284031215610bc657600080fd5b813567ffffffffffffffff811115610bdd57600080fd5b8201601f81018413610bee57600080fd5b8035610c01610bfc82610b6e565b610b1f565b818152856020838501011115610c1657600080fd5b81602084016020830137600091810160200191909152949350505050565b73ffffffffffffffffffffffffffffffffffffffff81168114610c5657600080fd5b50565b600060208284031215610c6b57600080fd5b8135610c7681610c34565b9392505050565b600080600060408486031215610c9257600080fd5b8335610c9d81610c34565b9250602084013567ffffffffffffffff80821115610cba57600080fd5b818601915086601f830112610cce57600080fd5b813581811115610cdd57600080fd5b876020828501011115610cef57600080fd5b6020830194508093505050509250925092565b600060208284031215610d1457600080fd5b8151610c7681610c34565b60005b83811015610d3a578181015183820152602001610d22565b83811115610d49576000848401525b50505050565b600082601f830112610d6057600080fd5b8151610d6e610bfc82610b6e565b818152846020838601011115610d8357600080fd5b610d94826020830160208701610d1f565b949350505050565b60008060408385031215610daf57600080fd5b825167ffffffffffffffff80821115610dc757600080fd5b610dd386838701610d4f565b93506020850151915080821115610de957600080fd5b50610df685828601610d4f565b9150509250929050565b60008060008060808587031215610e1657600080fd5b845163ffffffff81168114610e2a57600080fd5b6020860151909450610e3b81610c34565b604086015160608701519194509250610e5381610c34565b939692955090935050565b6020815260008251806020840152610e7d816040850160208701610d1f565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60008251610ec1818460208701610d1f565b9190910192915050565b600060208284031215610edd57600080fd5b81517fffffffff0000000000000000000000000000000000000000000000000000000081168114610c7657600080fdfea164736f6c634300080d000aa164736f6c634300080d000a", - "deployedBytecode": "0x6080604052600436106100d65760003560e01c8063704b6c021161007f578063b7e0366111610059578063b7e036611461028d578063bf64a82d146102bb578063df6516bd146102ce578063f851a440146102ee57600080fd5b8063704b6c021461023a578063a8935c671461025a578063a91ee0dc1461026d57600080fd5b80634ddf47d4116100b05780634ddf47d4146101b25780635ab1bd53146101d25780636e9960c31461020657600080fd5b806308a1eb20146100e557806325d5cac81461013b5780634827ae0c1461015d57600080fd5b366100e057600080fd5b600080fd5b3480156100f157600080fd5b50610105610100366004611375565b610303565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020015b60405180910390f35b34801561014757600080fd5b5061015b6101563660046113ed565b6103ba565b005b34801561016957600080fd5b507fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a545b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610132565b3480156101be57600080fd5b506101056101cd36600461153f565b610499565b3480156101de57600080fd5b507fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e75461018d565b34801561021257600080fd5b507f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95461018d565b34801561024657600080fd5b5061015b6102553660046113ed565b610600565b61015b610268366004611697565b6106da565b34801561027957600080fd5b5061015b6102883660046113ed565b6108c1565b34801561029957600080fd5b506102ad6102a83660046117de565b61099b565b6040516101329291906118ac565b61015b6102c93660046118e7565b6109ef565b3480156102da57600080fd5b5061015b6102e9366004611907565b610aca565b3480156102fa57600080fd5b5061018d611015565b600080808061031485870187611907565b6040517fdf6516bd0000000000000000000000000000000000000000000000000000000081529295509093509150309063df6516bd9061035c9086908690869060040161196a565b600060405180830381600087803b15801561037657600080fd5b505af115801561038a573d6000803e3d6000fd5b507f08a1eb20000000000000000000000000000000000000000000000000000000009a9950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610475576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064015b60405180910390fd5b7fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55565b60006104c37f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a015490565b1561052a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a20616c726561647920696e697469616c697a65640000604482015260640161046c565b600080838060200190518101906105419190611a2c565b91509150327f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955817fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55807fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7556105d760017f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a0155565b507f4ddf47d4000000000000000000000000000000000000000000000000000000009392505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955565b81156106eb576106eb858585610aca565b60008585856040516020016107029392919061196a565b604051602081830303815290604052905060007fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a54905060008173ffffffffffffffffffffffffffffffffffffffff16630fffbaf36040518163ffffffff1660e01b8152600401602060405180830381865afa158015610786573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107aa9190611a66565b845190915060005b818110156108b5578273ffffffffffffffffffffffffffffffffffffffff1663e55856668783815181106107e8576107e8611a83565b60200260200101516000015188848151811061080657610806611a83565b602002602001015160600151308a868151811061082557610825611a83565b6020026020010151602001518b878151811061084357610843611a83565b6020026020010151604001518b6040518763ffffffff1660e01b8152600401610870959493929190611ab2565b6000604051808303818588803b15801561088957600080fd5b505af115801561089d573d6000803e3d6000fd5b505050505080806108ad90611b33565b9150506107b2565b50505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610977576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b7fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e755565b6000606063b7e0366160e01b848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250959c929b50919950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aa5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b808260003760008082600034875af13d6000803e808015610ac5573d6000f35b3d6000fd5b7fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a547fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e754845160208087015160408089015160608a015180519085012060808b01518051908601209251969796600096610bb796909594918b910195865260e09490941b7fffffffff0000000000000000000000000000000000000000000000000000000016602086015260248501929092526044840152606483015260601b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016608482015260980190565b604051602081830303815290604052805190602001209050610be88560000151866020015187604001518488611044565b610c4e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f484f4c4f47524150483a20696e76616c6964207369676e617475726500000000604482015260640161046c565b600060405180602001610c6090611306565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820381018352601f90910116604081815282516020808501919091207fff00000000000000000000000000000000000000000000000000000000000000828501527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b166021850152603584018790526055808501919091528251808503909101815260759093019091528151910120909150610d21816112cc565b15610d88576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f484f4c4f47524150483a20616c7265616479206465706c6f7965640000000000604482015260640161046c565b60608801518051849160009183906020830184f59150828551602087016000f560208c8101518d516040805163ffffffff9093169383019390935273ffffffffffffffffffffffffffffffffffffffff8b811693830193909352606082015284821660808201529195507f4ddf47d4000000000000000000000000000000000000000000000000000000009190861690634ddf47d49060a0016040516020818303038152906040528e60800151604051602001610e46929190611b6b565b6040516020818303038152906040526040518263ffffffff1660e01b8152600401610e719190611b90565b6020604051808303816000875af1158015610e90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eb49190611ba3565b7fffffffff000000000000000000000000000000000000000000000000000000001614610f3d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f696e697469616c697a6174696f6e206661696c65640000000000000000000000604482015260640161046c565b6040517f725229f60000000000000000000000000000000000000000000000000000000081526004810187905273ffffffffffffffffffffffffffffffffffffffff858116602483015289169063725229f690604401600060405180830381600087803b158015610fad57600080fd5b505af1158015610fc1573d6000803e3d6000fd5b505060405188925073ffffffffffffffffffffffffffffffffffffffff871691507fa802207d4c618b40db3b25b7b90e6f483e16b2c1f8d3610b15b345a718c6b41b90600090a35050505050505050505050565b600061103f7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95490565b905090565b6000601b8460ff1610156110605761105d601b85611be5565b93505b8360ff16601b1415801561107857508360ff16601c14155b15611085575060006112c3565b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0851115611122576110d7857ffffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141611c0a565b945060ff8416601b036110ed57601c93506110f2565b601b93505b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0851115611122575060006112c3565b73ffffffffffffffffffffffffffffffffffffffff8216158015906112c057506040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c810184905273ffffffffffffffffffffffffffffffffffffffff831690600190605c01604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600084529083018083525260ff881690820152606081018990526080810188905260a0016020604051602081039080840390855afa15801561120c573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff1614806112c0575060408051600081526020810180835285905260ff861691810191909152606081018790526080810186905273ffffffffffffffffffffffffffffffffffffffff83169060019060a0016020604051602081039080840390855afa15801561129e573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff16145b90505b95945050505050565b6000813f80158015906112ff57507fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708114155b9392505050565b610f3a80611c2283390190565b803563ffffffff8116811461132757600080fd5b919050565b60008083601f84011261133e57600080fd5b50813567ffffffffffffffff81111561135657600080fd5b60208301915083602082850101111561136e57600080fd5b9250929050565b60008060006040848603121561138a57600080fd5b61139384611313565b9250602084013567ffffffffffffffff8111156113af57600080fd5b6113bb8682870161132c565b9497909650939450505050565b73ffffffffffffffffffffffffffffffffffffffff811681146113ea57600080fd5b50565b6000602082840312156113ff57600080fd5b81356112ff816113c8565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516080810167ffffffffffffffff8111828210171561145c5761145c61140a565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156114a9576114a961140a565b604052919050565b600082601f8301126114c257600080fd5b813567ffffffffffffffff8111156114dc576114dc61140a565b61150d60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601611462565b81815284602083860101111561152257600080fd5b816020850160208301376000918101602001919091529392505050565b60006020828403121561155157600080fd5b813567ffffffffffffffff81111561156857600080fd5b611574848285016114b1565b949350505050565b600060a0828403121561158e57600080fd5b60405160a0810167ffffffffffffffff82821081831117156115b2576115b261140a565b81604052829350843583526115c960208601611313565b60208401526040850135604084015260608501359150808211156115ec57600080fd5b6115f8868387016114b1565b6060840152608085013591508082111561161157600080fd5b5061161e858286016114b1565b6080830152505092915050565b60006060828403121561163d57600080fd5b6040516060810181811067ffffffffffffffff821117156116605761166061140a565b80604052508091508235815260208301356020820152604083013560ff8116811461168a57600080fd5b6040919091015292915050565b600080600080600060e086880312156116af57600080fd5b853567ffffffffffffffff808211156116c757600080fd5b6116d389838a0161157c565b9650602091506116e589838a0161162b565b95506080808901356116f6816113c8565b955060a0890135801515811461170b57600080fd5b945060c08901358281111561171f57600080fd5b8901601f81018b1361173057600080fd5b8035838111156117425761174261140a565b611750858260051b01611462565b818152858101945060079190911b82018501908c82111561177057600080fd5b918501915b818310156117cb5783838e03121561178d5760008081fd5b611795611439565b8335815286840135878201526040808501359082015260606117b8818601611313565b9082015285529385019391830191611775565b8096505050505050509295509295909350565b600080600080606085870312156117f457600080fd5b6117fd85611313565b9350602085013561180d816113c8565b9250604085013567ffffffffffffffff81111561182957600080fd5b6118358782880161132c565b95989497509550505050565b6000815180845260005b818110156118675760208185018101518683018201520161184b565b81811115611879576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b7fffffffff00000000000000000000000000000000000000000000000000000000831681526040602082015260006115746040830184611841565b6000806000604084860312156118fc57600080fd5b8335611393816113c8565b600080600060a0848603121561191c57600080fd5b833567ffffffffffffffff81111561193357600080fd5b61193f8682870161157c565b93505061194f856020860161162b565b9150608084013561195f816113c8565b809150509250925092565b60a08152835160a082015263ffffffff60208501511660c0820152604084015160e08201526000606085015160a06101008401526119ac610140840182611841565b905060808601517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60848303016101208501526119e88282611841565b92505050835160208301526020840151604083015260ff6040850151166060830152611574608083018473ffffffffffffffffffffffffffffffffffffffff169052565b60008060408385031215611a3f57600080fd5b8251611a4a816113c8565b6020840151909250611a5b816113c8565b809150509250929050565b600060208284031215611a7857600080fd5b81516112ff816113c8565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b63ffffffff8616815273ffffffffffffffffffffffffffffffffffffffff8516602082015283604082015282606082015260a060808201526000611af960a0830184611841565b979650505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611b6457611b64611b04565b5060010190565b604081526000611b7e6040830185611841565b82810360208401526112c38185611841565b6020815260006112ff6020830184611841565b600060208284031215611bb557600080fd5b81517fffffffff00000000000000000000000000000000000000000000000000000000811681146112ff57600080fd5b600060ff821660ff84168060ff03821115611c0257611c02611b04565b019392505050565b600082821015611c1c57611c1c611b04565b50039056fe608060405234801561001057600080fd5b50610f1a806100206000396000f3fe6080604052600436106100c05760003560e01c806380d1cb3511610074578063c51a29e01161004e578063c51a29e0146102c1578063c8a4c3d5146102f5578063f851a4401461030a576100c7565b806380d1cb351461022c578063913a0ef21461026a578063bf64a82d146102ae576100c7565b80636e9960c3116100a55780636e9960c3146101a45780636faf275b146101d8578063704b6c021461020c576100c7565b80634827ae0c146100f95780634ddf47d414610153576100c7565b366100c757005b60006100d161031f565b90503660008037600080366000845af43d6000803e8080156100f2573d6000f35b3d6000fd5b005b34801561010557600080fd5b507fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a545b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b34801561015f57600080fd5b5061017361016e366004610bb4565b61045d565b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200161014a565b3480156101b057600080fd5b507f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c954610129565b3480156101e457600080fd5b507f27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b07454610129565b34801561021857600080fd5b506100f7610227366004610c59565b610911565b34801561023857600080fd5b507f9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de3545b60405190815260200161014a565b34801561027657600080fd5b507fd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d5460405163ffffffff909116815260200161014a565b6100f76102bc366004610c7d565b6109eb565b3480156102cd57600080fd5b507f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c75461025c565b34801561030157600080fd5b5061012961031f565b34801561031657600080fd5b50610129610ac1565b60008060007fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a5491507f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c75490508173ffffffffffffffffffffffffffffffffffffffff16635ab1bd536040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103db9190610d02565b73ffffffffffffffffffffffffffffffffffffffff166374b7510c826040518263ffffffff1660e01b815260040161041591815260200190565b602060405180830381865afa158015610432573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104569190610d02565b9250505090565b60006104877f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a015490565b156104f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f484f4c4f475241504845523a20616c726561647920696e697469616c697a656460448201526064015b60405180910390fd5b6000808380602001905181019061050a9190610d9c565b91509150600080600080858060200190518101906105289190610e00565b9350935093509350337f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955437f9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de355817f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c755827fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55837fd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d55807f27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b074556000808473ffffffffffffffffffffffffffffffffffffffff16635ab1bd536040518163ffffffff1660e01b8152600401602060405180830381865afa158015610650573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106749190610d02565b73ffffffffffffffffffffffffffffffffffffffff166374b7510c856040518263ffffffff1660e01b81526004016106ae91815260200190565b602060405180830381865afa1580156106cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ef9190610d02565b73ffffffffffffffffffffffffffffffffffffffff16634ddf47d460e01b8860405160240161071e9190610e5e565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009094169390931790925290516107a79190610eaf565b600060405180830381855af49150503d80600081146107e2576040519150601f19603f3d011682016040523d82523d6000602084013e6107e7565b606091505b50915091506000818060200190518101906108029190610ecb565b905082801561085257507fffffffff0000000000000000000000000000000000000000000000000000000081167f4ddf47d400000000000000000000000000000000000000000000000000000000145b6108b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f484f4c4f47524150483a20696e697469616c697a6174696f6e206661696c656460448201526064016104ea565b6108e160017f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a0155565b507f4ddf47d4000000000000000000000000000000000000000000000000000000009a9950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016104ea565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aa1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016104ea565b808260003760008082600034875af13d6000803e8080156100f2573d6000f35b6000610aeb7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95490565b905090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715610b6657610b66610af0565b604052919050565b600067ffffffffffffffff821115610b8857610b88610af0565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600060208284031215610bc657600080fd5b813567ffffffffffffffff811115610bdd57600080fd5b8201601f81018413610bee57600080fd5b8035610c01610bfc82610b6e565b610b1f565b818152856020838501011115610c1657600080fd5b81602084016020830137600091810160200191909152949350505050565b73ffffffffffffffffffffffffffffffffffffffff81168114610c5657600080fd5b50565b600060208284031215610c6b57600080fd5b8135610c7681610c34565b9392505050565b600080600060408486031215610c9257600080fd5b8335610c9d81610c34565b9250602084013567ffffffffffffffff80821115610cba57600080fd5b818601915086601f830112610cce57600080fd5b813581811115610cdd57600080fd5b876020828501011115610cef57600080fd5b6020830194508093505050509250925092565b600060208284031215610d1457600080fd5b8151610c7681610c34565b60005b83811015610d3a578181015183820152602001610d22565b83811115610d49576000848401525b50505050565b600082601f830112610d6057600080fd5b8151610d6e610bfc82610b6e565b818152846020838601011115610d8357600080fd5b610d94826020830160208701610d1f565b949350505050565b60008060408385031215610daf57600080fd5b825167ffffffffffffffff80821115610dc757600080fd5b610dd386838701610d4f565b93506020850151915080821115610de957600080fd5b50610df685828601610d4f565b9150509250929050565b60008060008060808587031215610e1657600080fd5b845163ffffffff81168114610e2a57600080fd5b6020860151909450610e3b81610c34565b604086015160608701519194509250610e5381610c34565b939692955090935050565b6020815260008251806020840152610e7d816040850160208701610d1f565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60008251610ec1818460208701610d1f565b9190910192915050565b600060208284031215610edd57600080fd5b81517fffffffff0000000000000000000000000000000000000000000000000000000081168114610c7657600080fdfea164736f6c634300080d000aa164736f6c634300080d000a", + "numDeployments": 5, + "solcInputHash": "c71d96e115e745dd34ef9239c385494d", + "metadata": "{\"compiler\":{\"version\":\"0.8.13+commit.abaa5c0e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"BridgeableContractDeployed\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"adminCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"bridgeIn\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"bridgeOut\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"selector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"contractType\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"chainType\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"salt\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"byteCode\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"initCode\",\"type\":\"bytes\"}],\"internalType\":\"struct DeploymentConfig\",\"name\":\"config\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"}],\"internalType\":\"struct Verification\",\"name\":\"signature\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"}],\"name\":\"deployHolographableContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"contractType\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"chainType\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"salt\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"byteCode\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"initCode\",\"type\":\"bytes\"}],\"internalType\":\"struct DeploymentConfig\",\"name\":\"config\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"}],\"internalType\":\"struct Verification\",\"name\":\"signature\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"deployOnCurrentChain\",\"type\":\"bool\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"toChain\",\"type\":\"uint32\"}],\"internalType\":\"struct BridgeSettings[]\",\"name\":\"bridgeSettings\",\"type\":\"tuple[]\"}],\"name\":\"deployHolographableContractMultiChain\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"adminAddress\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getHolograph\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"holograph\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRegistry\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"registry\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"initPayload\",\"type\":\"bytes\"}],\"name\":\"init\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"adminAddress\",\"type\":\"address\"}],\"name\":\"setAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"holograph\",\"type\":\"address\"}],\"name\":\"setHolograph\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"registry\",\"type\":\"address\"}],\"name\":\"setRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"author\":\"https://github.com/holographxyz\",\"details\":\"The contract provides methods that allow for the creation of Holograph Protocol compliant smart contracts, that are capable of minting holographable assets\",\"kind\":\"dev\",\"methods\":{\"bridgeIn(uint32,bytes)\":{\"details\":\"This function directly forwards the calldata to the deployHolographableContract function It is used to allow for Holograph Bridge to make cross-chain deployments\"},\"bridgeOut(uint32,address,bytes)\":{\"details\":\"This function directly returns the calldata It is used to allow for Holograph Bridge to make cross-chain deployments\"},\"constructor\":{\"details\":\"Constructor is left empty and init is used instead\"},\"deployHolographableContract((bytes32,uint32,bytes32,bytes,bytes),(bytes32,bytes32,uint8),address)\":{\"details\":\"Using this function allows to deploy smart contracts that have the same address across all EVM chains\",\"params\":{\"config\":\"contract deployement configurations\",\"signature\":\"that was created by the wallet that created the original payload\",\"signer\":\"address of wallet that created the payload\"}},\"getHolograph()\":{\"details\":\"Used for storing a reference to all the primary modules and variables of the protocol\"},\"getRegistry()\":{\"details\":\"This module stores a reference for all deployed holographable smart contracts\"},\"init(bytes)\":{\"details\":\"This function is called by the deployer/factory when creating a contract\",\"params\":{\"initPayload\":\"abi encoded payload to use for contract initilaization\"}},\"setHolograph(address)\":{\"params\":{\"holograph\":\"address of the Holograph Protocol smart contract to use\"}},\"setRegistry(address)\":{\"params\":{\"registry\":\"address of the Holograph Registry smart contract to use\"}}},\"stateVariables\":{\"_holographSlot\":{\"details\":\"bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\"},\"_registrySlot\":{\"details\":\"bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\"}},\"title\":\"Holograph Factory\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"bridgeIn(uint32,bytes)\":{\"notice\":\"Deploy holographable contract via bridge request\"},\"bridgeOut(uint32,address,bytes)\":{\"notice\":\"Deploy holographable contract via bridge request\"},\"deployHolographableContract((bytes32,uint32,bytes32,bytes,bytes),(bytes32,bytes32,uint8),address)\":{\"notice\":\"Deploy a holographable smart contract\"},\"getHolograph()\":{\"notice\":\"Get the Holograph Protocol contract\"},\"getRegistry()\":{\"notice\":\"Get the Holograph Registry module\"},\"init(bytes)\":{\"notice\":\"Used internally to initialize the contract instead of through a constructor\"},\"setHolograph(address)\":{\"notice\":\"Update the Holograph Protocol contract address\"},\"setRegistry(address)\":{\"notice\":\"Update the Holograph Registry module address\"}},\"notice\":\"Deploy holographable contracts\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/HolographFactory.sol\":\"HolographFactory\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc721a-upgradeable/=erc721a-upgradeable/\",\":forge-std/=lib/forge-std/src/\"]},\"sources\":{\"contracts/HolographFactory.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nimport \\\"./abstract/Admin.sol\\\";\\nimport \\\"./abstract/Initializable.sol\\\";\\n\\nimport \\\"./enforcer/Holographer.sol\\\";\\n\\nimport \\\"./interface/Holographable.sol\\\";\\nimport \\\"./interface/HolographBridgeInterface.sol\\\";\\nimport \\\"./interface/HolographFactoryInterface.sol\\\";\\nimport \\\"./interface/HolographInterface.sol\\\";\\nimport \\\"./interface/HolographRegistryInterface.sol\\\";\\nimport \\\"./interface/InitializableInterface.sol\\\";\\n\\nimport \\\"./struct/BridgeSettings.sol\\\";\\nimport \\\"./struct/DeploymentConfig.sol\\\";\\nimport \\\"./struct/Verification.sol\\\";\\n\\nimport \\\"./library/Strings.sol\\\";\\n\\n/**\\n * @title Holograph Factory\\n * @author https://github.com/holographxyz\\n * @notice Deploy holographable contracts\\n * @dev The contract provides methods that allow for the creation of Holograph Protocol compliant smart contracts, that are capable of minting holographable assets\\n */\\ncontract HolographFactory is Admin, Initializable, Holographable, HolographFactoryInterface {\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\\n */\\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\\n */\\n bytes32 constant _registrySlot = 0xce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7;\\n\\n /**\\n * @dev Constructor is left empty and init is used instead\\n */\\n constructor() {}\\n\\n /**\\n * @notice Used internally to initialize the contract instead of through a constructor\\n * @dev This function is called by the deployer/factory when creating a contract\\n * @param initPayload abi encoded payload to use for contract initilaization\\n */\\n function init(bytes memory initPayload) external override returns (bytes4) {\\n require(!_isInitialized(), \\\"HOLOGRAPH: already initialized\\\");\\n (address holograph, address registry) = abi.decode(initPayload, (address, address));\\n assembly {\\n sstore(_adminSlot, origin())\\n sstore(_holographSlot, holograph)\\n sstore(_registrySlot, registry)\\n }\\n _setInitialized();\\n return InitializableInterface.init.selector;\\n }\\n\\n /**\\n * @notice Deploy holographable contract via bridge request\\n * @dev This function directly forwards the calldata to the deployHolographableContract function\\n * It is used to allow for Holograph Bridge to make cross-chain deployments\\n */\\n function bridgeIn(uint32 /* fromChain*/, bytes calldata payload) external returns (bytes4) {\\n (DeploymentConfig memory config, Verification memory signature, address signer) = abi.decode(\\n payload,\\n (DeploymentConfig, Verification, address)\\n );\\n HolographFactoryInterface(address(this)).deployHolographableContract(config, signature, signer);\\n return Holographable.bridgeIn.selector;\\n }\\n\\n /**\\n * @notice Deploy holographable contract via bridge request\\n * @dev This function directly returns the calldata\\n * It is used to allow for Holograph Bridge to make cross-chain deployments\\n */\\n function bridgeOut(\\n uint32 /* toChain*/,\\n address /* sender*/,\\n bytes calldata payload\\n ) external pure returns (bytes4 selector, bytes memory data) {\\n return (Holographable.bridgeOut.selector, payload);\\n }\\n\\n function deployHolographableContractMultiChain(\\n DeploymentConfig memory config,\\n Verification memory signature,\\n address signer,\\n bool deployOnCurrentChain,\\n BridgeSettings[] memory bridgeSettings\\n ) external payable {\\n if (deployOnCurrentChain) {\\n deployHolographableContract(config, signature, signer);\\n }\\n bytes memory payload = abi.encode(config, signature, signer);\\n HolographInterface holograph;\\n assembly {\\n holograph := sload(_holographSlot)\\n }\\n HolographBridgeInterface bridge = HolographBridgeInterface(holograph.getBridge());\\n uint256 l = bridgeSettings.length;\\n for (uint256 i = 0; i < l; i++) {\\n bridge.bridgeOutRequest{value: bridgeSettings[i].value}(\\n bridgeSettings[i].toChain,\\n address(this),\\n bridgeSettings[i].gasLimit,\\n bridgeSettings[i].gasPrice,\\n payload\\n );\\n }\\n }\\n\\n /**\\n * @notice Deploy a holographable smart contract\\n * @dev Using this function allows to deploy smart contracts that have the same address across all EVM chains\\n * @param config contract deployement configurations\\n * @param signature that was created by the wallet that created the original payload\\n * @param signer address of wallet that created the payload\\n */\\n function deployHolographableContract(\\n DeploymentConfig memory config,\\n Verification memory signature,\\n address signer\\n ) public {\\n address registry;\\n address holograph;\\n assembly {\\n holograph := sload(_holographSlot)\\n registry := sload(_registrySlot)\\n }\\n /**\\n * @dev the configuration is encoded and hashed along with signer address\\n */\\n bytes32 hash = keccak256(\\n abi.encodePacked(\\n config.contractType,\\n config.chainType,\\n config.salt,\\n keccak256(config.byteCode),\\n keccak256(config.initCode),\\n signer\\n )\\n );\\n /**\\n * @dev the hash is validated against signature\\n * this is to guarantee that the original creator's configuration has not been altered\\n */\\n require(_verifySigner(signature.r, signature.s, signature.v, hash, signer), \\\"HOLOGRAPH: invalid signature\\\");\\n /**\\n * @dev check that this contract has not already been deployed on this chain\\n */\\n bytes memory holographerBytecode = type(Holographer).creationCode;\\n address holographerAddress = address(\\n uint160(uint256(keccak256(abi.encodePacked(bytes1(0xff), address(this), hash, keccak256(holographerBytecode)))))\\n );\\n require(!_isContract(holographerAddress), \\\"HOLOGRAPH: already deployed\\\");\\n /**\\n * @dev convert hash into uint256 which will be used as the salt for create2\\n */\\n uint256 saltInt = uint256(hash);\\n address sourceContractAddress;\\n bytes memory sourceByteCode = config.byteCode;\\n assembly {\\n /**\\n * @dev deploy the user created smart contract first\\n */\\n sourceContractAddress := create2(0, add(sourceByteCode, 0x20), mload(sourceByteCode), saltInt)\\n }\\n assembly {\\n /**\\n * @dev deploy the Holographer contract\\n */\\n holographerAddress := create2(0, add(holographerBytecode, 0x20), mload(holographerBytecode), saltInt)\\n }\\n /**\\n * @dev initialize the Holographer contract\\n */\\n require(\\n InitializableInterface(holographerAddress).init(\\n abi.encode(abi.encode(config.chainType, holograph, config.contractType, sourceContractAddress), config.initCode)\\n ) == InitializableInterface.init.selector,\\n \\\"initialization failed\\\"\\n );\\n /**\\n * @dev update the Holograph Registry with deployed contract address\\n */\\n HolographRegistryInterface(registry).setHolographedHashAddress(hash, holographerAddress);\\n /**\\n * @dev emit an event that on-chain indexers can easily read\\n */\\n emit BridgeableContractDeployed(holographerAddress, hash);\\n }\\n\\n /**\\n * @notice Get the Holograph Protocol contract\\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\\n */\\n function getHolograph() external view returns (address holograph) {\\n assembly {\\n holograph := sload(_holographSlot)\\n }\\n }\\n\\n /**\\n * @notice Update the Holograph Protocol contract address\\n * @param holograph address of the Holograph Protocol smart contract to use\\n */\\n function setHolograph(address holograph) external onlyAdmin {\\n assembly {\\n sstore(_holographSlot, holograph)\\n }\\n }\\n\\n /**\\n * @notice Get the Holograph Registry module\\n * @dev This module stores a reference for all deployed holographable smart contracts\\n */\\n function getRegistry() external view returns (address registry) {\\n assembly {\\n registry := sload(_registrySlot)\\n }\\n }\\n\\n /**\\n * @notice Update the Holograph Registry module address\\n * @param registry address of the Holograph Registry smart contract to use\\n */\\n function setRegistry(address registry) external onlyAdmin {\\n assembly {\\n sstore(_registrySlot, registry)\\n }\\n }\\n\\n /**\\n * @dev Internal function used for checking if a contract has been deployed at address\\n */\\n function _isContract(address contractAddress) private view returns (bool) {\\n bytes32 codehash;\\n assembly {\\n codehash := extcodehash(contractAddress)\\n }\\n return (codehash != 0x0 && codehash != 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470);\\n }\\n\\n /**\\n * @dev Internal function used for verifying a signature\\n */\\n function _verifySigner(bytes32 r, bytes32 s, uint8 v, bytes32 hash, address signer) private pure returns (bool) {\\n if (v < 27) {\\n v += 27;\\n }\\n if (v != 27 && v != 28) {\\n return false;\\n }\\n // prevent signature malleability by checking if s-value is in the upper range\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n // if s-value is in upper range, calculate a new s-value\\n s = bytes32(0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - uint256(s));\\n // flip the v-value\\n if (v == 27) {\\n v = 28;\\n } else {\\n v = 27;\\n }\\n // check if s-value is still in upper range\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return false;\\n }\\n }\\n /**\\n * @dev signature is checked against EIP-191 first, then directly, to support legacy wallets\\n */\\n return (signer != address(0) &&\\n (ecrecover(keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash)), v, r, s) == signer ||\\n (\\n ecrecover(\\n keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n66\\\", Strings.toHexString(uint256(hash), 32))),\\n v,\\n r,\\n s\\n )\\n ) ==\\n signer ||\\n ecrecover(hash, v, r, s) == signer));\\n }\\n\\n /**\\n * @dev Purposefully reverts to prevent having any type of ether transfered into the contract\\n */\\n receive() external payable {\\n revert();\\n }\\n\\n /**\\n * @dev Purposefully reverts to prevent any calls to undefined functions\\n */\\n fallback() external payable {\\n revert();\\n }\\n}\\n\",\"keccak256\":\"0xb18538929ca40465f6762c4a6204f631d4a9844e2af366d46d9c340a4c75757c\",\"license\":\"UNLICENSED\"},\"contracts/abstract/Admin.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nabstract contract Admin {\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.admin')) - 1)\\n */\\n bytes32 constant _adminSlot = 0x3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c9;\\n\\n modifier onlyAdmin() {\\n require(msg.sender == getAdmin(), \\\"HOLOGRAPH: admin only function\\\");\\n _;\\n }\\n\\n constructor() {}\\n\\n function admin() public view returns (address) {\\n return getAdmin();\\n }\\n\\n function getAdmin() public view returns (address adminAddress) {\\n assembly {\\n adminAddress := sload(_adminSlot)\\n }\\n }\\n\\n function setAdmin(address adminAddress) public onlyAdmin {\\n assembly {\\n sstore(_adminSlot, adminAddress)\\n }\\n }\\n\\n function adminCall(address target, bytes calldata data) external payable onlyAdmin {\\n assembly {\\n calldatacopy(0, data.offset, data.length)\\n let result := call(gas(), target, callvalue(), 0, data.length, 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n switch result\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x93552c9253b579c45113a150a6a3dfddb997afd939d09b49c34d040525734b1a\",\"license\":\"UNLICENSED\"},\"contracts/abstract/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nimport \\\"../interface/InitializableInterface.sol\\\";\\n\\n/**\\n * @title Initializable\\n * @author https://github.com/holographxyz\\n * @notice Use init instead of constructor\\n * @dev This allows for use of init function to make one time initializations without the need for a constructor\\n */\\nabstract contract Initializable is InitializableInterface {\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.initialized')) - 1)\\n */\\n bytes32 constant _initializedSlot = 0x4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a01;\\n\\n /**\\n * @dev Constructor is left empty and init is used instead\\n */\\n constructor() {}\\n\\n /**\\n * @notice Used internally to initialize the contract instead of through a constructor\\n * @dev This function is called by the deployer/factory when creating a contract\\n * @param initPayload abi encoded payload to use for contract initilaization\\n */\\n function init(bytes memory initPayload) external virtual returns (bytes4);\\n\\n function _isInitialized() internal view returns (bool initialized) {\\n assembly {\\n initialized := sload(_initializedSlot)\\n }\\n }\\n\\n function _setInitialized() internal {\\n assembly {\\n sstore(_initializedSlot, 0x0000000000000000000000000000000000000000000000000000000000000001)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa55dc367285f96952dec56adfbfb48b6a4be31aef9ba0d30ad8c91023a572462\",\"license\":\"UNLICENSED\"},\"contracts/enforcer/Holographer.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nimport \\\"../abstract/Admin.sol\\\";\\nimport \\\"../abstract/Initializable.sol\\\";\\n\\nimport \\\"../interface/HolographInterface.sol\\\";\\nimport \\\"../interface/HolographerInterface.sol\\\";\\nimport \\\"../interface/HolographRegistryInterface.sol\\\";\\nimport \\\"../interface/InitializableInterface.sol\\\";\\n\\n/**\\n * @dev This contract is a binder. It puts together all the variables to make the underlying contracts functional and be bridgeable.\\n */\\ncontract Holographer is Admin, Initializable, HolographerInterface {\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.originChain')) - 1)\\n */\\n bytes32 constant _originChainSlot = 0xd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d;\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\\n */\\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.contractType')) - 1)\\n */\\n bytes32 constant _contractTypeSlot = 0x0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c7;\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.sourceContract')) - 1)\\n */\\n bytes32 constant _sourceContractSlot = 0x27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b074;\\n /**\\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.blockHeight')) - 1)\\n */\\n bytes32 constant _blockHeightSlot = 0x9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de3;\\n\\n /**\\n * @dev Constructor is left empty and init is used instead\\n */\\n constructor() {}\\n\\n /**\\n * @notice Used internally to initialize the contract instead of through a constructor\\n * @dev This function is called by the deployer/factory when creating a contract\\n * @param initPayload abi encoded payload to use for contract initilaization\\n */\\n function init(bytes memory initPayload) external override returns (bytes4) {\\n require(!_isInitialized(), \\\"HOLOGRAPHER: already initialized\\\");\\n (bytes memory encoded, bytes memory initCode) = abi.decode(initPayload, (bytes, bytes));\\n (uint32 originChain, address holograph, bytes32 contractType, address sourceContract) = abi.decode(\\n encoded,\\n (uint32, address, bytes32, address)\\n );\\n assembly {\\n sstore(_adminSlot, caller())\\n sstore(_blockHeightSlot, number())\\n sstore(_contractTypeSlot, contractType)\\n sstore(_holographSlot, holograph)\\n sstore(_originChainSlot, originChain)\\n sstore(_sourceContractSlot, sourceContract)\\n }\\n (bool success, bytes memory returnData) = HolographRegistryInterface(HolographInterface(holograph).getRegistry())\\n .getReservedContractTypeAddress(contractType)\\n .delegatecall(abi.encodeWithSelector(InitializableInterface.init.selector, initCode));\\n bytes4 selector = abi.decode(returnData, (bytes4));\\n require(success && selector == InitializableInterface.init.selector, \\\"HOLOGRAPH: initialization failed\\\");\\n _setInitialized();\\n return InitializableInterface.init.selector;\\n }\\n\\n /**\\n * @dev Returns the contract type that is used for loading the Enforcer\\n */\\n function getContractType() external view returns (bytes32 contractType) {\\n assembly {\\n contractType := sload(_contractTypeSlot)\\n }\\n }\\n\\n /**\\n * @dev Returns the block height of when the smart contract was deployed. Useful for retrieving deployment config for re-deployment on other EVM-compatible chains.\\n */\\n function getDeploymentBlock() external view returns (uint256 deploymentBlock) {\\n assembly {\\n deploymentBlock := sload(_blockHeightSlot)\\n }\\n }\\n\\n /**\\n * @dev Returns a hardcoded address for the Holograph smart contract.\\n */\\n function getHolograph() external view returns (address holograph) {\\n assembly {\\n holograph := sload(_holographSlot)\\n }\\n }\\n\\n /**\\n * @dev Returns a hardcoded address for the Holograph smart contract that controls and enforces the ERC standards.\\n */\\n function getHolographEnforcer() public view returns (address) {\\n HolographInterface holograph;\\n bytes32 contractType;\\n assembly {\\n holograph := sload(_holographSlot)\\n contractType := sload(_contractTypeSlot)\\n }\\n return HolographRegistryInterface(holograph.getRegistry()).getReservedContractTypeAddress(contractType);\\n }\\n\\n /**\\n * @dev Returns the original chain that contract was deployed on.\\n */\\n function getOriginChain() external view returns (uint32 originChain) {\\n assembly {\\n originChain := sload(_originChainSlot)\\n }\\n }\\n\\n /**\\n * @dev Returns a hardcoded address for the custom secure storage contract deployed in parallel with this contract deployment.\\n */\\n function getSourceContract() external view returns (address sourceContract) {\\n assembly {\\n sourceContract := sload(_sourceContractSlot)\\n }\\n }\\n\\n /**\\n * @dev Purposefully left empty, to prevent running out of gas errors when receiving native token payments.\\n */\\n receive() external payable {}\\n\\n /**\\n * @dev This takes the Enforcer's source code, runs it, and uses current address for storage slots.\\n */\\n fallback() external payable {\\n address holographEnforcer = getHolographEnforcer();\\n assembly {\\n calldatacopy(0, 0, calldatasize())\\n let result := delegatecall(gas(), holographEnforcer, 0, calldatasize(), 0, 0)\\n returndatacopy(0, 0, returndatasize())\\n switch result\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc31b575625e84743d9a14f282ef3894becece82a6f47ec945585ac5a0d1895f7\",\"license\":\"UNLICENSED\"},\"contracts/interface/HolographBridgeInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\n/**\\n * @title Holograph Bridge\\n * @author https://github.com/holographxyz\\n * @notice Beam any holographable contracts and assets across blockchains\\n * @dev The contract abstracts all the complexities of making bridge requests and uses a universal interface to bridge any type of holographable assets\\n */\\ninterface HolographBridgeInterface {\\n /**\\n * @notice Receive a beam from another chain\\n * @dev This function can only be called by the Holograph Operator module\\n * @param fromChain Holograph Chain ID where the brigeOutRequest was created\\n * @param holographableContract address of the destination contract that the bridgeInRequest is targeted for\\n * @param hToken address of the hToken contract that wrapped the origin chain native gas token\\n * @param hTokenRecipient address of recipient for the hToken reward\\n * @param hTokenValue exact amount of hToken reward in wei\\n * @param doNotRevert boolean used to specify if the call should revert\\n * @param bridgeInPayload actual abi encoded bytes of the data that the holographable contract bridgeIn function will receive\\n */\\n function bridgeInRequest(\\n uint256 nonce,\\n uint32 fromChain,\\n address holographableContract,\\n address hToken,\\n address hTokenRecipient,\\n uint256 hTokenValue,\\n bool doNotRevert,\\n bytes calldata bridgeInPayload\\n ) external payable;\\n\\n /**\\n * @notice Create a beam request for a destination chain\\n * @dev This function works for deploying contracts and beaming supported holographable assets across chains\\n * @param toChain Holograph Chain ID where the beam is being sent to\\n * @param holographableContract address of the contract for which the bridge request is being made\\n * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain\\n * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain\\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\\n */\\n function bridgeOutRequest(\\n uint32 toChain,\\n address holographableContract,\\n uint256 gasLimit,\\n uint256 gasPrice,\\n bytes calldata bridgeOutPayload\\n ) external payable;\\n\\n /**\\n * @notice Do not call this function, it will always revert\\n * @dev Used by getBridgeOutRequestPayload function\\n * It is purposefully inverted to always revert on a successful call\\n * Marked as external and not private to allow use inside try/catch of getBridgeOutRequestPayload function\\n * If this function does not revert and returns a string, it is the actual revert reason\\n * @param sender address of actual sender that is planning to make a bridgeOutRequest call\\n * @param toChain holograph chain id of destination chain\\n * @param holographableContract address of the contract for which the bridge request is being made\\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\\n */\\n function revertedBridgeOutRequest(\\n address sender,\\n uint32 toChain,\\n address holographableContract,\\n bytes calldata bridgeOutPayload\\n ) external returns (string memory revertReason);\\n\\n /**\\n * @notice Get the payload created by the bridgeOutRequest function\\n * @dev Use this function to get the payload that will be generated by a bridgeOutRequest\\n * Only use this with a static call\\n * @param toChain Holograph Chain ID where the beam is being sent to\\n * @param holographableContract address of the contract for which the bridge request is being made\\n * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain\\n * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain\\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\\n * @return samplePayload bytes made up of the bridgeOutRequest payload\\n */\\n function getBridgeOutRequestPayload(\\n uint32 toChain,\\n address holographableContract,\\n uint256 gasLimit,\\n uint256 gasPrice,\\n bytes calldata bridgeOutPayload\\n ) external returns (bytes memory samplePayload);\\n\\n /**\\n * @notice Get the fees associated with sending specific payload\\n * @dev Will provide exact costs on protocol and message side, combine the two to get total\\n * @param toChain holograph chain id of destination chain for payload\\n * @param gasLimit amount of gas to provide for executing payload on destination chain\\n * @param gasPrice maximum amount to pay for gas price, can be set to 0 and will be chose automatically\\n * @param crossChainPayload the entire packet being sent cross-chain\\n * @return hlgFee the amount (in wei) of native gas token that will cost for finalizing job on destiantion chain\\n * @return msgFee the amount (in wei) of native gas token that will cost for sending message to destiantion chain\\n * @return dstGasPrice the amount (in wei) that destination message maximum gas price will be\\n */\\n function getMessageFee(\\n uint32 toChain,\\n uint256 gasLimit,\\n uint256 gasPrice,\\n bytes calldata crossChainPayload\\n ) external view returns (uint256 hlgFee, uint256 msgFee, uint256 dstGasPrice);\\n\\n /**\\n * @notice Get the address of the Holograph Factory module\\n * @dev Used for deploying holographable smart contracts\\n */\\n function getFactory() external view returns (address factory);\\n\\n /**\\n * @notice Update the Holograph Factory module address\\n * @param factory address of the Holograph Factory smart contract to use\\n */\\n function setFactory(address factory) external;\\n\\n /**\\n * @notice Get the Holograph Protocol contract\\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\\n */\\n function getHolograph() external view returns (address holograph);\\n\\n /**\\n * @notice Update the Holograph Protocol contract address\\n * @param holograph address of the Holograph Protocol smart contract to use\\n */\\n function setHolograph(address holograph) external;\\n\\n /**\\n * @notice Get the latest job nonce\\n * @dev You can use the job nonce as a way to calculate total amount of bridge requests that have been made\\n */\\n function getJobNonce() external view returns (uint256 jobNonce);\\n\\n /**\\n * @notice Get the address of the Holograph Operator module\\n * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module\\n */\\n function getOperator() external view returns (address operator);\\n\\n /**\\n * @notice Update the Holograph Operator module address\\n * @param operator address of the Holograph Operator smart contract to use\\n */\\n function setOperator(address operator) external;\\n\\n /**\\n * @notice Get the Holograph Registry module\\n * @dev This module stores a reference for all deployed holographable smart contracts\\n */\\n function getRegistry() external view returns (address registry);\\n\\n /**\\n * @notice Update the Holograph Registry module address\\n * @param registry address of the Holograph Registry smart contract to use\\n */\\n function setRegistry(address registry) external;\\n}\\n\",\"keccak256\":\"0x6e49ef7e89b6271241da6df330eb5d5cf48da3be31408bb5d99c48d51c0ef176\",\"license\":\"UNLICENSED\"},\"contracts/interface/HolographFactoryInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nimport \\\"../struct/DeploymentConfig.sol\\\";\\nimport \\\"../struct/Verification.sol\\\";\\n\\n/**\\n * @title Holograph Factory\\n * @author https://github.com/holographxyz\\n * @notice Deploy holographable contracts\\n * @dev The contract provides methods that allow for the creation of Holograph Protocol compliant smart contracts, that are capable of minting holographable assets\\n */\\ninterface HolographFactoryInterface {\\n /**\\n * @dev This event is fired every time that a bridgeable contract is deployed.\\n */\\n event BridgeableContractDeployed(address indexed contractAddress, bytes32 indexed hash);\\n\\n /**\\n * @notice Deploy a holographable smart contract\\n * @dev Using this function allows to deploy smart contracts that have the same address across all EVM chains\\n * @param config contract deployement configurations\\n * @param signature that was created by the wallet that created the original payload\\n * @param signer address of wallet that created the payload\\n */\\n function deployHolographableContract(\\n DeploymentConfig memory config,\\n Verification memory signature,\\n address signer\\n ) external;\\n\\n /**\\n * @notice Get the Holograph Protocol contract\\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\\n */\\n function getHolograph() external view returns (address holograph);\\n\\n /**\\n * @notice Update the Holograph Protocol contract address\\n * @param holograph address of the Holograph Protocol smart contract to use\\n */\\n function setHolograph(address holograph) external;\\n\\n /**\\n * @notice Get the Holograph Registry module\\n * @dev This module stores a reference for all deployed holographable smart contracts\\n */\\n function getRegistry() external view returns (address registry);\\n\\n /**\\n * @notice Update the Holograph Registry module address\\n * @param registry address of the Holograph Registry smart contract to use\\n */\\n function setRegistry(address registry) external;\\n}\\n\",\"keccak256\":\"0x44cd1db20207337ef6abde2d0f42837778d13fb62fe353b0ee9b293a601a0d71\",\"license\":\"UNLICENSED\"},\"contracts/interface/HolographInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\n/**\\n * @title Holograph Protocol\\n * @author https://github.com/holographxyz\\n * @notice This is the primary Holograph Protocol smart contract\\n * @dev This contract stores a reference to all the primary modules and variables of the protocol\\n */\\ninterface HolographInterface {\\n /**\\n * @notice Get the address of the Holograph Bridge module\\n * @dev Used for beaming holographable assets cross-chain\\n */\\n function getBridge() external view returns (address bridge);\\n\\n /**\\n * @notice Update the Holograph Bridge module address\\n * @param bridge address of the Holograph Bridge smart contract to use\\n */\\n function setBridge(address bridge) external;\\n\\n /**\\n * @notice Get the chain ID that the Protocol was deployed on\\n * @dev Useful for checking if/when a hard fork occurs\\n */\\n function getChainId() external view returns (uint256 chainId);\\n\\n /**\\n * @notice Update the chain ID\\n * @dev Useful for updating once a hard fork has been mitigated\\n * @param chainId EVM chain ID to use\\n */\\n function setChainId(uint256 chainId) external;\\n\\n /**\\n * @notice Get the address of the Holograph Factory module\\n * @dev Used for deploying holographable smart contracts\\n */\\n function getFactory() external view returns (address factory);\\n\\n /**\\n * @notice Update the Holograph Factory module address\\n * @param factory address of the Holograph Factory smart contract to use\\n */\\n function setFactory(address factory) external;\\n\\n /**\\n * @notice Get the Holograph chain Id\\n * @dev Holograph uses an internal chain id mapping\\n */\\n function getHolographChainId() external view returns (uint32 holographChainId);\\n\\n /**\\n * @notice Update the Holograph chain ID\\n * @dev Useful for updating once a hard fork was mitigated\\n * @param holographChainId Holograph chain ID to use\\n */\\n function setHolographChainId(uint32 holographChainId) external;\\n\\n /**\\n * @notice Get the address of the Holograph Interfaces module\\n * @dev Holograph uses this contract to store data that needs to be accessed by a large portion of the modules\\n */\\n function getInterfaces() external view returns (address interfaces);\\n\\n /**\\n * @notice Update the Holograph Interfaces module address\\n * @param interfaces address of the Holograph Interfaces smart contract to use\\n */\\n function setInterfaces(address interfaces) external;\\n\\n /**\\n * @notice Get the address of the Holograph Operator module\\n * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module\\n */\\n function getOperator() external view returns (address operator);\\n\\n /**\\n * @notice Update the Holograph Operator module address\\n * @param operator address of the Holograph Operator smart contract to use\\n */\\n function setOperator(address operator) external;\\n\\n /**\\n * @notice Get the Holograph Registry module\\n * @dev This module stores a reference for all deployed holographable smart contracts\\n */\\n function getRegistry() external view returns (address registry);\\n\\n /**\\n * @notice Update the Holograph Registry module address\\n * @param registry address of the Holograph Registry smart contract to use\\n */\\n function setRegistry(address registry) external;\\n\\n /**\\n * @notice Get the Holograph Treasury module\\n * @dev All of the Holograph Protocol assets are stored and managed by this module\\n */\\n function getTreasury() external view returns (address treasury);\\n\\n /**\\n * @notice Update the Holograph Treasury module address\\n * @param treasury address of the Holograph Treasury smart contract to use\\n */\\n function setTreasury(address treasury) external;\\n\\n /**\\n * @notice Get the Holograph Utility Token address\\n * @dev This is the official utility token of the Holograph Protocol\\n */\\n function getUtilityToken() external view returns (address utilityToken);\\n\\n /**\\n * @notice Update the Holograph Utility Token address\\n * @param utilityToken address of the Holograph Utility Token smart contract to use\\n */\\n function setUtilityToken(address utilityToken) external;\\n}\\n\",\"keccak256\":\"0x90b5643e77e914393c508d59b80f5739debfd72455029c0db041f92374b3f586\",\"license\":\"UNLICENSED\"},\"contracts/interface/HolographRegistryInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\ninterface HolographRegistryInterface {\\n event HolographableContractEvent(address indexed _holographableContract, bytes _payload);\\n\\n function isHolographedContract(address smartContract) external view returns (bool);\\n\\n function isHolographedHashDeployed(bytes32 hash) external view returns (bool);\\n\\n function referenceContractTypeAddress(address contractAddress) external returns (bytes32);\\n\\n function getContractTypeAddress(bytes32 contractType) external view returns (address);\\n\\n function setContractTypeAddress(bytes32 contractType, address contractAddress) external;\\n\\n function getHolograph() external view returns (address holograph);\\n\\n function setHolograph(address holograph) external;\\n\\n function getHolographableContracts(uint256 index, uint256 length) external view returns (address[] memory contracts);\\n\\n function getHolographableContractsLength() external view returns (uint256);\\n\\n function getHolographedHashAddress(bytes32 hash) external view returns (address);\\n\\n function setHolographedHashAddress(bytes32 hash, address contractAddress) external;\\n\\n function getHToken(uint32 chainId) external view returns (address);\\n\\n function setHToken(uint32 chainId, address hToken) external;\\n\\n function getReservedContractTypeAddress(bytes32 contractType) external view returns (address contractTypeAddress);\\n\\n function setReservedContractTypeAddress(bytes32 hash, bool reserved) external;\\n\\n function setReservedContractTypeAddresses(bytes32[] calldata hashes, bool[] calldata reserved) external;\\n\\n function getUtilityToken() external view returns (address utilityToken);\\n\\n function setUtilityToken(address utilityToken) external;\\n\\n function holographableEvent(bytes calldata payload) external;\\n}\\n\",\"keccak256\":\"0x5e270e2ec4413f7e49d7bc4dd4d935549d3f5234f786e5a7f435cf77850ba966\",\"license\":\"UNLICENSED\"},\"contracts/interface/Holographable.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\ninterface Holographable {\\n function bridgeIn(uint32 fromChain, bytes calldata payload) external returns (bytes4);\\n\\n function bridgeOut(\\n uint32 toChain,\\n address sender,\\n bytes calldata payload\\n ) external returns (bytes4 selector, bytes memory data);\\n}\\n\",\"keccak256\":\"0x4dd2fc1af269273c46156df8af5cedeed0dfb83f0bfa5696a8d64c768449285b\",\"license\":\"UNLICENSED\"},\"contracts/interface/HolographerInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\ninterface HolographerInterface {\\n function getContractType() external view returns (bytes32 contractType);\\n\\n function getDeploymentBlock() external view returns (uint256 deploymentBlock);\\n\\n function getHolograph() external view returns (address holograph);\\n\\n function getHolographEnforcer() external view returns (address);\\n\\n function getOriginChain() external view returns (uint32 originChain);\\n\\n function getSourceContract() external view returns (address sourceContract);\\n}\\n\",\"keccak256\":\"0x4274b9180266275a8df16b8e1f0956cc795fb1ab87db1c01264c343be3bea937\",\"license\":\"UNLICENSED\"},\"contracts/interface/InitializableInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\n/**\\n * @title Initializable\\n * @author https://github.com/holographxyz\\n * @notice Use init instead of constructor\\n * @dev This allows for use of init function to make one time initializations without the need of a constructor\\n */\\ninterface InitializableInterface {\\n /**\\n * @notice Used internally to initialize the contract instead of through a constructor\\n * @dev This function is called by the deployer/factory when creating a contract\\n * @param initPayload abi encoded payload to use for contract initilaization\\n */\\n function init(bytes memory initPayload) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0x0a76fae986c5c18110ce2b1818c84ec28b7bf7f8fb00d20b39b8d7225fbd892d\",\"license\":\"UNLICENSED\"},\"contracts/library/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nlibrary Strings {\\n function toHexString(address account) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(account)));\\n }\\n\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\n }\\n\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = bytes16(\\\"0123456789abcdef\\\")[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n function toAsciiString(address x) internal pure returns (string memory) {\\n bytes memory s = new bytes(40);\\n for (uint256 i = 0; i < 20; i++) {\\n bytes1 b = bytes1(uint8(uint256(uint160(x)) / (2 ** (8 * (19 - i)))));\\n bytes1 hi = bytes1(uint8(b) / 16);\\n bytes1 lo = bytes1(uint8(b) - 16 * uint8(hi));\\n s[2 * i] = char(hi);\\n s[2 * i + 1] = char(lo);\\n }\\n return string(s);\\n }\\n\\n function char(bytes1 b) internal pure returns (bytes1 c) {\\n if (uint8(b) < 10) {\\n return bytes1(uint8(b) + 0x30);\\n } else {\\n return bytes1(uint8(b) + 0x57);\\n }\\n }\\n\\n function uint2str(uint256 _i) internal pure returns (string memory _uint256AsString) {\\n if (_i == 0) {\\n return \\\"0\\\";\\n }\\n uint256 j = _i;\\n uint256 len;\\n while (j != 0) {\\n len++;\\n j /= 10;\\n }\\n bytes memory bstr = new bytes(len);\\n uint256 k = len;\\n while (_i != 0) {\\n k = k - 1;\\n uint8 temp = (48 + uint8(_i - (_i / 10) * 10));\\n bytes1 b1 = bytes1(temp);\\n bstr[k] = b1;\\n _i /= 10;\\n }\\n return string(bstr);\\n }\\n\\n function toString(uint256 value) internal pure returns (string memory) {\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0xbfc8f2c75b679aefa1c0c0ef095665b957ebaeabde39fb15ce17afcdd4110492\",\"license\":\"UNLICENSED\"},\"contracts/struct/BridgeSettings.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nstruct BridgeSettings {\\n uint256 value;\\n uint256 gasLimit;\\n uint256 gasPrice;\\n uint32 toChain;\\n}\\n\",\"keccak256\":\"0x405f453cf620c5e882cf6d915fd7d14c895877408a7fd7e298d6e751bd4a0ce1\",\"license\":\"UNLICENSED\"},\"contracts/struct/DeploymentConfig.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nstruct DeploymentConfig {\\n bytes32 contractType;\\n uint32 chainType;\\n bytes32 salt;\\n bytes byteCode;\\n bytes initCode;\\n}\\n\",\"keccak256\":\"0x5eb9e83676eb65fa424aa9ca79961e1602a749f264ea4f496a9c359dad0da726\",\"license\":\"UNLICENSED\"},\"contracts/struct/Verification.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n/*\\n\\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 HOLOGRAPH \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n\\u2554\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2557\\n\\u2551 \\u2551\\n\\u2551 / ^ \\\\ \\u2551\\n\\u2551 ~~*~~ \\u00b8 \\u2551\\n\\u2551 [ '<>:<>' ] \\u2502\\u2591\\u2591\\u2591 \\u2551\\n\\u2551 \\u2554\\u2557 _/\\\"\\\\_ \\u2554\\u2563 \\u2551\\n\\u2551 \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\\"\\\"\\\" \\u250c\\u2500\\u256c\\u256c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\\\_/ \\u250c\\u2500\\u252c\\u2518 \\u2560\\u2563 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2560\\u2563 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2551 \\u250c\\u2500\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2510 \\u250c\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2500\\u2510 \\u2551\\n\\u2560\\u252c\\u2518 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502\\u2514\\u00a4\\u2518\\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2514\\u252c\\u2563\\n\\u2551\\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502 \\u2560\\u2563 \\u2502 \\u2502 \\u2502 \\u2502 \\u2502\\u2551\\n\\u2560\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u256c\\u256c\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2550\\u2550\\u2569\\u2563\\n\\u2560\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u256c\\u256c\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2534\\u2563\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 \\u2560\\u2563 \\u2560\\u2563 \\u2551\\n\\u2551 , \\u2560\\u2563 , ,' * \\u2560\\u2563 \\u2551\\n\\u2551~~~~~^~~~~~~~~\\u250c\\u256c\\u256c\\u2510~~~^~~~~~~~~^^~~~~~~~~^~~\\u250c\\u256c\\u256c\\u2510~~~~~~~^~~~~~~\\u2551\\n\\u255a\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2569\\u2569\\u2569\\u2569\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u2550\\u255d\\n - one protocol, one bridge = infinite possibilities -\\n\\n\\n ***************************************************************\\n\\n DISCLAIMER: U.S Patent Pending\\n\\n LICENSE: Holograph Limited Public License (H-LPL)\\n\\n https://holograph.xyz/licenses/h-lpl/1.0.0\\n\\n This license governs use of the accompanying software. If you\\n use the software, you accept this license. If you do not accept\\n the license, you are not permitted to use the software.\\n\\n 1. Definitions\\n\\n The terms \\\"reproduce,\\\" \\\"reproduction,\\\" \\\"derivative works,\\\" and\\n \\\"distribution\\\" have the same meaning here as under U.S.\\n copyright law. A \\\"contribution\\\" is the original software, or\\n any additions or changes to the software. A \\\"contributor\\\" is\\n any person that distributes its contribution under this\\n license. \\\"Licensed patents\\\" are a contributor\\u2019s patent claims\\n that read directly on its contribution.\\n\\n 2. Grant of Rights\\n\\n A) Copyright Grant- Subject to the terms of this license,\\n including the license conditions and limitations in sections 3\\n and 4, each contributor grants you a non-exclusive, worldwide,\\n royalty-free copyright license to reproduce its contribution,\\n prepare derivative works of its contribution, and distribute\\n its contribution or any derivative works that you create.\\n B) Patent Grant- Subject to the terms of this license,\\n including the license conditions and limitations in section 3,\\n each contributor grants you a non-exclusive, worldwide,\\n royalty-free license under its licensed patents to make, have\\n made, use, sell, offer for sale, import, and/or otherwise\\n dispose of its contribution in the software or derivative works\\n of the contribution in the software.\\n\\n 3. Conditions and Limitations\\n\\n A) No Trademark License- This license does not grant you rights\\n to use any contributors\\u2019 name, logo, or trademarks.\\n B) If you bring a patent claim against any contributor over\\n patents that you claim are infringed by the software, your\\n patent license from such contributor is terminated with\\n immediate effect.\\n C) If you distribute any portion of the software, you must\\n retain all copyright, patent, trademark, and attribution\\n notices that are present in the software.\\n D) If you distribute any portion of the software in source code\\n form, you may do so only under this license by including a\\n complete copy of this license with your distribution. If you\\n distribute any portion of the software in compiled or object\\n code form, you may only do so under a license that complies\\n with this license.\\n E) The software is licensed \\u201cas-is.\\u201d You bear all risks of\\n using it. The contributors give no express warranties,\\n guarantees, or conditions. You may have additional consumer\\n rights under your local laws which this license cannot change.\\n To the extent permitted under your local laws, the contributors\\n exclude all implied warranties, including those of\\n merchantability, fitness for a particular purpose and\\n non-infringement.\\n\\n 4. (F) Platform Limitation- The licenses granted in sections\\n 2.A & 2.B extend only to the software or derivative works that\\n you create that run on a Holograph system product.\\n\\n ***************************************************************\\n\\n*/\\n\\npragma solidity 0.8.13;\\n\\nstruct Verification {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n}\\n\",\"keccak256\":\"0xd351869472bcb2497e0a771c6e7f7a0b794d099133c67f5f378a8f7839f9db92\",\"license\":\"UNLICENSED\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50612f61806100206000396000f3fe6080604052600436106100d65760003560e01c8063704b6c021161007f578063b7e0366111610059578063b7e036611461028d578063bf64a82d146102bb578063df6516bd146102ce578063f851a440146102ee57600080fd5b8063704b6c021461023a578063a8935c671461025a578063a91ee0dc1461026d57600080fd5b80634ddf47d4116100b05780634ddf47d4146101b25780635ab1bd53146101d25780636e9960c31461020657600080fd5b806308a1eb20146100e557806325d5cac81461013b5780634827ae0c1461015d57600080fd5b366100e057600080fd5b600080fd5b3480156100f157600080fd5b50610105610100366004611690565b610303565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020015b60405180910390f35b34801561014757600080fd5b5061015b610156366004611708565b6103ba565b005b34801561016957600080fd5b507fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a545b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610132565b3480156101be57600080fd5b506101056101cd36600461185a565b610499565b3480156101de57600080fd5b507fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e75461018d565b34801561021257600080fd5b507f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95461018d565b34801561024657600080fd5b5061015b610255366004611708565b610600565b61015b6102683660046119b2565b6106da565b34801561027957600080fd5b5061015b610288366004611708565b6108c1565b34801561029957600080fd5b506102ad6102a8366004611af9565b61099b565b604051610132929190611bd6565b61015b6102c9366004611c11565b6109ef565b3480156102da57600080fd5b5061015b6102e9366004611c31565b610aca565b3480156102fa57600080fd5b5061018d611015565b600080808061031485870187611c31565b6040517fdf6516bd0000000000000000000000000000000000000000000000000000000081529295509093509150309063df6516bd9061035c90869086908690600401611c94565b600060405180830381600087803b15801561037657600080fd5b505af115801561038a573d6000803e3d6000fd5b507f08a1eb20000000000000000000000000000000000000000000000000000000009a9950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610475576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064015b60405180910390fd5b7fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55565b60006104c37f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a015490565b1561052a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a20616c726561647920696e697469616c697a65640000604482015260640161046c565b600080838060200190518101906105419190611d56565b91509150327f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955817fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55807fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7556105d760017f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a0155565b507f4ddf47d4000000000000000000000000000000000000000000000000000000009392505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955565b81156106eb576106eb858585610aca565b600085858560405160200161070293929190611c94565b604051602081830303815290604052905060007fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a54905060008173ffffffffffffffffffffffffffffffffffffffff16630fffbaf36040518163ffffffff1660e01b8152600401602060405180830381865afa158015610786573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107aa9190611d90565b845190915060005b818110156108b5578273ffffffffffffffffffffffffffffffffffffffff1663e55856668783815181106107e8576107e8611dad565b60200260200101516000015188848151811061080657610806611dad565b602002602001015160600151308a868151811061082557610825611dad565b6020026020010151602001518b878151811061084357610843611dad565b6020026020010151604001518b6040518763ffffffff1660e01b8152600401610870959493929190611ddc565b6000604051808303818588803b15801561088957600080fd5b505af115801561089d573d6000803e3d6000fd5b505050505080806108ad90611e5d565b9150506107b2565b50505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610977576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b7fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e755565b6000606063b7e0366160e01b848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250959c929b50919950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aa5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b808260003760008082600034875af13d6000803e808015610ac5573d6000f35b3d6000fd5b7fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a547fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e754845160208087015160408089015160608a015180519085012060808b01518051908601209251969796600096610bb796909594918b910195865260e09490941b7fffffffff0000000000000000000000000000000000000000000000000000000016602086015260248501929092526044840152606483015260601b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016608482015260980190565b604051602081830303815290604052805190602001209050610be88560000151866020015187604001518488611044565b610c4e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f484f4c4f47524150483a20696e76616c6964207369676e617475726500000000604482015260640161046c565b600060405180602001610c6090611621565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820381018352601f90910116604081815282516020808501919091207fff00000000000000000000000000000000000000000000000000000000000000828501527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b166021850152603584018790526055808501919091528251808503909101815260759093019091528151910120909150610d21816113a4565b15610d88576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f484f4c4f47524150483a20616c7265616479206465706c6f7965640000000000604482015260640161046c565b60608801518051849160009183906020830184f59150828551602087016000f560208c8101518d516040805163ffffffff9093169383019390935273ffffffffffffffffffffffffffffffffffffffff8b811693830193909352606082015284821660808201529195507f4ddf47d4000000000000000000000000000000000000000000000000000000009190861690634ddf47d49060a0016040516020818303038152906040528e60800151604051602001610e46929190611e95565b6040516020818303038152906040526040518263ffffffff1660e01b8152600401610e719190611eba565b6020604051808303816000875af1158015610e90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eb49190611ecd565b7fffffffff000000000000000000000000000000000000000000000000000000001614610f3d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f696e697469616c697a6174696f6e206661696c65640000000000000000000000604482015260640161046c565b6040517f725229f60000000000000000000000000000000000000000000000000000000081526004810187905273ffffffffffffffffffffffffffffffffffffffff858116602483015289169063725229f690604401600060405180830381600087803b158015610fad57600080fd5b505af1158015610fc1573d6000803e3d6000fd5b505060405188925073ffffffffffffffffffffffffffffffffffffffff871691507fa802207d4c618b40db3b25b7b90e6f483e16b2c1f8d3610b15b345a718c6b41b90600090a35050505050505050505050565b600061103f7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95490565b905090565b6000601b8460ff1610156110605761105d601b85611f0f565b93505b8360ff16601b1415801561107857508360ff16601c14155b156110855750600061139b565b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0851115611122576110d7857ffffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141611f34565b945060ff8416601b036110ed57601c93506110f2565b601b93505b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08511156111225750600061139b565b73ffffffffffffffffffffffffffffffffffffffff82161580159061139857506040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c810184905273ffffffffffffffffffffffffffffffffffffffff831690600190605c01604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600084529083018083525260ff881690820152606081018990526080810188905260a0016020604051602081039080840390855afa15801561120c573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff161480611305575073ffffffffffffffffffffffffffffffffffffffff821660016112578560206113de565b6040516020016112679190611f4b565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600084529083018083525260ff881690820152606081018990526080810188905260a0016020604051602081039080840390855afa1580156112e3573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff16145b80611398575060408051600081526020810180835285905260ff861691810191909152606081018790526080810186905273ffffffffffffffffffffffffffffffffffffffff83169060019060a0016020604051602081039080840390855afa158015611376573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff16145b90505b95945050505050565b6000813f80158015906113d757507fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708114155b9392505050565b606060006113ed836002611f90565b6113f8906002611fcd565b67ffffffffffffffff81111561141057611410611725565b6040519080825280601f01601f19166020018201604052801561143a576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061147157611471611dad565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106114d4576114d4611dad565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000611510846002611f90565b61151b906001611fcd565b90505b60018111156115b8577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061155c5761155c611dad565b1a60f81b82828151811061157257611572611dad565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c936115b181611fe5565b905061151e565b5083156113d7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161046c565b610f3a8061201b83390190565b803563ffffffff8116811461164257600080fd5b919050565b60008083601f84011261165957600080fd5b50813567ffffffffffffffff81111561167157600080fd5b60208301915083602082850101111561168957600080fd5b9250929050565b6000806000604084860312156116a557600080fd5b6116ae8461162e565b9250602084013567ffffffffffffffff8111156116ca57600080fd5b6116d686828701611647565b9497909650939450505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461170557600080fd5b50565b60006020828403121561171a57600080fd5b81356113d7816116e3565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516080810167ffffffffffffffff8111828210171561177757611777611725565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156117c4576117c4611725565b604052919050565b600082601f8301126117dd57600080fd5b813567ffffffffffffffff8111156117f7576117f7611725565b61182860207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160161177d565b81815284602083860101111561183d57600080fd5b816020850160208301376000918101602001919091529392505050565b60006020828403121561186c57600080fd5b813567ffffffffffffffff81111561188357600080fd5b61188f848285016117cc565b949350505050565b600060a082840312156118a957600080fd5b60405160a0810167ffffffffffffffff82821081831117156118cd576118cd611725565b81604052829350843583526118e46020860161162e565b602084015260408501356040840152606085013591508082111561190757600080fd5b611913868387016117cc565b6060840152608085013591508082111561192c57600080fd5b50611939858286016117cc565b6080830152505092915050565b60006060828403121561195857600080fd5b6040516060810181811067ffffffffffffffff8211171561197b5761197b611725565b80604052508091508235815260208301356020820152604083013560ff811681146119a557600080fd5b6040919091015292915050565b600080600080600060e086880312156119ca57600080fd5b853567ffffffffffffffff808211156119e257600080fd5b6119ee89838a01611897565b965060209150611a0089838a01611946565b9550608080890135611a11816116e3565b955060a08901358015158114611a2657600080fd5b945060c089013582811115611a3a57600080fd5b8901601f81018b13611a4b57600080fd5b803583811115611a5d57611a5d611725565b611a6b858260051b0161177d565b818152858101945060079190911b82018501908c821115611a8b57600080fd5b918501915b81831015611ae65783838e031215611aa85760008081fd5b611ab0611754565b833581528684013587820152604080850135908201526060611ad381860161162e565b9082015285529385019391830191611a90565b8096505050505050509295509295909350565b60008060008060608587031215611b0f57600080fd5b611b188561162e565b93506020850135611b28816116e3565b9250604085013567ffffffffffffffff811115611b4457600080fd5b611b5087828801611647565b95989497509550505050565b60005b83811015611b77578181015183820152602001611b5f565b83811115611b86576000848401525b50505050565b60008151808452611ba4816020860160208601611b5c565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b7fffffffff000000000000000000000000000000000000000000000000000000008316815260406020820152600061188f6040830184611b8c565b600080600060408486031215611c2657600080fd5b83356116ae816116e3565b600080600060a08486031215611c4657600080fd5b833567ffffffffffffffff811115611c5d57600080fd5b611c6986828701611897565b935050611c798560208601611946565b91506080840135611c89816116e3565b809150509250925092565b60a08152835160a082015263ffffffff60208501511660c0820152604084015160e08201526000606085015160a0610100840152611cd6610140840182611b8c565b905060808601517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6084830301610120850152611d128282611b8c565b92505050835160208301526020840151604083015260ff604085015116606083015261188f608083018473ffffffffffffffffffffffffffffffffffffffff169052565b60008060408385031215611d6957600080fd5b8251611d74816116e3565b6020840151909250611d85816116e3565b809150509250929050565b600060208284031215611da257600080fd5b81516113d7816116e3565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b63ffffffff8616815273ffffffffffffffffffffffffffffffffffffffff8516602082015283604082015282606082015260a060808201526000611e2360a0830184611b8c565b979650505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611e8e57611e8e611e2e565b5060010190565b604081526000611ea86040830185611b8c565b828103602084015261139b8185611b8c565b6020815260006113d76020830184611b8c565b600060208284031215611edf57600080fd5b81517fffffffff00000000000000000000000000000000000000000000000000000000811681146113d757600080fd5b600060ff821660ff84168060ff03821115611f2c57611f2c611e2e565b019392505050565b600082821015611f4657611f46611e2e565b500390565b7f19457468657265756d205369676e6564204d6573736167653a0a363600000000815260008251611f8381601c850160208701611b5c565b91909101601c0192915050565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611fc857611fc8611e2e565b500290565b60008219821115611fe057611fe0611e2e565b500190565b600081611ff457611ff4611e2e565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019056fe608060405234801561001057600080fd5b50610f1a806100206000396000f3fe6080604052600436106100c05760003560e01c806380d1cb3511610074578063c51a29e01161004e578063c51a29e0146102c1578063c8a4c3d5146102f5578063f851a4401461030a576100c7565b806380d1cb351461022c578063913a0ef21461026a578063bf64a82d146102ae576100c7565b80636e9960c3116100a55780636e9960c3146101a45780636faf275b146101d8578063704b6c021461020c576100c7565b80634827ae0c146100f95780634ddf47d414610153576100c7565b366100c757005b60006100d161031f565b90503660008037600080366000845af43d6000803e8080156100f2573d6000f35b3d6000fd5b005b34801561010557600080fd5b507fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a545b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b34801561015f57600080fd5b5061017361016e366004610bb4565b61045d565b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200161014a565b3480156101b057600080fd5b507f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c954610129565b3480156101e457600080fd5b507f27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b07454610129565b34801561021857600080fd5b506100f7610227366004610c59565b610911565b34801561023857600080fd5b507f9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de3545b60405190815260200161014a565b34801561027657600080fd5b507fd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d5460405163ffffffff909116815260200161014a565b6100f76102bc366004610c7d565b6109eb565b3480156102cd57600080fd5b507f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c75461025c565b34801561030157600080fd5b5061012961031f565b34801561031657600080fd5b50610129610ac1565b60008060007fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a5491507f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c75490508173ffffffffffffffffffffffffffffffffffffffff16635ab1bd536040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103db9190610d02565b73ffffffffffffffffffffffffffffffffffffffff166374b7510c826040518263ffffffff1660e01b815260040161041591815260200190565b602060405180830381865afa158015610432573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104569190610d02565b9250505090565b60006104877f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a015490565b156104f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f484f4c4f475241504845523a20616c726561647920696e697469616c697a656460448201526064015b60405180910390fd5b6000808380602001905181019061050a9190610d9c565b91509150600080600080858060200190518101906105289190610e00565b9350935093509350337f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955437f9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de355817f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c755827fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55837fd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d55807f27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b074556000808473ffffffffffffffffffffffffffffffffffffffff16635ab1bd536040518163ffffffff1660e01b8152600401602060405180830381865afa158015610650573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106749190610d02565b73ffffffffffffffffffffffffffffffffffffffff166374b7510c856040518263ffffffff1660e01b81526004016106ae91815260200190565b602060405180830381865afa1580156106cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ef9190610d02565b73ffffffffffffffffffffffffffffffffffffffff16634ddf47d460e01b8860405160240161071e9190610e5e565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009094169390931790925290516107a79190610eaf565b600060405180830381855af49150503d80600081146107e2576040519150601f19603f3d011682016040523d82523d6000602084013e6107e7565b606091505b50915091506000818060200190518101906108029190610ecb565b905082801561085257507fffffffff0000000000000000000000000000000000000000000000000000000081167f4ddf47d400000000000000000000000000000000000000000000000000000000145b6108b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f484f4c4f47524150483a20696e697469616c697a6174696f6e206661696c656460448201526064016104ea565b6108e160017f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a0155565b507f4ddf47d4000000000000000000000000000000000000000000000000000000009a9950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016104ea565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aa1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016104ea565b808260003760008082600034875af13d6000803e8080156100f2573d6000f35b6000610aeb7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95490565b905090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715610b6657610b66610af0565b604052919050565b600067ffffffffffffffff821115610b8857610b88610af0565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600060208284031215610bc657600080fd5b813567ffffffffffffffff811115610bdd57600080fd5b8201601f81018413610bee57600080fd5b8035610c01610bfc82610b6e565b610b1f565b818152856020838501011115610c1657600080fd5b81602084016020830137600091810160200191909152949350505050565b73ffffffffffffffffffffffffffffffffffffffff81168114610c5657600080fd5b50565b600060208284031215610c6b57600080fd5b8135610c7681610c34565b9392505050565b600080600060408486031215610c9257600080fd5b8335610c9d81610c34565b9250602084013567ffffffffffffffff80821115610cba57600080fd5b818601915086601f830112610cce57600080fd5b813581811115610cdd57600080fd5b876020828501011115610cef57600080fd5b6020830194508093505050509250925092565b600060208284031215610d1457600080fd5b8151610c7681610c34565b60005b83811015610d3a578181015183820152602001610d22565b83811115610d49576000848401525b50505050565b600082601f830112610d6057600080fd5b8151610d6e610bfc82610b6e565b818152846020838601011115610d8357600080fd5b610d94826020830160208701610d1f565b949350505050565b60008060408385031215610daf57600080fd5b825167ffffffffffffffff80821115610dc757600080fd5b610dd386838701610d4f565b93506020850151915080821115610de957600080fd5b50610df685828601610d4f565b9150509250929050565b60008060008060808587031215610e1657600080fd5b845163ffffffff81168114610e2a57600080fd5b6020860151909450610e3b81610c34565b604086015160608701519194509250610e5381610c34565b939692955090935050565b6020815260008251806020840152610e7d816040850160208701610d1f565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60008251610ec1818460208701610d1f565b9190910192915050565b600060208284031215610edd57600080fd5b81517fffffffff0000000000000000000000000000000000000000000000000000000081168114610c7657600080fdfea164736f6c634300080d000aa164736f6c634300080d000a", + "deployedBytecode": "0x6080604052600436106100d65760003560e01c8063704b6c021161007f578063b7e0366111610059578063b7e036611461028d578063bf64a82d146102bb578063df6516bd146102ce578063f851a440146102ee57600080fd5b8063704b6c021461023a578063a8935c671461025a578063a91ee0dc1461026d57600080fd5b80634ddf47d4116100b05780634ddf47d4146101b25780635ab1bd53146101d25780636e9960c31461020657600080fd5b806308a1eb20146100e557806325d5cac81461013b5780634827ae0c1461015d57600080fd5b366100e057600080fd5b600080fd5b3480156100f157600080fd5b50610105610100366004611690565b610303565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020015b60405180910390f35b34801561014757600080fd5b5061015b610156366004611708565b6103ba565b005b34801561016957600080fd5b507fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a545b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610132565b3480156101be57600080fd5b506101056101cd36600461185a565b610499565b3480156101de57600080fd5b507fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e75461018d565b34801561021257600080fd5b507f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95461018d565b34801561024657600080fd5b5061015b610255366004611708565b610600565b61015b6102683660046119b2565b6106da565b34801561027957600080fd5b5061015b610288366004611708565b6108c1565b34801561029957600080fd5b506102ad6102a8366004611af9565b61099b565b604051610132929190611bd6565b61015b6102c9366004611c11565b6109ef565b3480156102da57600080fd5b5061015b6102e9366004611c31565b610aca565b3480156102fa57600080fd5b5061018d611015565b600080808061031485870187611c31565b6040517fdf6516bd0000000000000000000000000000000000000000000000000000000081529295509093509150309063df6516bd9061035c90869086908690600401611c94565b600060405180830381600087803b15801561037657600080fd5b505af115801561038a573d6000803e3d6000fd5b507f08a1eb20000000000000000000000000000000000000000000000000000000009a9950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610475576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064015b60405180910390fd5b7fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55565b60006104c37f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a015490565b1561052a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a20616c726561647920696e697469616c697a65640000604482015260640161046c565b600080838060200190518101906105419190611d56565b91509150327f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955817fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55807fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7556105d760017f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a0155565b507f4ddf47d4000000000000000000000000000000000000000000000000000000009392505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955565b81156106eb576106eb858585610aca565b600085858560405160200161070293929190611c94565b604051602081830303815290604052905060007fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a54905060008173ffffffffffffffffffffffffffffffffffffffff16630fffbaf36040518163ffffffff1660e01b8152600401602060405180830381865afa158015610786573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107aa9190611d90565b845190915060005b818110156108b5578273ffffffffffffffffffffffffffffffffffffffff1663e55856668783815181106107e8576107e8611dad565b60200260200101516000015188848151811061080657610806611dad565b602002602001015160600151308a868151811061082557610825611dad565b6020026020010151602001518b878151811061084357610843611dad565b6020026020010151604001518b6040518763ffffffff1660e01b8152600401610870959493929190611ddc565b6000604051808303818588803b15801561088957600080fd5b505af115801561089d573d6000803e3d6000fd5b505050505080806108ad90611e5d565b9150506107b2565b50505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610977576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b7fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e755565b6000606063b7e0366160e01b848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250959c929b50919950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aa5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e0000604482015260640161046c565b808260003760008082600034875af13d6000803e808015610ac5573d6000f35b3d6000fd5b7fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a547fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e754845160208087015160408089015160608a015180519085012060808b01518051908601209251969796600096610bb796909594918b910195865260e09490941b7fffffffff0000000000000000000000000000000000000000000000000000000016602086015260248501929092526044840152606483015260601b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016608482015260980190565b604051602081830303815290604052805190602001209050610be88560000151866020015187604001518488611044565b610c4e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f484f4c4f47524150483a20696e76616c6964207369676e617475726500000000604482015260640161046c565b600060405180602001610c6090611621565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820381018352601f90910116604081815282516020808501919091207fff00000000000000000000000000000000000000000000000000000000000000828501527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b166021850152603584018790526055808501919091528251808503909101815260759093019091528151910120909150610d21816113a4565b15610d88576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f484f4c4f47524150483a20616c7265616479206465706c6f7965640000000000604482015260640161046c565b60608801518051849160009183906020830184f59150828551602087016000f560208c8101518d516040805163ffffffff9093169383019390935273ffffffffffffffffffffffffffffffffffffffff8b811693830193909352606082015284821660808201529195507f4ddf47d4000000000000000000000000000000000000000000000000000000009190861690634ddf47d49060a0016040516020818303038152906040528e60800151604051602001610e46929190611e95565b6040516020818303038152906040526040518263ffffffff1660e01b8152600401610e719190611eba565b6020604051808303816000875af1158015610e90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eb49190611ecd565b7fffffffff000000000000000000000000000000000000000000000000000000001614610f3d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f696e697469616c697a6174696f6e206661696c65640000000000000000000000604482015260640161046c565b6040517f725229f60000000000000000000000000000000000000000000000000000000081526004810187905273ffffffffffffffffffffffffffffffffffffffff858116602483015289169063725229f690604401600060405180830381600087803b158015610fad57600080fd5b505af1158015610fc1573d6000803e3d6000fd5b505060405188925073ffffffffffffffffffffffffffffffffffffffff871691507fa802207d4c618b40db3b25b7b90e6f483e16b2c1f8d3610b15b345a718c6b41b90600090a35050505050505050505050565b600061103f7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95490565b905090565b6000601b8460ff1610156110605761105d601b85611f0f565b93505b8360ff16601b1415801561107857508360ff16601c14155b156110855750600061139b565b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0851115611122576110d7857ffffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141611f34565b945060ff8416601b036110ed57601c93506110f2565b601b93505b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08511156111225750600061139b565b73ffffffffffffffffffffffffffffffffffffffff82161580159061139857506040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c810184905273ffffffffffffffffffffffffffffffffffffffff831690600190605c01604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600084529083018083525260ff881690820152606081018990526080810188905260a0016020604051602081039080840390855afa15801561120c573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff161480611305575073ffffffffffffffffffffffffffffffffffffffff821660016112578560206113de565b6040516020016112679190611f4b565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600084529083018083525260ff881690820152606081018990526080810188905260a0016020604051602081039080840390855afa1580156112e3573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff16145b80611398575060408051600081526020810180835285905260ff861691810191909152606081018790526080810186905273ffffffffffffffffffffffffffffffffffffffff83169060019060a0016020604051602081039080840390855afa158015611376573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff16145b90505b95945050505050565b6000813f80158015906113d757507fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708114155b9392505050565b606060006113ed836002611f90565b6113f8906002611fcd565b67ffffffffffffffff81111561141057611410611725565b6040519080825280601f01601f19166020018201604052801561143a576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061147157611471611dad565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106114d4576114d4611dad565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000611510846002611f90565b61151b906001611fcd565b90505b60018111156115b8577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061155c5761155c611dad565b1a60f81b82828151811061157257611572611dad565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c936115b181611fe5565b905061151e565b5083156113d7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161046c565b610f3a8061201b83390190565b803563ffffffff8116811461164257600080fd5b919050565b60008083601f84011261165957600080fd5b50813567ffffffffffffffff81111561167157600080fd5b60208301915083602082850101111561168957600080fd5b9250929050565b6000806000604084860312156116a557600080fd5b6116ae8461162e565b9250602084013567ffffffffffffffff8111156116ca57600080fd5b6116d686828701611647565b9497909650939450505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461170557600080fd5b50565b60006020828403121561171a57600080fd5b81356113d7816116e3565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516080810167ffffffffffffffff8111828210171561177757611777611725565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156117c4576117c4611725565b604052919050565b600082601f8301126117dd57600080fd5b813567ffffffffffffffff8111156117f7576117f7611725565b61182860207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160161177d565b81815284602083860101111561183d57600080fd5b816020850160208301376000918101602001919091529392505050565b60006020828403121561186c57600080fd5b813567ffffffffffffffff81111561188357600080fd5b61188f848285016117cc565b949350505050565b600060a082840312156118a957600080fd5b60405160a0810167ffffffffffffffff82821081831117156118cd576118cd611725565b81604052829350843583526118e46020860161162e565b602084015260408501356040840152606085013591508082111561190757600080fd5b611913868387016117cc565b6060840152608085013591508082111561192c57600080fd5b50611939858286016117cc565b6080830152505092915050565b60006060828403121561195857600080fd5b6040516060810181811067ffffffffffffffff8211171561197b5761197b611725565b80604052508091508235815260208301356020820152604083013560ff811681146119a557600080fd5b6040919091015292915050565b600080600080600060e086880312156119ca57600080fd5b853567ffffffffffffffff808211156119e257600080fd5b6119ee89838a01611897565b965060209150611a0089838a01611946565b9550608080890135611a11816116e3565b955060a08901358015158114611a2657600080fd5b945060c089013582811115611a3a57600080fd5b8901601f81018b13611a4b57600080fd5b803583811115611a5d57611a5d611725565b611a6b858260051b0161177d565b818152858101945060079190911b82018501908c821115611a8b57600080fd5b918501915b81831015611ae65783838e031215611aa85760008081fd5b611ab0611754565b833581528684013587820152604080850135908201526060611ad381860161162e565b9082015285529385019391830191611a90565b8096505050505050509295509295909350565b60008060008060608587031215611b0f57600080fd5b611b188561162e565b93506020850135611b28816116e3565b9250604085013567ffffffffffffffff811115611b4457600080fd5b611b5087828801611647565b95989497509550505050565b60005b83811015611b77578181015183820152602001611b5f565b83811115611b86576000848401525b50505050565b60008151808452611ba4816020860160208601611b5c565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b7fffffffff000000000000000000000000000000000000000000000000000000008316815260406020820152600061188f6040830184611b8c565b600080600060408486031215611c2657600080fd5b83356116ae816116e3565b600080600060a08486031215611c4657600080fd5b833567ffffffffffffffff811115611c5d57600080fd5b611c6986828701611897565b935050611c798560208601611946565b91506080840135611c89816116e3565b809150509250925092565b60a08152835160a082015263ffffffff60208501511660c0820152604084015160e08201526000606085015160a0610100840152611cd6610140840182611b8c565b905060808601517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6084830301610120850152611d128282611b8c565b92505050835160208301526020840151604083015260ff604085015116606083015261188f608083018473ffffffffffffffffffffffffffffffffffffffff169052565b60008060408385031215611d6957600080fd5b8251611d74816116e3565b6020840151909250611d85816116e3565b809150509250929050565b600060208284031215611da257600080fd5b81516113d7816116e3565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b63ffffffff8616815273ffffffffffffffffffffffffffffffffffffffff8516602082015283604082015282606082015260a060808201526000611e2360a0830184611b8c565b979650505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611e8e57611e8e611e2e565b5060010190565b604081526000611ea86040830185611b8c565b828103602084015261139b8185611b8c565b6020815260006113d76020830184611b8c565b600060208284031215611edf57600080fd5b81517fffffffff00000000000000000000000000000000000000000000000000000000811681146113d757600080fd5b600060ff821660ff84168060ff03821115611f2c57611f2c611e2e565b019392505050565b600082821015611f4657611f46611e2e565b500390565b7f19457468657265756d205369676e6564204d6573736167653a0a363600000000815260008251611f8381601c850160208701611b5c565b91909101601c0192915050565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611fc857611fc8611e2e565b500290565b60008219821115611fe057611fe0611e2e565b500190565b600081611ff457611ff4611e2e565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019056fe608060405234801561001057600080fd5b50610f1a806100206000396000f3fe6080604052600436106100c05760003560e01c806380d1cb3511610074578063c51a29e01161004e578063c51a29e0146102c1578063c8a4c3d5146102f5578063f851a4401461030a576100c7565b806380d1cb351461022c578063913a0ef21461026a578063bf64a82d146102ae576100c7565b80636e9960c3116100a55780636e9960c3146101a45780636faf275b146101d8578063704b6c021461020c576100c7565b80634827ae0c146100f95780634ddf47d414610153576100c7565b366100c757005b60006100d161031f565b90503660008037600080366000845af43d6000803e8080156100f2573d6000f35b3d6000fd5b005b34801561010557600080fd5b507fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a545b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b34801561015f57600080fd5b5061017361016e366004610bb4565b61045d565b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200161014a565b3480156101b057600080fd5b507f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c954610129565b3480156101e457600080fd5b507f27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b07454610129565b34801561021857600080fd5b506100f7610227366004610c59565b610911565b34801561023857600080fd5b507f9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de3545b60405190815260200161014a565b34801561027657600080fd5b507fd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d5460405163ffffffff909116815260200161014a565b6100f76102bc366004610c7d565b6109eb565b3480156102cd57600080fd5b507f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c75461025c565b34801561030157600080fd5b5061012961031f565b34801561031657600080fd5b50610129610ac1565b60008060007fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a5491507f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c75490508173ffffffffffffffffffffffffffffffffffffffff16635ab1bd536040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103db9190610d02565b73ffffffffffffffffffffffffffffffffffffffff166374b7510c826040518263ffffffff1660e01b815260040161041591815260200190565b602060405180830381865afa158015610432573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104569190610d02565b9250505090565b60006104877f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a015490565b156104f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f484f4c4f475241504845523a20616c726561647920696e697469616c697a656460448201526064015b60405180910390fd5b6000808380602001905181019061050a9190610d9c565b91509150600080600080858060200190518101906105289190610e00565b9350935093509350337f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955437f9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de355817f0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c755827fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55837fd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d55807f27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b074556000808473ffffffffffffffffffffffffffffffffffffffff16635ab1bd536040518163ffffffff1660e01b8152600401602060405180830381865afa158015610650573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106749190610d02565b73ffffffffffffffffffffffffffffffffffffffff166374b7510c856040518263ffffffff1660e01b81526004016106ae91815260200190565b602060405180830381865afa1580156106cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ef9190610d02565b73ffffffffffffffffffffffffffffffffffffffff16634ddf47d460e01b8860405160240161071e9190610e5e565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009094169390931790925290516107a79190610eaf565b600060405180830381855af49150503d80600081146107e2576040519150601f19603f3d011682016040523d82523d6000602084013e6107e7565b606091505b50915091506000818060200190518101906108029190610ecb565b905082801561085257507fffffffff0000000000000000000000000000000000000000000000000000000081167f4ddf47d400000000000000000000000000000000000000000000000000000000145b6108b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f484f4c4f47524150483a20696e697469616c697a6174696f6e206661696c656460448201526064016104ea565b6108e160017f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a0155565b507f4ddf47d4000000000000000000000000000000000000000000000000000000009a9950505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016104ea565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aa1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016104ea565b808260003760008082600034875af13d6000803e8080156100f2573d6000f35b6000610aeb7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95490565b905090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715610b6657610b66610af0565b604052919050565b600067ffffffffffffffff821115610b8857610b88610af0565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600060208284031215610bc657600080fd5b813567ffffffffffffffff811115610bdd57600080fd5b8201601f81018413610bee57600080fd5b8035610c01610bfc82610b6e565b610b1f565b818152856020838501011115610c1657600080fd5b81602084016020830137600091810160200191909152949350505050565b73ffffffffffffffffffffffffffffffffffffffff81168114610c5657600080fd5b50565b600060208284031215610c6b57600080fd5b8135610c7681610c34565b9392505050565b600080600060408486031215610c9257600080fd5b8335610c9d81610c34565b9250602084013567ffffffffffffffff80821115610cba57600080fd5b818601915086601f830112610cce57600080fd5b813581811115610cdd57600080fd5b876020828501011115610cef57600080fd5b6020830194508093505050509250925092565b600060208284031215610d1457600080fd5b8151610c7681610c34565b60005b83811015610d3a578181015183820152602001610d22565b83811115610d49576000848401525b50505050565b600082601f830112610d6057600080fd5b8151610d6e610bfc82610b6e565b818152846020838601011115610d8357600080fd5b610d94826020830160208701610d1f565b949350505050565b60008060408385031215610daf57600080fd5b825167ffffffffffffffff80821115610dc757600080fd5b610dd386838701610d4f565b93506020850151915080821115610de957600080fd5b50610df685828601610d4f565b9150509250929050565b60008060008060808587031215610e1657600080fd5b845163ffffffff81168114610e2a57600080fd5b6020860151909450610e3b81610c34565b604086015160608701519194509250610e5381610c34565b939692955090935050565b6020815260008251806020840152610e7d816040850160208701610d1f565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60008251610ec1818460208701610d1f565b9190910192915050565b600060208284031215610edd57600080fd5b81517fffffffff0000000000000000000000000000000000000000000000000000000081168114610c7657600080fdfea164736f6c634300080d000aa164736f6c634300080d000a", "devdoc": { "author": "https://github.com/holographxyz", "details": "The contract provides methods that allow for the creation of Holograph Protocol compliant smart contracts, that are capable of minting holographable assets", diff --git a/deployments/develop/polygonTestnet/solcInputs/c71d96e115e745dd34ef9239c385494d.json b/deployments/develop/polygonTestnet/solcInputs/c71d96e115e745dd34ef9239c385494d.json new file mode 100644 index 000000000..2f9c65ed5 --- /dev/null +++ b/deployments/develop/polygonTestnet/solcInputs/c71d96e115e745dd34ef9239c385494d.json @@ -0,0 +1,465 @@ +{ + "language": "Solidity", + "sources": { + "contracts/abstract/Admin.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nabstract contract Admin {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.admin')) - 1)\n */\n bytes32 constant _adminSlot = 0x3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c9;\n\n modifier onlyAdmin() {\n require(msg.sender == getAdmin(), \"HOLOGRAPH: admin only function\");\n _;\n }\n\n constructor() {}\n\n function admin() public view returns (address) {\n return getAdmin();\n }\n\n function getAdmin() public view returns (address adminAddress) {\n assembly {\n adminAddress := sload(_adminSlot)\n }\n }\n\n function setAdmin(address adminAddress) public onlyAdmin {\n assembly {\n sstore(_adminSlot, adminAddress)\n }\n }\n\n function adminCall(address target, bytes calldata data) external payable onlyAdmin {\n assembly {\n calldatacopy(0, data.offset, data.length)\n let result := call(gas(), target, callvalue(), 0, data.length, 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/abstract/EIP712.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/cryptography/draft-EIP712.sol)\n\npragma solidity 0.8.13;\n\nimport \"../library/ECDSA.sol\";\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\n *\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\n *\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\n * ({_hashTypedDataV4}).\n *\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\n * the chain id to protect against replay attacks on an eventual fork of the chain.\n *\n * NOTE: This contract implements the version of the encoding known as \"v4\", as implemented by the JSON RPC method\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\n *\n * _Available since v3.4._\n */\nabstract contract EIP712 {\n /* solhint-disable var-name-mixedcase */\n // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to\n // invalidate the cached domain separator if the chain id changes.\n // WE CANNOT USE immutable VALUES SINCE IT BREAKS OUT CREATE2 COMPUTATIONS ON DEPLOYER SCRIPTS\n // AFTER MAKING NECESARRY CHANGES, WE CAN ADD IT BACK IN\n bytes32 private _CACHED_DOMAIN_SEPARATOR;\n uint256 private _CACHED_CHAIN_ID;\n address private _CACHED_THIS;\n\n bytes32 private _HASHED_NAME;\n bytes32 private _HASHED_VERSION;\n bytes32 private _TYPE_HASH;\n\n /* solhint-enable var-name-mixedcase */\n\n /**\n * @dev Initializes the domain separator and parameter caches.\n *\n * The meaning of `name` and `version` is specified in\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\n *\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\n * - `version`: the current major version of the signing domain.\n *\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\n * contract upgrade].\n */\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n function _eip712_init(string memory name, string memory version) internal {\n bytes32 hashedName = keccak256(bytes(name));\n bytes32 hashedVersion = keccak256(bytes(version));\n bytes32 typeHash = keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\");\n _HASHED_NAME = hashedName;\n _HASHED_VERSION = hashedVersion;\n _CACHED_CHAIN_ID = block.chainid;\n _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion);\n _CACHED_THIS = address(this);\n _TYPE_HASH = typeHash;\n }\n\n /**\n * @dev Returns the domain separator for the current chain.\n */\n function _domainSeparatorV4() internal view returns (bytes32) {\n if (address(this) == _CACHED_THIS && block.chainid == _CACHED_CHAIN_ID) {\n return _CACHED_DOMAIN_SEPARATOR;\n } else {\n return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION);\n }\n }\n\n function _buildDomainSeparator(\n bytes32 typeHash,\n bytes32 nameHash,\n bytes32 versionHash\n ) private view returns (bytes32) {\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\n }\n\n /**\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\n * function returns the hash of the fully encoded EIP712 message for this domain.\n *\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\n *\n * ```solidity\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\n * keccak256(\"Mail(address to,string contents)\"),\n * mailTo,\n * keccak256(bytes(mailContents))\n * )));\n * address signer = ECDSA.recover(digest, signature);\n * ```\n */\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\n return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);\n }\n}\n" + }, + "contracts/abstract/ERC1155H.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Initializable.sol\";\n\nabstract contract ERC1155H is Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holographer')) - 1)\n */\n bytes32 constant _holographerSlot = 0xe9fcff60011c1a99f7b7244d1f2d9da93d79ea8ef3654ce590d775575255b2bd;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.owner')) - 1)\n */\n bytes32 constant _ownerSlot = 0xb56711ba6bd3ded7639fc335ee7524fe668a79d7558c85992e3f8494cf772777;\n\n modifier onlyHolographer() {\n require(msg.sender == holographer(), \"ERC1155: holographer only\");\n _;\n }\n\n modifier onlyOwner() {\n require(msgSender() == _getOwner(), \"ERC1155: owner only function\");\n _;\n }\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external virtual override returns (bytes4) {\n return _init(initPayload);\n }\n\n function _init(bytes memory /* initPayload*/) internal returns (bytes4) {\n require(!_isInitialized(), \"ERC1155: already initialized\");\n address _holographer = msg.sender;\n address currentOwner;\n assembly {\n sstore(_holographerSlot, _holographer)\n currentOwner := sload(_ownerSlot)\n }\n require(currentOwner != address(0), \"HOLOGRAPH: owner not set\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @dev The Holographer passes original msg.sender via calldata. This function extracts it.\n */\n function msgSender() internal view returns (address sender) {\n assembly {\n switch eq(caller(), sload(_holographerSlot))\n case 0 {\n sender := caller()\n }\n default {\n sender := calldataload(sub(calldatasize(), 0x20))\n }\n }\n }\n\n /**\n * @dev Address of Holograph ERC1155 standards enforcer smart contract.\n */\n function holographer() internal view returns (address _holographer) {\n assembly {\n _holographer := sload(_holographerSlot)\n }\n }\n\n function supportsInterface(bytes4) external pure virtual returns (bool) {\n return false;\n }\n\n /**\n * @dev Address of initial creator/owner of the collection.\n */\n function owner() external view virtual returns (address) {\n return _getOwner();\n }\n\n function isOwner() external view returns (bool) {\n return (msgSender() == _getOwner());\n }\n\n function isOwner(address wallet) external view returns (bool) {\n return wallet == _getOwner();\n }\n\n function _getOwner() internal view returns (address ownerAddress) {\n assembly {\n ownerAddress := sload(_ownerSlot)\n }\n }\n\n function _setOwner(address ownerAddress) internal {\n assembly {\n sstore(_ownerSlot, ownerAddress)\n }\n }\n\n function withdraw() external virtual onlyOwner {\n payable(_getOwner()).transfer(address(this).balance);\n }\n\n event FundsReceived(address indexed source, uint256 amount);\n\n /**\n * @dev This function emits an event to indicate native gas token receipt. Do not rely on this to work.\n * Please use custom payable functions for accepting native value.\n */\n receive() external payable virtual {\n emit FundsReceived(msgSender(), msg.value);\n }\n\n /**\n * @dev Return true for any un-implemented event hooks\n */\n fallback() external payable virtual {\n assembly {\n switch eq(sload(_holographerSlot), caller())\n case 1 {\n mstore(0x80, 0x0000000000000000000000000000000000000000000000000000000000000001)\n return(0x80, 0x20)\n }\n default {\n revert(0x00, 0x00)\n }\n }\n }\n}\n" + }, + "contracts/abstract/ERC20H.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Initializable.sol\";\n\nabstract contract ERC20H is Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holographer')) - 1)\n */\n bytes32 constant _holographerSlot = 0xe9fcff60011c1a99f7b7244d1f2d9da93d79ea8ef3654ce590d775575255b2bd;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.owner')) - 1)\n */\n bytes32 constant _ownerSlot = 0xb56711ba6bd3ded7639fc335ee7524fe668a79d7558c85992e3f8494cf772777;\n\n modifier onlyHolographer() {\n require(msg.sender == holographer(), \"ERC20: holographer only\");\n _;\n }\n\n modifier onlyOwner() {\n require(msgSender() == _getOwner(), \"ERC20: owner only function\");\n _;\n }\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external virtual override returns (bytes4) {\n return _init(initPayload);\n }\n\n function _init(bytes memory /* initPayload*/) internal returns (bytes4) {\n require(!_isInitialized(), \"ERC20: already initialized\");\n address _holographer = msg.sender;\n address currentOwner;\n assembly {\n sstore(_holographerSlot, _holographer)\n currentOwner := sload(_ownerSlot)\n }\n require(currentOwner != address(0), \"HOLOGRAPH: owner not set\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @dev The Holographer passes original msg.sender via calldata. This function extracts it.\n */\n function msgSender() internal view returns (address sender) {\n assembly {\n switch eq(caller(), sload(_holographerSlot))\n case 0 {\n sender := caller()\n }\n default {\n sender := calldataload(sub(calldatasize(), 0x20))\n }\n }\n }\n\n /**\n * @dev Address of Holograph ERC20 standards enforcer smart contract.\n */\n function holographer() internal view returns (address _holographer) {\n assembly {\n _holographer := sload(_holographerSlot)\n }\n }\n\n function supportsInterface(bytes4) external pure virtual returns (bool) {\n return false;\n }\n\n /**\n * @dev Address of initial creator/owner of the token contract.\n */\n function owner() external view virtual returns (address) {\n return _getOwner();\n }\n\n function isOwner() external view returns (bool) {\n return (msgSender() == _getOwner());\n }\n\n function isOwner(address wallet) external view returns (bool) {\n return wallet == _getOwner();\n }\n\n function _getOwner() internal view returns (address ownerAddress) {\n assembly {\n ownerAddress := sload(_ownerSlot)\n }\n }\n\n function _setOwner(address ownerAddress) internal {\n assembly {\n sstore(_ownerSlot, ownerAddress)\n }\n }\n\n function withdraw() external virtual onlyOwner {\n payable(_getOwner()).transfer(address(this).balance);\n }\n\n event FundsReceived(address indexed source, uint256 amount);\n\n /**\n * @dev This function emits an event to indicate native gas token receipt. Do not rely on this to work.\n * Please use custom payable functions for accepting native value.\n */\n receive() external payable virtual {\n emit FundsReceived(msgSender(), msg.value);\n }\n\n /**\n * @dev Return true for any un-implemented event hooks\n */\n fallback() external payable virtual {\n assembly {\n switch eq(sload(_holographerSlot), caller())\n case 1 {\n mstore(0x80, 0x0000000000000000000000000000000000000000000000000000000000000001)\n return(0x80, 0x20)\n }\n default {\n revert(0x00, 0x00)\n }\n }\n }\n}\n" + }, + "contracts/abstract/ERC721H.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Initializable.sol\";\n\nabstract contract ERC721H is Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holographer')) - 1)\n */\n bytes32 constant _holographerSlot = 0xe9fcff60011c1a99f7b7244d1f2d9da93d79ea8ef3654ce590d775575255b2bd;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.owner')) - 1)\n */\n bytes32 constant _ownerSlot = 0xb56711ba6bd3ded7639fc335ee7524fe668a79d7558c85992e3f8494cf772777;\n\n modifier onlyHolographer() {\n require(msg.sender == holographer(), \"ERC721: holographer only\");\n _;\n }\n\n modifier onlyOwner() {\n require(msgSender() == _getOwner(), \"ERC721: owner only function\");\n _;\n }\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external virtual override returns (bytes4) {\n return _init(initPayload);\n }\n\n function _init(bytes memory /* initPayload*/) internal returns (bytes4) {\n require(!_isInitialized(), \"ERC721: already initialized\");\n address _holographer = msg.sender;\n address currentOwner;\n assembly {\n sstore(_holographerSlot, _holographer)\n currentOwner := sload(_ownerSlot)\n }\n require(currentOwner != address(0), \"HOLOGRAPH: owner not set\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @dev The Holographer passes original msg.sender via calldata. This function extracts it.\n */\n function msgSender() internal view returns (address sender) {\n assembly {\n switch eq(caller(), sload(_holographerSlot))\n case 0 {\n sender := caller()\n }\n default {\n sender := calldataload(sub(calldatasize(), 0x20))\n }\n }\n }\n\n /**\n * @dev Address of Holograph ERC721 standards enforcer smart contract.\n */\n function holographer() internal view returns (address _holographer) {\n assembly {\n _holographer := sload(_holographerSlot)\n }\n }\n\n function supportsInterface(bytes4) external pure virtual returns (bool) {\n return false;\n }\n\n /**\n * @dev Address of initial creator/owner of the collection.\n */\n function owner() external view virtual returns (address) {\n return _getOwner();\n }\n\n function isOwner() external view returns (bool) {\n return (msgSender() == _getOwner());\n }\n\n function isOwner(address wallet) external view returns (bool) {\n return wallet == _getOwner();\n }\n\n function _getOwner() internal view returns (address ownerAddress) {\n assembly {\n ownerAddress := sload(_ownerSlot)\n }\n }\n\n function _setOwner(address ownerAddress) internal {\n assembly {\n sstore(_ownerSlot, ownerAddress)\n }\n }\n\n function withdraw() external virtual onlyOwner {\n payable(_getOwner()).transfer(address(this).balance);\n }\n\n event FundsReceived(address indexed source, uint256 amount);\n\n /**\n * @dev This function emits an event to indicate native gas token receipt. Do not rely on this to work.\n * Please use custom payable functions for accepting native value.\n */\n receive() external payable virtual {\n emit FundsReceived(msgSender(), msg.value);\n }\n\n /**\n * @dev Return true for any un-implemented event hooks\n */\n fallback() external payable virtual {\n assembly {\n switch eq(sload(_holographerSlot), caller())\n case 1 {\n mstore(0x80, 0x0000000000000000000000000000000000000000000000000000000000000001)\n return(0x80, 0x20)\n }\n default {\n revert(0x00, 0x00)\n }\n }\n }\n}\n" + }, + "contracts/abstract/GenericH.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Initializable.sol\";\n\nabstract contract GenericH is Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holographer')) - 1)\n */\n bytes32 constant _holographerSlot = 0xe9fcff60011c1a99f7b7244d1f2d9da93d79ea8ef3654ce590d775575255b2bd;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.owner')) - 1)\n */\n bytes32 constant _ownerSlot = 0xb56711ba6bd3ded7639fc335ee7524fe668a79d7558c85992e3f8494cf772777;\n\n modifier onlyHolographer() {\n require(msg.sender == holographer(), \"GENERIC: holographer only\");\n _;\n }\n\n modifier onlyOwner() {\n require(msgSender() == _getOwner(), \"GENERIC: owner only function\");\n _;\n }\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external virtual override returns (bytes4) {\n return _init(initPayload);\n }\n\n function _init(bytes memory /* initPayload*/) internal returns (bytes4) {\n require(!_isInitialized(), \"GENERIC: already initialized\");\n address _holographer = msg.sender;\n address currentOwner;\n assembly {\n sstore(_holographerSlot, _holographer)\n currentOwner := sload(_ownerSlot)\n }\n require(currentOwner != address(0), \"HOLOGRAPH: owner not set\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @dev The Holographer passes original msg.sender via calldata. This function extracts it.\n */\n function msgSender() internal view returns (address sender) {\n assembly {\n switch eq(caller(), sload(_holographerSlot))\n case 0 {\n sender := caller()\n }\n default {\n sender := calldataload(sub(calldatasize(), 0x20))\n }\n }\n }\n\n /**\n * @dev Address of Holograph GENERIC standards enforcer smart contract.\n */\n function holographer() internal view returns (address _holographer) {\n assembly {\n _holographer := sload(_holographerSlot)\n }\n }\n\n function supportsInterface(bytes4) external pure virtual returns (bool) {\n return false;\n }\n\n /**\n * @dev Address of initial creator/owner of the contract.\n */\n function owner() external view virtual returns (address) {\n return _getOwner();\n }\n\n function isOwner() external view returns (bool) {\n return (msgSender() == _getOwner());\n }\n\n function isOwner(address wallet) external view returns (bool) {\n return wallet == _getOwner();\n }\n\n function _getOwner() internal view returns (address ownerAddress) {\n assembly {\n ownerAddress := sload(_ownerSlot)\n }\n }\n\n function _setOwner(address ownerAddress) internal {\n assembly {\n sstore(_ownerSlot, ownerAddress)\n }\n }\n\n function withdraw() external virtual onlyOwner {\n payable(_getOwner()).transfer(address(this).balance);\n }\n\n event FundsReceived(address indexed source, uint256 amount);\n\n /**\n * @dev This function emits an event to indicate native gas token receipt. Do not rely on this to work.\n * Please use custom payable functions for accepting native value.\n */\n receive() external payable virtual {\n emit FundsReceived(msgSender(), msg.value);\n }\n\n /**\n * @dev Return true for any un-implemented event hooks\n */\n fallback() external payable virtual {\n assembly {\n switch eq(sload(_holographerSlot), caller())\n case 1 {\n mstore(0x80, 0x0000000000000000000000000000000000000000000000000000000000000001)\n return(0x80, 0x20)\n }\n default {\n revert(0x00, 0x00)\n }\n }\n }\n}\n" + }, + "contracts/abstract/HLGERC20H.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Initializable.sol\";\n\nabstract contract HLGERC20H is Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holographer')) - 1)\n */\n bytes32 constant _holographerSlot = 0xe9fcff60011c1a99f7b7244d1f2d9da93d79ea8ef3654ce590d775575255b2bd;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.owner')) - 1)\n */\n bytes32 constant _ownerSlot = 0xb56711ba6bd3ded7639fc335ee7524fe668a79d7558c85992e3f8494cf772777;\n\n modifier onlyHolographer() {\n require(msg.sender == holographer(), \"ERC20: holographer only\");\n _;\n }\n\n modifier onlyOwner() {\n if (msg.sender == holographer()) {\n require(msgSender() == _getOwner(), \"ERC20: owner only function\");\n } else {\n require(msg.sender == _getOwner(), \"ERC20: owner only function\");\n }\n _;\n }\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external virtual override returns (bytes4) {\n return _init(initPayload);\n }\n\n function _init(bytes memory /* initPayload*/) internal returns (bytes4) {\n require(!_isInitialized(), \"ERC20: already initialized\");\n address _holographer = msg.sender;\n address currentOwner;\n assembly {\n sstore(_holographerSlot, _holographer)\n currentOwner := sload(_ownerSlot)\n }\n require(currentOwner != address(0), \"HOLOGRAPH: owner not set\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @dev The Holographer passes original msg.sender via calldata. This function extracts it.\n */\n function msgSender() internal pure returns (address sender) {\n assembly {\n sender := calldataload(sub(calldatasize(), 0x20))\n }\n }\n\n /**\n * @dev Address of Holograph ERC20 standards enforcer smart contract.\n */\n function holographer() internal view returns (address _holographer) {\n assembly {\n _holographer := sload(_holographerSlot)\n }\n }\n\n function supportsInterface(bytes4) external pure returns (bool) {\n return false;\n }\n\n /**\n * @dev Address of initial creator/owner of the token contract.\n */\n function owner() external view returns (address) {\n return _getOwner();\n }\n\n function isOwner() external view returns (bool) {\n if (msg.sender == holographer()) {\n return msgSender() == _getOwner();\n } else {\n return msg.sender == _getOwner();\n }\n }\n\n function isOwner(address wallet) external view returns (bool) {\n return wallet == _getOwner();\n }\n\n function _getOwner() internal view returns (address ownerAddress) {\n assembly {\n ownerAddress := sload(_ownerSlot)\n }\n }\n\n function _setOwner(address ownerAddress) internal {\n assembly {\n sstore(_ownerSlot, ownerAddress)\n }\n }\n\n function withdraw() external virtual onlyOwner {\n payable(_getOwner()).transfer(address(this).balance);\n }\n\n /**\n * @dev This function is unreachable unless custom contract address is called directly.\n * Please use custom payable functions for accepting native value.\n */\n receive() external payable {\n revert(\"ERC20: unreachable code\");\n }\n\n /**\n * @dev Return true for any un-implemented event hooks\n */\n fallback() external payable {\n assembly {\n switch eq(sload(_holographerSlot), caller())\n case 1 {\n mstore(0x80, 0x0000000000000000000000000000000000000000000000000000000000000001)\n return(0x80, 0x20)\n }\n default {\n revert(0x00, 0x00)\n }\n }\n }\n}\n" + }, + "contracts/abstract/Initializable.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../interface/InitializableInterface.sol\";\n\n/**\n * @title Initializable\n * @author https://github.com/holographxyz\n * @notice Use init instead of constructor\n * @dev This allows for use of init function to make one time initializations without the need for a constructor\n */\nabstract contract Initializable is InitializableInterface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.initialized')) - 1)\n */\n bytes32 constant _initializedSlot = 0x4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a01;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external virtual returns (bytes4);\n\n function _isInitialized() internal view returns (bool initialized) {\n assembly {\n initialized := sload(_initializedSlot)\n }\n }\n\n function _setInitialized() internal {\n assembly {\n sstore(_initializedSlot, 0x0000000000000000000000000000000000000000000000000000000000000001)\n }\n }\n}\n" + }, + "contracts/abstract/NonReentrant.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nabstract contract NonReentrant {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.reentrant')) - 1)\n */\n bytes32 constant _reentrantSlot = 0x04b524dd539523930d3901481aa9455d7752b49add99e1647adb8b09a3137279;\n\n modifier nonReentrant() {\n require(getStatus() != 2, \"HOLOGRAPH: reentrant call\");\n setStatus(2);\n _;\n setStatus(1);\n }\n\n constructor() {}\n\n function getStatus() internal view returns (uint256 status) {\n assembly {\n status := sload(_reentrantSlot)\n }\n }\n\n function setStatus(uint256 status) internal {\n assembly {\n sstore(_reentrantSlot, status)\n }\n }\n}\n" + }, + "contracts/abstract/Owner.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nabstract contract Owner {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.owner')) - 1)\n */\n bytes32 constant _ownerSlot = 0xb56711ba6bd3ded7639fc335ee7524fe668a79d7558c85992e3f8494cf772777;\n\n /**\n * @dev Event emitted when contract owner is changed.\n */\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n modifier onlyOwner() virtual {\n require(msg.sender == getOwner(), \"HOLOGRAPH: owner only function\");\n _;\n }\n\n function owner() external view virtual returns (address) {\n return getOwner();\n }\n\n constructor() {}\n\n function getOwner() public view returns (address ownerAddress) {\n assembly {\n ownerAddress := sload(_ownerSlot)\n }\n }\n\n function setOwner(address ownerAddress) public virtual onlyOwner {\n address previousOwner = getOwner();\n assembly {\n sstore(_ownerSlot, ownerAddress)\n }\n emit OwnershipTransferred(previousOwner, ownerAddress);\n }\n\n function transferOwnership(address newOwner) public onlyOwner {\n require(newOwner != address(0), \"HOLOGRAPH: zero address\");\n assembly {\n sstore(_ownerSlot, newOwner)\n }\n }\n\n function ownerCall(address target, bytes calldata data) external payable onlyOwner {\n assembly {\n calldatacopy(0, data.offset, data.length)\n let result := call(gas(), target, callvalue(), 0, data.length, 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/abstract/StrictERC1155H.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../interface/HolographedERC1155.sol\";\n\nimport \"./ERC1155H.sol\";\n\nabstract contract StrictERC1155H is ERC1155H, HolographedERC1155 {\n /**\n * @dev Dummy variable to prevent empty functions from making \"switch to pure\" warnings.\n */\n bool private _success;\n\n function bridgeIn(\n uint32 /* _chainId*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool) {\n _success = true;\n return true;\n }\n\n function bridgeOut(\n uint32 /* _chainId*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bytes memory _data) {\n _success = true;\n _data = abi.encode(holographer());\n }\n\n function afterApprove(\n address /* _owner*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeApprove(\n address /* _owner*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterApprovalAll(\n address /* _to*/,\n bool /* _approved*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeApprovalAll(\n address /* _to*/,\n bool /* _approved*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterBurn(\n address /* _owner*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeBurn(\n address /* _owner*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterMint(\n address /* _owner*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeMint(\n address /* _owner*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterSafeTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeSafeTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterOnERC1155Received(\n address /* _operator*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeOnERC1155Received(\n address /* _operator*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n}\n" + }, + "contracts/abstract/StrictERC20H.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../interface/HolographedERC20.sol\";\n\nimport \"./ERC20H.sol\";\n\nabstract contract StrictERC20H is ERC20H, HolographedERC20 {\n /**\n * @dev Dummy variable to prevent empty functions from making \"switch to pure\" warnings.\n */\n bool private _success;\n\n function bridgeIn(\n uint32 /* _chainId*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool) {\n _success = true;\n return true;\n }\n\n function bridgeOut(\n uint32 /* _chainId*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bytes memory _data) {\n /**\n * @dev This is just here to suppress unused parameter warning\n */\n _data = abi.encodePacked(holographer());\n _success = true;\n }\n\n function afterApprove(\n address /* _owner*/,\n address /* _to*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeApprove(\n address /* _owner*/,\n address /* _to*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterOnERC20Received(\n address /* _token*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeOnERC20Received(\n address /* _token*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterBurn(\n address /* _owner*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeBurn(\n address /* _owner*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterMint(\n address /* _owner*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeMint(\n address /* _owner*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterSafeTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeSafeTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _amount*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function onAllowance(\n address /* _owner*/,\n address /* _to*/,\n uint256 /* _amount*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = false;\n return _success;\n }\n}\n" + }, + "contracts/abstract/StrictERC721H.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../interface/HolographedERC721.sol\";\n\nimport \"./ERC721H.sol\";\n\nabstract contract StrictERC721H is ERC721H, HolographedERC721 {\n /**\n * @dev Dummy variable to prevent empty functions from making \"switch to pure\" warnings.\n */\n bool private _success;\n\n function bridgeIn(\n uint32 /* _chainId*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool) {\n _success = true;\n return true;\n }\n\n function bridgeOut(\n uint32 /* _chainId*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/\n ) external virtual onlyHolographer returns (bytes memory _data) {\n _success = true;\n _data = abi.encode(holographer());\n }\n\n function afterApprove(\n address /* _owner*/,\n address /* _to*/,\n uint256 /* _tokenId*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeApprove(\n address /* _owner*/,\n address /* _to*/,\n uint256 /* _tokenId*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterApprovalAll(\n address /* _sender*/,\n address /* _to*/,\n bool /* _approved*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeApprovalAll(\n address /* _sender*/,\n address /* _to*/,\n bool /* _approved*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterBurn(\n address /* _owner*/,\n uint256 /* _tokenId*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeBurn(\n address /* _owner*/,\n uint256 /* _tokenId*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterMint(\n address /* _owner*/,\n uint256 /* _tokenId*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeMint(\n address /* _owner*/,\n uint256 /* _tokenId*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterSafeTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeSafeTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeTransfer(\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function afterOnERC721Received(\n address /* _operator*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function beforeOnERC721Received(\n address /* _operator*/,\n address /* _from*/,\n address /* _to*/,\n uint256 /* _tokenId*/,\n bytes calldata /* _data*/\n ) external virtual onlyHolographer returns (bool success) {\n _success = true;\n return _success;\n }\n\n function onIsApprovedForAll(\n address /* _wallet*/,\n address /* _operator*/\n ) external view virtual onlyHolographer returns (bool approved) {\n approved = _success;\n return false;\n }\n\n function contractURI() external view virtual onlyHolographer returns (string memory contractJSON) {\n contractJSON = _success ? \"\" : \"\";\n }\n}\n" + }, + "contracts/drops/interface/IDropsPriceOracle.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\ninterface IDropsPriceOracle {\n function convertUsdToWei(uint256 usdAmount) external view returns (uint256 weiAmount);\n}\n" + }, + "contracts/drops/interface/IHolographDropERC721.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {IMetadataRenderer} from \"./IMetadataRenderer.sol\";\n\nimport {AddressMintDetails} from \"../struct/AddressMintDetails.sol\";\nimport {SaleDetails} from \"../struct/SaleDetails.sol\";\n\n/// @notice Interface for HOLOGRAPH Drops contract\ninterface IHolographDropERC721 {\n // Access errors\n\n /// @notice Only admin can access this function\n error Access_OnlyAdmin();\n /// @notice Missing the given role or admin access\n error Access_MissingRoleOrAdmin(bytes32 role);\n /// @notice Withdraw is not allowed by this user\n error Access_WithdrawNotAllowed();\n /// @notice Cannot withdraw funds due to ETH send failure.\n error Withdraw_FundsSendFailure();\n /// @notice Mint fee send failure\n error MintFee_FundsSendFailure();\n\n /// @notice Call to external metadata renderer failed.\n error ExternalMetadataRenderer_CallFailed();\n\n /// @notice Thrown when the operator for the contract is not allowed\n /// @dev Used when strict enforcement of marketplaces for creator royalties is desired.\n error OperatorNotAllowed(address operator);\n\n /// @notice Thrown when there is no active market filter DAO address supported for the current chain\n /// @dev Used for enabling and disabling filter for the given chain.\n error MarketFilterDAOAddressNotSupportedForChain();\n\n /// @notice Used when the operator filter registry external call fails\n /// @dev Used for bubbling error up to clients.\n error RemoteOperatorFilterRegistryCallFailed();\n\n // Sale/Purchase errors\n /// @notice Sale is inactive\n error Sale_Inactive();\n /// @notice Presale is inactive\n error Presale_Inactive();\n /// @notice Presale merkle root is invalid\n error Presale_MerkleNotApproved();\n /// @notice Wrong price for purchase\n error Purchase_WrongPrice(uint256 correctPrice);\n /// @notice NFT sold out\n error Mint_SoldOut();\n /// @notice Too many purchase for address\n error Purchase_TooManyForAddress();\n /// @notice Too many presale for address\n error Presale_TooManyForAddress();\n\n // Admin errors\n /// @notice Royalty percentage too high\n error Setup_RoyaltyPercentageTooHigh(uint16 maxRoyaltyBPS);\n /// @notice Invalid admin upgrade address\n error Admin_InvalidUpgradeAddress(address proposedAddress);\n /// @notice Unable to finalize an edition not marked as open (size set to uint64_max_value)\n error Admin_UnableToFinalizeNotOpenEdition();\n\n /// @notice Event emitted for mint fee payout\n /// @param mintFeeAmount amount of the mint fee\n /// @param mintFeeRecipient recipient of the mint fee\n /// @param success if the payout succeeded\n event MintFeePayout(uint256 mintFeeAmount, address mintFeeRecipient, bool success);\n\n /// @notice Event emitted for each sale\n /// @param to address sale was made to\n /// @param quantity quantity of the minted nfts\n /// @param pricePerToken price for each token\n /// @param firstPurchasedTokenId first purchased token ID (to get range add to quantity for max)\n event Sale(\n address indexed to,\n uint256 indexed quantity,\n uint256 indexed pricePerToken,\n uint256 firstPurchasedTokenId\n );\n\n /// @notice Sales configuration has been changed\n /// @dev To access new sales configuration, use getter function.\n /// @param changedBy Changed by user\n event SalesConfigChanged(address indexed changedBy);\n\n /// @notice Event emitted when the funds recipient is changed\n /// @param newAddress new address for the funds recipient\n /// @param changedBy address that the recipient is changed by\n event FundsRecipientChanged(address indexed newAddress, address indexed changedBy);\n\n /// @notice Event emitted when the funds are withdrawn from the minting contract\n /// @param withdrawnBy address that issued the withdraw\n /// @param withdrawnTo address that the funds were withdrawn to\n /// @param amount amount that was withdrawn\n /// @param feeRecipient user getting withdraw fee (if any)\n /// @param feeAmount amount of the fee getting sent (if any)\n event FundsWithdrawn(\n address indexed withdrawnBy,\n address indexed withdrawnTo,\n uint256 amount,\n address feeRecipient,\n uint256 feeAmount\n );\n\n /// @notice Event emitted when an open mint is finalized and further minting is closed forever on the contract.\n /// @param sender address sending close mint\n /// @param numberOfMints number of mints the contract is finalized at\n event OpenMintFinalized(address indexed sender, uint256 numberOfMints);\n\n /// @notice Event emitted when metadata renderer is updated.\n /// @param sender address of the updater\n /// @param renderer new metadata renderer address\n event UpdatedMetadataRenderer(address sender, IMetadataRenderer renderer);\n\n /// @notice Admin function to update the sales configuration settings\n /// @param publicSalePrice public sale price in ether\n /// @param maxSalePurchasePerAddress Max # of purchases (public) per address allowed\n /// @param publicSaleStart unix timestamp when the public sale starts\n /// @param publicSaleEnd unix timestamp when the public sale ends (set to 0 to disable)\n /// @param presaleStart unix timestamp when the presale starts\n /// @param presaleEnd unix timestamp when the presale ends\n /// @param presaleMerkleRoot merkle root for the presale information\n function setSaleConfiguration(\n uint104 publicSalePrice,\n uint32 maxSalePurchasePerAddress,\n uint64 publicSaleStart,\n uint64 publicSaleEnd,\n uint64 presaleStart,\n uint64 presaleEnd,\n bytes32 presaleMerkleRoot\n ) external;\n\n /// @notice External purchase function (payable in eth)\n /// @param quantity to purchase\n /// @return first minted token ID\n function purchase(uint256 quantity) external payable returns (uint256);\n\n /// @notice External purchase presale function (takes a merkle proof and matches to root) (payable in eth)\n /// @param quantity to purchase\n /// @param maxQuantity can purchase (verified by merkle root)\n /// @param pricePerToken price per token allowed (verified by merkle root)\n /// @param merkleProof input for merkle proof leaf verified by merkle root\n /// @return first minted token ID\n function purchasePresale(\n uint256 quantity,\n uint256 maxQuantity,\n uint256 pricePerToken,\n bytes32[] memory merkleProof\n ) external payable returns (uint256);\n\n /// @notice Function to return the global sales details for the given drop\n function saleDetails() external view returns (SaleDetails memory);\n\n /// @notice Function to return the specific sales details for a given address\n /// @param minter address for minter to return mint information for\n function mintedPerAddress(address minter) external view returns (AddressMintDetails memory);\n\n /// @notice This is the opensea/public owner setting that can be set by the contract admin\n function owner() external view returns (address);\n\n /// @notice Update the metadata renderer\n /// @param newRenderer new address for renderer\n /// @param setupRenderer data to call to bootstrap data for the new renderer (optional)\n function setMetadataRenderer(IMetadataRenderer newRenderer, bytes memory setupRenderer) external;\n\n /// @notice This is an admin mint function to mint a quantity to a specific address\n /// @param to address to mint to\n /// @param quantity quantity to mint\n /// @return the id of the first minted NFT\n function adminMint(address to, uint256 quantity) external returns (uint256);\n\n /// @notice This is an admin mint function to mint a single nft each to a list of addresses\n /// @param to list of addresses to mint an NFT each to\n /// @return the id of the first minted NFT\n function adminMintAirdrop(address[] memory to) external returns (uint256);\n\n /// @dev Getter for admin role associated with the contract to handle metadata\n /// @return boolean if address is admin\n function isAdmin(address user) external view returns (bool);\n}\n" + }, + "contracts/drops/interface/IMetadataRenderer.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\ninterface IMetadataRenderer {\n function tokenURI(uint256) external view returns (string memory);\n\n function contractURI() external view returns (string memory);\n\n function initializeWithData(bytes memory initData) external;\n}\n" + }, + "contracts/drops/interface/IOperatorFilterRegistry.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\ninterface IOperatorFilterRegistry {\n function isOperatorAllowed(address registrant, address operator) external view returns (bool);\n\n function register(address registrant) external;\n\n function registerAndSubscribe(address registrant, address subscription) external;\n\n function registerAndCopyEntries(address registrant, address registrantToCopy) external;\n\n function updateOperator(address registrant, address operator, bool filtered) external;\n\n function updateOperators(address registrant, address[] calldata operators, bool filtered) external;\n\n function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external;\n\n function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external;\n\n function subscribe(address registrant, address registrantToSubscribe) external;\n\n function unsubscribe(address registrant, bool copyExistingEntries) external;\n\n function subscriptionOf(address addr) external returns (address registrant);\n\n function subscribers(address registrant) external returns (address[] memory);\n\n function subscriberAt(address registrant, uint256 index) external returns (address);\n\n function copyEntriesOf(address registrant, address registrantToCopy) external;\n\n function isOperatorFiltered(address registrant, address operator) external returns (bool);\n\n function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool);\n\n function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool);\n\n function filteredOperators(address addr) external returns (address[] memory);\n\n function filteredCodeHashes(address addr) external returns (bytes32[] memory);\n\n function filteredOperatorAt(address registrant, uint256 index) external returns (address);\n\n function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32);\n\n function isRegistered(address addr) external returns (bool);\n\n function codeHashOf(address addr) external returns (bytes32);\n\n function unregister(address registrant) external;\n}\n" + }, + "contracts/drops/library/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nlibrary Address {\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "contracts/drops/library/MerkleProof.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nlibrary MerkleProof {\n /**\n * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree\n * defined by `root`. For this, a `proof` must be provided, containing\n * sibling hashes on the branch from the leaf to the root of the tree. Each\n * pair of leaves and each pair of pre-images are assumed to be sorted.\n */\n function verify(bytes32[] memory proof, bytes32 root, bytes32 leaf) internal pure returns (bool) {\n return processProof(proof, leaf) == root;\n }\n\n /**\n * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up\n * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt\n * hash matches the root of the tree. When processing the proof, the pairs\n * of leafs & pre-images are assumed to be sorted.\n *\n * _Available since v4.4._\n */\n function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {\n bytes32 computedHash = leaf;\n for (uint256 i = 0; i < proof.length; i++) {\n bytes32 proofElement = proof[i];\n if (computedHash <= proofElement) {\n // Hash(current computed hash + current element of the proof)\n computedHash = _efficientHash(computedHash, proofElement);\n } else {\n // Hash(current element of the proof + current computed hash)\n computedHash = _efficientHash(proofElement, computedHash);\n }\n }\n return computedHash;\n }\n\n function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {\n assembly {\n mstore(0x00, a)\n mstore(0x20, b)\n value := keccak256(0x00, 0x40)\n }\n }\n}\n" + }, + "contracts/drops/library/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nlibrary Strings {\n bytes16 private constant _HEX_SYMBOLS = \"0123456789abcdef\";\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n // Inspired by OraclizeAPI's implementation - MIT licence\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n if (value == 0) {\n return \"0\";\n }\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n bytes memory buffer = new bytes(digits);\n while (value != 0) {\n digits -= 1;\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n value /= 10;\n }\n return string(buffer);\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n if (value == 0) {\n return \"0x00\";\n }\n uint256 temp = value;\n uint256 length = 0;\n while (temp != 0) {\n length++;\n temp >>= 8;\n }\n return toHexString(value, length);\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n}\n" + }, + "contracts/drops/metadata/DropsMetadataRenderer.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IMetadataRenderer} from \"../interface/IMetadataRenderer.sol\";\n\nimport {Strings} from \"../library/Strings.sol\";\n\nimport {MetadataRenderAdminCheck} from \"./MetadataRenderAdminCheck.sol\";\n\n/// @notice Drops metadata system\ncontract DropsMetadataRenderer is Initializable, IMetadataRenderer, MetadataRenderAdminCheck {\n error MetadataFrozen();\n\n /// Event to mark updated metadata information\n event MetadataUpdated(\n address indexed target,\n string metadataBase,\n string metadataExtension,\n string contractURI,\n uint256 freezeAt\n );\n\n /// @notice Hash to mark updated provenance hash\n event ProvenanceHashUpdated(address indexed target, bytes32 provenanceHash);\n\n /// @notice Struct to store metadata info and update data\n struct MetadataURIInfo {\n string base;\n string extension;\n string contractURI;\n uint256 freezeAt;\n }\n\n /// @notice NFT metadata by contract\n mapping(address => MetadataURIInfo) public metadataBaseByContract;\n\n /// @notice Optional provenance hashes for NFT metadata by contract\n mapping(address => bytes32) public provenanceHashes;\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @dev A blank init function is required to be able to call genesisDeriveFutureAddress to get the deterministic address\n * @dev Since no data is required to be intialized the selector is just returned and _setInitialized() does not need to be called\n */\n function init(bytes memory /* initPayload */) external pure override returns (bytes4) {\n return Initializable.init.selector;\n }\n\n /// @notice Standard init for drop metadata from root drop contract\n /// @param data passed in for initialization\n function initializeWithData(bytes memory data) external {\n // data format: string baseURI, string newContractURI\n (string memory initialBaseURI, string memory initialContractURI) = abi.decode(data, (string, string));\n _updateMetadataDetails(msg.sender, initialBaseURI, \"\", initialContractURI, 0);\n }\n\n /// @notice Update the provenance hash (optional) for a given nft\n /// @param target target address to update\n /// @param provenanceHash provenance hash to set\n function updateProvenanceHash(address target, bytes32 provenanceHash) external requireSenderAdmin(target) {\n provenanceHashes[target] = provenanceHash;\n emit ProvenanceHashUpdated(target, provenanceHash);\n }\n\n /// @notice Update metadata base URI and contract URI\n /// @param baseUri new base URI\n /// @param newContractUri new contract URI (can be an empty string)\n function updateMetadataBase(\n address target,\n string memory baseUri,\n string memory newContractUri\n ) external requireSenderAdmin(target) {\n _updateMetadataDetails(target, baseUri, \"\", newContractUri, 0);\n }\n\n /// @notice Update metadata base URI, extension, contract URI and freezing detailsUpdate metadata base URI, extension, contract URI and freezing detailsUpdate metadata base URI, extension, contract URI and freezing detailsUpdate metadata base URI, extension, contract URI and freezing detailsUpdate metadata base URI, extension, contract URI and freezing detailsUpdate metadata base URI, extension, contract URI and freezing detailsUpdate metadata base URI, extension, contract URI and freezing detailsUpdate metadata base URI, extension, contract URI and freezing details\n /// @param target target contract to update metadata for\n /// @param metadataBase new base URI to update metadata with\n /// @param metadataExtension new extension to append to base metadata URI\n /// @param freezeAt time to freeze the contract metadata at (set to 0 to disable)\n function updateMetadataBaseWithDetails(\n address target,\n string memory metadataBase,\n string memory metadataExtension,\n string memory newContractURI,\n uint256 freezeAt\n ) external requireSenderAdmin(target) {\n _updateMetadataDetails(target, metadataBase, metadataExtension, newContractURI, freezeAt);\n }\n\n /// @notice Internal metadata update function\n /// @param metadataBase Base URI to update metadata for\n /// @param metadataExtension Extension URI to update metadata for\n /// @param freezeAt timestamp to freeze metadata (set to 0 to disable freezing)\n function _updateMetadataDetails(\n address target,\n string memory metadataBase,\n string memory metadataExtension,\n string memory newContractURI,\n uint256 freezeAt\n ) internal {\n if (freezeAt != 0 && freezeAt > block.timestamp) {\n revert MetadataFrozen();\n }\n\n metadataBaseByContract[target] = MetadataURIInfo({\n base: metadataBase,\n extension: metadataExtension,\n contractURI: newContractURI,\n freezeAt: freezeAt\n });\n emit MetadataUpdated({\n target: target,\n metadataBase: metadataBase,\n metadataExtension: metadataExtension,\n contractURI: newContractURI,\n freezeAt: freezeAt\n });\n }\n\n /// @notice A contract URI for the given drop contract\n /// @dev reverts if a contract uri is not provided\n /// @return contract uri for the contract metadata\n function contractURI() external view override returns (string memory) {\n string memory uri = metadataBaseByContract[msg.sender].contractURI;\n if (bytes(uri).length == 0) revert();\n return uri;\n }\n\n /// @notice A token URI for the given drops contract\n /// @dev reverts if a contract uri is not set\n /// @return token URI for the given token ID and contract (set by msg.sender)\n function tokenURI(uint256 tokenId) external view override returns (string memory) {\n MetadataURIInfo memory info = metadataBaseByContract[msg.sender];\n\n if (bytes(info.base).length == 0) revert();\n\n return string(abi.encodePacked(info.base, Strings.toString(tokenId), info.extension));\n }\n}\n" + }, + "contracts/drops/metadata/EditionsMetadataRenderer.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport \"../../abstract/Initializable.sol\";\n\nimport {IMetadataRenderer} from \"../interface/IMetadataRenderer.sol\";\nimport {IHolographDropERC721} from \"../interface/IHolographDropERC721.sol\";\nimport {ERC721Metadata} from \"../../interface/ERC721Metadata.sol\";\nimport {NFTMetadataRenderer} from \"../utils/NFTMetadataRenderer.sol\";\nimport {MetadataRenderAdminCheck} from \"./MetadataRenderAdminCheck.sol\";\n\nimport {Configuration} from \"../struct/Configuration.sol\";\n\ninterface DropConfigGetter {\n function config() external view returns (Configuration memory config);\n}\n\n/// @notice EditionsMetadataRenderer for editions support\ncontract EditionsMetadataRenderer is Initializable, IMetadataRenderer, MetadataRenderAdminCheck {\n /// @notice Storage for token edition information\n struct TokenEditionInfo {\n string description;\n string imageURI;\n string animationURI;\n }\n\n /// @notice Event for updated Media URIs\n event MediaURIsUpdated(address indexed target, address sender, string imageURI, string animationURI);\n\n /// @notice Event for a new edition initialized\n /// @dev admin function indexer feedback\n event EditionInitialized(address indexed target, string description, string imageURI, string animationURI);\n\n /// @notice Description updated for this edition\n /// @dev admin function indexer feedback\n event DescriptionUpdated(address indexed target, address sender, string newDescription);\n\n /// @notice Token information mapping storage\n mapping(address => TokenEditionInfo) public tokenInfos;\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @dev A blank init function is required to be able to call genesisDeriveFutureAddress to get the deterministic address\n * @dev Since no data is required to be intialized the selector is just returned and _setInitialized() does not need to be called\n */\n function init(bytes memory /* initPayload */) external pure override returns (bytes4) {\n return InitializableInterface.init.selector;\n }\n\n /// @notice Update media URIs\n /// @param target target for contract to update metadata for\n /// @param imageURI new image uri address\n /// @param animationURI new animation uri address\n function updateMediaURIs(\n address target,\n string memory imageURI,\n string memory animationURI\n ) external requireSenderAdmin(target) {\n tokenInfos[target].imageURI = imageURI;\n tokenInfos[target].animationURI = animationURI;\n emit MediaURIsUpdated({target: target, sender: msg.sender, imageURI: imageURI, animationURI: animationURI});\n }\n\n /// @notice Admin function to update description\n /// @param target target description\n /// @param newDescription new description\n function updateDescription(address target, string memory newDescription) external requireSenderAdmin(target) {\n tokenInfos[target].description = newDescription;\n\n emit DescriptionUpdated({target: target, sender: msg.sender, newDescription: newDescription});\n }\n\n /// @notice Default initializer for edition data from a specific contract\n /// @param data data to init with\n function initializeWithData(bytes memory data) external {\n // data format: description, imageURI, animationURI\n (string memory description, string memory imageURI, string memory animationURI) = abi.decode(\n data,\n (string, string, string)\n );\n\n tokenInfos[msg.sender] = TokenEditionInfo({\n description: description,\n imageURI: imageURI,\n animationURI: animationURI\n });\n emit EditionInitialized({\n target: msg.sender,\n description: description,\n imageURI: imageURI,\n animationURI: animationURI\n });\n }\n\n /// @notice Contract URI information getter\n /// @return contract uri (if set)\n function contractURI() external view override returns (string memory) {\n address target = msg.sender;\n TokenEditionInfo storage editionInfo = tokenInfos[target];\n Configuration memory config = DropConfigGetter(target).config();\n\n return\n NFTMetadataRenderer.encodeContractURIJSON({\n name: ERC721Metadata(target).name(),\n description: editionInfo.description,\n imageURI: editionInfo.imageURI,\n animationURI: editionInfo.animationURI,\n royaltyBPS: uint256(config.royaltyBPS),\n royaltyRecipient: config.fundsRecipient\n });\n }\n\n /// @notice Token URI information getter\n /// @param tokenId to get uri for\n /// @return contract uri (if set)\n function tokenURI(uint256 tokenId) external view override returns (string memory) {\n address target = msg.sender;\n\n TokenEditionInfo memory info = tokenInfos[target];\n IHolographDropERC721 media = IHolographDropERC721(target);\n\n uint256 maxSupply = media.saleDetails().maxSupply;\n\n // For open editions, set max supply to 0 for renderer to remove the edition max number\n // This will be added back on once the open edition is \"finalized\"\n if (maxSupply == type(uint64).max) {\n maxSupply = 0;\n }\n\n return\n NFTMetadataRenderer.createMetadataEdition({\n name: ERC721Metadata(target).name(),\n description: info.description,\n imageURI: info.imageURI,\n animationURI: info.animationURI,\n tokenOfEdition: tokenId,\n editionSize: maxSupply\n });\n }\n}\n" + }, + "contracts/drops/metadata/MetadataRenderAdminCheck.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {IHolographDropERC721} from \"../interface/IHolographDropERC721.sol\";\n\ncontract MetadataRenderAdminCheck {\n error Access_OnlyAdmin();\n\n /// @notice Modifier to require the sender to be an admin\n /// @param target address that the user wants to modify\n modifier requireSenderAdmin(address target) {\n if (target != msg.sender && !IHolographDropERC721(target).isAdmin(msg.sender)) {\n revert Access_OnlyAdmin();\n }\n\n _;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleArbitrumNova.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOracleArbitrumNova is Admin, Initializable, IDropsPriceOracle {\n address constant WETH = 0x0000000000000000000000000000000000000000; // 18 decimals\n address constant USDC = 0x0000000000000000000000000000000000000000; // 6 decimals\n address constant USDT = 0x0000000000000000000000000000000000000000; // 6 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n\n IUniswapV2Pair constant UniV2UsdcPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n IUniswapV2Pair constant UniV2UsdtPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external view returns (uint256 weiAmount) {\n weiAmount =\n (_getSushiUSDC(usdAmount) + _getSushiUSDT(usdAmount) + _getUniUSDC(usdAmount) + _getUniUSDT(usdAmount)) /\n 4;\n }\n\n function _getSushiUSDC(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdcPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getSushiUSDT(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdtPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUniUSDC(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = UniV2UsdcPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUniUSDT(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = UniV2UsdtPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleArbitrumOne.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOracleArbitrumOne is Admin, Initializable, IDropsPriceOracle {\n address constant WETH = 0x82aF49447D8a07e3bd95BD0d56f35241523fBab1; // 18 decimals\n address constant USDC = 0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8; // 6 decimals\n address constant USDT = 0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9; // 6 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0x905dfCD5649217c42684f23958568e533C711Aa3);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0xCB0E5bFa72bBb4d16AB5aA0c60601c438F04b4ad);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external view returns (uint256 weiAmount) {\n weiAmount = (_getSushiUSDC(usdAmount) + _getSushiUSDT(usdAmount)) / 2;\n }\n\n function _getSushiUSDC(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdcPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDC\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getSushiUSDT(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdtPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleArbitrumTestnetGoerli.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOracleArbitrumTestnetGoerli is Admin, Initializable, IDropsPriceOracle {\n address constant WETH = 0x0000000000000000000000000000000000000000; // 18 decimals\n address constant USDC = 0x0000000000000000000000000000000000000000; // 6 decimals\n address constant USDT = 0x0000000000000000000000000000000000000000; // 6 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n\n IUniswapV2Pair constant UniV2UsdcPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n IUniswapV2Pair constant UniV2UsdtPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external pure returns (uint256 weiAmount) {\n weiAmount = (_getSushiUSDC(usdAmount) + _getSushiUSDT(usdAmount)) / 2;\n }\n\n function _getSushiUSDC(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdcPool.getReserves();\n uint112 _reserve0 = 14248413024234;\n uint112 _reserve1 = 8237558200010903232972;\n // x is always native token / WETH\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getSushiUSDT(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdtPool.getReserves();\n uint112 _reserve0 = 7190540826553156156218;\n uint112 _reserve1 = 12394808861997;\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleAvalanche.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {ILBPair} from \"./interface/ILBPair.sol\";\nimport {ILBRouter} from \"./interface/ILBRouter.sol\";\n\ncontract DropsPriceOracleAvalanche is Admin, Initializable, IDropsPriceOracle {\n address constant WAVAX = 0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7; // 18 decimals\n address constant USDC = 0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E; // 6 decimals\n address constant USDT = 0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7; // 6 decimals\n\n ILBRouter constant TraderJoeRouter = ILBRouter(0xb4315e873dBcf96Ffd0acd8EA43f689D8c20fB30);\n ILBPair constant TraderJoeUsdcPool = ILBPair(0xD446eb1660F766d533BeCeEf890Df7A69d26f7d1);\n ILBPair constant TraderJoeUsdtPool = ILBPair(0x87EB2F90d7D0034571f343fb7429AE22C1Bd9F72);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external view returns (uint256 weiAmount) {\n if (usdAmount == 0) {\n weiAmount = 0;\n return weiAmount;\n }\n weiAmount = (_getTraderJoeUSDC(usdAmount) + _getTraderJoeUSDT(usdAmount)) / 2;\n }\n\n function _getTraderJoeUSDC(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint128 amountIn, uint128 amountOutLeft, uint128 fee) = TraderJoeRouter.getSwapIn(\n TraderJoeUsdcPool,\n uint128(usdAmount),\n true\n );\n weiAmount = amountIn + fee;\n }\n\n function _getTraderJoeUSDT(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint128 amountIn, uint128 amountOutLeft, uint128 fee) = TraderJoeRouter.getSwapIn(\n TraderJoeUsdtPool,\n uint128(usdAmount),\n true\n );\n weiAmount = amountIn + fee;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleAvalancheTestnet.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOracleAvalancheTestnet is Admin, Initializable, IDropsPriceOracle {\n address constant WAVAX = 0xd00ae08403B9bbb9124bB305C09058E32C39A48c;\n address constant USDC = 0x5425890298aed601595a70AB815c96711a31Bc65; // 6 decimals\n address constant USDT = 0x0000000000000000000000000000000000000000; // 6 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0x1B92bf7394d317A758d953F6428445A8977e195C);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external pure returns (uint256 weiAmount) {\n weiAmount = (_getSushiUSDC(usdAmount) + _getSushiUSDT(usdAmount)) / 2;\n }\n\n function _getSushiUSDC(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdcPool.getReserves();\n uint112 _reserve0 = 133224784402692878349;\n uint112 _reserve1 = 2205199060;\n // x is always native token / WAVAX\n uint256 x = _reserve0;\n // y is always USD token / USDC\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getSushiUSDT(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdtPool.getReserves();\n uint112 _reserve0 = 2205199060;\n uint112 _reserve1 = 133224784402692878349;\n // x is always native token / WAVAX\n uint256 x = _reserve1;\n // y is always USD token / USDT\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleBinanceSmartChain.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOracleBinanceSmartChain is Admin, Initializable, IDropsPriceOracle {\n address constant WBNB = 0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c;\n address constant USDC = 0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d; // 18 decimals\n address constant USDT = 0x55d398326f99059fF775485246999027B3197955; // 18 decimals\n address constant BUSD = 0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56; // 18 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0xc7632B7b2d768bbb30a404E13E1dE48d1439ec21);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0x2905817b020fD35D9d09672946362b62766f0d69);\n IUniswapV2Pair constant SushiV2BusdPool = IUniswapV2Pair(0xDc558D64c29721d74C4456CfB4363a6e6660A9Bb);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external view returns (uint256 weiAmount) {\n weiAmount = (_getUSDC(usdAmount) + _getUSDT(usdAmount) + _getBUSD(usdAmount)) / 3;\n }\n\n function _getUSDC(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n usdAmount = usdAmount * (10 ** (18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdcPool.getReserves();\n // x is always native token / WBNB\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUSDT(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n usdAmount = usdAmount * (10 ** (18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdtPool.getReserves();\n // x is always native token / WBNB\n uint256 x = _reserve1;\n // y is always USD token / USDT\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getBUSD(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n usdAmount = usdAmount * (10 ** (18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2BusdPool.getReserves();\n // x is always native token / WBNB\n uint256 x = _reserve0;\n // y is always USD token / BUSD\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleBinanceSmartChainTestnet.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOracleBinanceSmartChainTestnet is Admin, Initializable, IDropsPriceOracle {\n address constant WBNB = 0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd;\n address constant USDC = 0x0000000000000000000000000000000000000000; // 18 decimals\n address constant USDT = 0x337610d27c682E347C9cD60BD4b3b107C9d34dDd; // 18 decimals\n address constant BUSD = 0xeD24FC36d5Ee211Ea25A80239Fb8C4Cfd80f12Ee; // 18 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0x622A814A1c842D34F9828370d9015Dc9d4c5b6F1);\n IUniswapV2Pair constant SushiV2BusdPool = IUniswapV2Pair(0x9A0eeceDA5c0203924484F5467cEE4321cf6A189);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external pure returns (uint256 weiAmount) {\n weiAmount = (_getUSDC(usdAmount) + _getUSDT(usdAmount) + _getBUSD(usdAmount)) / 3;\n }\n\n function _getUSDC(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n usdAmount = usdAmount * (10 ** (18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdcPool.getReserves();\n uint112 _reserve0 = 13021882855694508203763;\n uint112 _reserve1 = 40694382259814793835;\n // x is always native token / WBNB\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUSDT(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n usdAmount = usdAmount * (10 ** (18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdtPool.getReserves();\n uint112 _reserve0 = 27194218672878436248359;\n uint112 _reserve1 = 85236077287017749564;\n // x is always native token / WBNB\n uint256 x = _reserve1;\n // y is always USD token / USDT\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getBUSD(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n usdAmount = usdAmount * (10 ** (18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2BusdPool.getReserves();\n uint112 _reserve0 = 18888866298338593382;\n uint112 _reserve1 = 6055244885106491861952;\n // x is always native token / WBNB\n uint256 x = _reserve0;\n // y is always USD token / BUSD\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleEthereum.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOracleEthereum is Admin, Initializable, IDropsPriceOracle {\n address constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; // 18 decimals\n address constant USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48; // 6 decimals\n address constant USDT = 0xdAC17F958D2ee523a2206206994597C13D831ec7; // 6 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0x397FF1542f962076d0BFE58eA045FfA2d347ACa0);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0x06da0fd433C1A5d7a4faa01111c044910A184553);\n\n IUniswapV2Pair constant UniV2UsdcPool = IUniswapV2Pair(0xB4e16d0168e52d35CaCD2c6185b44281Ec28C9Dc);\n IUniswapV2Pair constant UniV2UsdtPool = IUniswapV2Pair(0x0d4a11d5EEaaC28EC3F61d100daF4d40471f1852);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external view returns (uint256 weiAmount) {\n weiAmount =\n (_getSushiUSDC(usdAmount) + _getSushiUSDT(usdAmount) + _getUniUSDC(usdAmount) + _getUniUSDT(usdAmount)) /\n 4;\n }\n\n function _getSushiUSDC(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdcPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getSushiUSDT(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdtPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUniUSDC(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = UniV2UsdcPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUniUSDT(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = UniV2UsdtPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleEthereumTestnetGoerli.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOracleEthereumTestnetGoerli is Admin, Initializable, IDropsPriceOracle {\n address constant WETH = 0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6; // 18 decimals\n address constant USDC = 0x07865c6E87B9F70255377e024ace6630C1Eaa37F; // 6 decimals\n address constant USDT = 0x0000000000000000000000000000000000000000; // 6 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n\n IUniswapV2Pair constant UniV2UsdcPool = IUniswapV2Pair(0xB4e16d0168e52d35CaCD2c6185b44281Ec28C9Dc);\n IUniswapV2Pair constant UniV2UsdtPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external pure returns (uint256 weiAmount) {\n weiAmount =\n (_getSushiUSDC(usdAmount) + _getSushiUSDT(usdAmount) + _getUniUSDC(usdAmount) + _getUniUSDT(usdAmount)) /\n 4;\n }\n\n function _getSushiUSDC(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdcPool.getReserves();\n uint112 _reserve0 = 14248413024234;\n uint112 _reserve1 = 8237558200010903232972;\n // x is always native token / WETH\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getSushiUSDT(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdtPool.getReserves();\n uint112 _reserve0 = 7190540826553156156218;\n uint112 _reserve1 = 12394808861997;\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUniUSDC(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = UniV2UsdcPool.getReserves();\n uint112 _reserve0 = 27969935741431;\n uint112 _reserve1 = 16175569695347837629371;\n // x is always native token / WETH\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUniUSDT(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = UniV2UsdtPool.getReserves();\n uint112 _reserve0 = 16492332449237327237450;\n uint112 _reserve1 = 28443279643692;\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleOptimism.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOracleOptimism is Admin, Initializable, IDropsPriceOracle {\n address constant WETH = 0x4200000000000000000000000000000000000006; // 18 decimals\n address constant USDC = 0x7F5c764cBc14f9669B88837ca1490cCa17c31607; // 6 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0x7086622E6Db990385B102D79CB1218947fb549a9);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external view returns (uint256 weiAmount) {\n weiAmount = _getSushiUSDC(usdAmount);\n }\n\n function _getSushiUSDC(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdcPool.getReserves();\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDC\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOracleOptimismTestnetGoerli.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOracleOptimismTestnetGoerli is Admin, Initializable, IDropsPriceOracle {\n address constant WETH = 0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6; // 18 decimals\n address constant USDC = 0x07865c6E87B9F70255377e024ace6630C1Eaa37F; // 6 decimals\n address constant USDT = 0x0000000000000000000000000000000000000000; // 6 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n\n IUniswapV2Pair constant UniV2UsdcPool = IUniswapV2Pair(0xB4e16d0168e52d35CaCD2c6185b44281Ec28C9Dc);\n IUniswapV2Pair constant UniV2UsdtPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external pure returns (uint256 weiAmount) {\n weiAmount =\n (_getSushiUSDC(usdAmount) + _getSushiUSDT(usdAmount) + _getUniUSDC(usdAmount) + _getUniUSDT(usdAmount)) /\n 4;\n }\n\n function _getSushiUSDC(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdcPool.getReserves();\n uint112 _reserve0 = 14248413024234;\n uint112 _reserve1 = 8237558200010903232972;\n // x is always native token / WETH\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getSushiUSDT(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdtPool.getReserves();\n uint112 _reserve0 = 7190540826553156156218;\n uint112 _reserve1 = 12394808861997;\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUniUSDC(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = UniV2UsdcPool.getReserves();\n uint112 _reserve0 = 27969935741431;\n uint112 _reserve1 = 16175569695347837629371;\n // x is always native token / WETH\n uint256 x = _reserve1;\n // y is always USD token / USDC\n uint256 y = _reserve0;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUniUSDT(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = UniV2UsdtPool.getReserves();\n uint112 _reserve0 = 16492332449237327237450;\n uint112 _reserve1 = 28443279643692;\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOraclePolygon.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOraclePolygon is Admin, Initializable, IDropsPriceOracle {\n address constant WMATIC = 0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270; // 18 decimals\n address constant USDC = 0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174; // 6 decimals\n address constant USDT = 0xc2132D05D31c914a87C6611C10748AEb04B58e8F; // 6 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0xcd353F79d9FADe311fC3119B841e1f456b54e858);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0x55FF76BFFC3Cdd9D5FdbBC2ece4528ECcE45047e);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external view returns (uint256 weiAmount) {\n weiAmount = (_getUSDC(usdAmount) + _getUSDT(usdAmount)) / 2;\n }\n\n function _getUSDC(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdcPool.getReserves();\n // x is always native token / WMATIC\n uint256 x = _reserve0;\n // y is always USD token / USDC\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUSDT(uint256 usdAmount) internal view returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n (uint112 _reserve0, uint112 _reserve1, ) = SushiV2UsdtPool.getReserves();\n // x is always native token / WMATIC\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DropsPriceOraclePolygonTestnet.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DropsPriceOraclePolygonTestnet is Admin, Initializable, IDropsPriceOracle {\n address constant WMATIC = 0x5B67676a984807a212b1c59eBFc9B3568a474F0a; // 18 decimals\n address constant USDC = 0x742DfA5Aa70a8212857966D491D67B09Ce7D6ec7; // 6 decimals\n address constant USDT = 0x0000000000000000000000000000000000000000; // 6 decimals\n\n IUniswapV2Pair constant SushiV2UsdcPool = IUniswapV2Pair(0x412D4b3C56836ff78F1C8197c6718A6DFf3702F5);\n IUniswapV2Pair constant SushiV2UsdtPool = IUniswapV2Pair(0x0000000000000000000000000000000000000000);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external pure returns (uint256 weiAmount) {\n weiAmount = (_getUSDC(usdAmount) + _getUSDT(usdAmount)) / 2;\n }\n\n function _getUSDC(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdcPool.getReserves();\n uint112 _reserve0 = 185186616552407552407159;\n uint112 _reserve1 = 207981749778;\n // x is always native token / WMATIC\n uint256 x = _reserve0;\n // y is always USD token / USDC\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n\n function _getUSDT(uint256 usdAmount) internal pure returns (uint256 weiAmount) {\n // add decimal places for amount IF decimals are above 6!\n // usdAmount = usdAmount * (10**(18 - 6));\n // (uint112 _reserve0, uint112 _reserve1,) = SushiV2UsdtPool.getReserves();\n uint112 _reserve0 = 13799757434002573084812;\n uint112 _reserve1 = 15484391886;\n // x is always native token / WMATIC\n uint256 x = _reserve0;\n // y is always USD token / USDT\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/DummyDropsPriceOracle.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {Admin} from \"../../abstract/Admin.sol\";\nimport {Initializable} from \"../../abstract/Initializable.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\nimport {IUniswapV2Pair} from \"./interface/IUniswapV2Pair.sol\";\n\ncontract DummyDropsPriceOracle is Admin, Initializable, IDropsPriceOracle {\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n */\n function init(bytes memory) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return Initializable.init.selector;\n }\n\n /**\n * @notice Convert USD value to native gas token value\n * @dev It is important to note that different USD stablecoins use different decimal places.\n * @param usdAmount a 6 decimal places USD amount\n */\n function convertUsdToWei(uint256 usdAmount) external pure returns (uint256 weiAmount) {\n uint112 _reserve0 = 8237558200010903232972;\n uint112 _reserve1 = 14248413024234;\n // x is always native token / WETH\n uint256 x = _reserve0;\n // y is always USD token / USDC\n uint256 y = _reserve1;\n\n uint256 numerator = (x * usdAmount) * 1000;\n uint256 denominator = (y - usdAmount) * 997;\n\n weiAmount = (numerator / denominator) + 1;\n }\n}\n" + }, + "contracts/drops/oracle/interface/ILBPair.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\ninterface ILBPair {\n function tokenX() external view returns (address);\n\n function tokenY() external view returns (address);\n\n function getReservesAndId() external view returns (uint256 reserveX, uint256 reserveY, uint256 activeId);\n}\n" + }, + "contracts/drops/oracle/interface/ILBRouter.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {ILBPair} from \"./ILBPair.sol\";\n\ninterface ILBRouter {\n function getSwapIn(\n ILBPair LBPair,\n uint128 amountOut,\n bool swapForY\n ) external view returns (uint128 amountIn, uint128 amountOutLeft, uint128 fee);\n}\n" + }, + "contracts/drops/oracle/interface/IUniswapV2Pair.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\ninterface IUniswapV2Pair {\n event Approval(address indexed owner, address indexed spender, uint256 value);\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n function name() external pure returns (string memory);\n\n function symbol() external pure returns (string memory);\n\n function decimals() external pure returns (uint8);\n\n function totalSupply() external view returns (uint256);\n\n function balanceOf(address owner) external view returns (uint256);\n\n function allowance(address owner, address spender) external view returns (uint256);\n\n function approve(address spender, uint256 value) external returns (bool);\n\n function transfer(address to, uint256 value) external returns (bool);\n\n function transferFrom(address from, address to, uint256 value) external returns (bool);\n\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n\n function PERMIT_TYPEHASH() external pure returns (bytes32);\n\n function nonces(address owner) external view returns (uint256);\n\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n event Mint(address indexed sender, uint256 amount0, uint256 amount1);\n event Burn(address indexed sender, uint256 amount0, uint256 amount1, address indexed to);\n event Swap(\n address indexed sender,\n uint256 amount0In,\n uint256 amount1In,\n uint256 amount0Out,\n uint256 amount1Out,\n address indexed to\n );\n event Sync(uint112 reserve0, uint112 reserve1);\n\n function MINIMUM_LIQUIDITY() external pure returns (uint256);\n\n function factory() external view returns (address);\n\n function token0() external view returns (address);\n\n function token1() external view returns (address);\n\n function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);\n\n function price0CumulativeLast() external view returns (uint256);\n\n function price1CumulativeLast() external view returns (uint256);\n\n function kLast() external view returns (uint256);\n\n function mint(address to) external returns (uint256 liquidity);\n\n function burn(address to) external returns (uint256 amount0, uint256 amount1);\n\n function swap(uint256 amount0Out, uint256 amount1Out, address to, bytes calldata data) external;\n\n function skim(address to) external;\n\n function sync() external;\n\n function initialize(address, address) external;\n}\n" + }, + "contracts/drops/oracle/interface/IUniswapV3Pair.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\ninterface IUniswapV3PoolImmutables {\n /// @notice The contract that deployed the pool, which must adhere to the IUniswapV3Factory interface\n /// @return The contract address\n function factory() external view returns (address);\n\n /// @notice The first of the two tokens of the pool, sorted by address\n /// @return The token contract address\n function token0() external view returns (address);\n\n /// @notice The second of the two tokens of the pool, sorted by address\n /// @return The token contract address\n function token1() external view returns (address);\n\n /// @notice The pool's fee in hundredths of a bip, i.e. 1e-6\n /// @return The fee\n function fee() external view returns (uint24);\n\n /// @notice The pool tick spacing\n /// @dev Ticks can only be used at multiples of this value, minimum of 1 and always positive\n /// e.g.: a tickSpacing of 3 means ticks can be initialized every 3rd tick, i.e., ..., -6, -3, 0, 3, 6, ...\n /// This value is an int24 to avoid casting even though it is always positive.\n /// @return The tick spacing\n function tickSpacing() external view returns (int24);\n\n /// @notice The maximum amount of position liquidity that can use any tick in the range\n /// @dev This parameter is enforced per tick to prevent liquidity from overflowing a uint128 at any point, and\n /// also prevents out-of-range liquidity from being used to prevent adding in-range liquidity to a pool\n /// @return The max amount of liquidity per tick\n function maxLiquidityPerTick() external view returns (uint128);\n}\n\ninterface IUniswapV3PoolState {\n /// @notice The 0th storage slot in the pool stores many values, and is exposed as a single method to save gas\n /// when accessed externally.\n /// @return sqrtPriceX96 The current price of the pool as a sqrt(token1/token0) Q64.96 value\n /// tick The current tick of the pool, i.e. according to the last tick transition that was run.\n /// This value may not always be equal to SqrtTickMath.getTickAtSqrtRatio(sqrtPriceX96) if the price is on a tick\n /// boundary.\n /// observationIndex The index of the last oracle observation that was written,\n /// observationCardinality The current maximum number of observations stored in the pool,\n /// observationCardinalityNext The next maximum number of observations, to be updated when the observation.\n /// feeProtocol The protocol fee for both tokens of the pool.\n /// Encoded as two 4 bit values, where the protocol fee of token1 is shifted 4 bits and the protocol fee of token0\n /// is the lower 4 bits. Used as the denominator of a fraction of the swap fee, e.g. 4 means 1/4th of the swap fee.\n /// unlocked Whether the pool is currently locked to reentrancy\n function slot0()\n external\n view\n returns (\n uint160 sqrtPriceX96,\n int24 tick,\n uint16 observationIndex,\n uint16 observationCardinality,\n uint16 observationCardinalityNext,\n uint8 feeProtocol,\n bool unlocked\n );\n\n /// @notice The fee growth as a Q128.128 fees of token0 collected per unit of liquidity for the entire life of the pool\n /// @dev This value can overflow the uint256\n function feeGrowthGlobal0X128() external view returns (uint256);\n\n /// @notice The fee growth as a Q128.128 fees of token1 collected per unit of liquidity for the entire life of the pool\n /// @dev This value can overflow the uint256\n function feeGrowthGlobal1X128() external view returns (uint256);\n\n /// @notice The amounts of token0 and token1 that are owed to the protocol\n /// @dev Protocol fees will never exceed uint128 max in either token\n function protocolFees() external view returns (uint128 token0, uint128 token1);\n\n /// @notice The currently in range liquidity available to the pool\n /// @dev This value has no relationship to the total liquidity across all ticks\n function liquidity() external view returns (uint128);\n\n /// @notice Look up information about a specific tick in the pool\n /// @param tick The tick to look up\n /// @return liquidityGross the total amount of position liquidity that uses the pool either as tick lower or\n /// tick upper,\n /// liquidityNet how much liquidity changes when the pool price crosses the tick,\n /// feeGrowthOutside0X128 the fee growth on the other side of the tick from the current tick in token0,\n /// feeGrowthOutside1X128 the fee growth on the other side of the tick from the current tick in token1,\n /// tickCumulativeOutside the cumulative tick value on the other side of the tick from the current tick\n /// secondsPerLiquidityOutsideX128 the seconds spent per liquidity on the other side of the tick from the current tick,\n /// secondsOutside the seconds spent on the other side of the tick from the current tick,\n /// initialized Set to true if the tick is initialized, i.e. liquidityGross is greater than 0, otherwise equal to false.\n /// Outside values can only be used if the tick is initialized, i.e. if liquidityGross is greater than 0.\n /// In addition, these values are only relative and must be used only in comparison to previous snapshots for\n /// a specific position.\n function ticks(\n int24 tick\n )\n external\n view\n returns (\n uint128 liquidityGross,\n int128 liquidityNet,\n uint256 feeGrowthOutside0X128,\n uint256 feeGrowthOutside1X128,\n int56 tickCumulativeOutside,\n uint160 secondsPerLiquidityOutsideX128,\n uint32 secondsOutside,\n bool initialized\n );\n\n /// @notice Returns 256 packed tick initialized boolean values. See TickBitmap for more information\n function tickBitmap(int16 wordPosition) external view returns (uint256);\n\n /// @notice Returns the information about a position by the position's key\n /// @param key The position's key is a hash of a preimage composed by the owner, tickLower and tickUpper\n /// @return _liquidity The amount of liquidity in the position,\n /// Returns feeGrowthInside0LastX128 fee growth of token0 inside the tick range as of the last mint/burn/poke,\n /// Returns feeGrowthInside1LastX128 fee growth of token1 inside the tick range as of the last mint/burn/poke,\n /// Returns tokensOwed0 the computed amount of token0 owed to the position as of the last mint/burn/poke,\n /// Returns tokensOwed1 the computed amount of token1 owed to the position as of the last mint/burn/poke\n function positions(\n bytes32 key\n )\n external\n view\n returns (\n uint128 _liquidity,\n uint256 feeGrowthInside0LastX128,\n uint256 feeGrowthInside1LastX128,\n uint128 tokensOwed0,\n uint128 tokensOwed1\n );\n\n /// @notice Returns data about a specific observation index\n /// @param index The element of the observations array to fetch\n /// @dev You most likely want to use #observe() instead of this method to get an observation as of some amount of time\n /// ago, rather than at a specific index in the array.\n /// @return blockTimestamp The timestamp of the observation,\n /// Returns tickCumulative the tick multiplied by seconds elapsed for the life of the pool as of the observation timestamp,\n /// Returns secondsPerLiquidityCumulativeX128 the seconds per in range liquidity for the life of the pool as of the observation timestamp,\n /// Returns initialized whether the observation has been initialized and the values are safe to use\n function observations(\n uint256 index\n )\n external\n view\n returns (uint32 blockTimestamp, int56 tickCumulative, uint160 secondsPerLiquidityCumulativeX128, bool initialized);\n}\n\ninterface IUniswapV3PoolDerivedState {\n /// @notice Returns the cumulative tick and liquidity as of each timestamp `secondsAgo` from the current block timestamp\n /// @dev To get a time weighted average tick or liquidity-in-range, you must call this with two values, one representing\n /// the beginning of the period and another for the end of the period. E.g., to get the last hour time-weighted average tick,\n /// you must call it with secondsAgos = [3600, 0].\n /// @dev The time weighted average tick represents the geometric time weighted average price of the pool, in\n /// log base sqrt(1.0001) of token1 / token0. The TickMath library can be used to go from a tick value to a ratio.\n /// @param secondsAgos From how long ago each cumulative tick and liquidity value should be returned\n /// @return tickCumulatives Cumulative tick values as of each `secondsAgos` from the current block timestamp\n /// @return secondsPerLiquidityCumulativeX128s Cumulative seconds per liquidity-in-range value as of each `secondsAgos` from the current block\n /// timestamp\n function observe(\n uint32[] calldata secondsAgos\n ) external view returns (int56[] memory tickCumulatives, uint160[] memory secondsPerLiquidityCumulativeX128s);\n\n /// @notice Returns a snapshot of the tick cumulative, seconds per liquidity and seconds inside a tick range\n /// @dev Snapshots must only be compared to other snapshots, taken over a period for which a position existed.\n /// I.e., snapshots cannot be compared if a position is not held for the entire period between when the first\n /// snapshot is taken and the second snapshot is taken.\n /// @param tickLower The lower tick of the range\n /// @param tickUpper The upper tick of the range\n /// @return tickCumulativeInside The snapshot of the tick accumulator for the range\n /// @return secondsPerLiquidityInsideX128 The snapshot of seconds per liquidity for the range\n /// @return secondsInside The snapshot of seconds per liquidity for the range\n function snapshotCumulativesInside(\n int24 tickLower,\n int24 tickUpper\n ) external view returns (int56 tickCumulativeInside, uint160 secondsPerLiquidityInsideX128, uint32 secondsInside);\n}\n\ninterface IUniswapV3PoolActions {\n /// @notice Sets the initial price for the pool\n /// @dev Price is represented as a sqrt(amountToken1/amountToken0) Q64.96 value\n /// @param sqrtPriceX96 the initial sqrt price of the pool as a Q64.96\n function initialize(uint160 sqrtPriceX96) external;\n\n /// @notice Adds liquidity for the given recipient/tickLower/tickUpper position\n /// @dev The caller of this method receives a callback in the form of IUniswapV3MintCallback#uniswapV3MintCallback\n /// in which they must pay any token0 or token1 owed for the liquidity. The amount of token0/token1 due depends\n /// on tickLower, tickUpper, the amount of liquidity, and the current price.\n /// @param recipient The address for which the liquidity will be created\n /// @param tickLower The lower tick of the position in which to add liquidity\n /// @param tickUpper The upper tick of the position in which to add liquidity\n /// @param amount The amount of liquidity to mint\n /// @param data Any data that should be passed through to the callback\n /// @return amount0 The amount of token0 that was paid to mint the given amount of liquidity. Matches the value in the callback\n /// @return amount1 The amount of token1 that was paid to mint the given amount of liquidity. Matches the value in the callback\n function mint(\n address recipient,\n int24 tickLower,\n int24 tickUpper,\n uint128 amount,\n bytes calldata data\n ) external returns (uint256 amount0, uint256 amount1);\n\n /// @notice Collects tokens owed to a position\n /// @dev Does not recompute fees earned, which must be done either via mint or burn of any amount of liquidity.\n /// Collect must be called by the position owner. To withdraw only token0 or only token1, amount0Requested or\n /// amount1Requested may be set to zero. To withdraw all tokens owed, caller may pass any value greater than the\n /// actual tokens owed, e.g. type(uint128).max. Tokens owed may be from accumulated swap fees or burned liquidity.\n /// @param recipient The address which should receive the fees collected\n /// @param tickLower The lower tick of the position for which to collect fees\n /// @param tickUpper The upper tick of the position for which to collect fees\n /// @param amount0Requested How much token0 should be withdrawn from the fees owed\n /// @param amount1Requested How much token1 should be withdrawn from the fees owed\n /// @return amount0 The amount of fees collected in token0\n /// @return amount1 The amount of fees collected in token1\n function collect(\n address recipient,\n int24 tickLower,\n int24 tickUpper,\n uint128 amount0Requested,\n uint128 amount1Requested\n ) external returns (uint128 amount0, uint128 amount1);\n\n /// @notice Burn liquidity from the sender and account tokens owed for the liquidity to the position\n /// @dev Can be used to trigger a recalculation of fees owed to a position by calling with an amount of 0\n /// @dev Fees must be collected separately via a call to #collect\n /// @param tickLower The lower tick of the position for which to burn liquidity\n /// @param tickUpper The upper tick of the position for which to burn liquidity\n /// @param amount How much liquidity to burn\n /// @return amount0 The amount of token0 sent to the recipient\n /// @return amount1 The amount of token1 sent to the recipient\n function burn(int24 tickLower, int24 tickUpper, uint128 amount) external returns (uint256 amount0, uint256 amount1);\n\n /// @notice Swap token0 for token1, or token1 for token0\n /// @dev The caller of this method receives a callback in the form of IUniswapV3SwapCallback#uniswapV3SwapCallback\n /// @param recipient The address to receive the output of the swap\n /// @param zeroForOne The direction of the swap, true for token0 to token1, false for token1 to token0\n /// @param amountSpecified The amount of the swap, which implicitly configures the swap as exact input (positive), or exact output (negative)\n /// @param sqrtPriceLimitX96 The Q64.96 sqrt price limit. If zero for one, the price cannot be less than this\n /// value after the swap. If one for zero, the price cannot be greater than this value after the swap\n /// @param data Any data to be passed through to the callback\n /// @return amount0 The delta of the balance of token0 of the pool, exact when negative, minimum when positive\n /// @return amount1 The delta of the balance of token1 of the pool, exact when negative, minimum when positive\n function swap(\n address recipient,\n bool zeroForOne,\n int256 amountSpecified,\n uint160 sqrtPriceLimitX96,\n bytes calldata data\n ) external returns (int256 amount0, int256 amount1);\n\n /// @notice Receive token0 and/or token1 and pay it back, plus a fee, in the callback\n /// @dev The caller of this method receives a callback in the form of IUniswapV3FlashCallback#uniswapV3FlashCallback\n /// @dev Can be used to donate underlying tokens pro-rata to currently in-range liquidity providers by calling\n /// with 0 amount{0,1} and sending the donation amount(s) from the callback\n /// @param recipient The address which will receive the token0 and token1 amounts\n /// @param amount0 The amount of token0 to send\n /// @param amount1 The amount of token1 to send\n /// @param data Any data to be passed through to the callback\n function flash(address recipient, uint256 amount0, uint256 amount1, bytes calldata data) external;\n\n /// @notice Increase the maximum number of price and liquidity observations that this pool will store\n /// @dev This method is no-op if the pool already has an observationCardinalityNext greater than or equal to\n /// the input observationCardinalityNext.\n /// @param observationCardinalityNext The desired minimum number of observations for the pool to store\n function increaseObservationCardinalityNext(uint16 observationCardinalityNext) external;\n}\n\ninterface IUniswapV3PoolOwnerActions {\n /// @notice Set the denominator of the protocol's % share of the fees\n /// @param feeProtocol0 new protocol fee for token0 of the pool\n /// @param feeProtocol1 new protocol fee for token1 of the pool\n function setFeeProtocol(uint8 feeProtocol0, uint8 feeProtocol1) external;\n\n /// @notice Collect the protocol fee accrued to the pool\n /// @param recipient The address to which collected protocol fees should be sent\n /// @param amount0Requested The maximum amount of token0 to send, can be 0 to collect fees in only token1\n /// @param amount1Requested The maximum amount of token1 to send, can be 0 to collect fees in only token0\n /// @return amount0 The protocol fee collected in token0\n /// @return amount1 The protocol fee collected in token1\n function collectProtocol(\n address recipient,\n uint128 amount0Requested,\n uint128 amount1Requested\n ) external returns (uint128 amount0, uint128 amount1);\n}\n\ninterface IUniswapV3PoolEvents {\n /// @notice Emitted exactly once by a pool when #initialize is first called on the pool\n /// @dev Mint/Burn/Swap cannot be emitted by the pool before Initialize\n /// @param sqrtPriceX96 The initial sqrt price of the pool, as a Q64.96\n /// @param tick The initial tick of the pool, i.e. log base 1.0001 of the starting price of the pool\n event Initialize(uint160 sqrtPriceX96, int24 tick);\n\n /// @notice Emitted when liquidity is minted for a given position\n /// @param sender The address that minted the liquidity\n /// @param owner The owner of the position and recipient of any minted liquidity\n /// @param tickLower The lower tick of the position\n /// @param tickUpper The upper tick of the position\n /// @param amount The amount of liquidity minted to the position range\n /// @param amount0 How much token0 was required for the minted liquidity\n /// @param amount1 How much token1 was required for the minted liquidity\n event Mint(\n address sender,\n address indexed owner,\n int24 indexed tickLower,\n int24 indexed tickUpper,\n uint128 amount,\n uint256 amount0,\n uint256 amount1\n );\n\n /// @notice Emitted when fees are collected by the owner of a position\n /// @dev Collect events may be emitted with zero amount0 and amount1 when the caller chooses not to collect fees\n /// @param owner The owner of the position for which fees are collected\n /// @param tickLower The lower tick of the position\n /// @param tickUpper The upper tick of the position\n /// @param amount0 The amount of token0 fees collected\n /// @param amount1 The amount of token1 fees collected\n event Collect(\n address indexed owner,\n address recipient,\n int24 indexed tickLower,\n int24 indexed tickUpper,\n uint128 amount0,\n uint128 amount1\n );\n\n /// @notice Emitted when a position's liquidity is removed\n /// @dev Does not withdraw any fees earned by the liquidity position, which must be withdrawn via #collect\n /// @param owner The owner of the position for which liquidity is removed\n /// @param tickLower The lower tick of the position\n /// @param tickUpper The upper tick of the position\n /// @param amount The amount of liquidity to remove\n /// @param amount0 The amount of token0 withdrawn\n /// @param amount1 The amount of token1 withdrawn\n event Burn(\n address indexed owner,\n int24 indexed tickLower,\n int24 indexed tickUpper,\n uint128 amount,\n uint256 amount0,\n uint256 amount1\n );\n\n /// @notice Emitted by the pool for any swaps between token0 and token1\n /// @param sender The address that initiated the swap call, and that received the callback\n /// @param recipient The address that received the output of the swap\n /// @param amount0 The delta of the token0 balance of the pool\n /// @param amount1 The delta of the token1 balance of the pool\n /// @param sqrtPriceX96 The sqrt(price) of the pool after the swap, as a Q64.96\n /// @param liquidity The liquidity of the pool after the swap\n /// @param tick The log base 1.0001 of price of the pool after the swap\n event Swap(\n address indexed sender,\n address indexed recipient,\n int256 amount0,\n int256 amount1,\n uint160 sqrtPriceX96,\n uint128 liquidity,\n int24 tick\n );\n\n /// @notice Emitted by the pool for any flashes of token0/token1\n /// @param sender The address that initiated the swap call, and that received the callback\n /// @param recipient The address that received the tokens from flash\n /// @param amount0 The amount of token0 that was flashed\n /// @param amount1 The amount of token1 that was flashed\n /// @param paid0 The amount of token0 paid for the flash, which can exceed the amount0 plus the fee\n /// @param paid1 The amount of token1 paid for the flash, which can exceed the amount1 plus the fee\n event Flash(\n address indexed sender,\n address indexed recipient,\n uint256 amount0,\n uint256 amount1,\n uint256 paid0,\n uint256 paid1\n );\n\n /// @notice Emitted by the pool for increases to the number of observations that can be stored\n /// @dev observationCardinalityNext is not the observation cardinality until an observation is written at the index\n /// just before a mint/swap/burn.\n /// @param observationCardinalityNextOld The previous value of the next observation cardinality\n /// @param observationCardinalityNextNew The updated value of the next observation cardinality\n event IncreaseObservationCardinalityNext(uint16 observationCardinalityNextOld, uint16 observationCardinalityNextNew);\n\n /// @notice Emitted when the protocol fee is changed by the pool\n /// @param feeProtocol0Old The previous value of the token0 protocol fee\n /// @param feeProtocol1Old The previous value of the token1 protocol fee\n /// @param feeProtocol0New The updated value of the token0 protocol fee\n /// @param feeProtocol1New The updated value of the token1 protocol fee\n event SetFeeProtocol(uint8 feeProtocol0Old, uint8 feeProtocol1Old, uint8 feeProtocol0New, uint8 feeProtocol1New);\n\n /// @notice Emitted when the collected protocol fees are withdrawn by the factory owner\n /// @param sender The address that collects the protocol fees\n /// @param recipient The address that receives the collected protocol fees\n /// @param amount0 The amount of token0 protocol fees that is withdrawn\n /// @param amount0 The amount of token1 protocol fees that is withdrawn\n event CollectProtocol(address indexed sender, address indexed recipient, uint128 amount0, uint128 amount1);\n}\n\ninterface IUniswapV3Pool is\n IUniswapV3PoolImmutables,\n IUniswapV3PoolState,\n IUniswapV3PoolDerivedState,\n IUniswapV3PoolActions,\n IUniswapV3PoolOwnerActions,\n IUniswapV3PoolEvents\n{}\n\ninterface IUniswapV3Pair is IUniswapV3Pool {}\n" + }, + "contracts/drops/oracle/interface/IUniswapV3Quoter.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\ninterface IUniswapV3Quoter {\n /// @notice Returns the amount out received for a given exact input swap without executing the swap\n /// @param path The path of the swap, i.e. each token pair and the pool fee\n /// @param amountIn The amount of the first token to swap\n /// @return amountOut The amount of the last token that would be received\n function quoteExactInput(bytes memory path, uint256 amountIn) external returns (uint256 amountOut);\n\n /// @notice Returns the amount out received for a given exact input but for a swap of a single pool\n /// @param tokenIn The token being swapped in\n /// @param tokenOut The token being swapped out\n /// @param fee The fee of the token pool to consider for the pair\n /// @param amountIn The desired input amount\n /// @param sqrtPriceLimitX96 The price limit of the pool that cannot be exceeded by the swap\n /// @return amountOut The amount of `tokenOut` that would be received\n function quoteExactInputSingle(\n address tokenIn,\n address tokenOut,\n uint24 fee,\n uint256 amountIn,\n uint160 sqrtPriceLimitX96\n ) external returns (uint256 amountOut);\n\n /// @notice Returns the amount in required for a given exact output swap without executing the swap\n /// @param path The path of the swap, i.e. each token pair and the pool fee\n /// @param amountOut The amount of the last token to receive\n /// @return amountIn The amount of first token required to be paid\n function quoteExactOutput(bytes memory path, uint256 amountOut) external returns (uint256 amountIn);\n\n /// @notice Returns the amount in required to receive the given exact output amount but for a swap of a single pool\n /// @param tokenIn The token being swapped in\n /// @param tokenOut The token being swapped out\n /// @param fee The fee of the token pool to consider for the pair\n /// @param amountOut The desired output amount\n /// @param sqrtPriceLimitX96 The price limit of the pool that cannot be exceeded by the swap\n /// @return amountIn The amount required as the input for the swap in order to receive `amountOut`\n function quoteExactOutputSingle(\n address tokenIn,\n address tokenOut,\n uint24 fee,\n uint256 amountOut,\n uint160 sqrtPriceLimitX96\n ) external returns (uint256 amountIn);\n}\n" + }, + "contracts/drops/proxy/DropsMetadataRendererProxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../../abstract/Admin.sol\";\nimport \"../../abstract/Initializable.sol\";\n\ncontract DropsMetadataRendererProxy is Admin, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.dropsMetadataRenderer')) - 1)\n */\n bytes32 constant _dropsMetadataRendererSlot = 0xe1d18664c68b1eedd4e2fc65b2d42097f2cd8cd4c2f1a9a6418986c9f5da3817;\n\n constructor() {}\n\n function init(bytes memory data) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address dropsMetadataRenderer, bytes memory initCode) = abi.decode(data, (address, bytes));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_dropsMetadataRendererSlot, dropsMetadataRenderer)\n }\n (bool success, bytes memory returnData) = dropsMetadataRenderer.delegatecall(\n abi.encodeWithSignature(\"init(bytes)\", initCode)\n );\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == Initializable.init.selector, \"initialization failed\");\n _setInitialized();\n return Initializable.init.selector;\n }\n\n function getDropsMetadataRenderer() external view returns (address dropsMetadataRenderer) {\n assembly {\n dropsMetadataRenderer := sload(_dropsMetadataRendererSlot)\n }\n }\n\n function setDropsMetadataRenderer(address dropsMetadataRenderer) external onlyAdmin {\n assembly {\n sstore(_dropsMetadataRendererSlot, dropsMetadataRenderer)\n }\n }\n\n receive() external payable {}\n\n fallback() external payable {\n assembly {\n let dropsMetadataRenderer := sload(_dropsMetadataRendererSlot)\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), dropsMetadataRenderer, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/drops/proxy/DropsPriceOracleProxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../../abstract/Admin.sol\";\nimport \"../../abstract/Initializable.sol\";\n\ncontract DropsPriceOracleProxy is Admin, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.dropsPriceOracle')) - 1)\n */\n bytes32 constant _dropsPriceOracleSlot = 0x26600f0171e5a2b86874be26285c66444b2a6fa5f62114757214d5e732aded36;\n\n constructor() {}\n\n function init(bytes memory data) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address dropsPriceOracle, bytes memory initCode) = abi.decode(data, (address, bytes));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_dropsPriceOracleSlot, dropsPriceOracle)\n }\n (bool success, bytes memory returnData) = dropsPriceOracle.delegatecall(\n abi.encodeWithSignature(\"init(bytes)\", initCode)\n );\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == Initializable.init.selector, \"initialization failed\");\n _setInitialized();\n return Initializable.init.selector;\n }\n\n function getDropsPriceOracle() external view returns (address dropsPriceOracle) {\n assembly {\n dropsPriceOracle := sload(_dropsPriceOracleSlot)\n }\n }\n\n function setDropsPriceOracle(address dropsPriceOracle) external onlyAdmin {\n assembly {\n sstore(_dropsPriceOracleSlot, dropsPriceOracle)\n }\n }\n\n receive() external payable {}\n\n fallback() external payable {\n assembly {\n let dropsPriceOracle := sload(_dropsPriceOracleSlot)\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), dropsPriceOracle, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/drops/proxy/EditionsMetadataRendererProxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../../abstract/Admin.sol\";\nimport \"../../abstract/Initializable.sol\";\n\ncontract EditionsMetadataRendererProxy is Admin, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.editionsMetadataRenderer')) - 1)\n */\n bytes32 constant _editionsMetadataRendererSlot = 0x747f2428bc473d14fd9642872693b7bc7ad3f58057c4c084ce1f541a26e4bcb1;\n\n constructor() {}\n\n function init(bytes memory data) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address editionsMetadataRenderer, bytes memory initCode) = abi.decode(data, (address, bytes));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_editionsMetadataRendererSlot, editionsMetadataRenderer)\n }\n (bool success, bytes memory returnData) = editionsMetadataRenderer.delegatecall(\n abi.encodeWithSignature(\"init(bytes)\", initCode)\n );\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == Initializable.init.selector, \"initialization failed\");\n _setInitialized();\n return Initializable.init.selector;\n }\n\n function getEditionsMetadataRenderer() external view returns (address editionsMetadataRenderer) {\n assembly {\n editionsMetadataRenderer := sload(_editionsMetadataRendererSlot)\n }\n }\n\n function setEditionsMetadataRenderer(address editionsMetadataRenderer) external onlyAdmin {\n assembly {\n sstore(_editionsMetadataRendererSlot, editionsMetadataRenderer)\n }\n }\n\n receive() external payable {}\n\n fallback() external payable {\n assembly {\n let editionsMetadataRenderer := sload(_editionsMetadataRendererSlot)\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), editionsMetadataRenderer, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/drops/proxy/HolographDropERC721Proxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../../abstract/Admin.sol\";\nimport \"../../abstract/Initializable.sol\";\n\nimport \"../../interface/HolographRegistryInterface.sol\";\n\ncontract HolographDropERC721Proxy is Admin, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.contractType')) - 1)\n */\n bytes32 constant _contractTypeSlot = 0x0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c7;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\n */\n bytes32 constant _registrySlot = 0xce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7;\n\n constructor() {}\n\n function init(bytes memory data) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (bytes32 contractType, address registry, bytes memory initCode) = abi.decode(data, (bytes32, address, bytes));\n assembly {\n sstore(_contractTypeSlot, contractType)\n sstore(_registrySlot, registry)\n }\n (bool success, bytes memory returnData) = getHolographDropERC721Source().delegatecall(\n abi.encodeWithSignature(\"init(bytes)\", initCode)\n );\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == Initializable.init.selector, \"initialization failed\");\n\n _setInitialized();\n return Initializable.init.selector;\n }\n\n function getHolographDropERC721Source() public view returns (address) {\n HolographRegistryInterface registry;\n bytes32 contractType;\n assembly {\n registry := sload(_registrySlot)\n contractType := sload(_contractTypeSlot)\n }\n return registry.getContractTypeAddress(contractType);\n }\n\n receive() external payable {}\n\n fallback() external payable {\n address HolographDropERC721Source = getHolographDropERC721Source();\n assembly {\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), HolographDropERC721Source, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/drops/struct/AddressMintDetails.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\n/// @notice Return type of specific mint counts and details per address\nstruct AddressMintDetails {\n /// Number of total mints from the given address\n uint256 totalMints;\n /// Number of presale mints from the given address\n uint256 presaleMints;\n /// Number of public mints from the given address\n uint256 publicMints;\n}\n" + }, + "contracts/drops/struct/Configuration.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {IMetadataRenderer} from \"../interface/IMetadataRenderer.sol\";\n\n/// @notice General configuration for NFT Minting and bookkeeping\nstruct Configuration {\n /// @dev Metadata renderer (uint160)\n IMetadataRenderer metadataRenderer;\n /// @dev Total size of edition that can be minted (uint160+64 = 224)\n uint64 editionSize;\n /// @dev Royalty amount in bps (uint224+16 = 240)\n uint16 royaltyBPS;\n /// @dev Funds recipient for sale (new slot, uint160)\n address payable fundsRecipient;\n}\n" + }, + "contracts/drops/struct/DropsInitializer.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport {SalesConfiguration} from \"./SalesConfiguration.sol\";\n\n/// @param erc721TransferHelper Transfer helper contract\n/// @param marketFilterAddress Market filter address - Manage subscription to the for marketplace filtering based off royalty payouts.\n/// @param initialOwner User that owns and can mint the edition, gets royalty and sales payouts and can update the base url if needed.\n/// @param fundsRecipient Wallet/user that receives funds from sale\n/// @param editionSize Number of editions that can be minted in total. If type(uint64).max, unlimited editions can be minted as an open edition.\n/// @param royaltyBPS BPS of the royalty set on the contract. Can be 0 for no royalty.\n/// @param salesConfiguration The initial SalesConfiguration\n/// @param metadataRenderer Renderer contract to use\n/// @param metadataRendererInit Renderer data initial contract\nstruct DropsInitializer {\n address erc721TransferHelper;\n address marketFilterAddress;\n address initialOwner;\n address payable fundsRecipient;\n uint64 editionSize;\n uint16 royaltyBPS;\n bool enableOpenSeaRoyaltyRegistry;\n SalesConfiguration salesConfiguration;\n address metadataRenderer;\n bytes metadataRendererInit;\n}\n" + }, + "contracts/drops/struct/SaleDetails.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\n/// @notice Return value for sales details to use with front-ends\nstruct SaleDetails {\n // Synthesized status variables for sale and presale\n bool publicSaleActive;\n bool presaleActive;\n // Price for public sale\n uint256 publicSalePrice;\n // Timed sale actions for public sale\n uint64 publicSaleStart;\n uint64 publicSaleEnd;\n // Timed sale actions for presale\n uint64 presaleStart;\n uint64 presaleEnd;\n // Merkle root (includes address, quantity, and price data for each entry)\n bytes32 presaleMerkleRoot;\n // Limit public sale to a specific number of mints per wallet\n uint256 maxSalePurchasePerAddress;\n // Information about the rest of the supply\n // Total that have been minted\n uint256 totalMinted;\n // The total supply available\n uint256 maxSupply;\n}\n" + }, + "contracts/drops/struct/SalesConfiguration.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\n/// @notice Sales states and configuration\n/// @dev Uses 3 storage slots\nstruct SalesConfiguration {\n /// @dev Public sale price (max ether value > 1000 ether with this value)\n uint104 publicSalePrice;\n /// @notice Purchase mint limit per address (if set to 0 === unlimited mints)\n /// @dev Max purchase number per txn (90+32 = 122)\n uint32 maxSalePurchasePerAddress;\n /// @dev uint64 type allows for dates into 292 billion years\n /// @notice Public sale start timestamp (136+64 = 186)\n uint64 publicSaleStart;\n /// @notice Public sale end timestamp (186+64 = 250)\n uint64 publicSaleEnd;\n /// @notice Presale start timestamp\n /// @dev new storage slot\n uint64 presaleStart;\n /// @notice Presale end timestamp\n uint64 presaleEnd;\n /// @notice Presale merkle root\n bytes32 presaleMerkleRoot;\n}\n" + }, + "contracts/drops/token/HolographDropERC721.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport {ERC721H} from \"../../abstract/ERC721H.sol\";\nimport {NonReentrant} from \"../../abstract/NonReentrant.sol\";\n\nimport {HolographERC721Interface} from \"../../interface/HolographERC721Interface.sol\";\nimport {HolographerInterface} from \"../../interface/HolographerInterface.sol\";\nimport {HolographInterface} from \"../../interface/HolographInterface.sol\";\n\nimport {AddressMintDetails} from \"../struct/AddressMintDetails.sol\";\nimport {Configuration} from \"../struct/Configuration.sol\";\nimport {DropsInitializer} from \"../struct/DropsInitializer.sol\";\nimport {SaleDetails} from \"../struct/SaleDetails.sol\";\nimport {SalesConfiguration} from \"../struct/SalesConfiguration.sol\";\n\nimport {Address} from \"../library/Address.sol\";\nimport {MerkleProof} from \"../library/MerkleProof.sol\";\n\nimport {IMetadataRenderer} from \"../interface/IMetadataRenderer.sol\";\nimport {IOperatorFilterRegistry} from \"../interface/IOperatorFilterRegistry.sol\";\nimport {IHolographDropERC721} from \"../interface/IHolographDropERC721.sol\";\n\nimport {IDropsPriceOracle} from \"../interface/IDropsPriceOracle.sol\";\n\n/**\n * @dev This contract subscribes to the following HolographERC721 events:\n * - beforeSafeTransfer\n * - beforeTransfer\n * - onIsApprovedForAll\n * - customContractURI\n *\n * Do not enable or subscribe to any other events unless you modified your source code for them.\n */\ncontract HolographDropERC721 is NonReentrant, ERC721H, IHolographDropERC721 {\n /**\n * CONTRACT VARIABLES\n * all variables, without custom storage slots, are defined here\n */\n\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.osRegistryEnabled')) - 1)\n */\n bytes32 constant _osRegistryEnabledSlot = 0x5c835f3b6bd322d9a084ffdeac746df2b96cce308e7f0612f4ff4f9c490734cc;\n\n /**\n * @dev Address of the operator filter registry\n */\n IOperatorFilterRegistry public constant openseaOperatorFilterRegistry =\n IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E);\n\n /**\n * @dev Address of the price oracle proxy\n */\n IDropsPriceOracle public constant dropsPriceOracle = IDropsPriceOracle(0xA3Db09EEC42BAfF7A50fb8F9aF90A0e035Ef3302);\n\n /**\n * @dev Internal reference used for minting incremental token ids.\n */\n uint224 private _currentTokenId;\n\n /**\n * @dev HOLOGRAPH transfer helper address for auto-approval\n */\n address public erc721TransferHelper;\n\n /**\n * @dev Address of the market filter registry\n */\n address public marketFilterAddress;\n\n /**\n * @notice Configuration for NFT minting contract storage\n */\n Configuration public config;\n\n /**\n * @notice Sales configuration\n */\n SalesConfiguration public salesConfig;\n\n /**\n * @dev Mapping for presale mint counts by address to allow public mint limit\n */\n mapping(address => uint256) public presaleMintsByAddress;\n\n /**\n * @dev Mapping for presale mint counts by address to allow public mint limit\n */\n mapping(address => uint256) public totalMintsByAddress;\n\n /**\n * CUSTOM ERRORS\n */\n\n /**\n * @notice Thrown when there is no active market filter address supported for the current chain\n * @dev Used for enabling and disabling filter for the given chain.\n */\n error MarketFilterAddressNotSupportedForChain();\n\n /**\n * MODIFIERS\n */\n\n /**\n * @notice Allows user to mint tokens at a quantity\n */\n modifier canMintTokens(uint256 quantity) {\n if (config.editionSize != 0 && quantity + _currentTokenId > config.editionSize) {\n revert Mint_SoldOut();\n }\n\n _;\n }\n\n /**\n * @notice Presale active\n */\n modifier onlyPresaleActive() {\n if (!_presaleActive()) {\n revert Presale_Inactive();\n }\n\n _;\n }\n\n /**\n * @notice Public sale active\n */\n modifier onlyPublicSaleActive() {\n if (!_publicSaleActive()) {\n revert Sale_Inactive();\n }\n\n _;\n }\n\n /**\n * CONTRACT INITIALIZERS\n * init function is used instead of constructor\n */\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n\n DropsInitializer memory initializer = abi.decode(initPayload, (DropsInitializer));\n\n erc721TransferHelper = initializer.erc721TransferHelper;\n if (initializer.marketFilterAddress != address(0)) {\n marketFilterAddress = initializer.marketFilterAddress;\n }\n\n // Setup the owner role\n _setOwner(initializer.initialOwner);\n\n // Setup config variables\n config = Configuration({\n metadataRenderer: IMetadataRenderer(initializer.metadataRenderer),\n editionSize: initializer.editionSize,\n royaltyBPS: initializer.royaltyBPS,\n fundsRecipient: initializer.fundsRecipient\n });\n\n salesConfig = initializer.salesConfiguration;\n\n // TODO: Need to make sure to initialize the metadata renderer\n if (initializer.metadataRenderer != address(0)) {\n IMetadataRenderer(initializer.metadataRenderer).initializeWithData(initializer.metadataRendererInit);\n }\n\n if (initializer.enableOpenSeaRoyaltyRegistry && Address.isContract(address(openseaOperatorFilterRegistry))) {\n if (marketFilterAddress == address(0)) {\n // this is a default filter that can be used for OS royalty filtering\n // marketFilterAddress = 0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6;\n // we just register to OS royalties and let OS handle it for us with their default filter contract\n HolographERC721Interface(holographer()).sourceExternalCall(\n address(openseaOperatorFilterRegistry),\n abi.encodeWithSelector(IOperatorFilterRegistry.register.selector, holographer())\n );\n } else {\n // allow user to specify custom filtering contract address\n HolographERC721Interface(holographer()).sourceExternalCall(\n address(openseaOperatorFilterRegistry),\n abi.encodeWithSelector(\n IOperatorFilterRegistry.registerAndSubscribe.selector,\n holographer(),\n marketFilterAddress\n )\n );\n }\n assembly {\n sstore(_osRegistryEnabledSlot, true)\n }\n }\n\n setStatus(1);\n\n return _init(initPayload);\n }\n\n /**\n * PUBLIC NON STATE CHANGING FUNCTIONS\n * static\n */\n\n /**\n * @notice Returns the version of the contract\n * @dev Used for contract versioning and validation\n * @return version string representing the version of the contract\n */\n function version() external pure returns (string memory) {\n return \"1.0.0\";\n }\n\n function supportsInterface(bytes4 interfaceId) external pure override returns (bool) {\n return interfaceId == type(IHolographDropERC721).interfaceId;\n }\n\n /**\n * PUBLIC NON STATE CHANGING FUNCTIONS\n * dynamic\n */\n\n function owner() external view override(ERC721H, IHolographDropERC721) returns (address) {\n return _getOwner();\n }\n\n function isAdmin(address user) external view returns (bool) {\n return (_getOwner() == user);\n }\n\n function beforeSafeTransfer(\n address _from,\n address /* _to*/,\n uint256 /* _tokenId*/,\n bytes calldata /* _data*/\n ) external view returns (bool) {\n if (\n _from != address(0) && // skip on mints\n _from != msgSender() // skip on transfers from sender\n ) {\n bool osRegistryEnabled;\n assembly {\n osRegistryEnabled := sload(_osRegistryEnabledSlot)\n }\n if (osRegistryEnabled) {\n try openseaOperatorFilterRegistry.isOperatorAllowed(address(this), msgSender()) returns (bool allowed) {\n return allowed;\n } catch {\n revert OperatorNotAllowed(msgSender());\n }\n }\n }\n return true;\n }\n\n function beforeTransfer(\n address _from,\n address /* _to*/,\n uint256 /* _tokenId*/,\n bytes calldata /* _data*/\n ) external view returns (bool) {\n if (\n _from != address(0) && // skip on mints\n _from != msgSender() // skip on transfers from sender\n ) {\n bool osRegistryEnabled;\n assembly {\n osRegistryEnabled := sload(_osRegistryEnabledSlot)\n }\n if (osRegistryEnabled) {\n try openseaOperatorFilterRegistry.isOperatorAllowed(address(this), msgSender()) returns (bool allowed) {\n return allowed;\n } catch {\n revert OperatorNotAllowed(msgSender());\n }\n }\n }\n return true;\n }\n\n function onIsApprovedForAll(address /* _wallet*/, address _operator) external view returns (bool approved) {\n approved = (erc721TransferHelper != address(0) && _operator == erc721TransferHelper);\n }\n\n /**\n * @notice Sale details\n * @return SaleDetails sale information details\n */\n function saleDetails() external view returns (SaleDetails memory) {\n return\n SaleDetails({\n publicSaleActive: _publicSaleActive(),\n presaleActive: _presaleActive(),\n publicSalePrice: salesConfig.publicSalePrice,\n publicSaleStart: salesConfig.publicSaleStart,\n publicSaleEnd: salesConfig.publicSaleEnd,\n presaleStart: salesConfig.presaleStart,\n presaleEnd: salesConfig.presaleEnd,\n presaleMerkleRoot: salesConfig.presaleMerkleRoot,\n totalMinted: _currentTokenId,\n maxSupply: config.editionSize,\n maxSalePurchasePerAddress: salesConfig.maxSalePurchasePerAddress\n });\n }\n\n /**\n * @dev Number of NFTs the user has minted per address\n * @param minter to get counts for\n */\n function mintedPerAddress(address minter) external view returns (AddressMintDetails memory) {\n return\n AddressMintDetails({\n presaleMints: presaleMintsByAddress[minter],\n publicMints: totalMintsByAddress[minter] - presaleMintsByAddress[minter],\n totalMints: totalMintsByAddress[minter]\n });\n }\n\n /**\n * @notice Contract URI Getter, proxies to metadataRenderer\n * @return Contract URI\n */\n function contractURI() external view returns (string memory) {\n return config.metadataRenderer.contractURI();\n }\n\n /**\n * @notice Getter for metadataRenderer contract\n */\n function metadataRenderer() external view returns (IMetadataRenderer) {\n return IMetadataRenderer(config.metadataRenderer);\n }\n\n /**\n * @notice Convert USD price to current price in native Ether\n */\n function getNativePrice() external view returns (uint256) {\n return _usdToWei(salesConfig.publicSalePrice);\n }\n\n /**\n * @notice Returns the name of the token through the holographer entrypoint\n */\n function name() external view returns (string memory) {\n return HolographERC721Interface(holographer()).name();\n }\n\n /**\n * @notice Token URI Getter, proxies to metadataRenderer\n * @param tokenId id of token to get URI for\n * @return Token URI\n */\n function tokenURI(uint256 tokenId) external view returns (string memory) {\n HolographERC721Interface H721 = HolographERC721Interface(holographer());\n require(H721.exists(tokenId), \"ERC721: token does not exist\");\n\n return config.metadataRenderer.tokenURI(tokenId);\n }\n\n /**\n * PUBLIC STATE CHANGING FUNCTIONS\n * available to all\n */\n\n function multicall(bytes[] memory data) public returns (bytes[] memory results) {\n results = new bytes[](data.length);\n for (uint256 i = 0; i < data.length; i++) {\n results[i] = Address.functionDelegateCall(address(this), abi.encodePacked(data[i], msgSender()));\n }\n }\n\n /**\n * @dev This allows the user to purchase/mint a edition at the given price in the contract.\n */\n function purchase(\n uint256 quantity\n ) external payable nonReentrant canMintTokens(quantity) onlyPublicSaleActive returns (uint256) {\n uint256 salePrice = _usdToWei(salesConfig.publicSalePrice);\n\n if (msg.value < salePrice * quantity) {\n revert Purchase_WrongPrice(salesConfig.publicSalePrice * quantity);\n }\n uint256 remainder = msg.value - (salePrice * quantity);\n\n // If max purchase per address == 0 there is no limit.\n // Any other number, the per address mint limit is that.\n if (\n salesConfig.maxSalePurchasePerAddress != 0 &&\n totalMintsByAddress[msgSender()] + quantity - presaleMintsByAddress[msgSender()] >\n salesConfig.maxSalePurchasePerAddress\n ) {\n revert Purchase_TooManyForAddress();\n }\n\n _mintNFTs(msgSender(), quantity);\n\n HolographERC721Interface H721 = HolographERC721Interface(holographer());\n uint256 chainPrepend = H721.sourceGetChainPrepend();\n uint256 firstMintedTokenId = (chainPrepend + uint256(_currentTokenId - quantity)) + 1;\n\n emit Sale({\n to: msgSender(),\n quantity: quantity,\n pricePerToken: salePrice,\n firstPurchasedTokenId: firstMintedTokenId\n });\n\n if (remainder > 0) {\n msgSender().call{value: remainder, gas: gasleft() > 210_000 ? 210_000 : gasleft()}(\"\");\n }\n\n return firstMintedTokenId;\n }\n\n /**\n * @notice Merkle-tree based presale purchase function\n * @param quantity quantity to purchase\n * @param maxQuantity max quantity that can be purchased via merkle proof #\n * @param pricePerToken price that each token is purchased at\n * @param merkleProof proof for presale mint\n */\n function purchasePresale(\n uint256 quantity,\n uint256 maxQuantity,\n uint256 pricePerToken,\n bytes32[] calldata merkleProof\n ) external payable nonReentrant canMintTokens(quantity) onlyPresaleActive returns (uint256) {\n if (\n !MerkleProof.verify(\n merkleProof,\n salesConfig.presaleMerkleRoot,\n keccak256(\n // address, uint256, uint256\n abi.encode(msgSender(), maxQuantity, pricePerToken)\n )\n )\n ) {\n revert Presale_MerkleNotApproved();\n }\n\n uint256 weiPricePerToken = _usdToWei(pricePerToken);\n if (msg.value < weiPricePerToken * quantity) {\n revert Purchase_WrongPrice(pricePerToken * quantity);\n }\n uint256 remainder = msg.value - (weiPricePerToken * quantity);\n\n presaleMintsByAddress[msgSender()] += quantity;\n if (presaleMintsByAddress[msgSender()] > maxQuantity) {\n revert Presale_TooManyForAddress();\n }\n\n _mintNFTs(msgSender(), quantity);\n\n HolographERC721Interface H721 = HolographERC721Interface(holographer());\n uint256 chainPrepend = H721.sourceGetChainPrepend();\n uint256 firstMintedTokenId = (chainPrepend + uint256(_currentTokenId - quantity)) + 1;\n\n emit Sale({\n to: msgSender(),\n quantity: quantity,\n pricePerToken: weiPricePerToken,\n firstPurchasedTokenId: firstMintedTokenId\n });\n\n if (remainder > 0) {\n msgSender().call{value: remainder, gas: gasleft() > 210_000 ? 210_000 : gasleft()}(\"\");\n }\n\n return firstMintedTokenId;\n }\n\n /**\n * PUBLIC STATE CHANGING FUNCTIONS\n * admin only\n */\n\n /**\n * @notice Proxy to update market filter settings in the main registry contracts\n * @notice Requires admin permissions\n * @param args Calldata args to pass to the registry\n */\n function updateMarketFilterSettings(bytes calldata args) external onlyOwner {\n HolographERC721Interface(holographer()).sourceExternalCall(address(openseaOperatorFilterRegistry), args);\n bool osRegistryEnabled = openseaOperatorFilterRegistry.isRegistered(holographer());\n assembly {\n sstore(_osRegistryEnabledSlot, osRegistryEnabled)\n }\n }\n\n /**\n * @notice Manage subscription for marketplace filtering based off royalty payouts.\n * @param enable Enable filtering to non-royalty payout marketplaces\n */\n function manageMarketFilterSubscription(bool enable) external onlyOwner {\n address self = holographer();\n if (marketFilterAddress == address(0)) {\n revert MarketFilterAddressNotSupportedForChain();\n }\n if (!openseaOperatorFilterRegistry.isRegistered(self) && enable) {\n HolographERC721Interface(self).sourceExternalCall(\n address(openseaOperatorFilterRegistry),\n abi.encodeWithSelector(IOperatorFilterRegistry.registerAndSubscribe.selector, self, marketFilterAddress)\n );\n } else if (enable) {\n HolographERC721Interface(self).sourceExternalCall(\n address(openseaOperatorFilterRegistry),\n abi.encodeWithSelector(IOperatorFilterRegistry.subscribe.selector, self, marketFilterAddress)\n );\n } else {\n HolographERC721Interface(self).sourceExternalCall(\n address(openseaOperatorFilterRegistry),\n abi.encodeWithSelector(IOperatorFilterRegistry.unsubscribe.selector, self, false)\n );\n HolographERC721Interface(self).sourceExternalCall(\n address(openseaOperatorFilterRegistry),\n abi.encodeWithSelector(IOperatorFilterRegistry.unregister.selector, self)\n );\n }\n bool osRegistryEnabled = openseaOperatorFilterRegistry.isRegistered(self);\n assembly {\n sstore(_osRegistryEnabledSlot, osRegistryEnabled)\n }\n }\n\n function modifyMarketFilterAddress(address newMarketFilterAddress) external onlyOwner {\n marketFilterAddress = newMarketFilterAddress;\n }\n\n /**\n * @notice Admin mint tokens to a recipient for free\n * @param recipient recipient to mint to\n * @param quantity quantity to mint\n */\n function adminMint(address recipient, uint256 quantity) external onlyOwner canMintTokens(quantity) returns (uint256) {\n _mintNFTs(recipient, quantity);\n\n return _currentTokenId;\n }\n\n /**\n * @dev Mints multiple editions to the given list of addresses.\n * @param recipients list of addresses to send the newly minted editions to\n */\n function adminMintAirdrop(\n address[] calldata recipients\n ) external onlyOwner canMintTokens(recipients.length) returns (uint256) {\n unchecked {\n for (uint256 i = 0; i < recipients.length; i++) {\n _mintNFTs(recipients[i], 1);\n }\n }\n\n return _currentTokenId;\n }\n\n /**\n * @notice Set a new metadata renderer\n * @param newRenderer new renderer address to use\n * @param setupRenderer data to setup new renderer with\n */\n function setMetadataRenderer(IMetadataRenderer newRenderer, bytes memory setupRenderer) external onlyOwner {\n config.metadataRenderer = newRenderer;\n\n if (setupRenderer.length > 0) {\n newRenderer.initializeWithData(setupRenderer);\n }\n\n emit UpdatedMetadataRenderer({sender: msgSender(), renderer: newRenderer});\n }\n\n /**\n * @dev This sets the sales configuration\n * @param publicSalePrice New public sale price\n * @param maxSalePurchasePerAddress Max # of purchases (public) per address allowed\n * @param publicSaleStart unix timestamp when the public sale starts\n * @param publicSaleEnd unix timestamp when the public sale ends (set to 0 to disable)\n * @param presaleStart unix timestamp when the presale starts\n * @param presaleEnd unix timestamp when the presale ends\n * @param presaleMerkleRoot merkle root for the presale information\n */\n function setSaleConfiguration(\n uint104 publicSalePrice,\n uint32 maxSalePurchasePerAddress,\n uint64 publicSaleStart,\n uint64 publicSaleEnd,\n uint64 presaleStart,\n uint64 presaleEnd,\n bytes32 presaleMerkleRoot\n ) external onlyOwner {\n salesConfig.publicSalePrice = publicSalePrice;\n salesConfig.maxSalePurchasePerAddress = maxSalePurchasePerAddress;\n salesConfig.publicSaleStart = publicSaleStart;\n salesConfig.publicSaleEnd = publicSaleEnd;\n salesConfig.presaleStart = presaleStart;\n salesConfig.presaleEnd = presaleEnd;\n salesConfig.presaleMerkleRoot = presaleMerkleRoot;\n\n emit SalesConfigChanged(msgSender());\n }\n\n /**\n * @notice Set a different funds recipient\n * @param newRecipientAddress new funds recipient address\n */\n function setFundsRecipient(address payable newRecipientAddress) external onlyOwner {\n if (newRecipientAddress == address(0)) {\n revert(\"Funds Recipient cannot be 0 address\");\n }\n config.fundsRecipient = newRecipientAddress;\n emit FundsRecipientChanged(newRecipientAddress, msgSender());\n }\n\n /**\n * @notice This withdraws ETH from the contract to the contract owner.\n */\n function withdraw() external override nonReentrant {\n if (config.fundsRecipient == address(0)) {\n revert(\"Funds Recipient address not set\");\n }\n address sender = msgSender();\n\n // Get fee amount\n uint256 funds = address(this).balance;\n address payable feeRecipient = payable(\n HolographInterface(HolographerInterface(holographer()).getHolograph()).getTreasury()\n );\n // for now set it to 0 since there is no fee\n uint256 holographFee = 0;\n\n // Check if withdraw is allowed for sender\n if (sender != config.fundsRecipient && sender != _getOwner() && sender != feeRecipient) {\n revert Access_WithdrawNotAllowed();\n }\n\n // Payout HOLOGRAPH fee\n if (holographFee > 0) {\n (bool successFee, ) = feeRecipient.call{value: holographFee, gas: 210_000}(\"\");\n if (!successFee) {\n revert Withdraw_FundsSendFailure();\n }\n funds -= holographFee;\n }\n\n // Payout recipient\n (bool successFunds, ) = config.fundsRecipient.call{value: funds, gas: 210_000}(\"\");\n if (!successFunds) {\n revert Withdraw_FundsSendFailure();\n }\n\n // Emit event for indexing\n emit FundsWithdrawn(sender, config.fundsRecipient, funds, feeRecipient, holographFee);\n }\n\n /**\n * @notice Admin function to finalize and open edition sale\n */\n function finalizeOpenEdition() external onlyOwner {\n if (config.editionSize != type(uint64).max) {\n revert Admin_UnableToFinalizeNotOpenEdition();\n }\n\n config.editionSize = uint64(_currentTokenId);\n emit OpenMintFinalized(msgSender(), config.editionSize);\n }\n\n /**\n * INTERNAL FUNCTIONS\n * non state changing\n */\n\n function _presaleActive() internal view returns (bool) {\n return salesConfig.presaleStart <= block.timestamp && salesConfig.presaleEnd > block.timestamp;\n }\n\n function _publicSaleActive() internal view returns (bool) {\n return salesConfig.publicSaleStart <= block.timestamp && salesConfig.publicSaleEnd > block.timestamp;\n }\n\n function _usdToWei(uint256 amount) internal view returns (uint256 weiAmount) {\n if (amount == 0) {\n return 0;\n }\n weiAmount = dropsPriceOracle.convertUsdToWei(amount);\n }\n\n /**\n * INTERNAL FUNCTIONS\n * state changing\n */\n\n function _mintNFTs(address recipient, uint256 quantity) internal {\n HolographERC721Interface H721 = HolographERC721Interface(holographer());\n uint256 chainPrepend = H721.sourceGetChainPrepend();\n uint224 tokenId = 0;\n for (uint256 i = 0; i < quantity; i++) {\n _currentTokenId += 1;\n while (\n H721.exists(chainPrepend + uint256(_currentTokenId)) || H721.burned(chainPrepend + uint256(_currentTokenId))\n ) {\n _currentTokenId += 1;\n }\n tokenId = _currentTokenId;\n H721.sourceMint(recipient, tokenId);\n // uint256 id = chainPrepend + uint256(tokenId);\n }\n }\n\n fallback() external payable override {\n assembly {\n // Allocate memory for the error message\n let errorMsg := mload(0x40)\n\n // Error message: \"Function not found\", properly padded with zeroes\n mstore(errorMsg, 0x46756e6374696f6e206e6f7420666f756e640000000000000000000000000000)\n\n // Revert with the error message\n revert(errorMsg, 20) // 20 is the length of the error message in bytes\n }\n }\n}\n" + }, + "contracts/drops/utils/NFTMetadataRenderer.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nlibrary Math {\n enum Rounding {\n Down, // Toward negative infinity\n Up, // Toward infinity\n Zero // Toward zero\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds up instead\n * of rounding down.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b - 1) / b can overflow on addition, so we distribute.\n return a == 0 ? 0 : (a - 1) / b + 1;\n }\n\n /**\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\n * with further edits by Uniswap Labs also under MIT license.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\n unchecked {\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = prod1 * 2^256 + prod0.\n uint256 prod0; // Least significant 256 bits of the product\n uint256 prod1; // Most significant 256 bits of the product\n assembly {\n let mm := mulmod(x, y, not(0))\n prod0 := mul(x, y)\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n }\n\n // Handle non-overflow cases, 256 by 256 division.\n if (prod1 == 0) {\n return prod0 / denominator;\n }\n\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\n require(denominator > prod1);\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [prod1 prod0].\n uint256 remainder;\n assembly {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n prod1 := sub(prod1, gt(remainder, prod0))\n prod0 := sub(prod0, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\n // See https://cs.stackexchange.com/q/138556/92363.\n\n // Does not overflow because the denominator cannot be zero at this stage in the function.\n uint256 twos = denominator & (~denominator + 1);\n assembly {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [prod1 prod0] by twos.\n prod0 := div(prod0, twos)\n\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from prod1 into prod0.\n prod0 |= prod1 * twos;\n\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv = 1 mod 2^4.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\n // in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\n // is no longer required.\n result = prod0 * inverse;\n return result;\n }\n }\n\n /**\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\n uint256 result = mulDiv(x, y, denominator);\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\n result += 1;\n }\n return result;\n }\n\n /**\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 128;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 64;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 32;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 16;\n }\n if (value >> 8 > 0) {\n value >>= 8;\n result += 8;\n }\n if (value >> 4 > 0) {\n value >>= 4;\n result += 4;\n }\n if (value >> 2 > 0) {\n value >>= 2;\n result += 2;\n }\n if (value >> 1 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log2(value);\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10 ** 64) {\n value /= 10 ** 64;\n result += 64;\n }\n if (value >= 10 ** 32) {\n value /= 10 ** 32;\n result += 32;\n }\n if (value >= 10 ** 16) {\n value /= 10 ** 16;\n result += 16;\n }\n if (value >= 10 ** 8) {\n value /= 10 ** 8;\n result += 8;\n }\n if (value >= 10 ** 4) {\n value /= 10 ** 4;\n result += 4;\n }\n if (value >= 10 ** 2) {\n value /= 10 ** 2;\n result += 2;\n }\n if (value >= 10 ** 1) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log10(value);\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256, rounded down, of a positive value.\n * Returns 0 if given 0.\n *\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n */\n function log256(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 16;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 8;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 4;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 2;\n }\n if (value >> 8 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log256(value);\n return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);\n }\n }\n}\n\nlibrary Strings {\n bytes16 private constant _SYMBOLS = \"0123456789abcdef\";\n uint8 private constant _ADDRESS_LENGTH = 20;\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n unchecked {\n uint256 length = Math.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n /// @solidity memory-safe-assembly\n assembly {\n ptr := add(buffer, add(32, length))\n }\n while (true) {\n ptr--;\n /// @solidity memory-safe-assembly\n assembly {\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n unchecked {\n return toHexString(value, Math.log256(value) + 1);\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\n }\n}\n\nlibrary Base64 {\n /**\n * @dev Base64 Encoding/Decoding Table\n */\n string internal constant _TABLE = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\n\n /**\n * @dev Converts a `bytes` to its Bytes64 `string` representation.\n */\n function encode(bytes memory data) internal pure returns (string memory) {\n /**\n * Inspired by Brecht Devos (Brechtpd) implementation - MIT licence\n * https://github.com/Brechtpd/base64/blob/e78d9fd951e7b0977ddca77d92dc85183770daf4/base64.sol\n */\n if (data.length == 0) return \"\";\n\n // Loads the table into memory\n string memory table = _TABLE;\n\n // Encoding takes 3 bytes chunks of binary data from `bytes` data parameter\n // and split into 4 numbers of 6 bits.\n // The final Base64 length should be `bytes` data length multiplied by 4/3 rounded up\n // - `data.length + 2` -> Round up\n // - `/ 3` -> Number of 3-bytes chunks\n // - `4 *` -> 4 characters for each chunk\n string memory result = new string(4 * ((data.length + 2) / 3));\n\n /// @solidity memory-safe-assembly\n assembly {\n // Prepare the lookup table (skip the first \"length\" byte)\n let tablePtr := add(table, 1)\n\n // Prepare result pointer, jump over length\n let resultPtr := add(result, 32)\n\n // Run over the input, 3 bytes at a time\n for {\n let dataPtr := data\n let endPtr := add(data, mload(data))\n } lt(dataPtr, endPtr) {\n\n } {\n // Advance 3 bytes\n dataPtr := add(dataPtr, 3)\n let input := mload(dataPtr)\n\n // To write each character, shift the 3 bytes (18 bits) chunk\n // 4 times in blocks of 6 bits for each character (18, 12, 6, 0)\n // and apply logical AND with 0x3F which is the number of\n // the previous character in the ASCII table prior to the Base64 Table\n // The result is then added to the table to get the character to write,\n // and finally write it in the result pointer but with a left shift\n // of 256 (1 byte) - 8 (1 ASCII char) = 248 bits\n\n mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F))))\n resultPtr := add(resultPtr, 1) // Advance\n\n mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F))))\n resultPtr := add(resultPtr, 1) // Advance\n\n mstore8(resultPtr, mload(add(tablePtr, and(shr(6, input), 0x3F))))\n resultPtr := add(resultPtr, 1) // Advance\n\n mstore8(resultPtr, mload(add(tablePtr, and(input, 0x3F))))\n resultPtr := add(resultPtr, 1) // Advance\n }\n\n // When data `bytes` is not exactly 3 bytes long\n // it is padded with `=` characters at the end\n switch mod(mload(data), 3)\n case 1 {\n mstore8(sub(resultPtr, 1), 0x3d)\n mstore8(sub(resultPtr, 2), 0x3d)\n }\n case 2 {\n mstore8(sub(resultPtr, 1), 0x3d)\n }\n }\n\n return result;\n }\n}\n\n/// NFT metadata library for rendering metadata associated with editions\nlibrary NFTMetadataRenderer {\n /// Generate edition metadata from storage information as base64-json blob\n /// Combines the media data and metadata\n /// @param name Name of NFT in metadata\n /// @param description Description of NFT in metadata\n /// @param imageURI URI of image to render for edition\n /// @param animationURI URI of animation to render for edition\n /// @param tokenOfEdition Token ID for specific token\n /// @param editionSize Size of entire edition to show\n function createMetadataEdition(\n string memory name,\n string memory description,\n string memory imageURI,\n string memory animationURI,\n uint256 tokenOfEdition,\n uint256 editionSize\n ) internal pure returns (string memory) {\n string memory _tokenMediaData = tokenMediaData(imageURI, animationURI);\n bytes memory json = createMetadataJSON(name, description, _tokenMediaData, tokenOfEdition, editionSize);\n return encodeMetadataJSON(json);\n }\n\n function encodeContractURIJSON(\n string memory name,\n string memory description,\n string memory imageURI,\n string memory animationURI,\n uint256 royaltyBPS,\n address royaltyRecipient\n ) internal pure returns (string memory) {\n bytes memory imageSpace = bytes(\"\");\n if (bytes(imageURI).length > 0) {\n imageSpace = abi.encodePacked('\", \"image\": \"', imageURI);\n }\n bytes memory animationSpace = bytes(\"\");\n if (bytes(animationURI).length > 0) {\n animationSpace = abi.encodePacked('\", \"animation_url\": \"', animationURI);\n }\n\n return\n string(\n encodeMetadataJSON(\n abi.encodePacked(\n '{\"name\": \"',\n name,\n '\", \"description\": \"',\n description,\n // this is for opensea since they don't respect ERC2981 right now\n '\", \"seller_fee_basis_points\": ',\n Strings.toString(royaltyBPS),\n ', \"fee_recipient\": \"',\n Strings.toHexString(uint256(uint160(royaltyRecipient)), 20),\n imageSpace,\n animationSpace,\n '\"}'\n )\n )\n );\n }\n\n /// Function to create the metadata json string for the nft edition\n /// @param name Name of NFT in metadata\n /// @param description Description of NFT in metadata\n /// @param mediaData Data for media to include in json object\n /// @param tokenOfEdition Token ID for specific token\n /// @param editionSize Size of entire edition to show\n function createMetadataJSON(\n string memory name,\n string memory description,\n string memory mediaData,\n uint256 tokenOfEdition,\n uint256 editionSize\n ) internal pure returns (bytes memory) {\n bytes memory editionSizeText;\n if (editionSize > 0) {\n editionSizeText = abi.encodePacked(\"/\", Strings.toString(editionSize));\n }\n return\n abi.encodePacked(\n '{\"name\": \"',\n name,\n \" \",\n Strings.toString(tokenOfEdition),\n editionSizeText,\n '\", \"',\n 'description\": \"',\n description,\n '\", \"',\n mediaData,\n 'properties\": {\"number\": ',\n Strings.toString(tokenOfEdition),\n ', \"name\": \"',\n name,\n '\"}}'\n );\n }\n\n /// Encodes the argument json bytes into base64-data uri format\n /// @param json Raw json to base64 and turn into a data-uri\n function encodeMetadataJSON(bytes memory json) internal pure returns (string memory) {\n return string(abi.encodePacked(\"data:application/json;base64,\", Base64.encode(json)));\n }\n\n /// Generates edition metadata from storage information as base64-json blob\n /// Combines the media data and metadata\n /// @param imageUrl URL of image to render for edition\n /// @param animationUrl URL of animation to render for edition\n function tokenMediaData(string memory imageUrl, string memory animationUrl) internal pure returns (string memory) {\n bool hasImage = bytes(imageUrl).length > 0;\n bool hasAnimation = bytes(animationUrl).length > 0;\n if (hasImage && hasAnimation) {\n return string(abi.encodePacked('image\": \"', imageUrl, '\", \"animation_url\": \"', animationUrl, '\", \"'));\n }\n if (hasImage) {\n return string(abi.encodePacked('image\": \"', imageUrl, '\", \"'));\n }\n if (hasAnimation) {\n return string(abi.encodePacked('animation_url\": \"', animationUrl, '\", \"'));\n }\n\n return \"\";\n }\n}\n" + }, + "contracts/enforcer/Holographer.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\n\nimport \"../interface/HolographInterface.sol\";\nimport \"../interface/HolographerInterface.sol\";\nimport \"../interface/HolographRegistryInterface.sol\";\nimport \"../interface/InitializableInterface.sol\";\n\n/**\n * @dev This contract is a binder. It puts together all the variables to make the underlying contracts functional and be bridgeable.\n */\ncontract Holographer is Admin, Initializable, HolographerInterface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.originChain')) - 1)\n */\n bytes32 constant _originChainSlot = 0xd49ffd6af8249d6e6b5963d9d2b22c6db30ad594cb468453047a14e1c1bcde4d;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\n */\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.contractType')) - 1)\n */\n bytes32 constant _contractTypeSlot = 0x0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c7;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.sourceContract')) - 1)\n */\n bytes32 constant _sourceContractSlot = 0x27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b074;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.blockHeight')) - 1)\n */\n bytes32 constant _blockHeightSlot = 0x9172848b0f1df776dc924b58e7fa303087ae0409bbf611608529e7f747d55de3;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPHER: already initialized\");\n (bytes memory encoded, bytes memory initCode) = abi.decode(initPayload, (bytes, bytes));\n (uint32 originChain, address holograph, bytes32 contractType, address sourceContract) = abi.decode(\n encoded,\n (uint32, address, bytes32, address)\n );\n assembly {\n sstore(_adminSlot, caller())\n sstore(_blockHeightSlot, number())\n sstore(_contractTypeSlot, contractType)\n sstore(_holographSlot, holograph)\n sstore(_originChainSlot, originChain)\n sstore(_sourceContractSlot, sourceContract)\n }\n (bool success, bytes memory returnData) = HolographRegistryInterface(HolographInterface(holograph).getRegistry())\n .getReservedContractTypeAddress(contractType)\n .delegatecall(abi.encodeWithSelector(InitializableInterface.init.selector, initCode));\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == InitializableInterface.init.selector, \"HOLOGRAPH: initialization failed\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @dev Returns the contract type that is used for loading the Enforcer\n */\n function getContractType() external view returns (bytes32 contractType) {\n assembly {\n contractType := sload(_contractTypeSlot)\n }\n }\n\n /**\n * @dev Returns the block height of when the smart contract was deployed. Useful for retrieving deployment config for re-deployment on other EVM-compatible chains.\n */\n function getDeploymentBlock() external view returns (uint256 deploymentBlock) {\n assembly {\n deploymentBlock := sload(_blockHeightSlot)\n }\n }\n\n /**\n * @dev Returns a hardcoded address for the Holograph smart contract.\n */\n function getHolograph() external view returns (address holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n /**\n * @dev Returns a hardcoded address for the Holograph smart contract that controls and enforces the ERC standards.\n */\n function getHolographEnforcer() public view returns (address) {\n HolographInterface holograph;\n bytes32 contractType;\n assembly {\n holograph := sload(_holographSlot)\n contractType := sload(_contractTypeSlot)\n }\n return HolographRegistryInterface(holograph.getRegistry()).getReservedContractTypeAddress(contractType);\n }\n\n /**\n * @dev Returns the original chain that contract was deployed on.\n */\n function getOriginChain() external view returns (uint32 originChain) {\n assembly {\n originChain := sload(_originChainSlot)\n }\n }\n\n /**\n * @dev Returns a hardcoded address for the custom secure storage contract deployed in parallel with this contract deployment.\n */\n function getSourceContract() external view returns (address sourceContract) {\n assembly {\n sourceContract := sload(_sourceContractSlot)\n }\n }\n\n /**\n * @dev Purposefully left empty, to prevent running out of gas errors when receiving native token payments.\n */\n receive() external payable {}\n\n /**\n * @dev This takes the Enforcer's source code, runs it, and uses current address for storage slots.\n */\n fallback() external payable {\n address holographEnforcer = getHolographEnforcer();\n assembly {\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), holographEnforcer, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/enforcer/HolographERC20.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/EIP712.sol\";\nimport \"../abstract/Initializable.sol\";\nimport \"../abstract/NonReentrant.sol\";\nimport \"../abstract/Owner.sol\";\n\nimport \"../enum/HolographERC20Event.sol\";\nimport \"../enum/InterfaceType.sol\";\n\nimport \"../interface/ERC20.sol\";\nimport \"../interface/ERC20Burnable.sol\";\nimport \"../interface/HolographERC20Interface.sol\";\nimport \"../interface/ERC20Metadata.sol\";\nimport \"../interface/ERC20Permit.sol\";\nimport \"../interface/ERC20Receiver.sol\";\nimport \"../interface/ERC20Safer.sol\";\nimport \"../interface/ERC165.sol\";\nimport \"../interface/Holographable.sol\";\nimport \"../interface/HolographedERC20.sol\";\nimport \"../interface/HolographInterface.sol\";\nimport \"../interface/HolographerInterface.sol\";\nimport \"../interface/HolographRegistryInterface.sol\";\nimport \"../interface/InitializableInterface.sol\";\nimport \"../interface/HolographInterfacesInterface.sol\";\nimport \"../interface/Ownable.sol\";\n\n/**\n * @title Holograph Bridgeable ERC-20 Token\n * @author Holograph Foundation\n * @notice A smart contract for minting and managing Holograph Bridgeable ERC20 Tokens.\n * @dev The entire logic and functionality of the smart contract is self-contained.\n */\ncontract HolographERC20 is Admin, Owner, Initializable, NonReentrant, EIP712, HolographERC20Interface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\n */\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.sourceContract')) - 1)\n */\n bytes32 constant _sourceContractSlot = 0x27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b074;\n\n /**\n * @dev Configuration for events to trigger for source smart contract.\n */\n uint256 private _eventConfig;\n\n /**\n * @dev Mapping of all the addresse's balances.\n */\n mapping(address => uint256) private _balances;\n\n /**\n * @dev Mapping of all authorized operators, and capped amounts.\n */\n mapping(address => mapping(address => uint256)) private _allowances;\n\n /**\n * @dev Total number of token in circulation.\n */\n uint256 private _totalSupply;\n\n /**\n * @dev Token name.\n */\n string private _name;\n\n /**\n * @dev Token ticker symbol.\n */\n string private _symbol;\n\n /**\n * @dev Token number of decimal places.\n */\n uint8 private _decimals;\n\n /**\n * @dev List of used up nonces. Used in the ERC20Permit interface functionality.\n */\n mapping(address => uint256) private _nonces;\n\n /**\n * @notice Only allow calls from bridge smart contract.\n */\n modifier onlyBridge() {\n require(msg.sender == _holograph().getBridge(), \"ERC20: bridge only call\");\n _;\n }\n\n /**\n * @notice Only allow calls from source smart contract.\n */\n modifier onlySource() {\n address sourceContract;\n assembly {\n sourceContract := sload(_sourceContractSlot)\n }\n require(msg.sender == sourceContract, \"ERC20: source only call\");\n _;\n }\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"ERC20: already initialized\");\n InitializableInterface sourceContract;\n assembly {\n sstore(_reentrantSlot, 0x0000000000000000000000000000000000000000000000000000000000000001)\n sstore(_ownerSlot, caller())\n sourceContract := sload(_sourceContractSlot)\n }\n (\n string memory contractName,\n string memory contractSymbol,\n uint8 contractDecimals,\n uint256 eventConfig,\n string memory domainSeperator,\n string memory domainVersion,\n bool skipInit,\n bytes memory initCode\n ) = abi.decode(initPayload, (string, string, uint8, uint256, string, string, bool, bytes));\n _name = contractName;\n _symbol = contractSymbol;\n _decimals = contractDecimals;\n _eventConfig = eventConfig;\n if (!skipInit) {\n require(sourceContract.init(initCode) == InitializableInterface.init.selector, \"ERC20: could not init source\");\n }\n _setInitialized();\n _eip712_init(domainSeperator, domainVersion);\n return InitializableInterface.init.selector;\n }\n\n /**\n * @dev Purposefully left empty, to prevent running out of gas errors when receiving native token payments.\n */\n receive() external payable {}\n\n /**\n * @notice Fallback to the source contract.\n * @dev Any function call that is not covered here, will automatically be sent over to the source contract.\n */\n fallback() external payable {\n assembly {\n calldatacopy(0, 0, calldatasize())\n mstore(calldatasize(), caller())\n let result := call(gas(), sload(_sourceContractSlot), callvalue(), 0, add(calldatasize(), 0x20), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /*\n * @dev all calls to source contract go through this function in order to inject original msg.sender in calldata\n */\n function _sourceCall(bytes memory payload) private returns (bool output) {\n assembly {\n mstore(add(payload, add(mload(payload), 0x20)), caller())\n // offset memory position by 32 bytes to skip the 32 bytes where bytes length is stored\n // add 32 bytes to bytes length to include the appended msg.sender to calldata\n let result := call(\n gas(),\n sload(_sourceContractSlot),\n callvalue(),\n add(payload, 0x20),\n add(mload(payload), 0x20),\n 0,\n 0\n )\n let pos := mload(0x40)\n // reserve memory space for return data\n mstore(0x40, add(pos, returndatasize()))\n returndatacopy(pos, 0, returndatasize())\n switch result\n case 0 {\n revert(pos, returndatasize())\n }\n output := mload(pos)\n }\n }\n\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n /**\n * @dev Although EIP-165 is not required for ERC20 contracts, we still decided to implement it.\n *\n * This makes it easier for external smart contracts to easily identify a valid ERC20 token contract.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool) {\n HolographInterfacesInterface interfaces = HolographInterfacesInterface(_interfaces());\n ERC165 erc165Contract;\n assembly {\n erc165Contract := sload(_sourceContractSlot)\n }\n if (\n interfaces.supportsInterface(InterfaceType.ERC20, interfaceId) || erc165Contract.supportsInterface(interfaceId) // check global interfaces // check if source supports interface\n ) {\n return true;\n } else {\n return false;\n }\n }\n\n function allowance(address account, address spender) public view returns (uint256) {\n return _allowances[account][spender];\n }\n\n function balanceOf(address account) public view returns (uint256) {\n return _balances[account];\n }\n\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() public view returns (bytes32) {\n return _domainSeparatorV4();\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function nonces(address account) public view returns (uint256) {\n return _nonces[account];\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function totalSupply() public view returns (uint256) {\n return _totalSupply;\n }\n\n function approve(address spender, uint256 amount) public returns (bool) {\n if (_isEventRegistered(HolographERC20Event.beforeApprove)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC20.beforeApprove.selector, msg.sender, spender, amount))\n );\n }\n _approve(msg.sender, spender, amount);\n if (_isEventRegistered(HolographERC20Event.afterApprove)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC20.afterApprove.selector, msg.sender, spender, amount)));\n }\n return true;\n }\n\n function burn(uint256 amount) public {\n if (_isEventRegistered(HolographERC20Event.beforeBurn)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC20.beforeBurn.selector, msg.sender, amount)));\n }\n _burn(msg.sender, amount);\n if (_isEventRegistered(HolographERC20Event.afterBurn)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC20.afterBurn.selector, msg.sender, amount)));\n }\n }\n\n function _allowance(address account, address to, uint256 amount) internal {\n uint256 currentAllowance = _allowances[account][to];\n if (currentAllowance >= amount) {\n unchecked {\n _allowances[account][to] = currentAllowance - amount;\n }\n } else {\n if (_isEventRegistered(HolographERC20Event.onAllowance)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC20.onAllowance.selector, account, to, amount)),\n \"ERC20: amount exceeds allowance\"\n );\n _allowances[account][to] = 0;\n } else {\n revert(\"ERC20: amount exceeds allowance\");\n }\n }\n }\n\n function burnFrom(address account, uint256 amount) public returns (bool) {\n _allowance(account, msg.sender, amount);\n if (_isEventRegistered(HolographERC20Event.beforeBurn)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC20.beforeBurn.selector, account, amount)));\n }\n _burn(account, amount);\n if (_isEventRegistered(HolographERC20Event.afterBurn)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC20.afterBurn.selector, account, amount)));\n }\n return true;\n }\n\n function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {\n uint256 currentAllowance = _allowances[msg.sender][spender];\n require(currentAllowance >= subtractedValue, \"ERC20: decreased below zero\");\n uint256 newAllowance;\n unchecked {\n newAllowance = currentAllowance - subtractedValue;\n }\n if (_isEventRegistered(HolographERC20Event.beforeApprove)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC20.beforeApprove.selector, msg.sender, spender, newAllowance))\n );\n }\n _approve(msg.sender, spender, newAllowance);\n if (_isEventRegistered(HolographERC20Event.afterApprove)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC20.afterApprove.selector, msg.sender, spender, newAllowance))\n );\n }\n return true;\n }\n\n function bridgeIn(uint32 fromChain, bytes calldata payload) external onlyBridge returns (bytes4) {\n (address from, address to, uint256 amount, bytes memory data) = abi.decode(\n payload,\n (address, address, uint256, bytes)\n );\n _mint(to, amount);\n if (_isEventRegistered(HolographERC20Event.bridgeIn)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC20.bridgeIn.selector, fromChain, from, to, amount, data)),\n \"HOLOGRAPH: bridge in failed\"\n );\n }\n return Holographable.bridgeIn.selector;\n }\n\n function bridgeOut(\n uint32 toChain,\n address sender,\n bytes calldata payload\n ) external onlyBridge returns (bytes4 selector, bytes memory data) {\n (address from, address to, uint256 amount) = abi.decode(payload, (address, address, uint256));\n if (sender != from) {\n _allowance(from, sender, amount);\n }\n if (_isEventRegistered(HolographERC20Event.bridgeOut)) {\n /*\n * @dev making a bridgeOut call to source contract\n * assembly is used so that msg.sender can be injected in the calldata\n */\n bytes memory sourcePayload = abi.encodeWithSelector(\n HolographedERC20.bridgeOut.selector,\n toChain,\n from,\n to,\n amount\n );\n assembly {\n // it is important to add 32 bytes in order to accommodate the first 32 bytes being used for storing length of bytes\n mstore(add(sourcePayload, add(mload(sourcePayload), 0x20)), caller())\n let result := call(\n gas(),\n sload(_sourceContractSlot),\n callvalue(),\n // start reading data from memory position, plus 32 bytes, to skip bytes length indicator\n add(sourcePayload, 0x20),\n // add an additional 32 bytes to bytes length to include the appended caller address\n add(mload(sourcePayload), 0x20),\n 0,\n 0\n )\n // when reading back data, skip the first 32 bytes which is used to indicate bytes position in calldata\n // also subtract 32 bytes from returndatasize to accomodate the skipped first 32 bytes\n returndatacopy(data, 0x20, sub(returndatasize(), 0x20))\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n }\n }\n _burn(from, amount);\n return (Holographable.bridgeOut.selector, abi.encode(from, to, amount, data));\n }\n\n /**\n * @dev Allows the bridge to mint tokens (used for hTokens only).\n */\n function holographBridgeMint(address to, uint256 amount) external onlyBridge returns (bytes4) {\n _mint(to, amount);\n return HolographERC20Interface.holographBridgeMint.selector;\n }\n\n function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {\n uint256 currentAllowance = _allowances[msg.sender][spender];\n uint256 newAllowance;\n unchecked {\n newAllowance = currentAllowance + addedValue;\n }\n unchecked {\n require(newAllowance >= currentAllowance, \"ERC20: increased above max value\");\n }\n if (_isEventRegistered(HolographERC20Event.beforeApprove)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC20.beforeApprove.selector, msg.sender, spender, newAllowance))\n );\n }\n _approve(msg.sender, spender, newAllowance);\n if (_isEventRegistered(HolographERC20Event.afterApprove)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC20.afterApprove.selector, msg.sender, spender, newAllowance))\n );\n }\n return true;\n }\n\n function onERC20Received(\n address account,\n address sender,\n uint256 amount,\n bytes calldata data\n ) public returns (bytes4) {\n require(_isContract(account), \"ERC20: operator not contract\");\n if (_isEventRegistered(HolographERC20Event.beforeOnERC20Received)) {\n require(\n _sourceCall(\n abi.encodeWithSelector(\n HolographedERC20.beforeOnERC20Received.selector,\n account,\n sender,\n address(this),\n amount,\n data\n )\n )\n );\n }\n try ERC20(account).balanceOf(address(this)) returns (uint256) {\n // do nothing, just want to see if this reverts due to invalid erc-20 contract\n } catch {\n revert(\"ERC20: failed getting balance\");\n }\n if (_isEventRegistered(HolographERC20Event.afterOnERC20Received)) {\n require(\n _sourceCall(\n abi.encodeWithSelector(\n HolographedERC20.afterOnERC20Received.selector,\n account,\n sender,\n address(this),\n amount,\n data\n )\n )\n );\n }\n return ERC20Receiver.onERC20Received.selector;\n }\n\n function permit(\n address account,\n address spender,\n uint256 amount,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) public {\n require(block.timestamp <= deadline, \"ERC20: expired deadline\");\n bytes32 structHash = keccak256(\n abi.encode(\n 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9,\n account,\n spender,\n amount,\n _useNonce(account),\n deadline\n )\n );\n bytes32 hash = _hashTypedDataV4(structHash);\n address signer = _recover(r, s, v, hash);\n require(signer == account, \"ERC20: invalid signature\");\n if (_isEventRegistered(HolographERC20Event.beforeApprove)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC20.beforeApprove.selector, account, spender, amount)));\n }\n _approve(account, spender, amount);\n if (_isEventRegistered(HolographERC20Event.afterApprove)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC20.afterApprove.selector, account, spender, amount)));\n }\n }\n\n function safeTransfer(address recipient, uint256 amount) public returns (bool) {\n return safeTransfer(recipient, amount, \"\");\n }\n\n function safeTransfer(address recipient, uint256 amount, bytes memory data) public returns (bool) {\n if (_isEventRegistered(HolographERC20Event.beforeSafeTransfer)) {\n require(\n _sourceCall(\n abi.encodeWithSelector(HolographedERC20.beforeSafeTransfer.selector, msg.sender, recipient, amount, data)\n )\n );\n }\n _transfer(msg.sender, recipient, amount);\n if (_isEventRegistered(HolographERC20Event.afterSafeTransfer)) {\n require(\n _sourceCall(\n abi.encodeWithSelector(HolographedERC20.afterSafeTransfer.selector, msg.sender, recipient, amount, data)\n )\n );\n }\n return true;\n }\n\n function safeTransferFrom(address account, address recipient, uint256 amount) public returns (bool) {\n return safeTransferFrom(account, recipient, amount, \"\");\n }\n\n function safeTransferFrom(\n address account,\n address recipient,\n uint256 amount,\n bytes memory data\n ) public returns (bool) {\n if (account != msg.sender) {\n /*\n * @dev This is intentionally enabled to remove friction when operator or bridge needs to move tokens\n */\n if (msg.sender != _holograph().getBridge() && msg.sender != _holograph().getOperator()) {\n _allowance(account, msg.sender, amount);\n }\n }\n if (_isEventRegistered(HolographERC20Event.beforeSafeTransfer)) {\n require(\n _sourceCall(\n abi.encodeWithSelector(HolographedERC20.beforeSafeTransfer.selector, account, recipient, amount, data)\n )\n );\n }\n _transfer(account, recipient, amount);\n if (_isEventRegistered(HolographERC20Event.afterSafeTransfer)) {\n require(\n _sourceCall(\n abi.encodeWithSelector(HolographedERC20.afterSafeTransfer.selector, account, recipient, amount, data)\n )\n );\n }\n return true;\n }\n\n /**\n * @dev Allows for source smart contract to burn tokens.\n */\n function sourceBurn(address from, uint256 amount) external onlySource {\n _burn(from, amount);\n }\n\n /**\n * @dev Allows for source smart contract to mint tokens.\n */\n function sourceMint(address to, uint256 amount) external onlySource {\n _mint(to, amount);\n }\n\n /**\n * @dev Allows for source smart contract to mint a batch of token amounts.\n */\n function sourceMintBatch(address[] calldata wallets, uint256[] calldata amounts) external onlySource {\n for (uint256 i = 0; i < wallets.length; i++) {\n _mint(wallets[i], amounts[i]);\n }\n }\n\n /**\n * @dev Allows for source smart contract to transfer tokens.\n */\n function sourceTransfer(address from, address to, uint256 amount) external onlySource {\n _transfer(from, to, amount);\n }\n\n /**\n * @dev Allows for source smart contract to withdraw contract balance.\n */\n function sourceTransfer(address payable destination, uint256 amount) external onlySource {\n destination.transfer(amount);\n }\n\n /**\n * @dev Allows for source smart contract to make calls to external contracts\n */\n function sourceExternalCall(address target, bytes calldata data) external onlySource {\n assembly {\n calldatacopy(0, data.offset, data.length)\n let result := call(gas(), target, callvalue(), 0, data.length, 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n function transfer(address recipient, uint256 amount) public returns (bool) {\n if (_isEventRegistered(HolographERC20Event.beforeTransfer)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC20.beforeTransfer.selector, msg.sender, recipient, amount))\n );\n }\n _transfer(msg.sender, recipient, amount);\n if (_isEventRegistered(HolographERC20Event.afterTransfer)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC20.afterTransfer.selector, msg.sender, recipient, amount))\n );\n }\n return true;\n }\n\n function transferFrom(address account, address recipient, uint256 amount) public returns (bool) {\n if (account != msg.sender) {\n /*\n * @dev This is intentionally enabled to remove friction when operator or bridge needs to move tokens\n */\n if (msg.sender != _holograph().getBridge() && msg.sender != _holograph().getOperator()) {\n _allowance(account, msg.sender, amount);\n }\n }\n if (_isEventRegistered(HolographERC20Event.beforeTransfer)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC20.beforeTransfer.selector, account, recipient, amount))\n );\n }\n _transfer(account, recipient, amount);\n if (_isEventRegistered(HolographERC20Event.afterTransfer)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC20.afterTransfer.selector, account, recipient, amount)));\n }\n return true;\n }\n\n function _approve(address account, address spender, uint256 amount) private {\n require(account != address(0), \"ERC20: account is zero address\");\n require(spender != address(0), \"ERC20: spender is zero address\");\n _allowances[account][spender] = amount;\n emit Approval(account, spender, amount);\n }\n\n function _burn(address account, uint256 amount) private {\n require(account != address(0), \"ERC20: account is zero address\");\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n }\n _totalSupply -= amount;\n _registryTransfer(account, address(0), amount);\n }\n\n /**\n * @notice Mints tokens.\n * @dev Mint a specific amount of tokens to a specific address.\n * @param to Address to mint to.\n * @param amount Amount of tokens to mint.\n */\n function _mint(address to, uint256 amount) private {\n require(to != address(0), \"ERC20: minting to burn address\");\n _totalSupply += amount;\n _balances[to] += amount;\n _registryTransfer(address(0), to, amount);\n }\n\n function _transfer(address account, address recipient, uint256 amount) private {\n require(account != address(0), \"ERC20: account is zero address\");\n require(recipient != address(0), \"ERC20: recipient is zero address\");\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n }\n _balances[recipient] += amount;\n _registryTransfer(account, recipient, amount);\n }\n\n function _registryTransfer(address _from, address _to, uint256 _amount) private {\n emit Transfer(_from, _to, _amount);\n HolographRegistryInterface(_holograph().getRegistry()).holographableEvent(\n abi.encode(\n // keccak256(\"TransferERC20(address,address,uint256)\")\n bytes32(0x9b035625e569d1d2bf54830a290aefba7ab11610ba8490871dc62b86b63a8956),\n _from,\n _to,\n _amount\n )\n );\n }\n\n /**\n * @dev \"Consume a nonce\": return the current value and increment.\n *\n * _Available since v4.1._\n */\n function _useNonce(address account) private returns (uint256 current) {\n current = _nonces[account];\n _nonces[account]++;\n }\n\n function _isContract(address contractAddress) private view returns (bool) {\n bytes32 codehash;\n assembly {\n codehash := extcodehash(contractAddress)\n }\n return (codehash != 0x0 && codehash != 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470);\n }\n\n /**\n * @dev Internal function used for identifying signer\n */\n function _recover(bytes32 r, bytes32 s, uint8 v, bytes32 hash) private pure returns (address signer) {\n if (v < 27) {\n v += 27;\n }\n require(v == 27 || v == 28, \"ERC20: invalid v-value\");\n // prevent signature malleability by checking if s-value is in the upper range\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n // if s-value is in upper range, calculate a new s-value\n s = bytes32(0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - uint256(s));\n // flip the v-value\n if (v == 27) {\n v = 28;\n } else {\n v = 27;\n }\n // check if s-value is still in upper range\n require(\n uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0,\n \"ERC20: invalid s-value\"\n );\n }\n signer = ecrecover(hash, v, r, s);\n require(signer != address(0), \"ERC20: zero address signer\");\n }\n\n /**\n * @dev Get the interfaces contract address.\n */\n function _interfaces() private view returns (address) {\n return _holograph().getInterfaces();\n }\n\n function owner() public view override returns (address) {\n Ownable ownableContract;\n assembly {\n ownableContract := sload(_sourceContractSlot)\n }\n return ownableContract.owner();\n }\n\n function _holograph() private view returns (HolographInterface holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n function _isEventRegistered(HolographERC20Event _eventName) private view returns (bool) {\n return ((_eventConfig >> uint256(_eventName)) & uint256(1) == 1 ? true : false);\n }\n}\n" + }, + "contracts/enforcer/HolographERC721.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\nimport \"../abstract/Owner.sol\";\n\nimport \"../enum/HolographERC721Event.sol\";\nimport \"../enum/InterfaceType.sol\";\n\nimport \"../interface/ERC165.sol\";\nimport \"../interface/ERC721.sol\";\nimport \"../interface/HolographERC721Interface.sol\";\nimport \"../interface/ERC721Metadata.sol\";\nimport \"../interface/ERC721TokenReceiver.sol\";\nimport \"../interface/Holographable.sol\";\nimport \"../interface/HolographedERC721.sol\";\nimport \"../interface/HolographInterface.sol\";\nimport \"../interface/HolographerInterface.sol\";\nimport \"../interface/HolographRegistryInterface.sol\";\nimport \"../interface/InitializableInterface.sol\";\nimport \"../interface/HolographInterfacesInterface.sol\";\nimport \"../interface/HolographRoyaltiesInterface.sol\";\nimport \"../interface/Ownable.sol\";\n\n/**\n * @title Holograph Bridgeable ERC-721 Collection\n * @author Holograph Foundation\n * @notice A smart contract for minting and managing Holograph Bridgeable ERC721 NFTs.\n * @dev The entire logic and functionality of the smart contract is self-contained.\n */\ncontract HolographERC721 is Admin, Owner, HolographERC721Interface, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\n */\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.sourceContract')) - 1)\n */\n bytes32 constant _sourceContractSlot = 0x27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b074;\n\n /**\n * @dev Configuration for events to trigger for source smart contract.\n */\n uint256 private _eventConfig;\n\n /**\n * @dev Collection name.\n */\n string private _name;\n\n /**\n * @dev Collection symbol.\n */\n string private _symbol;\n\n /**\n * @dev Collection royalty base points.\n */\n uint16 private _bps;\n\n /**\n * @dev Array of all token ids in collection.\n */\n uint256[] private _allTokens;\n\n /**\n * @dev Map of token id to array index of _ownedTokens.\n */\n mapping(uint256 => uint256) private _ownedTokensIndex;\n\n /**\n * @dev Token id to wallet (owner) address map.\n */\n mapping(uint256 => address) private _tokenOwner;\n\n /**\n * @dev 1-to-1 map of token id that was assigned an approved operator address.\n */\n mapping(uint256 => address) private _tokenApprovals;\n\n /**\n * @dev Map of total tokens owner by a specific address.\n */\n mapping(address => uint256) private _ownedTokensCount;\n\n /**\n * @dev Map of array of token ids owned by a specific address.\n */\n mapping(address => uint256[]) private _ownedTokens;\n\n /**\n * @notice Map of full operator approval for a particular address.\n * @dev Usually utilised for supporting marketplace proxy wallets.\n */\n mapping(address => mapping(address => bool)) private _operatorApprovals;\n\n /**\n * @dev Mapping from token id to position in the allTokens array.\n */\n mapping(uint256 => uint256) private _allTokensIndex;\n\n /**\n * @dev Mapping of all token ids that have been burned. This is to prevent re-minting of same token ids.\n */\n mapping(uint256 => bool) private _burnedTokens;\n\n /**\n * @notice Only allow calls from bridge smart contract.\n */\n modifier onlyBridge() {\n require(msg.sender == _holograph().getBridge(), \"ERC721: bridge only call\");\n _;\n }\n\n /**\n * @notice Only allow calls from source smart contract.\n */\n modifier onlySource() {\n address sourceContract;\n assembly {\n sourceContract := sload(_sourceContractSlot)\n }\n require(msg.sender == sourceContract, \"ERC721: source only call\");\n _;\n }\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"ERC721: already initialized\");\n InitializableInterface sourceContract;\n assembly {\n sstore(_ownerSlot, caller())\n sourceContract := sload(_sourceContractSlot)\n }\n (\n string memory contractName,\n string memory contractSymbol,\n uint16 contractBps,\n uint256 eventConfig,\n bool skipInit,\n bytes memory initCode\n ) = abi.decode(initPayload, (string, string, uint16, uint256, bool, bytes));\n _name = contractName;\n _symbol = contractSymbol;\n _bps = contractBps;\n _eventConfig = eventConfig;\n if (!skipInit) {\n require(sourceContract.init(initCode) == InitializableInterface.init.selector, \"ERC721: could not init source\");\n (bool success, bytes memory returnData) = _royalties().delegatecall(\n abi.encodeWithSelector(\n HolographRoyaltiesInterface.initHolographRoyalties.selector,\n abi.encode(uint256(contractBps), uint256(0))\n )\n );\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == InitializableInterface.init.selector, \"ERC721: could not init royalties\");\n }\n\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @notice Gets a base64 encoded contract JSON file.\n * @return string The URI.\n */\n function contractURI() external view returns (string memory) {\n if (_isEventRegistered(HolographERC721Event.customContractURI)) {\n assembly {\n calldatacopy(0, 0, calldatasize())\n mstore(calldatasize(), caller())\n let result := staticcall(gas(), sload(_sourceContractSlot), 0, add(calldatasize(), 0x20), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n return HolographInterfacesInterface(_interfaces()).contractURI(_name, \"\", \"\", _bps, address(this));\n }\n\n /**\n * @notice Gets the name of the collection.\n * @return string The collection name.\n */\n function name() external view returns (string memory) {\n return _name;\n }\n\n /**\n * @notice Shows the interfaces the contracts support\n * @dev Must add new 4 byte interface Ids here to acknowledge support\n * @param interfaceId ERC165 style 4 byte interfaceId.\n * @return bool True if supported.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool) {\n HolographInterfacesInterface interfaces = HolographInterfacesInterface(_interfaces());\n ERC165 erc165Contract;\n assembly {\n erc165Contract := sload(_sourceContractSlot)\n }\n if (\n interfaces.supportsInterface(InterfaceType.ERC721, interfaceId) || // check global interfaces\n interfaces.supportsInterface(InterfaceType.ROYALTIES, interfaceId) || // check if royalties supports interface\n erc165Contract.supportsInterface(interfaceId) // check if source supports interface\n ) {\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * @notice Gets the collection's symbol.\n * @return string The symbol.\n */\n function symbol() external view returns (string memory) {\n return _symbol;\n }\n\n /**\n * @notice Get's the URI of the token.\n * @dev Defaults the the Arweave URI\n * @return string The URI.\n */\n function tokenURI(uint256 tokenId) external view returns (string memory) {\n assembly {\n calldatacopy(0, 0, calldatasize())\n mstore(calldatasize(), caller())\n let result := staticcall(gas(), sload(_sourceContractSlot), 0, add(calldatasize(), 0x20), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @notice Get list of tokens owned by wallet.\n * @param wallet The wallet address to get tokens for.\n * @return uint256[] Returns an array of token ids owned by wallet.\n */\n function tokensOfOwner(address wallet) external view returns (uint256[] memory) {\n return _ownedTokens[wallet];\n }\n\n /**\n * @notice Get set length list, starting from index, for tokens owned by wallet.\n * @param wallet The wallet address to get tokens for.\n * @param index The index to start enumeration from.\n * @param length The length of returned results.\n * @return tokenIds uint256[] Returns a set length array of token ids owned by wallet.\n */\n function tokensOfOwner(\n address wallet,\n uint256 index,\n uint256 length\n ) external view returns (uint256[] memory tokenIds) {\n uint256 supply = _ownedTokensCount[wallet];\n if (index + length > supply) {\n length = supply - index;\n }\n tokenIds = new uint256[](length);\n for (uint256 i = 0; i < length; i++) {\n tokenIds[i] = _ownedTokens[wallet][index + i];\n }\n }\n\n /**\n * @notice Adds a new address to the token's approval list.\n * @dev Requires the sender to be in the approved addresses.\n * @param to The address to approve.\n * @param tokenId The affected token.\n */\n function approve(address to, uint256 tokenId) external payable {\n address tokenOwner = _tokenOwner[tokenId];\n require(to != tokenOwner, \"ERC721: cannot approve self\");\n require(_isApprovedStrict(msg.sender, tokenId), \"ERC721: not approved sender\");\n if (_isEventRegistered(HolographERC721Event.beforeApprove)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC721.beforeApprove.selector, tokenOwner, to, tokenId)));\n }\n _tokenApprovals[tokenId] = to;\n emit Approval(tokenOwner, to, tokenId);\n if (_isEventRegistered(HolographERC721Event.afterApprove)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC721.afterApprove.selector, tokenOwner, to, tokenId)));\n }\n }\n\n /**\n * @notice Burns the token.\n * @dev The sender must be the owner or approved.\n * @param tokenId The token to burn.\n */\n function burn(uint256 tokenId) external {\n require(_isApproved(msg.sender, tokenId), \"ERC721: not approved sender\");\n address wallet = _tokenOwner[tokenId];\n if (_isEventRegistered(HolographERC721Event.beforeBurn)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC721.beforeBurn.selector, wallet, tokenId)));\n }\n _burn(wallet, tokenId);\n if (_isEventRegistered(HolographERC721Event.afterBurn)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC721.afterBurn.selector, wallet, tokenId)));\n }\n }\n\n function bridgeIn(uint32 fromChain, bytes calldata payload) external onlyBridge returns (bytes4) {\n (address from, address to, uint256 tokenId, bytes memory data) = abi.decode(\n payload,\n (address, address, uint256, bytes)\n );\n require(!_exists(tokenId), \"ERC721: token already exists\");\n delete _burnedTokens[tokenId];\n _mint(to, tokenId);\n if (_isEventRegistered(HolographERC721Event.bridgeIn)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC721.bridgeIn.selector, fromChain, from, to, tokenId, data)),\n \"HOLOGRAPH: bridge in failed\"\n );\n }\n return Holographable.bridgeIn.selector;\n }\n\n function bridgeOut(\n uint32 toChain,\n address sender,\n bytes calldata payload\n ) external onlyBridge returns (bytes4 selector, bytes memory data) {\n (address from, address to, uint256 tokenId) = abi.decode(payload, (address, address, uint256));\n require(to != address(0), \"ERC721: zero address\");\n require(_isApproved(sender, tokenId), \"ERC721: sender not approved\");\n require(from == _tokenOwner[tokenId], \"ERC721: from is not owner\");\n if (_isEventRegistered(HolographERC721Event.bridgeOut)) {\n /*\n * @dev making a bridgeOut call to source contract\n * assembly is used so that msg.sender can be injected in the calldata\n */\n bytes memory sourcePayload = abi.encodeWithSelector(\n HolographedERC721.bridgeOut.selector,\n toChain,\n from,\n to,\n tokenId\n );\n assembly {\n // it is important to add 32 bytes in order to accommodate the first 32 bytes being used for storing length of bytes\n mstore(add(sourcePayload, add(mload(sourcePayload), 0x20)), caller())\n let result := call(\n gas(),\n sload(_sourceContractSlot),\n callvalue(),\n // start reading data from memory position, plus 32 bytes, to skip bytes length indicator\n add(sourcePayload, 0x20),\n // add an additional 32 bytes to bytes length to include the appended caller address\n add(mload(sourcePayload), 0x20),\n 0,\n 0\n )\n // when reading back data, skip the first 32 bytes which is used to indicate bytes position in calldata\n // also subtract 32 bytes from returndatasize to accomodate the skipped first 32 bytes\n returndatacopy(data, 0x20, sub(returndatasize(), 0x20))\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n }\n }\n _burn(from, tokenId);\n return (Holographable.bridgeOut.selector, abi.encode(from, to, tokenId, data));\n }\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n * @param from cannot be the zero address.\n * @param to cannot be the zero address.\n * @param tokenId token must exist and be owned by `from`.\n */\n function safeTransferFrom(address from, address to, uint256 tokenId) external payable {\n safeTransferFrom(from, to, tokenId, \"\");\n }\n\n /**\n * @notice Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n * @dev Since it's not being used, the _data variable is commented out to avoid compiler warnings.\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n * @param from cannot be the zero address.\n * @param to cannot be the zero address.\n * @param tokenId token must exist and be owned by `from`.\n */\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public payable {\n require(_isApproved(msg.sender, tokenId), \"ERC721: not approved sender\");\n if (_isEventRegistered(HolographERC721Event.beforeSafeTransfer)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC721.beforeSafeTransfer.selector, from, to, tokenId, data))\n );\n }\n _transferFrom(from, to, tokenId);\n if (_isContract(to)) {\n require(\n ERC721TokenReceiver(to).onERC721Received(msg.sender, from, tokenId, data) ==\n ERC721TokenReceiver.onERC721Received.selector,\n \"ERC721: onERC721Received fail\"\n );\n }\n if (_isEventRegistered(HolographERC721Event.afterSafeTransfer)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC721.afterSafeTransfer.selector, from, to, tokenId, data))\n );\n }\n }\n\n /**\n * @notice Adds a new approved operator.\n * @dev Allows platforms to sell/transfer all your NFTs. Used with proxy contracts like OpenSea/Rarible.\n * @param to The address to approve.\n * @param approved Turn on or off approval status.\n */\n function setApprovalForAll(address to, bool approved) external {\n require(to != msg.sender, \"ERC721: cannot approve self\");\n if (_isEventRegistered(HolographERC721Event.beforeApprovalAll)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC721.beforeApprovalAll.selector, msg.sender, to, approved))\n );\n }\n _operatorApprovals[msg.sender][to] = approved;\n emit ApprovalForAll(msg.sender, to, approved);\n if (_isEventRegistered(HolographERC721Event.afterApprovalAll)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedERC721.afterApprovalAll.selector, msg.sender, to, approved))\n );\n }\n }\n\n /**\n * @dev Allows for source smart contract to burn a token.\n * Note: this is put in place to make sure that custom logic could be implemented for merging, gamification, etc.\n * Note: token cannot be burned if it's locked by bridge.\n */\n function sourceBurn(uint256 tokenId) external onlySource {\n address wallet = _tokenOwner[tokenId];\n _burn(wallet, tokenId);\n }\n\n /**\n * @dev Allows for source smart contract to mint a token.\n */\n function sourceMint(address to, uint224 tokenId) external onlySource {\n // uint32 is reserved for chain id to be used\n // we need to get current chain id, and prepend it to tokenId\n // this will prevent possible tokenId overlap if minting simultaneously on multiple chains is possible\n uint256 token = uint256(bytes32(abi.encodePacked(_chain(), tokenId)));\n require(!_burnedTokens[token], \"ERC721: can't mint burned token\");\n _mint(to, token);\n }\n\n /**\n * @dev Allows source to get the prepend for their tokenIds.\n */\n function sourceGetChainPrepend() external view onlySource returns (uint256) {\n return uint256(bytes32(abi.encodePacked(_chain(), uint224(0))));\n }\n\n /**\n * @dev Allows for source smart contract to mint a batch of tokens.\n */\n function sourceMintBatch(address to, uint224[] calldata tokenIds) external onlySource {\n require(tokenIds.length < 1000, \"ERC721: max batch size is 1000\");\n uint32 chain = _chain();\n uint256 token;\n for (uint256 i = 0; i < tokenIds.length; i++) {\n require(!_burnedTokens[token], \"ERC721: can't mint burned token\");\n token = uint256(bytes32(abi.encodePacked(chain, tokenIds[i])));\n require(!_burnedTokens[token], \"ERC721: can't mint burned token\");\n _mint(to, token);\n }\n }\n\n /**\n * @dev Allows for source smart contract to mint a batch of tokens.\n */\n function sourceMintBatch(address[] calldata wallets, uint224[] calldata tokenIds) external onlySource {\n require(wallets.length == tokenIds.length, \"ERC721: array length missmatch\");\n require(tokenIds.length < 1000, \"ERC721: max batch size is 1000\");\n uint32 chain = _chain();\n uint256 token;\n for (uint256 i = 0; i < tokenIds.length; i++) {\n token = uint256(bytes32(abi.encodePacked(chain, tokenIds[i])));\n require(!_burnedTokens[token], \"ERC721: can't mint burned token\");\n _mint(wallets[i], token);\n }\n }\n\n /**\n * @dev Allows for source smart contract to mint a batch of tokens.\n */\n function sourceMintBatchIncremental(address to, uint224 startingTokenId, uint256 length) external onlySource {\n uint256 token = uint256(bytes32(abi.encodePacked(_chain(), startingTokenId)));\n for (uint256 i = 0; i < length; i++) {\n require(!_burnedTokens[token], \"ERC721: can't mint burned token\");\n _mint(to, token);\n token++;\n }\n }\n\n /**\n * @dev Allows for source smart contract to transfer a token.\n * Note: this is put in place to make sure that custom logic could be implemented for merging, gamification, etc.\n * Note: token cannot be transfered if it's locked by bridge.\n */\n function sourceTransfer(address to, uint256 tokenId) external onlySource {\n require(!_burnedTokens[tokenId], \"ERC721: token has been burned\");\n address wallet = _tokenOwner[tokenId];\n _transferFrom(wallet, to, tokenId);\n }\n\n /**\n * @dev Allows for source smart contract to make calls to external contracts\n */\n function sourceExternalCall(address target, bytes calldata data) external onlySource {\n assembly {\n calldatacopy(0, data.offset, data.length)\n let result := call(gas(), target, callvalue(), 0, data.length, 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @notice Transfers `tokenId` token from `msg.sender` to `to`.\n * @dev WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\n * @param to cannot be the zero address.\n * @param tokenId token must be owned by `from`.\n */\n function transfer(address to, uint256 tokenId) external payable {\n transferFrom(msg.sender, to, tokenId, \"\");\n }\n\n /**\n * @notice Transfers `tokenId` token from `from` to `to`.\n * @dev WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\n * @param from cannot be the zero address.\n * @param to cannot be the zero address.\n * @param tokenId token must be owned by `from`.\n */\n function transferFrom(address from, address to, uint256 tokenId) public payable {\n transferFrom(from, to, tokenId, \"\");\n }\n\n /**\n * @notice Transfers `tokenId` token from `from` to `to`.\n * @dev WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\n * @dev Since it's not being used, the _data variable is commented out to avoid compiler warnings.\n * @param from cannot be the zero address.\n * @param to cannot be the zero address.\n * @param tokenId token must be owned by `from`.\n * @param data additional data to pass.\n */\n function transferFrom(address from, address to, uint256 tokenId, bytes memory data) public payable {\n require(_isApproved(msg.sender, tokenId), \"ERC721: not approved sender\");\n if (_isEventRegistered(HolographERC721Event.beforeTransfer)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC721.beforeTransfer.selector, from, to, tokenId, data)));\n }\n _transferFrom(from, to, tokenId);\n if (_isEventRegistered(HolographERC721Event.afterTransfer)) {\n require(_sourceCall(abi.encodeWithSelector(HolographedERC721.afterTransfer.selector, from, to, tokenId, data)));\n }\n }\n\n /**\n * @notice Get total number of tokens owned by wallet.\n * @dev Used to see total amount of tokens owned by a specific wallet.\n * @param wallet Address for which to get token balance.\n * @return uint256 Returns an integer, representing total amount of tokens held by address.\n */\n function balanceOf(address wallet) public view returns (uint256) {\n return _ownedTokensCount[wallet];\n }\n\n function burned(uint256 tokenId) public view returns (bool) {\n return _burnedTokens[tokenId];\n }\n\n /**\n * @notice Decimal places to have for totalSupply.\n * @dev Since ERC721s are single, we use 0 as the decimal places to make sure a round number for totalSupply.\n * @return uint256 Returns the number of decimal places to have for totalSupply.\n */\n function decimals() external pure returns (uint256) {\n return 0;\n }\n\n function exists(uint256 tokenId) public view returns (bool) {\n return _tokenOwner[tokenId] != address(0);\n }\n\n /**\n * @notice Gets the approved address for the token.\n * @dev Single operator set for a specific token. Usually used for one-time very specific authorisations.\n * @param tokenId Token id to get approved operator for.\n * @return address Approved address for token.\n */\n function getApproved(uint256 tokenId) external view returns (address) {\n return _tokenApprovals[tokenId];\n }\n\n /**\n * @notice Checks if the address is approved.\n * @dev Includes references to OpenSea and Rarible marketplace proxies.\n * @param wallet Address of the wallet.\n * @param operator Address of the marketplace operator.\n * @return bool True if approved.\n */\n function isApprovedForAll(address wallet, address operator) external view returns (bool) {\n return (_operatorApprovals[wallet][operator] || _sourceApproved(wallet, operator));\n }\n\n /**\n * @notice Checks who the owner of a token is.\n * @dev The token must exist.\n * @param tokenId The token to look up.\n * @return address Owner of the token.\n */\n function ownerOf(uint256 tokenId) external view returns (address) {\n address tokenOwner = _tokenOwner[tokenId];\n require(tokenOwner != address(0), \"ERC721: token does not exist\");\n return tokenOwner;\n }\n\n /**\n * @notice Get token by index.\n * @dev Used in conjunction with totalSupply function to iterate over all tokens in collection.\n * @param index Index of token in array.\n * @return uint256 Returns the token id of token located at that index.\n */\n function tokenByIndex(uint256 index) external view returns (uint256) {\n require(index < _allTokens.length, \"ERC721: index out of bounds\");\n return _allTokens[index];\n }\n\n /**\n * @notice Get set length list, starting from index, for all tokens.\n * @param index The index to start enumeration from.\n * @param length The length of returned results.\n * @return tokenIds uint256[] Returns a set length array of token ids minted.\n */\n function tokens(uint256 index, uint256 length) external view returns (uint256[] memory tokenIds) {\n uint256 supply = _allTokens.length;\n if (index + length > supply) {\n length = supply - index;\n }\n tokenIds = new uint256[](length);\n for (uint256 i = 0; i < length; i++) {\n tokenIds[i] = _allTokens[index + i];\n }\n }\n\n /**\n * @notice Get token from wallet by index instead of token id.\n * @dev Helpful for wallet token enumeration where token id info is not yet available. Use in conjunction with balanceOf function.\n * @param wallet Specific address for which to get token for.\n * @param index Index of token in array.\n * @return uint256 Returns the token id of token located at that index in specified wallet.\n */\n function tokenOfOwnerByIndex(address wallet, uint256 index) external view returns (uint256) {\n require(index < balanceOf(wallet), \"ERC721: index out of bounds\");\n return _ownedTokens[wallet][index];\n }\n\n /**\n * @notice Total amount of tokens in the collection.\n * @dev Ignores burned tokens.\n * @return uint256 Returns the total number of active (not burned) tokens.\n */\n function totalSupply() external view returns (uint256) {\n return _allTokens.length;\n }\n\n /**\n * @notice Empty function that is triggered by external contract on NFT transfer.\n * @dev We have this blank function in place to make sure that external contract sending in NFTs don't error out.\n * @dev Since it's not being used, the _operator variable is commented out to avoid compiler warnings.\n * @dev Since it's not being used, the _from variable is commented out to avoid compiler warnings.\n * @dev Since it's not being used, the _tokenId variable is commented out to avoid compiler warnings.\n * @dev Since it's not being used, the _data variable is commented out to avoid compiler warnings.\n * @return bytes4 Returns the interfaceId of onERC721Received.\n */\n function onERC721Received(\n address _operator,\n address _from,\n uint256 _tokenId,\n bytes calldata _data\n ) external returns (bytes4) {\n require(_isContract(_operator), \"ERC721: operator not contract\");\n if (_isEventRegistered(HolographERC721Event.beforeOnERC721Received)) {\n require(\n _sourceCall(\n abi.encodeWithSelector(\n HolographedERC721.beforeOnERC721Received.selector,\n _operator,\n _from,\n address(this),\n _tokenId,\n _data\n )\n )\n );\n }\n try HolographERC721Interface(_operator).ownerOf(_tokenId) returns (address tokenOwner) {\n require(tokenOwner == address(this), \"ERC721: contract not token owner\");\n } catch {\n revert(\"ERC721: token does not exist\");\n }\n if (_isEventRegistered(HolographERC721Event.afterOnERC721Received)) {\n require(\n _sourceCall(\n abi.encodeWithSelector(\n HolographedERC721.afterOnERC721Received.selector,\n _operator,\n _from,\n address(this),\n _tokenId,\n _data\n )\n )\n );\n }\n return ERC721TokenReceiver.onERC721Received.selector;\n }\n\n /**\n * @dev Add a newly minted token into managed list of tokens.\n * @param to Address of token owner for which to add the token.\n * @param tokenId Id of token to add.\n */\n function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {\n _ownedTokensIndex[tokenId] = _ownedTokensCount[to];\n _ownedTokensCount[to]++;\n _ownedTokens[to].push(tokenId);\n _allTokensIndex[tokenId] = _allTokens.length;\n _allTokens.push(tokenId);\n }\n\n /**\n * @notice Burns the token.\n * @dev All validation needs to be done before calling this function.\n * @param wallet Address of current token owner.\n * @param tokenId The token to burn.\n */\n function _burn(address wallet, uint256 tokenId) private {\n _clearApproval(tokenId);\n _tokenOwner[tokenId] = address(0);\n _registryTransfer(wallet, address(0), tokenId);\n _removeTokenFromOwnerEnumeration(wallet, tokenId);\n _burnedTokens[tokenId] = true;\n }\n\n /**\n * @notice Deletes a token from the approval list.\n * @dev Removes from count.\n * @param tokenId T.\n */\n function _clearApproval(uint256 tokenId) private {\n delete _tokenApprovals[tokenId];\n }\n\n /**\n * @notice Mints an NFT.\n * @dev Can to mint the token to the zero address and the token cannot already exist.\n * @param to Address to mint to.\n * @param tokenId The new token.\n */\n function _mint(address to, uint256 tokenId) private {\n require(tokenId > 0, \"ERC721: token id cannot be zero\");\n require(to != address(0), \"ERC721: minting to burn address\");\n require(!_exists(tokenId), \"ERC721: token already exists\");\n require(!_burnedTokens[tokenId], \"ERC721: token has been burned\");\n _tokenOwner[tokenId] = to;\n _registryTransfer(address(0), to, tokenId);\n _addTokenToOwnerEnumeration(to, tokenId);\n }\n\n function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {\n uint256 lastTokenIndex = _allTokens.length - 1;\n uint256 tokenIndex = _allTokensIndex[tokenId];\n uint256 lastTokenId = _allTokens[lastTokenIndex];\n _allTokens[tokenIndex] = lastTokenId;\n _allTokensIndex[lastTokenId] = tokenIndex;\n delete _allTokensIndex[tokenId];\n delete _allTokens[lastTokenIndex];\n _allTokens.pop();\n }\n\n /**\n * @dev Remove a token from managed list of tokens.\n * @param from Address of token owner for which to remove the token.\n * @param tokenId Id of token to remove.\n */\n function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {\n _removeTokenFromAllTokensEnumeration(tokenId);\n _ownedTokensCount[from]--;\n uint256 lastTokenIndex = _ownedTokensCount[from];\n uint256 tokenIndex = _ownedTokensIndex[tokenId];\n if (tokenIndex != lastTokenIndex) {\n uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];\n _ownedTokens[from][tokenIndex] = lastTokenId;\n _ownedTokensIndex[lastTokenId] = tokenIndex;\n }\n if (lastTokenIndex == 0) {\n delete _ownedTokens[from];\n } else {\n delete _ownedTokens[from][lastTokenIndex];\n _ownedTokens[from].pop();\n }\n }\n\n /**\n * @dev Primary private function that handles the transfer/mint/burn functionality.\n * @param from Address from where token is being transferred. Zero address means it is being minted.\n * @param to Address to whom the token is being transferred. Zero address means it is being burned.\n * @param tokenId Id of token that is being transferred/minted/burned.\n */\n function _transferFrom(address from, address to, uint256 tokenId) private {\n require(_tokenOwner[tokenId] == from, \"ERC721: token not owned\");\n require(to != address(0), \"ERC721: use burn instead\");\n _clearApproval(tokenId);\n _tokenOwner[tokenId] = to;\n _registryTransfer(from, to, tokenId);\n _removeTokenFromOwnerEnumeration(from, tokenId);\n _addTokenToOwnerEnumeration(to, tokenId);\n }\n\n function _chain() private view returns (uint32) {\n uint32 currentChain = HolographInterface(HolographerInterface(payable(address(this))).getHolograph())\n .getHolographChainId();\n if (currentChain != HolographerInterface(payable(address(this))).getOriginChain()) {\n return currentChain;\n }\n return uint32(0);\n }\n\n /**\n * @notice Checks if the token owner exists.\n * @dev If the address is the zero address no owner exists.\n * @param tokenId The affected token.\n * @return bool True if it exists.\n */\n function _exists(uint256 tokenId) private view returns (bool) {\n address tokenOwner = _tokenOwner[tokenId];\n return tokenOwner != address(0);\n }\n\n function _sourceApproved(address _tokenWallet, address _tokenSpender) internal view returns (bool approved) {\n if (_isEventRegistered(HolographERC721Event.onIsApprovedForAll)) {\n HolographedERC721 sourceContract;\n assembly {\n sourceContract := sload(_sourceContractSlot)\n }\n if (sourceContract.onIsApprovedForAll(_tokenWallet, _tokenSpender)) {\n approved = true;\n }\n }\n }\n\n /**\n * @notice Checks if the address is an approved one.\n * @dev Uses inlined checks for different usecases of approval.\n * @param spender Address of the spender.\n * @param tokenId The affected token.\n * @return bool True if approved.\n */\n function _isApproved(address spender, uint256 tokenId) private view returns (bool) {\n require(_exists(tokenId), \"ERC721: token does not exist\");\n address tokenOwner = _tokenOwner[tokenId];\n return (spender == tokenOwner ||\n _tokenApprovals[tokenId] == spender ||\n _operatorApprovals[tokenOwner][spender] ||\n _sourceApproved(tokenOwner, spender));\n }\n\n function _isApprovedStrict(address spender, uint256 tokenId) private view returns (bool) {\n require(_exists(tokenId), \"ERC721: token does not exist\");\n address tokenOwner = _tokenOwner[tokenId];\n return (spender == tokenOwner || _operatorApprovals[tokenOwner][spender] || _sourceApproved(tokenOwner, spender));\n }\n\n function _isContract(address contractAddress) private view returns (bool) {\n bytes32 codehash;\n assembly {\n codehash := extcodehash(contractAddress)\n }\n return (codehash != 0x0 && codehash != 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470);\n }\n\n /**\n * @dev Get the interfaces contract address.\n */\n function _interfaces() private view returns (address) {\n return _holograph().getInterfaces();\n }\n\n function owner() public view override returns (address) {\n assembly {\n calldatacopy(0, 0, calldatasize())\n mstore(calldatasize(), caller())\n let result := staticcall(gas(), sload(_sourceContractSlot), 0, add(calldatasize(), 0x20), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n function _holograph() private view returns (HolographInterface holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n /**\n * @dev Get the bridge contract address.\n */\n function _royalties() private view returns (address) {\n return\n HolographRegistryInterface(_holograph().getRegistry()).getContractTypeAddress(\n // \"HolographRoyalties\" front zero padded to be 32 bytes\n 0x0000000000000000000000000000486f6c6f6772617068526f79616c74696573\n );\n }\n\n function _registryTransfer(address _from, address _to, uint256 _tokenId) private {\n emit Transfer(_from, _to, _tokenId);\n HolographRegistryInterface(_holograph().getRegistry()).holographableEvent(\n abi.encode(\n // keccak256(\"TransferERC721(address,address,uint256)\")\n bytes32(0x351b8d13789e4d8d2717631559251955685881a31494dd0b8b19b4ef8530bb6d),\n _from,\n _to,\n _tokenId\n )\n );\n }\n\n /**\n * @dev Purposefully left empty, to prevent running out of gas errors when receiving native token payments.\n */\n event FundsReceived(address indexed source, uint256 amount);\n\n receive() external payable {\n emit FundsReceived(msg.sender, msg.value);\n }\n\n /**\n * @notice Fallback to the source contract.\n * @dev Any function call that is not covered here, will automatically be sent over to the source contract.\n */\n fallback() external payable {\n // Check if royalties support the function, send there, otherwise revert to source\n address _target;\n if (HolographInterfacesInterface(_interfaces()).supportsInterface(InterfaceType.ROYALTIES, msg.sig)) {\n _target = _royalties();\n assembly {\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), _target, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n } else {\n assembly {\n calldatacopy(0, 0, calldatasize())\n mstore(calldatasize(), caller())\n let result := call(gas(), sload(_sourceContractSlot), callvalue(), 0, add(calldatasize(), 0x20), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n }\n\n /*\n * @dev all calls to source contract go through this function in order to inject original msg.sender in calldata\n */\n function _sourceCall(bytes memory payload) private returns (bool output) {\n assembly {\n mstore(add(payload, add(mload(payload), 0x20)), caller())\n // offset memory position by 32 bytes to skip the 32 bytes where bytes length is stored\n // add 32 bytes to bytes length to include the appended msg.sender to calldata\n let result := call(\n gas(),\n sload(_sourceContractSlot),\n callvalue(),\n add(payload, 0x20),\n add(mload(payload), 0x20),\n 0,\n 0\n )\n let pos := mload(0x40)\n // reserve memory space for return data\n mstore(0x40, add(pos, returndatasize()))\n returndatacopy(pos, 0, returndatasize())\n switch result\n case 0 {\n revert(pos, returndatasize())\n }\n output := mload(pos)\n }\n }\n\n function _isEventRegistered(HolographERC721Event _eventName) private view returns (bool) {\n return ((_eventConfig >> uint256(_eventName)) & uint256(1) == 1 ? true : false);\n }\n}\n" + }, + "contracts/enforcer/HolographGeneric.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\nimport \"../abstract/Owner.sol\";\n\nimport \"../enum/HolographGenericEvent.sol\";\nimport \"../enum/InterfaceType.sol\";\n\nimport \"../interface/HolographGenericInterface.sol\";\nimport \"../interface/ERC165.sol\";\nimport \"../interface/Holographable.sol\";\nimport \"../interface/HolographedGeneric.sol\";\nimport \"../interface/HolographInterface.sol\";\nimport \"../interface/InitializableInterface.sol\";\nimport \"../interface/HolographInterfacesInterface.sol\";\nimport \"../interface/Ownable.sol\";\n\n/**\n * @title Holograph Bridgeable Generic Contract\n * @author Holograph Foundation\n * @notice A smart contract for creating custom bridgeable logic.\n * @dev The entire logic and functionality of the smart contract is self-contained.\n */\ncontract HolographGeneric is Admin, Owner, Initializable, HolographGenericInterface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\n */\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.sourceContract')) - 1)\n */\n bytes32 constant _sourceContractSlot = 0x27d542086d1e831d40b749e7f5509a626c3047a36d160781c40d5acc83e5b074;\n\n /**\n * @dev Configuration for events to trigger for source smart contract.\n */\n uint256 private _eventConfig;\n\n /**\n * @notice Only allow calls from bridge smart contract.\n */\n modifier onlyBridge() {\n require(msg.sender == _holograph().getBridge(), \"GENERIC: bridge only call\");\n _;\n }\n\n /**\n * @notice Only allow calls from source smart contract.\n */\n modifier onlySource() {\n address sourceContract;\n assembly {\n sourceContract := sload(_sourceContractSlot)\n }\n require(msg.sender == sourceContract, \"GENERIC: source only call\");\n _;\n }\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"GENERIC: already initialized\");\n InitializableInterface sourceContract;\n assembly {\n sstore(_ownerSlot, caller())\n sourceContract := sload(_sourceContractSlot)\n }\n (uint256 eventConfig, bool skipInit, bytes memory initCode) = abi.decode(initPayload, (uint256, bool, bytes));\n _eventConfig = eventConfig;\n if (!skipInit) {\n require(sourceContract.init(initCode) == InitializableInterface.init.selector, \"GENERIC: could not init source\");\n }\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @dev Allows for source smart contract to withdraw contract balance.\n */\n function sourceTransfer(address payable destination, uint256 amount) external onlySource {\n destination.transfer(amount);\n }\n\n /**\n * @dev Allows for source smart contract to make calls to external contracts\n */\n function sourceExternalCall(address target, bytes calldata data) external onlySource {\n assembly {\n calldatacopy(0, data.offset, data.length)\n let result := call(gas(), target, callvalue(), 0, data.length, 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @dev Purposefully left empty, to prevent running out of gas errors when receiving native token payments.\n */\n receive() external payable {}\n\n /**\n * @notice Fallback to the source contract.\n * @dev Any function call that is not covered here, will automatically be sent over to the source contract.\n */\n fallback() external payable {\n assembly {\n calldatacopy(0, 0, calldatasize())\n mstore(calldatasize(), caller())\n let result := call(gas(), sload(_sourceContractSlot), callvalue(), 0, add(calldatasize(), 0x20), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n function _sourceCall(bytes memory payload) private returns (bool output) {\n assembly {\n let pos := mload(0x40)\n mstore(0x40, add(pos, 0x20))\n mstore(add(payload, add(mload(payload), 0x20)), caller())\n // offset memory position by 32 bytes to skip the 32 bytes where bytes length is stored\n // add 32 bytes to bytes length to include the appended msg.sender to calldata\n let result := call(\n gas(),\n sload(_sourceContractSlot),\n callvalue(),\n add(payload, 0x20),\n add(mload(payload), 0x20),\n 0,\n 0\n )\n returndatacopy(pos, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n output := mload(pos)\n }\n }\n\n /**\n * @dev Although EIP-165 is not required for ERC20 contracts, we still decided to implement it.\n *\n * This makes it easier for external smart contracts to easily identify a valid ERC20 token contract.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool) {\n HolographInterfacesInterface interfaces = HolographInterfacesInterface(_interfaces());\n ERC165 erc165Contract;\n assembly {\n erc165Contract := sload(_sourceContractSlot)\n }\n if (\n interfaces.supportsInterface(InterfaceType.GENERIC, interfaceId) || erc165Contract.supportsInterface(interfaceId) // check global interfaces // check if source supports interface\n ) {\n return true;\n } else {\n return false;\n }\n }\n\n function bridgeIn(uint32 fromChain, bytes calldata payload) external onlyBridge returns (bytes4) {\n if (_isEventRegistered(HolographGenericEvent.bridgeIn)) {\n require(\n _sourceCall(abi.encodeWithSelector(HolographedGeneric.bridgeIn.selector, fromChain, payload)),\n \"HOLOGRAPH: bridge in failed\"\n );\n }\n return Holographable.bridgeIn.selector;\n }\n\n function bridgeOut(\n uint32 toChain,\n address sender,\n bytes calldata payload\n ) external onlyBridge returns (bytes4 selector, bytes memory data) {\n if (_isEventRegistered(HolographGenericEvent.bridgeOut)) {\n bytes memory sourcePayload = abi.encodeWithSelector(\n HolographedGeneric.bridgeOut.selector,\n toChain,\n sender,\n payload\n );\n assembly {\n // it is important to add 32 bytes in order to accommodate the first 32 bytes being used for storing length of bytes\n mstore(add(sourcePayload, add(mload(sourcePayload), 0x20)), caller())\n let result := call(\n gas(),\n sload(_sourceContractSlot),\n callvalue(),\n // start reading data from memory position, plus 32 bytes, to skip bytes length indicator\n add(sourcePayload, 0x20),\n // add an additional 32 bytes to bytes length to include the appended caller address\n add(mload(sourcePayload), 0x20),\n 0,\n 0\n )\n // when reading back data, skip the first 32 bytes which is used to indicate bytes position in calldata\n // also subtract 32 bytes from returndatasize to accomodate the skipped first 32 bytes\n returndatacopy(data, 0x20, sub(returndatasize(), 0x20))\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n }\n }\n return (Holographable.bridgeOut.selector, data);\n }\n\n /**\n * @dev Allows for source smart contract to emit events.\n */\n function sourceEmit(bytes calldata eventData) external onlySource {\n assembly {\n calldatacopy(0, eventData.offset, eventData.length)\n log0(0, eventData.length)\n }\n }\n\n function sourceEmit(bytes32 eventId, bytes calldata eventData) external onlySource {\n assembly {\n calldatacopy(0, eventData.offset, eventData.length)\n log1(0, eventData.length, eventId)\n }\n }\n\n function sourceEmit(bytes32 eventId, bytes32 topic1, bytes calldata eventData) external onlySource {\n assembly {\n calldatacopy(0, eventData.offset, eventData.length)\n log2(0, eventData.length, eventId, topic1)\n }\n }\n\n function sourceEmit(bytes32 eventId, bytes32 topic1, bytes32 topic2, bytes calldata eventData) external onlySource {\n assembly {\n calldatacopy(0, eventData.offset, eventData.length)\n log3(0, eventData.length, eventId, topic1, topic2)\n }\n }\n\n function sourceEmit(\n bytes32 eventId,\n bytes32 topic1,\n bytes32 topic2,\n bytes32 topic3,\n bytes calldata eventData\n ) external onlySource {\n assembly {\n calldatacopy(0, eventData.offset, eventData.length)\n log4(0, eventData.length, eventId, topic1, topic2, topic3)\n }\n }\n\n /**\n * @dev Get the source smart contract as bridgeable interface.\n */\n function SourceGeneric() private view returns (HolographedGeneric sourceContract) {\n assembly {\n sourceContract := sload(_sourceContractSlot)\n }\n }\n\n /**\n * @dev Get the interfaces contract address.\n */\n function _interfaces() private view returns (address) {\n return _holograph().getInterfaces();\n }\n\n function owner() public view override returns (address) {\n Ownable ownableContract;\n assembly {\n ownableContract := sload(_sourceContractSlot)\n }\n return ownableContract.owner();\n }\n\n function _holograph() private view returns (HolographInterface holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n function _isEventRegistered(HolographGenericEvent _eventName) private view returns (bool) {\n return ((_eventConfig >> uint256(_eventName)) & uint256(1) == 1 ? true : false);\n }\n}\n" + }, + "contracts/enforcer/HolographRoyalties.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\nimport \"../abstract/Owner.sol\";\n\nimport \"../interface/ERC20.sol\";\nimport \"../interface/HolographerInterface.sol\";\nimport \"../interface/InitializableInterface.sol\";\nimport \"../interface/HolographRoyaltiesInterface.sol\";\n\nimport \"../struct/ZoraBidShares.sol\";\n\n/**\n * @title HolographRoyalties\n * @author Holograph Foundation\n * @notice A smart contract for providing royalty info, collecting royalties, and distributing it to configured payout wallets.\n * @dev This smart contract is not intended to be used directly. Apply it to any of your ERC721 or ERC1155 smart contracts through a delegatecall fallback.\n */\ncontract HolographRoyalties is Admin, Owner, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.ROYALTIES.defaultBp')) - 1)\n */\n bytes32 constant _defaultBpSlot = 0xff29fcf645501423fd56e0287670f6813a1e5db5cf706428bc8516381e7ffe81;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.ROYALTIES.defaultReceiver')) - 1)\n */\n bytes32 constant _defaultReceiverSlot = 0x00b381815b89a20a37ee91e8a0119be5e16f6d1668377e7ae457213a74a415bb;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.ROYALTIES.initialized')) - 1)\n */\n bytes32 constant _initializedPaidSlot = 0x91428d26cb4818e4e627ebb64c06b5a67b82f313516b5c903cf07a00681c95f6;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.ROYALTIES.payout.addresses')) - 1)\n */\n bytes32 constant _payoutAddressesSlot = 0xf31f2a3a453a7aa2f3054423a8c5474ac9817ea457b458152967bbcb12ed6a43;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.ROYALTIES.payout.bps')) - 1)\n */\n bytes32 constant _payoutBpsSlot = 0xa4023567d5b5f01c63e00d90785d7cd4ff057a237ad185c5ecade8f4059fb61a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.ROYALTIES.extendedCall')) - 1)\n * @dev extendedCall is an init config used to determine if payouts should be sent via a call or a transfer.\n */\n bytes32 constant _extendedCallSlot = 0x254926eafdecb56f669f96a3a752fbca17becd902481431df613768b1f903fa3;\n\n string constant _bpString = \"eip1967.Holograph.ROYALTIES.bp\";\n string constant _receiverString = \"eip1967.Holograph.ROYALTIES.receiver\";\n string constant _tokenAddressString = \"eip1967.Holograph.ROYALTIES.tokenAddress\";\n\n /**\n * @notice Event emitted when setting/updating royalty info/fees. This is used by Rarible V1.\n * @dev Emits event in order to comply with Rarible V1 royalty spec.\n * @param tokenId Specific token id for which royalty info is being set, set as 0 for all tokens inside of the smart contract.\n * @param recipients Address array of wallets that will receive tha royalties.\n * @param bps Uint256 array of base points(percentages) that each wallet(specified in recipients) will receive from the royalty payouts.\n * Make sure that all the base points add up to a total of 10000.\n */\n event SecondarySaleFees(uint256 tokenId, address[] recipients, uint256[] bps);\n\n /**\n * @dev Use this modifier to lock public functions that should not be accesible to non-owners.\n */\n modifier onlyOwner() override {\n require(isOwner(), \"ROYALTIES: caller not an owner\");\n _;\n }\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"ROYALTIES: already initialized\");\n assembly {\n sstore(_adminSlot, caller())\n sstore(_ownerSlot, caller())\n }\n uint256 bp = abi.decode(initPayload, (uint256));\n setRoyalties(0, payable(address(this)), bp);\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n function initHolographRoyalties(bytes memory initPayload) external returns (bytes4) {\n uint256 initialized;\n assembly {\n initialized := sload(_initializedPaidSlot)\n }\n require(initialized == 0, \"ROYALTIES: already initialized\");\n (uint256 bp, uint256 useExtenededCall) = abi.decode(initPayload, (uint256, uint256));\n if (useExtenededCall > 0) {\n useExtenededCall = 1;\n }\n assembly {\n sstore(_extendedCallSlot, useExtenededCall)\n }\n setRoyalties(0, payable(address(this)), bp);\n address payable[] memory addresses = new address payable[](1);\n addresses[0] = payable(Owner(HolographerInterface(address(this)).getSourceContract()).owner());\n uint256[] memory bps = new uint256[](1);\n bps[0] = 10000;\n _setPayoutAddresses(addresses);\n _setPayoutBps(bps);\n initialized = 1;\n assembly {\n sstore(_initializedPaidSlot, initialized)\n }\n return InitializableInterface.init.selector;\n }\n\n /**\n * @notice Check if message sender is a legitimate owner of the smart contract\n * @dev We check owner, admin, and identity for a more comprehensive coverage.\n * @return Returns true is message sender is an owner.\n */\n function isOwner() private view returns (bool) {\n return (msg.sender == getOwner() ||\n msg.sender == getAdmin() ||\n msg.sender == Owner(HolographerInterface(address(this)).getSourceContract()).owner());\n }\n\n /**\n * @dev This is here in place to prevent reverts in case contract is used outside of the protocol.\n */\n function getSourceContract() external view returns (address sourceContract) {\n sourceContract = address(this);\n }\n\n /**\n * @dev Gets the default royalty payment receiver address from storage slot.\n * @return receiver Wallet or smart contract that will receive the initial royalty payouts.\n */\n function _getDefaultReceiver() private view returns (address payable receiver) {\n assembly {\n receiver := sload(_defaultReceiverSlot)\n }\n }\n\n /**\n * @dev Sets the default royalty payment receiver address to storage slot.\n * @param receiver Wallet or smart contract that will receive the initial royalty payouts.\n */\n function _setDefaultReceiver(address receiver) private {\n assembly {\n sstore(_defaultReceiverSlot, receiver)\n }\n }\n\n /**\n * @dev Gets the default royalty base points(percentage) from storage slot.\n * @return bp Royalty base points(percentage) for royalty payouts.\n */\n function _getDefaultBp() private view returns (uint256 bp) {\n assembly {\n bp := sload(_defaultBpSlot)\n }\n }\n\n /**\n * @dev Sets the default royalty base points(percentage) to storage slot.\n * @param bp Uint256 of royalty percentage, provided in base points format.\n */\n function _setDefaultBp(uint256 bp) private {\n assembly {\n sstore(_defaultBpSlot, bp)\n }\n }\n\n /**\n * @dev Gets the royalty payment receiver address, for a particular token id, from storage slot.\n * @return receiver Wallet or smart contract that will receive the royalty payouts for a particular token id.\n */\n function _getReceiver(uint256 tokenId) private view returns (address payable receiver) {\n bytes32 slot = bytes32(uint256(keccak256(abi.encodePacked(_receiverString, tokenId))) - 1);\n assembly {\n receiver := sload(slot)\n }\n }\n\n /**\n * @dev Sets the royalty payment receiver address, for a particular token id, to storage slot.\n * @param tokenId Uint256 of the token id to set the receiver for.\n * @param receiver Wallet or smart contract that will receive the royalty payouts for a particular token id.\n */\n function _setReceiver(uint256 tokenId, address receiver) private {\n bytes32 slot = bytes32(uint256(keccak256(abi.encodePacked(_receiverString, tokenId))) - 1);\n assembly {\n sstore(slot, receiver)\n }\n }\n\n /**\n * @dev Gets the royalty base points(percentage), for a particular token id, from storage slot.\n * @return bp Royalty base points(percentage) for the royalty payouts of a specific token id.\n */\n function _getBp(uint256 tokenId) private view returns (uint256 bp) {\n bytes32 slot = bytes32(uint256(keccak256(abi.encodePacked(_bpString, tokenId))) - 1);\n assembly {\n bp := sload(slot)\n }\n }\n\n /**\n * @dev Sets the royalty base points(percentage), for a particular token id, to storage slot.\n * @param tokenId Uint256 of the token id to set the base points for.\n * @param bp Uint256 of royalty percentage, provided in base points format, for a particular token id.\n */\n function _setBp(uint256 tokenId, uint256 bp) private {\n bytes32 slot = bytes32(uint256(keccak256(abi.encodePacked(_bpString, tokenId))) - 1);\n assembly {\n sstore(slot, bp)\n }\n }\n\n function _getPayoutAddresses() private view returns (address payable[] memory addresses) {\n // The slot hash has been precomputed for gas optimizaion\n bytes32 slot = _payoutAddressesSlot;\n uint256 length;\n assembly {\n length := sload(slot)\n }\n addresses = new address payable[](length);\n address payable value;\n for (uint256 i = 0; i < length; i++) {\n slot = keccak256(abi.encodePacked(i, slot));\n assembly {\n value := sload(slot)\n }\n addresses[i] = value;\n }\n }\n\n function _setPayoutAddresses(address payable[] memory addresses) private {\n bytes32 slot = _payoutAddressesSlot;\n uint256 length = addresses.length;\n assembly {\n sstore(slot, length)\n }\n address payable value;\n for (uint256 i = 0; i < length; i++) {\n slot = keccak256(abi.encodePacked(i, slot));\n value = addresses[i];\n assembly {\n sstore(slot, value)\n }\n }\n }\n\n function _getPayoutBps() private view returns (uint256[] memory bps) {\n bytes32 slot = _payoutBpsSlot;\n uint256 length;\n assembly {\n length := sload(slot)\n }\n bps = new uint256[](length);\n uint256 value;\n for (uint256 i = 0; i < length; i++) {\n slot = keccak256(abi.encodePacked(i, slot));\n assembly {\n value := sload(slot)\n }\n bps[i] = value;\n }\n }\n\n function _setPayoutBps(uint256[] memory bps) private {\n bytes32 slot = _payoutBpsSlot;\n uint256 length = bps.length;\n assembly {\n sstore(slot, length)\n }\n uint256 value;\n for (uint256 i = 0; i < length; i++) {\n slot = keccak256(abi.encodePacked(i, slot));\n value = bps[i];\n assembly {\n sstore(slot, value)\n }\n }\n }\n\n function _getTokenAddress(string memory tokenName) private view returns (address tokenAddress) {\n bytes32 slot = bytes32(uint256(keccak256(abi.encodePacked(_tokenAddressString, tokenName))) - 1);\n assembly {\n tokenAddress := sload(slot)\n }\n }\n\n function _setTokenAddress(string memory tokenName, address tokenAddress) private {\n bytes32 slot = bytes32(uint256(keccak256(abi.encodePacked(_tokenAddressString, tokenName))) - 1);\n assembly {\n sstore(slot, tokenAddress)\n }\n }\n\n /**\n * @dev Private function that transfers ETH to all payout recipients.\n * @dev This contract is designed primarily to capture royalties, but is limited in payout logic.\n * @dev This function uses a push payment model, where the contract pushes the ETH to the recipients.\n * @dev The design is intended so that royalty distribution logic can be handled externally via payment distribution contracts.\n * @dev The recommended usage for royalty structures that require more complex payout logic to multiple recipients is to\n * set 100% ownership payout with the recipient being the payment distribution contract.\n */\n function _payoutEth() private {\n address payable[] memory addresses = _getPayoutAddresses();\n uint256[] memory bps = _getPayoutBps();\n uint256 length = addresses.length;\n uint256 balance = address(this).balance;\n uint256 sending;\n bool extendedCall;\n assembly {\n extendedCall := sload(_extendedCallSlot)\n }\n for (uint256 i = 0; i < length; i++) {\n sending = ((bps[i] * balance) / 10000);\n // only send value if it is greater than 0\n if (sending > 0) {\n // If the contract enabled extended call on init then use call to transfer, otherwise use transfer\n if (extendedCall == true) {\n (bool success, ) = addresses[i].call{value: sending}(\"\");\n require(success, \"ROYALTIES: Transfer failed\");\n } else {\n addresses[i].transfer(sending);\n }\n }\n }\n }\n\n /**\n * @dev Private function that transfers tokens to all payout recipients.\n * @dev ERC20 tokens that use fee on transfer are not supported.\n * @dev This contract is designed primarily to capture royalties, but is limited in payout logic.\n * @dev This function uses a push payment model, where the contract pushes the ETH to the recipients.\n * @dev The design is intended so that royalty distribution logic can be handled externally via payment distribution contracts.\n * @dev The recommended usage for royalty structures that require more complex payout logic to multiple recipients is to\n * set 100% ownership payout with the recipient being the payment distribution contract.\n *\n * @param tokenAddress Smart contract address of ERC20 token.\n */\n function _payoutToken(address tokenAddress) private {\n address payable[] memory addresses = _getPayoutAddresses();\n uint256[] memory bps = _getPayoutBps();\n uint256 length = addresses.length;\n ERC20 erc20 = ERC20(tokenAddress);\n uint256 balance = erc20.balanceOf(address(this));\n uint256 sending;\n for (uint256 i = 0; i < length; i++) {\n sending = ((bps[i] * balance) / 10000);\n // Some tokens revert when transferring a zero value amount this check ensures if one recipient's\n // amount is zero, the transfer will still succeed for the other recipients.\n if (sending > 0) {\n require(\n _callOptionalReturn(\n tokenAddress,\n erc20.transfer.selector,\n abi.encode(address(addresses[i]), uint256(sending))\n ),\n \"ROYALTIES: ERC20 transfer failed\"\n );\n }\n }\n }\n\n /**\n * @dev Private function that transfers multiple tokens to all payout recipients.\n * @dev Try to use _payoutToken and handle each token individually.\n * @dev ERC20 tokens that use fee on transfer are not supported.\n * @dev This contract is designed primarily to capture royalties, but is limited in payout logic.\n * @dev This function uses a push payment model, where the contract pushes the ETH to the recipients.\n * @dev The design is intended so that royalty distribution logic can be handled externally via payment distribution contracts.\n * @dev The recommended usage for royalty structures that require more complex payout logic to multiple recipients is to\n * set 100% ownership payout with the recipient being the payment distribution contract.\n *\n * @param tokenAddresses Array of smart contract addresses of ERC20 tokens.\n */\n function _payoutTokens(address[] memory tokenAddresses) private {\n address payable[] memory addresses = _getPayoutAddresses();\n uint256[] memory bps = _getPayoutBps();\n ERC20 erc20;\n uint256 balance;\n uint256 sending;\n for (uint256 t = 0; t < tokenAddresses.length; t++) {\n erc20 = ERC20(tokenAddresses[t]);\n balance = erc20.balanceOf(address(this));\n for (uint256 i = 0; i < addresses.length; i++) {\n sending = ((bps[i] * balance) / 10000);\n // Some tokens revert when transferring a zero value amount this check ensures if one recipient's\n // amount is zero, the transfer will still succeed for the other recipients.\n if (sending > 0) {\n require(\n _callOptionalReturn(\n tokenAddresses[t],\n erc20.transfer.selector,\n abi.encode(address(addresses[i]), uint256(sending))\n ),\n \"ROYALTIES: ERC20 transfer failed\"\n );\n }\n }\n }\n }\n\n /**\n * @dev This function validates that the call is being made by an authorised wallet.\n * @dev Will revert entire tranaction if it fails.\n */\n function _validatePayoutRequestor() private view {\n if (!isOwner()) {\n bool matched;\n address payable[] memory addresses = _getPayoutAddresses();\n address payable sender = payable(msg.sender);\n for (uint256 i = 0; i < addresses.length; i++) {\n if (addresses[i] == sender) {\n matched = true;\n break;\n }\n }\n require(matched, \"ROYALTIES: sender not authorized\");\n }\n }\n\n /**\n * @notice Set the wallets and percentages for royalty payouts.\n * Limited to 10 wallets to prevent out of gas errors.\n * For more complex royalty structures, set 100% ownership payout with the recipient being the payment distribution contract.\n * @dev Function can only we called by owner, admin, or identity wallet.\n * @dev Addresses and bps arrays must be equal length. Bps values added together must equal 10000 exactly.\n * @param addresses An array of all the addresses that will be receiving royalty payouts.\n * @param bps An array of the percentages that each address will receive from the royalty payouts.\n */\n function configurePayouts(address payable[] memory addresses, uint256[] memory bps) public onlyOwner {\n require(addresses.length == bps.length, \"ROYALTIES: missmatched lenghts\");\n require(addresses.length <= 10, \"ROYALTIES: max 10 addresses\");\n uint256 totalBp;\n for (uint256 i = 0; i < addresses.length; i++) {\n require(addresses[i] != address(0), \"ROYALTIES: payee is zero address\");\n require(bps[i] > 0, \"ROYALTIES: bp is zero\");\n totalBp = totalBp + bps[i];\n }\n require(totalBp == 10000, \"ROYALTIES: bps must equal 10000\");\n _setPayoutAddresses(addresses);\n _setPayoutBps(bps);\n }\n\n /**\n * @notice Show the wallets and percentages of payout recipients.\n * @dev These are the recipients that will be getting royalty payouts.\n * @return addresses An array of all the addresses that will be receiving royalty payouts.\n * @return bps An array of the percentages that each address will receive from the royalty payouts.\n */\n function getPayoutInfo() public view returns (address payable[] memory addresses, uint256[] memory bps) {\n addresses = _getPayoutAddresses();\n bps = _getPayoutBps();\n }\n\n /**\n * @notice Get payout of all ETH in smart contract.\n * @dev Distribute all the ETH(minus gas fees) to payout recipients.\n */\n function getEthPayout() public {\n _validatePayoutRequestor();\n _payoutEth();\n }\n\n /**\n * @notice Get payout for a specific token address. Token must have a positive balance!\n * @dev Contract owner, admin, identity wallet, and payout recipients can call this function.\n * @param tokenAddress An address of the token for which to issue payouts for.\n */\n function getTokenPayout(address tokenAddress) public {\n _validatePayoutRequestor();\n _payoutToken(tokenAddress);\n }\n\n /**\n * @notice Get payouts for tokens listed by address. Tokens must have a positive balance!\n * @dev Each token balance must be equal or greater than 10000. Otherwise calculating BP is difficult.\n * @param tokenAddresses An address array of tokens to issue payouts for.\n */\n function getTokensPayout(address[] memory tokenAddresses) public {\n _validatePayoutRequestor();\n _payoutTokens(tokenAddresses);\n }\n\n /**\n * @notice Set the royalty information for entire contract, or a specific token.\n * @dev Take great care to not make this function accessible by other public functions in your overlying smart contract.\n * @param tokenId Set a specific token id, or leave at 0 to set as default parameters.\n * @param receiver Wallet or smart contract that will receive the royalty payouts.\n * @param bp Uint256 of royalty percentage, provided in base points format.\n */\n function setRoyalties(uint256 tokenId, address payable receiver, uint256 bp) public onlyOwner {\n require(receiver != address(0), \"ROYALTIES: receiver is zero address\");\n require(bp <= 10000, \"ROYALTIES: base points over 100%\");\n if (tokenId == 0) {\n _setDefaultReceiver(receiver);\n _setDefaultBp(bp);\n } else {\n _setReceiver(tokenId, receiver);\n _setBp(tokenId, bp);\n }\n address[] memory receivers = new address[](1);\n receivers[0] = address(receiver);\n uint256[] memory bps = new uint256[](1);\n bps[0] = bp;\n emit SecondarySaleFees(tokenId, receivers, bps);\n }\n\n // IEIP2981\n function royaltyInfo(uint256 tokenId, uint256 value) public view returns (address, uint256) {\n if (_getReceiver(tokenId) == address(0)) {\n return (_getDefaultReceiver(), (_getDefaultBp() * value) / 10000);\n } else {\n return (_getReceiver(tokenId), (_getBp(tokenId) * value) / 10000);\n }\n }\n\n // Rarible V1\n function getFeeBps(uint256 tokenId) public view returns (uint256[] memory) {\n uint256[] memory bps = new uint256[](1);\n if (_getReceiver(tokenId) == address(0)) {\n bps[0] = _getDefaultBp();\n } else {\n bps[0] = _getBp(tokenId);\n }\n return bps;\n }\n\n // Rarible V1\n function getFeeRecipients(uint256 tokenId) public view returns (address payable[] memory) {\n address payable[] memory receivers = new address payable[](1);\n if (_getReceiver(tokenId) == address(0)) {\n receivers[0] = _getDefaultReceiver();\n } else {\n receivers[0] = _getReceiver(tokenId);\n }\n return receivers;\n }\n\n // Rarible V2(not being used since it creates a conflict with Manifold royalties)\n // struct Part {\n // address payable account;\n // uint96 value;\n // }\n\n // function getRoyalties(uint256 tokenId) public view returns (Part[] memory) {\n // return royalties[id];\n // }\n\n // Manifold\n function getRoyalties(uint256 tokenId) public view returns (address payable[] memory, uint256[] memory) {\n address payable[] memory receivers = new address payable[](1);\n uint256[] memory bps = new uint256[](1);\n if (_getReceiver(tokenId) == address(0)) {\n receivers[0] = _getDefaultReceiver();\n bps[0] = _getDefaultBp();\n } else {\n receivers[0] = _getReceiver(tokenId);\n bps[0] = _getBp(tokenId);\n }\n return (receivers, bps);\n }\n\n // Foundation\n function getFees(uint256 tokenId) public view returns (address payable[] memory, uint256[] memory) {\n address payable[] memory receivers = new address payable[](1);\n uint256[] memory bps = new uint256[](1);\n if (_getReceiver(tokenId) == address(0)) {\n receivers[0] = _getDefaultReceiver();\n bps[0] = _getDefaultBp();\n } else {\n receivers[0] = _getReceiver(tokenId);\n bps[0] = _getBp(tokenId);\n }\n return (receivers, bps);\n }\n\n // SuperRare\n // Hint taken from Manifold's RoyaltyEngine(https://github.com/manifoldxyz/royalty-registry-solidity/blob/main/contracts/RoyaltyEngineV1.sol)\n // To be quite honest, SuperRare is a closed marketplace. They're working on opening it up but looks like they want to use private smart contracts.\n // We'll just leave this here for just in case they open the flood gates.\n function tokenCreator(\n address,\n /* contractAddress*/\n uint256 tokenId\n ) public view returns (address) {\n address receiver = _getReceiver(tokenId);\n if (receiver == address(0)) {\n return _getDefaultReceiver();\n }\n return receiver;\n }\n\n // SuperRare\n function calculateRoyaltyFee(\n address,\n /* contractAddress */\n uint256 tokenId,\n uint256 amount\n ) public view returns (uint256) {\n if (_getReceiver(tokenId) == address(0)) {\n return (_getDefaultBp() * amount) / 10000;\n } else {\n return (_getBp(tokenId) * amount) / 10000;\n }\n }\n\n // Holograph\n // we indicate that this contract operates market functions\n function marketContract() public view returns (address) {\n return address(this);\n }\n\n // Holograph\n // we indicate that the receiver is the creator, to convince the smart contract to pay\n function tokenCreators(uint256 tokenId) public view returns (address) {\n address receiver = _getReceiver(tokenId);\n if (receiver == address(0)) {\n return _getDefaultReceiver();\n }\n return receiver;\n }\n\n // Holograph\n // we provide the percentage that needs to be paid out from the sale\n function bidSharesForToken(uint256 tokenId) public view returns (HolographBidShares memory bidShares) {\n // this information is outside of the scope of our\n bidShares.prevOwner.value = 0;\n bidShares.owner.value = 0;\n if (_getReceiver(tokenId) == address(0)) {\n bidShares.creator.value = _getDefaultBp() * (10 ** 16);\n } else {\n bidShares.creator.value = _getBp(tokenId) * (10 ** 16);\n }\n return bidShares;\n }\n\n /**\n * @notice Get the smart contract address of a token by common name.\n * @dev Used only to identify really major/common tokens. Avoid using due to gas usages.\n * @param tokenName The ticker symbol of the token. For example \"USDC\" or \"DAI\".\n * @return The smart contract address of the token ticker symbol. Or zero address if not found.\n */\n function getTokenAddress(string memory tokenName) public view returns (address) {\n return _getTokenAddress(tokenName);\n }\n\n /**\n * @notice Used to wrap function calls to check if they return without revert regardless of return type.\n * @dev Checks if wrapped function opcode is a revert, if it is then it reverts as well, if it's not then\n * it checks for return data, if return data exists, it is returned as a bool,\n * if return data does not exist (0 length) then success is expected and returns true\n * @return Returns true if the wrapped function call returns without a revert even if it doesn't return true.\n */\n function _callOptionalReturn(address target, bytes4 functionSignature, bytes memory payload) internal returns (bool) {\n bytes memory data = abi.encodePacked(functionSignature, payload);\n bool success = true;\n assembly {\n let result := call(gas(), target, callvalue(), add(data, 0x20), mload(data), 0, 0)\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n if gt(returndatasize(), 0) {\n returndatacopy(success, 0, 0x20)\n }\n }\n }\n return success;\n }\n}\n" + }, + "contracts/enum/ChainIdType.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nenum ChainIdType {\n UNDEFINED, // 0\n EVM, // 1\n HOLOGRAPH, // 2\n LAYERZERO, // 3\n HYPERLANE // 4\n}\n" + }, + "contracts/enum/HolographERC20Event.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nenum HolographERC20Event {\n UNDEFINED, // 0\n bridgeIn, // 1\n bridgeOut, // 2\n afterApprove, // 3\n beforeApprove, // 4\n afterOnERC20Received, // 5\n beforeOnERC20Received, // 6\n afterBurn, // 7\n beforeBurn, // 8\n afterMint, // 9\n beforeMint, // 10\n afterSafeTransfer, // 11\n beforeSafeTransfer, // 12\n afterTransfer, // 13\n beforeTransfer, // 14\n onAllowance // 15\n}\n" + }, + "contracts/enum/HolographERC721Event.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nenum HolographERC721Event {\n UNDEFINED, // 0\n bridgeIn, // 1\n bridgeOut, // 2\n afterApprove, // 3\n beforeApprove, // 4\n afterApprovalAll, // 5\n beforeApprovalAll, // 6\n afterBurn, // 7\n beforeBurn, // 8\n afterMint, // 9\n beforeMint, // 10\n afterSafeTransfer, // 11\n beforeSafeTransfer, // 12\n afterTransfer, // 13\n beforeTransfer, // 14\n beforeOnERC721Received, // 15\n afterOnERC721Received, // 16\n onIsApprovedForAll, // 17\n customContractURI // 18\n}\n" + }, + "contracts/enum/HolographGenericEvent.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nenum HolographGenericEvent {\n UNDEFINED, // 0\n bridgeIn, // 1\n bridgeOut // 2\n}\n" + }, + "contracts/enum/InterfaceType.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nenum InterfaceType {\n UNDEFINED, // 0\n ERC20, // 1\n ERC721, // 2\n ERC1155, // 3\n ROYALTIES, // 4\n GENERIC // 5\n}\n" + }, + "contracts/enum/TokenUriType.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nenum TokenUriType {\n UNDEFINED, // 0\n IPFS, // 1\n HTTPS, // 2\n ARWEAVE // 3\n}\n" + }, + "contracts/faucet/Faucet.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Initializable.sol\";\nimport \"../interface/HolographERC20Interface.sol\";\nimport \"../interface/InitializableInterface.sol\";\n\ncontract Faucet is Initializable {\n address public owner;\n HolographERC20Interface public token;\n\n uint256 public faucetDripAmount = 100 ether;\n uint256 public faucetCooldown = 24 hours;\n\n mapping(address => uint256) lastAccessTime;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"Faucet contract is already initialized\");\n (address _contractOwner, address _tokenInstance) = abi.decode(initPayload, (address, address));\n token = HolographERC20Interface(_tokenInstance);\n owner = _contractOwner;\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /// @notice Get tokens from faucet's own balance. Rate limited.\n function requestTokens() external {\n require(isAllowedToWithdraw(msg.sender), \"Come back later\");\n require(token.balanceOf(address(this)) >= faucetDripAmount, \"Faucet is empty\");\n lastAccessTime[msg.sender] = block.timestamp;\n token.transfer(msg.sender, faucetDripAmount);\n }\n\n /// @notice Update token address\n function setToken(address tokenAddress) external onlyOwner {\n token = HolographERC20Interface(tokenAddress);\n }\n\n /// @notice Grant tokens to receiver from faucet's own balance. Not rate limited.\n function grantTokens(address _address) external onlyOwner {\n require(token.balanceOf(address(this)) >= faucetDripAmount, \"Faucet is empty\");\n token.transfer(_address, faucetDripAmount);\n }\n\n function grantTokens(address _address, uint256 _amountWei) external onlyOwner {\n require(token.balanceOf(address(this)) >= _amountWei, \"Insufficient funds\");\n token.transfer(_address, _amountWei);\n }\n\n /// @notice Withdraw all funds from the faucet.\n function withdrawAllTokens(address _receiver) external onlyOwner {\n token.transfer(_receiver, token.balanceOf(address(this)));\n }\n\n /// @notice Withdraw amount of funds from the faucet. Amount is in wei.\n function withdrawTokens(address _receiver, uint256 _amountWei) external onlyOwner {\n require(token.balanceOf(address(this)) >= _amountWei, \"Insufficient funds\");\n token.transfer(_receiver, _amountWei);\n }\n\n /// @notice Configure the time between two drip requests. Time is in seconds.\n function setWithdrawCooldown(uint256 _waitTimeSeconds) external onlyOwner {\n faucetCooldown = _waitTimeSeconds;\n }\n\n /// @notice Configure the drip request amount. Amount is in wei.\n function setWithdrawAmount(uint256 _amountWei) external onlyOwner {\n faucetDripAmount = _amountWei;\n }\n\n /// @notice Check whether an address can request drip and is not on cooldown.\n function isAllowedToWithdraw(address _address) public view returns (bool) {\n if (lastAccessTime[_address] == 0) {\n return true;\n } else if (block.timestamp >= lastAccessTime[_address] + faucetCooldown) {\n return true;\n }\n return false;\n }\n\n /// @notice Get the last time the address withdrew tokens.\n function getLastAccessTime(address _address) public view returns (uint256) {\n return lastAccessTime[_address];\n }\n\n modifier onlyOwner() {\n require(msg.sender == owner, \"Caller is not the owner\");\n _;\n }\n}\n" + }, + "contracts/Holograph.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./abstract/Admin.sol\";\nimport \"./abstract/Initializable.sol\";\n\nimport \"./interface/InitializableInterface.sol\";\nimport \"./interface/HolographInterface.sol\";\n\n/**\n * @title Holograph Protocol\n * @author https://github.com/holographxyz\n * @notice This is the primary Holograph Protocol smart contract\n * @dev This contract stores a reference to all the primary modules and variables of the protocol\n */\ncontract Holograph is Admin, Initializable, HolographInterface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.bridge')) - 1)\n */\n bytes32 constant _bridgeSlot = 0xeb87cbb21687feb327e3d58c6c16d552231d12c7a0e8115042a4165fac8a77f9;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.chainId')) - 1)\n */\n bytes32 constant _chainIdSlot = 0x7651bfc11f7485d07ab2b41c1312e2007c8cb7efb0f7352a6dee4a1153eebab2;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.factory')) - 1)\n */\n bytes32 constant _factorySlot = 0xa49f20855ba576e09d13c8041c8039fa655356ea27f6c40f1ec46a4301cd5b23;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holographChainId')) - 1)\n */\n bytes32 constant _holographChainIdSlot = 0xd840a780c26e07edc6e1ee2eaa6f134ed5488dbd762614116653cee8542a3844;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.interfaces')) - 1)\n */\n bytes32 constant _interfacesSlot = 0xbd3084b8c09da87ad159c247a60e209784196be2530cecbbd8f337fdd1848827;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.operator')) - 1)\n */\n bytes32 constant _operatorSlot = 0x7caba557ad34138fa3b7e43fb574e0e6cc10481c3073e0dffbc560db81b5c60f;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\n */\n bytes32 constant _registrySlot = 0xce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.treasury')) - 1)\n */\n bytes32 constant _treasurySlot = 0x4215e7a38d75164ca078bbd61d0992cdeb1ba16f3b3ead5944966d3e4080e8b6;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.utilityToken')) - 1)\n */\n bytes32 constant _utilityTokenSlot = 0xbf76518d46db472b71aa7677a0908b8016f3dee568415ffa24055f9a670f9c37;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (\n uint32 holographChainId,\n address bridge,\n address factory,\n address interfaces,\n address operator,\n address registry,\n address treasury,\n address utilityToken\n ) = abi.decode(initPayload, (uint32, address, address, address, address, address, address, address));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_chainIdSlot, chainid())\n sstore(_holographChainIdSlot, holographChainId)\n sstore(_bridgeSlot, bridge)\n sstore(_factorySlot, factory)\n sstore(_interfacesSlot, interfaces)\n sstore(_operatorSlot, operator)\n sstore(_registrySlot, registry)\n sstore(_treasurySlot, treasury)\n sstore(_utilityTokenSlot, utilityToken)\n }\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @notice Get the address of the Holograph Bridge module\n * @dev Used for beaming holographable assets cross-chain\n */\n function getBridge() external view returns (address bridge) {\n assembly {\n bridge := sload(_bridgeSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Bridge module address\n * @param bridge address of the Holograph Bridge smart contract to use\n */\n function setBridge(address bridge) external onlyAdmin {\n assembly {\n sstore(_bridgeSlot, bridge)\n }\n }\n\n /**\n * @notice Get the chain ID that the Protocol was deployed on\n * @dev Useful for checking if/when a hard fork occurs\n */\n function getChainId() external view returns (uint256 chainId) {\n assembly {\n chainId := sload(_chainIdSlot)\n }\n }\n\n /**\n * @notice Update the chain ID\n * @dev Useful for updating once a hard fork has been mitigated\n * @param chainId EVM chain ID to use\n */\n function setChainId(uint256 chainId) external onlyAdmin {\n assembly {\n sstore(_chainIdSlot, chainId)\n }\n }\n\n /**\n * @notice Get the address of the Holograph Factory module\n * @dev Used for deploying holographable smart contracts\n */\n function getFactory() external view returns (address factory) {\n assembly {\n factory := sload(_factorySlot)\n }\n }\n\n /**\n * @notice Update the Holograph Factory module address\n * @param factory address of the Holograph Factory smart contract to use\n */\n function setFactory(address factory) external onlyAdmin {\n assembly {\n sstore(_factorySlot, factory)\n }\n }\n\n /**\n * @notice Get the Holograph chain Id\n * @dev Holograph uses an internal chain id mapping\n */\n function getHolographChainId() external view returns (uint32 holographChainId) {\n assembly {\n holographChainId := sload(_holographChainIdSlot)\n }\n }\n\n /**\n * @notice Update the Holograph chain ID\n * @dev Useful for updating once a hard fork was mitigated\n * @param holographChainId Holograph chain ID to use\n */\n function setHolographChainId(uint32 holographChainId) external onlyAdmin {\n assembly {\n sstore(_holographChainIdSlot, holographChainId)\n }\n }\n\n /**\n * @notice Get the address of the Holograph Interfaces module\n * @dev Holograph uses this contract to store data that needs to be accessed by a large portion of the modules\n */\n function getInterfaces() external view returns (address interfaces) {\n assembly {\n interfaces := sload(_interfacesSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Interfaces module address\n * @param interfaces address of the Holograph Interfaces smart contract to use\n */\n function setInterfaces(address interfaces) external onlyAdmin {\n assembly {\n sstore(_interfacesSlot, interfaces)\n }\n }\n\n /**\n * @notice Get the address of the Holograph Operator module\n * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module\n */\n function getOperator() external view returns (address operator) {\n assembly {\n operator := sload(_operatorSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Operator module address\n * @param operator address of the Holograph Operator smart contract to use\n */\n function setOperator(address operator) external onlyAdmin {\n assembly {\n sstore(_operatorSlot, operator)\n }\n }\n\n /**\n * @notice Get the Holograph Registry module\n * @dev This module stores a reference for all deployed holographable smart contracts\n */\n function getRegistry() external view returns (address registry) {\n assembly {\n registry := sload(_registrySlot)\n }\n }\n\n /**\n * @notice Update the Holograph Registry module address\n * @param registry address of the Holograph Registry smart contract to use\n */\n function setRegistry(address registry) external onlyAdmin {\n assembly {\n sstore(_registrySlot, registry)\n }\n }\n\n /**\n * @notice Get the Holograph Treasury module\n * @dev All of the Holograph Protocol assets are stored and managed by this module\n */\n function getTreasury() external view returns (address treasury) {\n assembly {\n treasury := sload(_treasurySlot)\n }\n }\n\n /**\n * @notice Update the Holograph Treasury module address\n * @param treasury address of the Holograph Treasury smart contract to use\n */\n function setTreasury(address treasury) external onlyAdmin {\n assembly {\n sstore(_treasurySlot, treasury)\n }\n }\n\n /**\n * @notice Get the Holograph Utility Token address\n * @dev This is the official utility token of the Holograph Protocol\n */\n function getUtilityToken() external view returns (address utilityToken) {\n assembly {\n utilityToken := sload(_utilityTokenSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Utility Token address\n * @param utilityToken address of the Holograph Utility Token smart contract to use\n */\n function setUtilityToken(address utilityToken) external onlyAdmin {\n assembly {\n sstore(_utilityTokenSlot, utilityToken)\n }\n }\n\n /**\n * @dev Purposefully reverts to prevent having any type of ether transfered into the contract\n */\n receive() external payable {\n revert();\n }\n\n /**\n * @dev Purposefully reverts to prevent any calls to undefined functions\n */\n fallback() external payable {\n revert();\n }\n}\n" + }, + "contracts/HolographBridge.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./abstract/Admin.sol\";\nimport \"./abstract/Initializable.sol\";\n\nimport \"./interface/HolographERC20Interface.sol\";\nimport \"./interface/Holographable.sol\";\nimport \"./interface/HolographInterface.sol\";\nimport \"./interface/HolographBridgeInterface.sol\";\nimport \"./interface/HolographFactoryInterface.sol\";\nimport \"./interface/HolographOperatorInterface.sol\";\nimport \"./interface/HolographRegistryInterface.sol\";\nimport \"./interface/InitializableInterface.sol\";\n\n/**\n * @title Holograph Bridge\n * @author https://github.com/holographxyz\n * @notice Beam any holographable contracts and assets across blockchains\n * @dev The contract abstracts all the complexities of making bridge requests and uses a universal interface to bridge any type of holographable assets\n */\ncontract HolographBridge is Admin, Initializable, HolographBridgeInterface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.factory')) - 1)\n */\n bytes32 constant _factorySlot = 0xa49f20855ba576e09d13c8041c8039fa655356ea27f6c40f1ec46a4301cd5b23;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\n */\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.jobNonce')) - 1)\n */\n bytes32 constant _jobNonceSlot = 0x1cda64803f3b43503042e00863791e8d996666552d5855a78d53ee1dd4b3286d;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.operator')) - 1)\n */\n bytes32 constant _operatorSlot = 0x7caba557ad34138fa3b7e43fb574e0e6cc10481c3073e0dffbc560db81b5c60f;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\n */\n bytes32 constant _registrySlot = 0xce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7;\n\n /**\n * @dev Allow calls only from Holograph Operator contract\n */\n modifier onlyOperator() {\n require(msg.sender == address(_operator()), \"HOLOGRAPH: operator only call\");\n _;\n }\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address factory, address holograph, address operator, address registry) = abi.decode(\n initPayload,\n (address, address, address, address)\n );\n assembly {\n sstore(_adminSlot, origin())\n sstore(_factorySlot, factory)\n sstore(_holographSlot, holograph)\n sstore(_operatorSlot, operator)\n sstore(_registrySlot, registry)\n }\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @notice Receive a beam from another chain\n * @dev This function can only be called by the Holograph Operator module\n * @param fromChain Holograph Chain ID where the brigeOutRequest was created\n * @param holographableContract address of the destination contract that the bridgeInRequest is targeted for\n * @param hToken address of the hToken contract that wrapped the origin chain native gas token\n * @param hTokenRecipient address of recipient for the hToken reward\n * @param hTokenValue exact amount of hToken reward in wei\n * @param doNotRevert boolean used to specify if the call should revert\n * @param bridgeInPayload actual abi encoded bytes of the data that the holographable contract bridgeIn function will receive\n */\n function bridgeInRequest(\n uint256 /* nonce*/,\n uint32 fromChain,\n address holographableContract,\n address hToken,\n address hTokenRecipient,\n uint256 hTokenValue,\n bool doNotRevert,\n bytes calldata bridgeInPayload\n ) external payable onlyOperator {\n /**\n * @dev check that the target contract is either Holograph Factory or a deployed holographable contract\n */\n require(\n _registry().isHolographedContract(holographableContract) || address(_factory()) == holographableContract,\n \"HOLOGRAPH: not holographed\"\n );\n /**\n * @dev make a bridgeIn function call to the holographable contract\n */\n bytes4 selector = Holographable(holographableContract).bridgeIn(fromChain, bridgeInPayload);\n /**\n * @dev ensure returned selector is bridgeIn function signature, to guarantee that the function was called and succeeded\n */\n require(selector == Holographable.bridgeIn.selector, \"HOLOGRAPH: bridge in failed\");\n /**\n * @dev check if a specific reward amount was assigned to this request\n */\n if (hTokenValue > 0 && hTokenRecipient != address(0)) {\n /**\n * @dev mint the specific hToken amount for hToken recipient\n * this value is equivalent to amount that is deposited on origin chain's hToken contract\n * recipient can beam the asset to origin chain and unwrap for native gas token at any time\n */\n require(\n HolographERC20Interface(hToken).holographBridgeMint(hTokenRecipient, hTokenValue) ==\n HolographERC20Interface.holographBridgeMint.selector,\n \"HOLOGRAPH: hToken mint failed\"\n );\n }\n /**\n * @dev allow the call to revert on demand, for example use case, look into the Holograph Operator's jobEstimator function\n */\n require(doNotRevert, \"HOLOGRAPH: reverted\");\n }\n\n /**\n * @notice Create a beam request for a destination chain\n * @dev This function works for deploying contracts and beaming supported holographable assets across chains\n * @param toChain Holograph Chain ID where the beam is being sent to\n * @param holographableContract address of the contract for which the bridge request is being made\n * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain\n * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\n */\n function bridgeOutRequest(\n uint32 toChain,\n address holographableContract,\n uint256 gasLimit,\n uint256 gasPrice,\n bytes calldata bridgeOutPayload\n ) external payable {\n /**\n * @dev check that the target contract is either Holograph Factory or a deployed holographable contract\n */\n require(\n _registry().isHolographedContract(holographableContract) || address(_factory()) == holographableContract,\n \"HOLOGRAPH: not holographed\"\n );\n /**\n * @dev make a bridgeOut function call to the holographable contract\n */\n (bytes4 selector, bytes memory returnedPayload) = Holographable(holographableContract).bridgeOut(\n toChain,\n msg.sender,\n bridgeOutPayload\n );\n /**\n * @dev ensure returned selector is bridgeOut function signature, to guarantee that the function was called and succeeded\n */\n require(selector == Holographable.bridgeOut.selector, \"HOLOGRAPH: bridge out failed\");\n /**\n * @dev pass the request, along with all data, to Holograph Operator, to handle the cross-chain messaging logic\n */\n _operator().send{value: msg.value}(\n gasLimit,\n gasPrice,\n toChain,\n msg.sender,\n _jobNonce(),\n holographableContract,\n returnedPayload\n );\n }\n\n /**\n * @notice Do not call this function, it will always revert\n * @dev Used by getBridgeOutRequestPayload function\n * It is purposefully inverted to always revert on a successful call\n * Marked as external and not private to allow use inside try/catch of getBridgeOutRequestPayload function\n * If this function does not revert and returns a string, it is the actual revert reason\n * @param sender address of actual sender that is planning to make a bridgeOutRequest call\n * @param toChain holograph chain id of destination chain\n * @param holographableContract address of the contract for which the bridge request is being made\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\n */\n function revertedBridgeOutRequest(\n address sender,\n uint32 toChain,\n address holographableContract,\n bytes calldata bridgeOutPayload\n ) external returns (string memory revertReason) {\n /**\n * @dev make a bridgeOut function call to the holographable contract inside of a try/catch\n */\n try Holographable(holographableContract).bridgeOut(toChain, sender, bridgeOutPayload) returns (\n bytes4 selector,\n bytes memory payload\n ) {\n /**\n * @dev ensure returned selector is bridgeOut function signature, to guarantee that the function was called and succeeded\n */\n if (selector != Holographable.bridgeOut.selector) {\n /**\n * @dev if selector does not match, then it means the request failed\n */\n return \"HOLOGRAPH: bridge out failed\";\n }\n assembly {\n /**\n * @dev the entire payload is sent back in a revert\n */\n revert(add(payload, 0x20), mload(payload))\n }\n } catch Error(string memory reason) {\n return reason;\n } catch {\n return \"HOLOGRAPH: unknown error\";\n }\n }\n\n /**\n * @notice Get the payload created by the bridgeOutRequest function\n * @dev Use this function to get the payload that will be generated by a bridgeOutRequest\n * Only use this with a static call\n * @param toChain Holograph Chain ID where the beam is being sent to\n * @param holographableContract address of the contract for which the bridge request is being made\n * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain\n * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\n * @return samplePayload bytes made up of the bridgeOutRequest payload\n */\n function getBridgeOutRequestPayload(\n uint32 toChain,\n address holographableContract,\n uint256 gasLimit,\n uint256 gasPrice,\n bytes calldata bridgeOutPayload\n ) external returns (bytes memory samplePayload) {\n /**\n * @dev check that the target contract is either Holograph Factory or a deployed holographable contract\n */\n require(\n _registry().isHolographedContract(holographableContract) || address(_factory()) == holographableContract,\n \"HOLOGRAPH: not holographed\"\n );\n bytes memory payload;\n /**\n * @dev the revertedBridgeOutRequest function is wrapped into a try/catch function\n */\n try this.revertedBridgeOutRequest(msg.sender, toChain, holographableContract, bridgeOutPayload) returns (\n string memory revertReason\n ) {\n /**\n * @dev a non reverted result is actually a revert\n */\n revert(revertReason);\n } catch (bytes memory realResponse) {\n /**\n * @dev a revert is actually success, so the return data is stored as payload\n */\n payload = realResponse;\n }\n uint256 jobNonce;\n assembly {\n jobNonce := sload(_jobNonceSlot)\n }\n /**\n * @dev extract hlgFee from operator\n */\n uint256 fee = 0;\n if (gasPrice < type(uint256).max && gasLimit < type(uint256).max) {\n (uint256 hlgFee, , uint256 dstGasPrice) = _operator().getMessageFee(\n toChain,\n gasLimit,\n gasPrice,\n bridgeOutPayload\n );\n if (gasPrice == 0) {\n gasPrice = dstGasPrice;\n }\n fee = hlgFee;\n }\n /**\n * @dev the data is abi encoded into actual bridgeOutRequest payload bytes\n */\n bytes memory encodedData = abi.encodeWithSelector(\n HolographBridgeInterface.bridgeInRequest.selector,\n /**\n * @dev the latest job nonce is incremented by one\n */\n jobNonce + 1,\n _holograph().getHolographChainId(),\n holographableContract,\n _registry().getHToken(_holograph().getHolographChainId()),\n address(0),\n fee,\n true,\n payload\n );\n /**\n * @dev this abi encodes the data just like in Holograph Operator\n */\n samplePayload = abi.encodePacked(encodedData, gasLimit, gasPrice);\n }\n\n /**\n * @notice Get the fees associated with sending specific payload\n * @dev Will provide exact costs on protocol and message side, combine the two to get total\n * @dev @param toChain holograph chain id of destination chain for payload\n * @dev @param gasLimit amount of gas to provide for executing payload on destination chain\n * @dev @param gasPrice maximum amount to pay for gas price, can be set to 0 and will be chose automatically\n * @dev @param crossChainPayload the entire packet being sent cross-chain\n * @return hlgFee the amount (in wei) of native gas token that will cost for finalizing job on destiantion chain\n * @return msgFee the amount (in wei) of native gas token that will cost for sending message to destiantion chain\n * @return dstGasPrice the amount (in wei) that destination message maximum gas price will be\n */\n function getMessageFee(uint32, uint256, uint256, bytes calldata) external view returns (uint256, uint256, uint256) {\n assembly {\n calldatacopy(0, 0, calldatasize())\n let result := staticcall(gas(), sload(_operatorSlot), 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @notice Get the address of the Holograph Factory module\n * @dev Used for deploying holographable smart contracts\n */\n function getFactory() external view returns (address factory) {\n assembly {\n factory := sload(_factorySlot)\n }\n }\n\n /**\n * @notice Update the Holograph Factory module address\n * @param factory address of the Holograph Factory smart contract to use\n */\n function setFactory(address factory) external onlyAdmin {\n assembly {\n sstore(_factorySlot, factory)\n }\n }\n\n /**\n * @notice Get the Holograph Protocol contract\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\n */\n function getHolograph() external view returns (address holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Protocol contract address\n * @param holograph address of the Holograph Protocol smart contract to use\n */\n function setHolograph(address holograph) external onlyAdmin {\n assembly {\n sstore(_holographSlot, holograph)\n }\n }\n\n /**\n * @notice Get the latest job nonce\n * @dev You can use the job nonce as a way to calculate total amount of bridge requests that have been made\n */\n function getJobNonce() external view returns (uint256 jobNonce) {\n assembly {\n jobNonce := sload(_jobNonceSlot)\n }\n }\n\n /**\n * @notice Get the address of the Holograph Operator module\n * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module\n */\n function getOperator() external view returns (address operator) {\n assembly {\n operator := sload(_operatorSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Operator module address\n * @param operator address of the Holograph Operator smart contract to use\n */\n function setOperator(address operator) external onlyAdmin {\n assembly {\n sstore(_operatorSlot, operator)\n }\n }\n\n /**\n * @notice Get the Holograph Registry module\n * @dev This module stores a reference for all deployed holographable smart contracts\n */\n function getRegistry() external view returns (address registry) {\n assembly {\n registry := sload(_registrySlot)\n }\n }\n\n /**\n * @notice Update the Holograph Registry module address\n * @param registry address of the Holograph Registry smart contract to use\n */\n function setRegistry(address registry) external onlyAdmin {\n assembly {\n sstore(_registrySlot, registry)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Factory Interface\n */\n function _factory() private view returns (HolographFactoryInterface factory) {\n assembly {\n factory := sload(_factorySlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Interface\n */\n function _holograph() private view returns (HolographInterface holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n /**\n * @dev Internal nonce, that increments on each call, used for randomness\n */\n function _jobNonce() private returns (uint256 jobNonce) {\n assembly {\n jobNonce := add(sload(_jobNonceSlot), 0x0000000000000000000000000000000000000000000000000000000000000001)\n sstore(_jobNonceSlot, jobNonce)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Operator Interface\n */\n function _operator() private view returns (HolographOperatorInterface operator) {\n assembly {\n operator := sload(_operatorSlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Registry Interface\n */\n function _registry() private view returns (HolographRegistryInterface registry) {\n assembly {\n registry := sload(_registrySlot)\n }\n }\n\n /**\n * @dev Purposefully reverts to prevent having any type of ether transfered into the contract\n */\n receive() external payable {\n revert();\n }\n\n /**\n * @dev Purposefully reverts to prevent any calls to undefined functions\n */\n fallback() external payable {\n revert();\n }\n}\n" + }, + "contracts/HolographFactory.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./abstract/Admin.sol\";\nimport \"./abstract/Initializable.sol\";\n\nimport \"./enforcer/Holographer.sol\";\n\nimport \"./interface/Holographable.sol\";\nimport \"./interface/HolographBridgeInterface.sol\";\nimport \"./interface/HolographFactoryInterface.sol\";\nimport \"./interface/HolographInterface.sol\";\nimport \"./interface/HolographRegistryInterface.sol\";\nimport \"./interface/InitializableInterface.sol\";\n\nimport \"./struct/BridgeSettings.sol\";\nimport \"./struct/DeploymentConfig.sol\";\nimport \"./struct/Verification.sol\";\n\nimport \"./library/Strings.sol\";\n\n/**\n * @title Holograph Factory\n * @author https://github.com/holographxyz\n * @notice Deploy holographable contracts\n * @dev The contract provides methods that allow for the creation of Holograph Protocol compliant smart contracts, that are capable of minting holographable assets\n */\ncontract HolographFactory is Admin, Initializable, Holographable, HolographFactoryInterface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\n */\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\n */\n bytes32 constant _registrySlot = 0xce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address holograph, address registry) = abi.decode(initPayload, (address, address));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_holographSlot, holograph)\n sstore(_registrySlot, registry)\n }\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @notice Deploy holographable contract via bridge request\n * @dev This function directly forwards the calldata to the deployHolographableContract function\n * It is used to allow for Holograph Bridge to make cross-chain deployments\n */\n function bridgeIn(uint32 /* fromChain*/, bytes calldata payload) external returns (bytes4) {\n (DeploymentConfig memory config, Verification memory signature, address signer) = abi.decode(\n payload,\n (DeploymentConfig, Verification, address)\n );\n HolographFactoryInterface(address(this)).deployHolographableContract(config, signature, signer);\n return Holographable.bridgeIn.selector;\n }\n\n /**\n * @notice Deploy holographable contract via bridge request\n * @dev This function directly returns the calldata\n * It is used to allow for Holograph Bridge to make cross-chain deployments\n */\n function bridgeOut(\n uint32 /* toChain*/,\n address /* sender*/,\n bytes calldata payload\n ) external pure returns (bytes4 selector, bytes memory data) {\n return (Holographable.bridgeOut.selector, payload);\n }\n\n function deployHolographableContractMultiChain(\n DeploymentConfig memory config,\n Verification memory signature,\n address signer,\n bool deployOnCurrentChain,\n BridgeSettings[] memory bridgeSettings\n ) external payable {\n if (deployOnCurrentChain) {\n deployHolographableContract(config, signature, signer);\n }\n bytes memory payload = abi.encode(config, signature, signer);\n HolographInterface holograph;\n assembly {\n holograph := sload(_holographSlot)\n }\n HolographBridgeInterface bridge = HolographBridgeInterface(holograph.getBridge());\n uint256 l = bridgeSettings.length;\n for (uint256 i = 0; i < l; i++) {\n bridge.bridgeOutRequest{value: bridgeSettings[i].value}(\n bridgeSettings[i].toChain,\n address(this),\n bridgeSettings[i].gasLimit,\n bridgeSettings[i].gasPrice,\n payload\n );\n }\n }\n\n /**\n * @notice Deploy a holographable smart contract\n * @dev Using this function allows to deploy smart contracts that have the same address across all EVM chains\n * @param config contract deployement configurations\n * @param signature that was created by the wallet that created the original payload\n * @param signer address of wallet that created the payload\n */\n function deployHolographableContract(\n DeploymentConfig memory config,\n Verification memory signature,\n address signer\n ) public {\n address registry;\n address holograph;\n assembly {\n holograph := sload(_holographSlot)\n registry := sload(_registrySlot)\n }\n /**\n * @dev the configuration is encoded and hashed along with signer address\n */\n bytes32 hash = keccak256(\n abi.encodePacked(\n config.contractType,\n config.chainType,\n config.salt,\n keccak256(config.byteCode),\n keccak256(config.initCode),\n signer\n )\n );\n /**\n * @dev the hash is validated against signature\n * this is to guarantee that the original creator's configuration has not been altered\n */\n require(_verifySigner(signature.r, signature.s, signature.v, hash, signer), \"HOLOGRAPH: invalid signature\");\n /**\n * @dev check that this contract has not already been deployed on this chain\n */\n bytes memory holographerBytecode = type(Holographer).creationCode;\n address holographerAddress = address(\n uint160(uint256(keccak256(abi.encodePacked(bytes1(0xff), address(this), hash, keccak256(holographerBytecode)))))\n );\n require(!_isContract(holographerAddress), \"HOLOGRAPH: already deployed\");\n /**\n * @dev convert hash into uint256 which will be used as the salt for create2\n */\n uint256 saltInt = uint256(hash);\n address sourceContractAddress;\n bytes memory sourceByteCode = config.byteCode;\n assembly {\n /**\n * @dev deploy the user created smart contract first\n */\n sourceContractAddress := create2(0, add(sourceByteCode, 0x20), mload(sourceByteCode), saltInt)\n }\n assembly {\n /**\n * @dev deploy the Holographer contract\n */\n holographerAddress := create2(0, add(holographerBytecode, 0x20), mload(holographerBytecode), saltInt)\n }\n /**\n * @dev initialize the Holographer contract\n */\n require(\n InitializableInterface(holographerAddress).init(\n abi.encode(abi.encode(config.chainType, holograph, config.contractType, sourceContractAddress), config.initCode)\n ) == InitializableInterface.init.selector,\n \"initialization failed\"\n );\n /**\n * @dev update the Holograph Registry with deployed contract address\n */\n HolographRegistryInterface(registry).setHolographedHashAddress(hash, holographerAddress);\n /**\n * @dev emit an event that on-chain indexers can easily read\n */\n emit BridgeableContractDeployed(holographerAddress, hash);\n }\n\n /**\n * @notice Get the Holograph Protocol contract\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\n */\n function getHolograph() external view returns (address holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Protocol contract address\n * @param holograph address of the Holograph Protocol smart contract to use\n */\n function setHolograph(address holograph) external onlyAdmin {\n assembly {\n sstore(_holographSlot, holograph)\n }\n }\n\n /**\n * @notice Get the Holograph Registry module\n * @dev This module stores a reference for all deployed holographable smart contracts\n */\n function getRegistry() external view returns (address registry) {\n assembly {\n registry := sload(_registrySlot)\n }\n }\n\n /**\n * @notice Update the Holograph Registry module address\n * @param registry address of the Holograph Registry smart contract to use\n */\n function setRegistry(address registry) external onlyAdmin {\n assembly {\n sstore(_registrySlot, registry)\n }\n }\n\n /**\n * @dev Internal function used for checking if a contract has been deployed at address\n */\n function _isContract(address contractAddress) private view returns (bool) {\n bytes32 codehash;\n assembly {\n codehash := extcodehash(contractAddress)\n }\n return (codehash != 0x0 && codehash != 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470);\n }\n\n /**\n * @dev Internal function used for verifying a signature\n */\n function _verifySigner(bytes32 r, bytes32 s, uint8 v, bytes32 hash, address signer) private pure returns (bool) {\n if (v < 27) {\n v += 27;\n }\n if (v != 27 && v != 28) {\n return false;\n }\n // prevent signature malleability by checking if s-value is in the upper range\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n // if s-value is in upper range, calculate a new s-value\n s = bytes32(0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - uint256(s));\n // flip the v-value\n if (v == 27) {\n v = 28;\n } else {\n v = 27;\n }\n // check if s-value is still in upper range\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return false;\n }\n }\n /**\n * @dev signature is checked against EIP-191 first, then directly, to support legacy wallets\n */\n return (signer != address(0) &&\n (ecrecover(keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", hash)), v, r, s) == signer ||\n (\n ecrecover(\n keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n66\", Strings.toHexString(uint256(hash), 32))),\n v,\n r,\n s\n )\n ) ==\n signer ||\n ecrecover(hash, v, r, s) == signer));\n }\n\n /**\n * @dev Purposefully reverts to prevent having any type of ether transfered into the contract\n */\n receive() external payable {\n revert();\n }\n\n /**\n * @dev Purposefully reverts to prevent any calls to undefined functions\n */\n fallback() external payable {\n revert();\n }\n}\n" + }, + "contracts/HolographGenesis.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./interface/InitializableInterface.sol\";\n\n/**\n * @dev In the beginning there was a smart contract...\n */\ncontract HolographGenesis {\n mapping(address => bool) private _approvedDeployers;\n\n event Message(string message);\n\n modifier onlyDeployer() {\n require(_approvedDeployers[msg.sender], \"HOLOGRAPH: deployer not approved\");\n _;\n }\n\n constructor() {\n _approvedDeployers[tx.origin] = true;\n emit Message(\"The future of NFTs is Holograph.\");\n }\n\n function deploy(\n uint256 chainId,\n bytes12 saltHash,\n bytes memory sourceCode,\n bytes memory initCode\n ) external onlyDeployer {\n require(chainId == block.chainid, \"HOLOGRAPH: incorrect chain id\");\n bytes32 salt = bytes32(abi.encodePacked(msg.sender, saltHash));\n address contractAddress = address(\n uint160(uint256(keccak256(abi.encodePacked(bytes1(0xff), address(this), salt, keccak256(sourceCode)))))\n );\n require(!_isContract(contractAddress), \"HOLOGRAPH: already deployed\");\n assembly {\n contractAddress := create2(0, add(sourceCode, 0x20), mload(sourceCode), salt)\n }\n require(_isContract(contractAddress), \"HOLOGRAPH: deployment failed\");\n require(\n InitializableInterface(contractAddress).init(initCode) == InitializableInterface.init.selector,\n \"HOLOGRAPH: initialization failed\"\n );\n }\n\n function approveDeployer(address newDeployer, bool approve) external onlyDeployer {\n _approvedDeployers[newDeployer] = approve;\n }\n\n function isApprovedDeployer(address deployer) external view returns (bool) {\n return _approvedDeployers[deployer];\n }\n\n function _isContract(address contractAddress) internal view returns (bool) {\n bytes32 codehash;\n assembly {\n codehash := extcodehash(contractAddress)\n }\n return (codehash != 0x0 && codehash != 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470);\n }\n}\n" + }, + "contracts/HolographInterfaces.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./abstract/Admin.sol\";\nimport \"./abstract/Initializable.sol\";\n\nimport \"./enum/ChainIdType.sol\";\nimport \"./enum/InterfaceType.sol\";\nimport \"./enum/TokenUriType.sol\";\n\nimport \"./interface/InitializableInterface.sol\";\n\nimport \"./library/Base64.sol\";\nimport \"./library/Strings.sol\";\n\n/**\n * @title Holograph Interfaces\n * @author https://github.com/holographxyz\n * @notice Get universal Holograph Protocol variables\n * @dev The contract stores a reference of all supported: chains, interfaces, functions, etc.\n */\ncontract HolographInterfaces is Admin, Initializable {\n /**\n * @dev Internal mapping of all InterfaceType interfaces\n */\n mapping(InterfaceType => mapping(bytes4 => bool)) private _supportedInterfaces;\n\n /**\n * @dev Internal mapping of all ChainIdType conversions\n */\n mapping(ChainIdType => mapping(uint256 => mapping(ChainIdType => uint256))) private _chainIdMap;\n\n /**\n * @dev Internal mapping of all TokenUriType prepends\n */\n mapping(TokenUriType => string) private _prependURI;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n address contractAdmin = abi.decode(initPayload, (address));\n assembly {\n sstore(_adminSlot, contractAdmin)\n }\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @notice Get a base64 encoded contract URI JSON string\n * @dev Used to dynamically generate contract JSON payload\n * @param name the name of the smart contract\n * @param imageURL string pointing to the primary contract image, can be: https, ipfs, or ar (arweave)\n * @param externalLink url to website/page related to smart contract\n * @param bps basis points used for specifying royalties percentage\n * @param contractAddress address of the smart contract\n * @return a base64 encoded json string representing the smart contract\n */\n function contractURI(\n string calldata name,\n string calldata imageURL,\n string calldata externalLink,\n uint16 bps,\n address contractAddress\n ) external pure returns (string memory) {\n return\n string(\n abi.encodePacked(\n \"data:application/json;base64,\",\n Base64.encode(\n abi.encodePacked(\n '{\"name\":\"',\n name,\n '\",\"description\":\"',\n name,\n '\",\"image\":\"',\n imageURL,\n '\",\"external_link\":\"',\n externalLink,\n '\",\"seller_fee_basis_points\":',\n Strings.uint2str(bps),\n ',\"fee_recipient\":\"0x',\n Strings.toAsciiString(contractAddress),\n '\"}'\n )\n )\n )\n );\n }\n\n /**\n * @notice Get the prepend to use for tokenURI\n * @dev Provides the prepend to use with TokenUriType URI\n */\n function getUriPrepend(TokenUriType uriType) external view returns (string memory prepend) {\n prepend = _prependURI[uriType];\n }\n\n /**\n * @notice Update the tokenURI prepend\n * @param uriType specify which TokenUriType to set for\n * @param prepend the string to use for the prepend\n */\n function updateUriPrepend(TokenUriType uriType, string calldata prepend) external onlyAdmin {\n _prependURI[uriType] = prepend;\n }\n\n /**\n * @notice Update the tokenURI prepends\n * @param uriTypes specify array of TokenUriTypes to set for\n * @param prepends array string to use for the prepends\n */\n function updateUriPrepends(TokenUriType[] calldata uriTypes, string[] calldata prepends) external onlyAdmin {\n for (uint256 i = 0; i < uriTypes.length; i++) {\n _prependURI[uriTypes[i]] = prepends[i];\n }\n }\n\n function getChainId(\n ChainIdType fromChainType,\n uint256 fromChainId,\n ChainIdType toChainType\n ) external view returns (uint256 toChainId) {\n return _chainIdMap[fromChainType][fromChainId][toChainType];\n }\n\n function updateChainIdMap(\n ChainIdType fromChainType,\n uint256 fromChainId,\n ChainIdType toChainType,\n uint256 toChainId\n ) external onlyAdmin {\n _chainIdMap[fromChainType][fromChainId][toChainType] = toChainId;\n }\n\n function updateChainIdMaps(\n ChainIdType[] calldata fromChainType,\n uint256[] calldata fromChainId,\n ChainIdType[] calldata toChainType,\n uint256[] calldata toChainId\n ) external onlyAdmin {\n uint256 length = fromChainType.length;\n for (uint256 i = 0; i < length; i++) {\n _chainIdMap[fromChainType[i]][fromChainId[i]][toChainType[i]] = toChainId[i];\n }\n }\n\n function supportsInterface(InterfaceType interfaceType, bytes4 interfaceId) external view returns (bool) {\n return _supportedInterfaces[interfaceType][interfaceId];\n }\n\n function updateInterface(InterfaceType interfaceType, bytes4 interfaceId, bool supported) external onlyAdmin {\n _supportedInterfaces[interfaceType][interfaceId] = supported;\n }\n\n function updateInterfaces(\n InterfaceType interfaceType,\n bytes4[] calldata interfaceIds,\n bool supported\n ) external onlyAdmin {\n for (uint256 i = 0; i < interfaceIds.length; i++) {\n _supportedInterfaces[interfaceType][interfaceIds[i]] = supported;\n }\n }\n\n /**\n * @dev Purposefully reverts to prevent having any type of ether transfered into the contract\n */\n receive() external payable {\n revert();\n }\n\n /**\n * @dev Purposefully reverts to prevent any calls to undefined functions\n */\n fallback() external payable {\n revert();\n }\n}\n" + }, + "contracts/HolographOperator.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./abstract/Admin.sol\";\nimport \"./abstract/Initializable.sol\";\n\nimport \"./interface/CrossChainMessageInterface.sol\";\nimport \"./interface/HolographBridgeInterface.sol\";\nimport \"./interface/HolographERC20Interface.sol\";\nimport \"./interface/HolographInterface.sol\";\nimport \"./interface/HolographOperatorInterface.sol\";\nimport \"./interface/HolographRegistryInterface.sol\";\nimport \"./interface/InitializableInterface.sol\";\nimport \"./interface/HolographInterfacesInterface.sol\";\nimport \"./interface/Ownable.sol\";\n\nimport \"./struct/OperatorJob.sol\";\n\n/**\n * @title Holograph Operator\n * @author https://github.com/holographxyz\n * @notice Participate in the Holograph Protocol by becoming an Operator\n * @dev This contract allows operators to bond utility tokens and help execute operator jobs\n */\ncontract HolographOperator is Admin, Initializable, HolographOperatorInterface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.bridge')) - 1)\n */\n bytes32 constant _bridgeSlot = 0xeb87cbb21687feb327e3d58c6c16d552231d12c7a0e8115042a4165fac8a77f9;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\n */\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.interfaces')) - 1)\n */\n bytes32 constant _interfacesSlot = 0xbd3084b8c09da87ad159c247a60e209784196be2530cecbbd8f337fdd1848827;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.jobNonce')) - 1)\n */\n bytes32 constant _jobNonceSlot = 0x1cda64803f3b43503042e00863791e8d996666552d5855a78d53ee1dd4b3286d;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.messagingModule')) - 1)\n */\n bytes32 constant _messagingModuleSlot = 0x54176250282e65985d205704ffce44a59efe61f7afd99e29fda50f55b48c061a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\n */\n bytes32 constant _registrySlot = 0xce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.utilityToken')) - 1)\n */\n bytes32 constant _utilityTokenSlot = 0xbf76518d46db472b71aa7677a0908b8016f3dee568415ffa24055f9a670f9c37;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.minGasPrice')) - 1)\n */\n bytes32 constant _minGasPriceSlot = 0x264d744422f7427cd080572c35c848b6cd3a36da6b47519af89ef13098b12fc0;\n\n /**\n * @dev Internal number (in seconds), used for defining a window for operator to execute the job\n */\n uint256 private _blockTime;\n\n /**\n * @dev Minimum amount of tokens needed for bonding\n */\n uint256 private _baseBondAmount;\n\n /**\n * @dev The multiplier used for calculating bonding amount for pods\n */\n uint256 private _podMultiplier;\n\n /**\n * @dev The threshold used for limiting number of operators in a pod\n */\n uint256 private _operatorThreshold;\n\n /**\n * @dev The threshold step used for increasing bond amount once threshold is reached\n */\n uint256 private _operatorThresholdStep;\n\n /**\n * @dev The threshold divisor used for increasing bond amount once threshold is reached\n */\n uint256 private _operatorThresholdDivisor;\n\n /**\n * @dev Internal counter of all cross-chain messages received\n */\n uint256 private _inboundMessageCounter;\n\n /**\n * @dev Internal mapping of operator job details for a specific job hash\n */\n mapping(bytes32 => uint256) private _operatorJobs;\n\n /**\n * @dev Internal mapping of operator job details for a specific job hash\n */\n mapping(bytes32 => bool) private _failedJobs;\n\n /**\n * @dev Internal mapping of operator addresses, used for temp storage when defining an operator job\n */\n mapping(uint256 => address) private _operatorTempStorage;\n\n /**\n * @dev Internal index used for storing/referencing operator temp storage\n */\n uint32 private _operatorTempStorageCounter;\n\n /**\n * @dev Multi-dimensional array of available operators\n */\n address[][] private _operatorPods;\n\n /**\n * @dev Internal mapping of bonded operators, to prevent double bonding\n */\n mapping(address => uint256) private _bondedOperators;\n\n /**\n * @dev Internal mapping of bonded operators, to prevent double bonding\n */\n mapping(address => uint256) private _operatorPodIndex;\n\n /**\n * @dev Internal mapping of bonded operator amounts\n */\n mapping(address => uint256) private _bondedAmounts;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (\n address bridge,\n address holograph,\n address interfaces,\n address registry,\n address utilityToken,\n uint256 minGasPrice\n ) = abi.decode(initPayload, (address, address, address, address, address, uint256));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_bridgeSlot, bridge)\n sstore(_holographSlot, holograph)\n sstore(_interfacesSlot, interfaces)\n sstore(_registrySlot, registry)\n sstore(_utilityTokenSlot, utilityToken)\n sstore(_minGasPriceSlot, minGasPrice)\n }\n _blockTime = 60; // 60 seconds allowed for execution\n unchecked {\n _baseBondAmount = 100 * (10 ** 18); // one single token unit * 100\n }\n // how much to increase bond amount per pod\n _podMultiplier = 2; // 1, 4, 16, 64\n // starting pod max amount\n _operatorThreshold = 1000;\n // how often to increase price per each operator\n _operatorThresholdStep = 10;\n // we want to multiply by decimals, but instead will have to divide\n _operatorThresholdDivisor = 100; // == * 0.01\n // set first operator for each pod as zero address\n _operatorPods = [[address(0)]];\n // mark zero address as bonded operator, to prevent abuse\n _bondedOperators[address(0)] = 1;\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @notice Recover failed job\n * @dev If a job fails, it can be manually recovered\n * @param bridgeInRequestPayload the entire cross chain message payload\n */\n function recoverJob(bytes calldata bridgeInRequestPayload) external payable {\n bytes32 hash = keccak256(bridgeInRequestPayload);\n require(_failedJobs[hash], \"HOLOGRAPH: invalid recovery job\");\n (bool success, ) = _bridge().call{value: msg.value}(bridgeInRequestPayload);\n require(success, \"HOLOGRAPH: recovery failed\");\n delete (_failedJobs[hash]);\n }\n\n /**\n * @notice Execute an available operator job\n * @dev When making this call, if operating criteria is not met, the call will revert\n * @param bridgeInRequestPayload the entire cross chain message payload\n */\n function executeJob(bytes calldata bridgeInRequestPayload) external payable {\n /**\n * @dev derive the payload hash for use in mappings\n */\n bytes32 hash = keccak256(bridgeInRequestPayload);\n /**\n * @dev check that job exists\n */\n require(_operatorJobs[hash] > 0, \"HOLOGRAPH: invalid job\");\n uint256 gasLimit = 0;\n uint256 gasPrice = 0;\n assembly {\n /**\n * @dev extract gasLimit\n */\n gasLimit := calldataload(sub(add(bridgeInRequestPayload.offset, bridgeInRequestPayload.length), 0x40))\n /**\n * @dev extract gasPrice\n */\n gasPrice := calldataload(sub(add(bridgeInRequestPayload.offset, bridgeInRequestPayload.length), 0x20))\n }\n /**\n * @dev unpack bitwise packed operator job details\n */\n OperatorJob memory job = getJobDetails(hash);\n /**\n * @dev to prevent replay attacks, remove job from mapping\n */\n delete _operatorJobs[hash];\n /**\n * @dev operators of last resort are allowed, but they will not receive HLG rewards of any sort\n */\n bool isBonded = _bondedAmounts[msg.sender] != 0;\n /**\n * @dev check that a specific operator was selected for the job\n */\n if (job.operator != address(0)) {\n /**\n * @dev switch pod to index based value\n */\n uint256 pod = job.pod - 1;\n /**\n * @dev check if sender is not the selected primary operator\n */\n if (job.operator != msg.sender) {\n /**\n * @dev sender is not selected operator, need to check if allowed to do job\n */\n uint256 elapsedTime = block.timestamp - uint256(job.startTimestamp);\n uint256 timeDifference = elapsedTime / job.blockTimes;\n /**\n * @dev validate that initial selected operator time slot is still active\n */\n require(timeDifference > 0, \"HOLOGRAPH: operator has time\");\n /**\n * @dev check that the selected missed the time slot due to a gas spike\n */\n require(gasPrice >= tx.gasprice, \"HOLOGRAPH: gas spike detected\");\n /**\n * @dev check if time is within fallback operator slots\n */\n if (timeDifference < 6) {\n uint256 podIndex = uint256(job.fallbackOperators[timeDifference - 1]);\n /**\n * @dev do a quick sanity check to make sure operator did not leave from index or is a zero address\n */\n if (podIndex > 0 && podIndex < _operatorPods[pod].length) {\n address fallbackOperator = _operatorPods[pod][podIndex];\n /**\n * @dev ensure that sender is currently valid backup operator\n */\n require(fallbackOperator == msg.sender, \"HOLOGRAPH: invalid fallback\");\n } else {\n require(_bondedOperators[msg.sender] == job.pod, \"HOLOGRAPH: pod only fallback\");\n }\n }\n /**\n * @dev time to reward the current operator\n */\n uint256 amount = _getBaseBondAmount(pod);\n /**\n * @dev select operator that failed to do the job, is slashed the pod base fee\n */\n _bondedAmounts[job.operator] -= amount;\n /**\n * @dev only allow HLG rewards to go to bonded operators\n * if operator is bonded, the slashed amount is sent to current operator\n * otherwise it's sent to HolographTreasury, can be burned or distributed from there\n */\n _utilityToken().transfer((isBonded ? msg.sender : address(_holograph().getTreasury())), amount);\n /**\n * @dev check if slashed operator has enough tokens bonded to stay\n */\n if (_bondedAmounts[job.operator] >= amount) {\n /**\n * @dev enough bond amount leftover, put operator back in\n */\n _operatorPods[pod].push(job.operator);\n _operatorPodIndex[job.operator] = _operatorPods[pod].length - 1;\n _bondedOperators[job.operator] = job.pod;\n } else {\n /**\n * @dev slashed operator does not have enough tokens bonded, return remaining tokens only\n */\n uint256 leftovers = _bondedAmounts[job.operator];\n if (leftovers > 0) {\n _bondedAmounts[job.operator] = 0;\n _utilityToken().transfer(job.operator, leftovers);\n }\n }\n } else {\n /**\n * @dev the selected operator is executing the job\n */\n _operatorPods[pod].push(msg.sender);\n _operatorPodIndex[job.operator] = _operatorPods[pod].length - 1;\n _bondedOperators[msg.sender] = job.pod;\n }\n }\n /**\n * @dev every executed job (even if failed) increments total message counter by one\n */\n ++_inboundMessageCounter;\n /**\n * @dev reward operator (with HLG) for executing the job\n * this is out of scope and is purposefully omitted from code\n * currently no rewards are issued\n */\n //_utilityToken().transfer((isBonded ? msg.sender : address(_utilityToken())), (10**18));\n /**\n * @dev always emit an event at end of job, this helps other operators keep track of job status\n */\n emit FinishedOperatorJob(hash, msg.sender);\n /**\n * @dev ensure that there is enough has left for the job\n */\n require(gasleft() > gasLimit, \"HOLOGRAPH: not enough gas left\");\n /**\n * @dev execute the job\n */\n try\n HolographOperatorInterface(address(this)).nonRevertingBridgeCall{value: msg.value}(\n msg.sender,\n bridgeInRequestPayload\n )\n {\n /// @dev do nothing\n } catch {\n /// @dev return any payed funds in case of revert\n payable(msg.sender).transfer(msg.value);\n _failedJobs[hash] = true;\n emit FailedOperatorJob(hash);\n }\n }\n\n /*\n * @dev Purposefully made to be external so that Operator can call it during executeJob function\n * Check the executeJob function to understand it's implementation\n */\n function nonRevertingBridgeCall(address msgSender, bytes calldata payload) external payable {\n require(msg.sender == address(this), \"HOLOGRAPH: operator only call\");\n assembly {\n /**\n * @dev remove gas price from end\n */\n calldatacopy(0, payload.offset, sub(payload.length, 0x20))\n /**\n * @dev hToken recipient is injected right before making the call\n */\n mstore(0x84, msgSender)\n /**\n * @dev make non-reverting call\n */\n let result := call(\n /// @dev gas limit is retrieved from last 32 bytes of payload in-memory value\n mload(sub(payload.length, 0x40)),\n /// @dev destination is bridge contract\n sload(_bridgeSlot),\n /// @dev any value is passed along\n callvalue(),\n /// @dev data is retrieved from 0 index memory position\n 0,\n /// @dev everything except for last 32 bytes (gas limit) is sent\n sub(payload.length, 0x40),\n 0,\n 0\n )\n if eq(result, 0) {\n revert(0, 0)\n }\n return(0, 0)\n }\n }\n\n /**\n * @notice Receive a cross-chain message\n * @dev This function is restricted for use by Holograph Messaging Module only\n */\n function crossChainMessage(bytes calldata bridgeInRequestPayload) external payable {\n require(\n msg.sender == address(_messagingModule()) || msg.sender == 0xE9e30A0aD0d8Af5cF2606ea720052E28D6fcbAAF,\n \"HOLOGRAPH: messaging only call\"\n ); // TODO: Schedule time to remove deprecated LayerZeroModule address after all in-flight LZ messages propagate\n uint256 gasPrice = 0;\n assembly {\n /**\n * @dev extract gasPrice\n */\n gasPrice := calldataload(sub(add(bridgeInRequestPayload.offset, bridgeInRequestPayload.length), 0x20))\n }\n bool underpriced = gasPrice < _minGasPrice();\n unchecked {\n bytes32 jobHash = keccak256(bridgeInRequestPayload);\n /**\n * @dev load and increment operator temp storage in one call\n */\n ++_operatorTempStorageCounter;\n /**\n * @dev use job hash, job nonce, block number, and block timestamp for generating a random number\n */\n uint256 random = uint256(keccak256(abi.encodePacked(jobHash, _jobNonce(), block.number, block.timestamp)));\n // use the left 128 bits of random number\n uint256 random1 = uint256(random >> 128);\n // use the right 128 bits of random number\n uint256 random2 = uint256(uint128(random));\n // combine the two new random numbers for use in additional pod operator selection logic\n random = uint256(keccak256(abi.encodePacked(random1 + random2)));\n /**\n * @dev divide by total number of pods, use modulus/remainder\n */\n uint256 pod = random1 % _operatorPods.length;\n /**\n * @dev identify the total number of available operators in pod\n */\n uint256 podSize = _operatorPods[pod].length;\n /**\n * @dev select a primary operator\n */\n uint256 operatorIndex = underpriced ? 0 : random2 % podSize;\n /**\n * @dev If operator index is 0, then it's open season! Anyone can execute this job. First come first serve\n * pop operator to ensure that they cannot be selected for any other job until this one completes\n * decrease pod size to accomodate popped operator\n */\n _operatorTempStorage[_operatorTempStorageCounter] = _operatorPods[pod][operatorIndex];\n _popOperator(pod, operatorIndex);\n if (podSize > 1) {\n podSize--;\n }\n _operatorJobs[jobHash] = uint256(\n ((pod + 1) << 248) |\n (uint256(_operatorTempStorageCounter) << 216) |\n (block.number << 176) |\n ((underpriced ? 0 : _randomBlockHash(random, podSize, 1)) << 160) |\n ((underpriced ? 0 : _randomBlockHash(random, podSize, 2)) << 144) |\n ((underpriced ? 0 : _randomBlockHash(random, podSize, 3)) << 128) |\n ((underpriced ? 0 : _randomBlockHash(random, podSize, 4)) << 112) |\n ((underpriced ? 0 : _randomBlockHash(random, podSize, 5)) << 96) |\n (block.timestamp << 16) |\n 0\n ); // 80 next available bit position && so far 176 bits used with only 128 left\n /**\n * @dev emit event to signal to operators that a job has become available\n */\n emit AvailableOperatorJob(jobHash, bridgeInRequestPayload);\n }\n }\n\n /**\n * @notice Calculate the amount of gas needed to execute a bridgeInRequest\n * @dev Use this function to estimate the amount of gas that will be used by the bridgeInRequest function\n * Set a specific gas limit when making this call, subtract return value, to get total gas used\n * Only use this with a static call\n * @param bridgeInRequestPayload abi encoded bytes making up the bridgeInRequest payload\n * @return the gas amount remaining after the static call is returned\n */\n function jobEstimator(bytes calldata bridgeInRequestPayload) external payable returns (uint256) {\n assembly {\n calldatacopy(0, bridgeInRequestPayload.offset, sub(bridgeInRequestPayload.length, 0x40))\n /**\n * @dev bridgeInRequest doNotRevert is purposefully set to false so a rever would happen\n */\n mstore8(0xE3, 0x00)\n let result := call(gas(), sload(_bridgeSlot), callvalue(), 0, sub(bridgeInRequestPayload.length, 0x40), 0, 0)\n /**\n * @dev if for some reason the call does not revert, it is force reverted\n */\n if eq(result, 1) {\n returndatacopy(0, 0, returndatasize())\n revert(0, returndatasize())\n }\n /**\n * @dev remaining gas is set as the return value\n */\n mstore(0x00, gas())\n return(0x00, 0x20)\n }\n }\n\n /**\n * @notice Send cross chain bridge request message\n * @dev This function is restricted to only be callable by Holograph Bridge\n * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain\n * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain\n * @param toChain Holograph Chain ID where the beam is being sent to\n * @param nonce incremented number used to ensure job hashes are unique\n * @param holographableContract address of the contract for which the bridge request is being made\n * @param bridgeOutPayload bytes made up of the bridgeOutRequest payload\n */\n function send(\n uint256 gasLimit,\n uint256 gasPrice,\n uint32 toChain,\n address msgSender,\n uint256 nonce,\n address holographableContract,\n bytes calldata bridgeOutPayload\n ) external payable {\n require(msg.sender == _bridge(), \"HOLOGRAPH: bridge only call\");\n CrossChainMessageInterface messagingModule = _messagingModule();\n uint256 hlgFee = messagingModule.getHlgFee(toChain, gasLimit, gasPrice, bridgeOutPayload);\n address hToken = _registry().getHToken(_holograph().getHolographChainId());\n require(hlgFee < msg.value, \"HOLOGRAPH: not enough value\");\n payable(hToken).transfer(hlgFee);\n bytes memory encodedData = abi.encodeWithSelector(\n HolographBridgeInterface.bridgeInRequest.selector,\n /**\n * @dev job nonce is an incremented value that is assigned to each bridge request to guarantee unique hashes\n */\n nonce,\n /**\n * @dev including the current holograph chain id (origin chain)\n */\n _holograph().getHolographChainId(),\n /**\n * @dev holographable contract have the same address across all chains, so our destination address will be the same\n */\n holographableContract,\n /**\n * @dev get the current chain's hToken for native gas token\n */\n hToken,\n /**\n * @dev recipient will be defined when operator picks up the job\n */\n address(0),\n /**\n * @dev value is set to zero for now\n */\n hlgFee,\n /**\n * @dev specify that function call should not revert\n */\n true,\n /**\n * @dev attach actual holographableContract function call\n */\n bridgeOutPayload\n );\n /**\n * @dev add gas variables to the back for later extraction\n */\n encodedData = abi.encodePacked(encodedData, gasLimit, gasPrice);\n /**\n * @dev Send the data to the current Holograph Messaging Module\n * This will be changed to dynamically select which messaging module to use based on destination network\n */\n messagingModule.send{value: msg.value - hlgFee}(\n gasLimit,\n gasPrice,\n toChain,\n msgSender,\n msg.value - hlgFee,\n encodedData\n );\n /**\n * @dev for easy indexing, an event is emitted with the payload hash for status tracking\n */\n emit CrossChainMessageSent(keccak256(encodedData));\n }\n\n /**\n * @notice Get the fees associated with sending specific payload\n * @dev Will provide exact costs on protocol and message side, combine the two to get total\n * @dev @param toChain holograph chain id of destination chain for payload\n * @dev @param gasLimit amount of gas to provide for executing payload on destination chain\n * @dev @param gasPrice maximum amount to pay for gas price, can be set to 0 and will be chose automatically\n * @dev @param crossChainPayload the entire packet being sent cross-chain\n * @return hlgFee the amount (in wei) of native gas token that will cost for finalizing job on destiantion chain\n * @return msgFee the amount (in wei) of native gas token that will cost for sending message to destiantion chain\n * @return dstGasPrice the amount (in wei) that destination message maximum gas price will be\n */\n function getMessageFee(uint32, uint256, uint256, bytes calldata) external view returns (uint256, uint256, uint256) {\n assembly {\n calldatacopy(0, 0, calldatasize())\n let result := staticcall(gas(), sload(_messagingModuleSlot), 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @notice Get the details for an available operator job\n * @dev The job hash is a keccak256 hash of the entire job payload\n * @param jobHash keccak256 hash of the job\n * @return an OperatorJob struct with details about a specific job\n */\n function getJobDetails(bytes32 jobHash) public view returns (OperatorJob memory) {\n uint256 packed = _operatorJobs[jobHash];\n /**\n * @dev The job is bitwise packed into a single 32 byte slot, this unpacks it before returning the struct\n */\n return\n OperatorJob(\n uint8(packed >> 248),\n uint16(_blockTime),\n _operatorTempStorage[uint32(packed >> 216)],\n uint40(packed >> 176),\n // TODO: move the bit-shifting around to have it be sequential\n uint64(packed >> 16),\n [\n uint16(packed >> 160),\n uint16(packed >> 144),\n uint16(packed >> 128),\n uint16(packed >> 112),\n uint16(packed >> 96)\n ]\n );\n }\n\n /**\n * @notice Get number of pods available\n * @dev This returns number of pods that have been opened via bonding\n */\n function getTotalPods() external view returns (uint256 totalPods) {\n return _operatorPods.length;\n }\n\n /**\n * @notice Get total number of operators in a pod\n * @dev Use in conjunction with paginated getPodOperators function\n * @param pod the pod to query\n * @return total operators in a pod\n */\n function getPodOperatorsLength(uint256 pod) external view returns (uint256) {\n require(_operatorPods.length >= pod, \"HOLOGRAPH: pod does not exist\");\n return _operatorPods[pod - 1].length;\n }\n\n /**\n * @notice Get list of operators in a pod\n * @dev Use paginated getPodOperators function instead if list gets too long\n * @param pod the pod to query\n * @return operators array list of operators in a pod\n */\n function getPodOperators(uint256 pod) external view returns (address[] memory operators) {\n require(_operatorPods.length >= pod, \"HOLOGRAPH: pod does not exist\");\n operators = _operatorPods[pod - 1];\n }\n\n /**\n * @notice Get paginated list of operators in a pod\n * @dev Use in conjunction with getPodOperatorsLength to know the total length of results\n * @param pod the pod to query\n * @param index the array index to start from\n * @param length the length of result set to be (will be shorter if reached end of array)\n * @return operators a paginated array of operators\n */\n function getPodOperators(\n uint256 pod,\n uint256 index,\n uint256 length\n ) external view returns (address[] memory operators) {\n require(_operatorPods.length >= pod, \"HOLOGRAPH: pod does not exist\");\n /**\n * @dev if pod 0 is selected, this will create a revert\n */\n pod--;\n /**\n * @dev get total length of pod operators\n */\n uint256 supply = _operatorPods[pod].length;\n /**\n * @dev check if length is out of bounds for this result set\n */\n if (index + length > supply) {\n /**\n * @dev adjust length to return remainder of the results\n */\n length = supply - index;\n }\n /**\n * @dev create in-memory array\n */\n operators = new address[](length);\n /**\n * @dev add operators to result set\n */\n for (uint256 i = 0; i < length; i++) {\n operators[i] = _operatorPods[pod][index + i];\n }\n }\n\n /**\n * @notice Check the base and current price for bonding to a particular pod\n * @dev Useful for understanding what is required for bonding to a pod\n * @param pod the pod to get bonding amounts for\n * @return base the base bond amount required for a pod\n * @return current the current bond amount required for a pod\n */\n function getPodBondAmounts(uint256 pod) external view returns (uint256 base, uint256 current) {\n base = _getBaseBondAmount(pod - 1);\n current = _getCurrentBondAmount(pod - 1);\n }\n\n /**\n * @notice Get an operator's currently bonded amount\n * @dev Useful for checking how much an operator has bonded\n * @param operator address of operator to check\n * @return amount total number of utility token bonded\n */\n function getBondedAmount(address operator) external view returns (uint256 amount) {\n return _bondedAmounts[operator];\n }\n\n /**\n * @notice Get an operator's currently bonded pod\n * @dev Useful for checking if an operator is currently bonded\n * @param operator address of operator to check\n * @return pod number that operator is bonded on, returns zero if not bonded or selected for job\n */\n function getBondedPod(address operator) external view returns (uint256 pod) {\n return _bondedOperators[operator];\n }\n\n /**\n * @notice Get an operator's currently bonded pod index\n * @dev Useful for checking if an operator is a fallback for active job\n * @param operator address of operator to check\n * @return index currently bonded pod's operator index, returns zero if not in pod or moved out for active job\n */\n function getBondedPodIndex(address operator) external view returns (uint256 index) {\n return _operatorPodIndex[operator];\n }\n\n /**\n * @notice Topup a bonded operator with more utility tokens\n * @dev Useful function if an operator got slashed and wants to add a safety buffer to not get unbonded\n * This function will not work if operator has currently been selected for a job\n * @param operator address of operator to topup\n * @param amount utility token amount to add\n */\n function topupUtilityToken(address operator, uint256 amount) external {\n /**\n * @dev check that an operator is currently bonded\n */\n require(_bondedOperators[operator] != 0, \"HOLOGRAPH: operator not bonded\");\n unchecked {\n /**\n * @dev add the additional amount to operator\n */\n _bondedAmounts[operator] += amount;\n }\n /**\n * @dev transfer tokens last, to prevent reentrancy attacks\n */\n require(_utilityToken().transferFrom(msg.sender, address(this), amount), \"HOLOGRAPH: token transfer failed\");\n }\n\n /**\n * @notice Bond utility tokens and become an operator\n * @dev An operator can only bond to one pod at a time, per network\n * @param operator address of operator to bond (can be an ownable smart contract)\n * @param amount utility token amount to bond (can be greater than minimum)\n * @param pod number of pod to bond to (can be for one that does not exist yet)\n */\n function bondUtilityToken(address operator, uint256 amount, uint256 pod) external {\n /**\n * @dev an operator can only bond to one pod at any give time per network\n */\n require(_bondedOperators[operator] == 0 && _bondedAmounts[operator] == 0, \"HOLOGRAPH: operator is bonded\");\n if (_isContract(operator)) {\n require(Ownable(operator).owner() != address(0), \"HOLOGRAPH: contract not ownable\");\n }\n unchecked {\n /**\n * @dev get the current bonding minimum for selected pod\n */\n uint256 current = _getCurrentBondAmount(pod - 1);\n require(current <= amount, \"HOLOGRAPH: bond amount too small\");\n /**\n * @dev check if selected pod is greater than currently existing pods\n */\n if (_operatorPods.length < pod) {\n /**\n * @dev activate pod(s) up until the selected pod\n */\n for (uint256 i = _operatorPods.length; i < pod; i++) {\n /**\n * @dev add zero address into pod to mitigate empty pod issues\n */\n _operatorPods.push([address(0)]);\n }\n }\n /**\n * @dev prevent bonding to a pod with more than uint16 max value\n */\n require(_operatorPods[pod - 1].length < type(uint16).max, \"HOLOGRAPH: too many operators\");\n _operatorPods[pod - 1].push(operator);\n _operatorPodIndex[operator] = _operatorPods[pod - 1].length - 1;\n _bondedOperators[operator] = pod;\n _bondedAmounts[operator] = amount;\n /**\n * @dev transfer tokens last, to prevent reentrancy attacks\n */\n require(_utilityToken().transferFrom(msg.sender, address(this), amount), \"HOLOGRAPH: token transfer failed\");\n }\n }\n\n /**\n * @notice Unbond HLG utility tokens and stop being an operator\n * @dev A bonded operator selected for a job cannot unbond until they complete the job, or are slashed\n * @param operator address of operator to unbond\n * @param recipient address where to send the bonded tokens\n */\n function unbondUtilityToken(address operator, address recipient) external {\n /**\n * @dev validate that operator is currently bonded\n */\n require(_bondedOperators[operator] != 0, \"HOLOGRAPH: operator not bonded\");\n /**\n * @dev check if sender is not actual operator\n */\n if (msg.sender != operator) {\n /**\n * @dev check if operator is a smart contract\n */\n require(_isContract(operator), \"HOLOGRAPH: operator not contract\");\n /**\n * @dev check if smart contract is owned by sender\n */\n require(Ownable(operator).owner() == msg.sender, \"HOLOGRAPH: sender not owner\");\n }\n /**\n * @dev get current bonded amount by operator\n */\n uint256 amount = _bondedAmounts[operator];\n /**\n * @dev unset operator bond amount before making a transfer\n */\n _bondedAmounts[operator] = 0;\n /**\n * @dev remove all operator references\n */\n _popOperator(_bondedOperators[operator] - 1, _operatorPodIndex[operator]);\n /**\n * @dev transfer tokens to recipient\n */\n require(_utilityToken().transfer(recipient, amount), \"HOLOGRAPH: token transfer failed\");\n }\n\n /**\n * @notice Get the address of the Holograph Bridge module\n * @dev Used for beaming holographable assets cross-chain\n */\n function getBridge() external view returns (address bridge) {\n assembly {\n bridge := sload(_bridgeSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Bridge module address\n * @param bridge address of the Holograph Bridge smart contract to use\n */\n function setBridge(address bridge) external onlyAdmin {\n assembly {\n sstore(_bridgeSlot, bridge)\n }\n }\n\n /**\n * @notice Get the Holograph Protocol contract\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\n */\n function getHolograph() external view returns (address holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Protocol contract address\n * @param holograph address of the Holograph Protocol smart contract to use\n */\n function setHolograph(address holograph) external onlyAdmin {\n assembly {\n sstore(_holographSlot, holograph)\n }\n }\n\n /**\n * @notice Get the address of the Holograph Interfaces module\n * @dev Holograph uses this contract to store data that needs to be accessed by a large portion of the modules\n */\n function getInterfaces() external view returns (address interfaces) {\n assembly {\n interfaces := sload(_interfacesSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Interfaces module address\n * @param interfaces address of the Holograph Interfaces smart contract to use\n */\n function setInterfaces(address interfaces) external onlyAdmin {\n assembly {\n sstore(_interfacesSlot, interfaces)\n }\n }\n\n /**\n * @notice Get the address of the Holograph Messaging Module\n * @dev All cross-chain message requests will get forwarded to this adress\n */\n function getMessagingModule() external view returns (address messagingModule) {\n assembly {\n messagingModule := sload(_messagingModuleSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Messaging Module address\n * @param messagingModule address of the LayerZero Endpoint to use\n */\n function setMessagingModule(address messagingModule) external onlyAdmin {\n assembly {\n sstore(_messagingModuleSlot, messagingModule)\n }\n }\n\n /**\n * @notice Get the Holograph Registry module\n * @dev This module stores a reference for all deployed holographable smart contracts\n */\n function getRegistry() external view returns (address registry) {\n assembly {\n registry := sload(_registrySlot)\n }\n }\n\n /**\n * @notice Update the Holograph Registry module address\n * @param registry address of the Holograph Registry smart contract to use\n */\n function setRegistry(address registry) external onlyAdmin {\n assembly {\n sstore(_registrySlot, registry)\n }\n }\n\n /**\n * @notice Get the Holograph Utility Token address\n * @dev This is the official utility token of the Holograph Protocol\n */\n function getUtilityToken() external view returns (address utilityToken) {\n assembly {\n utilityToken := sload(_utilityTokenSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Utility Token address\n * @param utilityToken address of the Holograph Utility Token smart contract to use\n */\n function setUtilityToken(address utilityToken) external onlyAdmin {\n assembly {\n sstore(_utilityTokenSlot, utilityToken)\n }\n }\n\n /**\n * @notice Get the Minimum Gas Price\n * @dev The minimum value required to execute a job without it being marked as under priced\n */\n function getMinGasPrice() external view returns (uint256 minGasPrice) {\n assembly {\n minGasPrice := sload(_minGasPriceSlot)\n }\n }\n\n /**\n * @notice Update the Minimum Gas Price\n * @param minGasPrice amount to set for minimum gas price\n */\n function setMinGasPrice(uint256 minGasPrice) external onlyAdmin {\n assembly {\n sstore(_minGasPriceSlot, minGasPrice)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Bridge Interface\n */\n function _bridge() private view returns (address bridge) {\n assembly {\n bridge := sload(_bridgeSlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Interface\n */\n function _holograph() private view returns (HolographInterface holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Interfaces Interface\n */\n function _interfaces() private view returns (HolographInterfacesInterface interfaces) {\n assembly {\n interfaces := sload(_interfacesSlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Messaging Module Interface\n */\n function _messagingModule() private view returns (CrossChainMessageInterface messagingModule) {\n assembly {\n messagingModule := sload(_messagingModuleSlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Registry Interface\n */\n function _registry() private view returns (HolographRegistryInterface registry) {\n assembly {\n registry := sload(_registrySlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Utility Token Interface\n */\n function _utilityToken() private view returns (HolographERC20Interface utilityToken) {\n assembly {\n utilityToken := sload(_utilityTokenSlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the minimum gas price allowed\n */\n function _minGasPrice() private view returns (uint256 minGasPrice) {\n assembly {\n minGasPrice := sload(_minGasPriceSlot)\n }\n }\n\n /**\n * @dev Internal nonce, that increments on each call, used for randomness\n */\n function _jobNonce() private returns (uint256 jobNonce) {\n assembly {\n jobNonce := add(sload(_jobNonceSlot), 0x0000000000000000000000000000000000000000000000000000000000000001)\n sstore(_jobNonceSlot, jobNonce)\n }\n }\n\n /**\n * @dev Internal function used to remove an operator from a particular pod\n */\n function _popOperator(uint256 pod, uint256 operatorIndex) private {\n /**\n * @dev only pop the operator if it's not a zero address\n */\n if (operatorIndex > 0) {\n unchecked {\n address operator = _operatorPods[pod][operatorIndex];\n /**\n * @dev mark operator as no longer bonded\n */\n _bondedOperators[operator] = 0;\n /**\n * @dev remove pod reference for operator\n */\n _operatorPodIndex[operator] = 0;\n uint256 lastIndex = _operatorPods[pod].length - 1;\n if (lastIndex != operatorIndex) {\n /**\n * @dev if operator is not last index, move last index to operator's current index\n */\n _operatorPods[pod][operatorIndex] = _operatorPods[pod][lastIndex];\n _operatorPodIndex[_operatorPods[pod][operatorIndex]] = operatorIndex;\n }\n /**\n * @dev delete last index\n */\n delete _operatorPods[pod][lastIndex];\n /**\n * @dev shorten array length\n */\n _operatorPods[pod].pop();\n }\n }\n }\n\n /**\n * @dev Internal function used for calculating the base bonding amount for a pod\n */\n function _getBaseBondAmount(uint256 pod) private view returns (uint256) {\n return (_podMultiplier ** pod) * _baseBondAmount;\n }\n\n /**\n * @dev Internal function used for calculating the current bonding amount for a pod\n */\n function _getCurrentBondAmount(uint256 pod) private view returns (uint256) {\n uint256 current = (_podMultiplier ** pod) * _baseBondAmount;\n if (pod >= _operatorPods.length) {\n return current;\n }\n uint256 threshold = _operatorThreshold / (2 ** pod);\n uint256 position = _operatorPods[pod].length;\n if (position > threshold) {\n position -= threshold;\n // current += (current / _operatorThresholdDivisor) * position;\n current += (current / _operatorThresholdDivisor) * (position / _operatorThresholdStep);\n }\n return current;\n }\n\n /**\n * @dev Internal function used for generating a random pod operator selection by using previously mined blocks\n */\n function _randomBlockHash(uint256 random, uint256 podSize, uint256 n) private view returns (uint256) {\n unchecked {\n return (random + uint256(blockhash(block.number - n))) % podSize;\n }\n }\n\n /**\n * @dev Internal function used for checking if a contract has been deployed at address\n */\n function _isContract(address contractAddress) private view returns (bool) {\n bytes32 codehash;\n assembly {\n codehash := extcodehash(contractAddress)\n }\n return (codehash != 0x0 && codehash != 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470);\n }\n\n /**\n * @dev Purposefully left empty to ensure ether transfers use least amount of gas possible\n */\n receive() external payable {}\n\n /**\n * @dev Purposefully reverts to prevent any calls to undefined functions\n */\n fallback() external payable {\n revert();\n }\n}\n" + }, + "contracts/HolographRegistry.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./abstract/Admin.sol\";\nimport \"./abstract/Initializable.sol\";\n\nimport \"./interface/HolographInterface.sol\";\nimport \"./interface/HolographRegistryInterface.sol\";\nimport \"./interface/InitializableInterface.sol\";\n\n/**\n * @title Holograph Registry\n * @author https://github.com/holographxyz\n * @notice View and validate all deployed holographable contracts\n * @dev Use this to: validate that contracts are Holograph Protocol compliant, get source code for supported standards, and interact with hTokens\n */\ncontract HolographRegistry is Admin, Initializable, HolographRegistryInterface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\n */\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.utilityToken')) - 1)\n */\n bytes32 constant _utilityTokenSlot = 0xbf76518d46db472b71aa7677a0908b8016f3dee568415ffa24055f9a670f9c37;\n\n /**\n * @dev Array of all Holographable contracts that were ever deployed on this chain\n */\n address[] private _holographableContracts;\n\n /**\n * @dev A mapping of hashes to contract addresses\n */\n mapping(bytes32 => address) private _holographedContractsHashMap;\n\n /**\n * @dev Storage slot for saving contract type to contract address references\n */\n mapping(bytes32 => address) private _contractTypeAddresses;\n\n /**\n * @dev Reserved type addresses for Admin\n * Note: this is used for defining default contracts\n */\n mapping(bytes32 => bool) private _reservedTypes;\n\n /**\n * @dev A list of smart contracts that are guaranteed secure and holographable\n */\n mapping(address => bool) private _holographedContracts;\n\n /**\n * @dev Mapping of all hTokens available for the different EVM chains\n */\n mapping(uint32 => address) private _hTokens;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address holograph, bytes32[] memory reservedTypes) = abi.decode(initPayload, (address, bytes32[]));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_holographSlot, holograph)\n }\n for (uint256 i = 0; i < reservedTypes.length; i++) {\n _reservedTypes[reservedTypes[i]] = true;\n }\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n function isHolographedContract(address smartContract) external view returns (bool) {\n return _holographedContracts[smartContract];\n }\n\n function isHolographedHashDeployed(bytes32 hash) external view returns (bool) {\n return _holographedContractsHashMap[hash] != address(0);\n }\n\n function holographableEvent(bytes calldata payload) external {\n if (_holographedContracts[msg.sender]) {\n emit HolographableContractEvent(msg.sender, payload);\n }\n }\n\n /**\n * @dev Allows to reference a deployed smart contract, and use it's code as reference inside of Holographers\n */\n function referenceContractTypeAddress(address contractAddress) external returns (bytes32) {\n bytes32 contractType;\n assembly {\n contractType := extcodehash(contractAddress)\n }\n require(\n (// check that bytecode is not empty\n contractType != 0x0 &&\n // check that hash is not for empty bytes\n contractType != 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470),\n \"HOLOGRAPH: empty contract\"\n );\n require(_contractTypeAddresses[contractType] == address(0), \"HOLOGRAPH: contract already set\");\n require(!_reservedTypes[contractType], \"HOLOGRAPH: reserved address type\");\n _contractTypeAddresses[contractType] = contractAddress;\n return contractType;\n }\n\n /**\n * @dev Returns the contract address for a contract type\n */\n function getContractTypeAddress(bytes32 contractType) external view returns (address) {\n return _contractTypeAddresses[contractType];\n }\n\n /**\n * @dev Sets the contract address for a contract type\n */\n function setContractTypeAddress(bytes32 contractType, address contractAddress) external onlyAdmin {\n require(_reservedTypes[contractType], \"HOLOGRAPH: not reserved type\");\n _contractTypeAddresses[contractType] = contractAddress;\n }\n\n /**\n * @notice Get the Holograph Protocol contract\n * @dev This contract stores a reference to all the primary modules and variables of the protocol\n */\n function getHolograph() external view returns (address holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Protocol contract address\n * @param holograph address of the Holograph Protocol smart contract to use\n */\n function setHolograph(address holograph) external onlyAdmin {\n assembly {\n sstore(_holographSlot, holograph)\n }\n }\n\n /**\n * @notice Get set length list, starting from index, for all holographable contracts\n * @param index The index to start enumeration from\n * @param length The length of returned results\n * @return contracts address[] Returns a set length array of holographable contracts deployed\n */\n function getHolographableContracts(uint256 index, uint256 length) external view returns (address[] memory contracts) {\n uint256 supply = _holographableContracts.length;\n if (index + length > supply) {\n length = supply - index;\n }\n contracts = new address[](length);\n for (uint256 i = 0; i < length; i++) {\n contracts[i] = _holographableContracts[index + i];\n }\n }\n\n /**\n * @notice Get total number of deployed holographable contracts\n */\n function getHolographableContractsLength() external view returns (uint256) {\n return _holographableContracts.length;\n }\n\n /**\n * @dev Returns the address for a holographed hash\n */\n function getHolographedHashAddress(bytes32 hash) external view returns (address) {\n return _holographedContractsHashMap[hash];\n }\n\n /**\n * @dev Allows Holograph Factory to register a deployed contract, referenced with deployment hash\n */\n function setHolographedHashAddress(bytes32 hash, address contractAddress) external {\n address holograph;\n assembly {\n holograph := sload(_holographSlot)\n }\n require(msg.sender == HolographInterface(holograph).getFactory(), \"HOLOGRAPH: factory only function\");\n _holographedContractsHashMap[hash] = contractAddress;\n _holographedContracts[contractAddress] = true;\n _holographableContracts.push(contractAddress);\n }\n\n /**\n * @dev Returns the hToken address for a given chain id\n */\n function getHToken(uint32 chainId) external view returns (address) {\n return _hTokens[chainId];\n }\n\n /**\n * @dev Sets the hToken address for a specific chain id\n */\n function setHToken(uint32 chainId, address hToken) external onlyAdmin {\n _hTokens[chainId] = hToken;\n }\n\n /**\n * @dev Returns the reserved contract address for a contract type\n */\n function getReservedContractTypeAddress(bytes32 contractType) external view returns (address contractTypeAddress) {\n if (_reservedTypes[contractType]) {\n contractTypeAddress = _contractTypeAddresses[contractType];\n }\n }\n\n /**\n * @dev Allows admin to update or toggle reserved type\n */\n function setReservedContractTypeAddress(bytes32 hash, bool reserved) external onlyAdmin {\n _reservedTypes[hash] = reserved;\n }\n\n /**\n * @dev Allows admin to update or toggle reserved types\n */\n function setReservedContractTypeAddresses(bytes32[] calldata hashes, bool[] calldata reserved) external onlyAdmin {\n for (uint256 i = 0; i < hashes.length; i++) {\n _reservedTypes[hashes[i]] = reserved[i];\n }\n }\n\n /**\n * @notice Get the Holograph Utility Token address\n * @dev This is the official utility token of the Holograph Protocol\n */\n function getUtilityToken() external view returns (address utilityToken) {\n assembly {\n utilityToken := sload(_utilityTokenSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Utility Token address\n * @param utilityToken address of the Holograph Utility Token smart contract to use\n */\n function setUtilityToken(address utilityToken) external onlyAdmin {\n assembly {\n sstore(_utilityTokenSlot, utilityToken)\n }\n }\n\n /**\n * @dev Purposefully reverts to prevent having any type of ether transfered into the contract\n */\n receive() external payable {\n revert();\n }\n\n /**\n * @dev Purposefully reverts to prevent any calls to undefined functions\n */\n fallback() external payable {\n revert();\n }\n}\n" + }, + "contracts/HolographTreasury.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./abstract/Admin.sol\";\nimport \"./abstract/Initializable.sol\";\n\nimport \"./interface/HolographERC20Interface.sol\";\nimport \"./interface/HolographERC721Interface.sol\";\nimport \"./interface/HolographInterface.sol\";\nimport \"./interface/HolographTreasuryInterface.sol\";\nimport \"./interface/HolographFactoryInterface.sol\";\nimport \"./interface/HolographOperatorInterface.sol\";\nimport \"./interface/HolographRegistryInterface.sol\";\nimport \"./interface/InitializableInterface.sol\";\n\nimport \"./struct/DeploymentConfig.sol\";\nimport \"./struct/Verification.sol\";\n\n/**\n * @title Holograph Treasury\n * @author https://github.com/holographxyz\n * @notice This contract holds and manages the protocol treasury\n * @dev As of now this is an empty zero logic contract and is still a work in progress\n */\ncontract HolographTreasury is Admin, Initializable, HolographTreasuryInterface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.bridge')) - 1)\n */\n bytes32 constant _bridgeSlot = 0xeb87cbb21687feb327e3d58c6c16d552231d12c7a0e8115042a4165fac8a77f9;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)\n */\n bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.operator')) - 1)\n */\n bytes32 constant _operatorSlot = 0x7caba557ad34138fa3b7e43fb574e0e6cc10481c3073e0dffbc560db81b5c60f;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\n */\n bytes32 constant _registrySlot = 0xce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address bridge, address holograph, address operator, address registry) = abi.decode(\n initPayload,\n (address, address, address, address)\n );\n assembly {\n sstore(_adminSlot, origin())\n\n sstore(_bridgeSlot, bridge)\n sstore(_holographSlot, holograph)\n sstore(_operatorSlot, operator)\n sstore(_registrySlot, registry)\n }\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @notice Get the address of the Holograph Bridge module\n * @dev Used for beaming holographable assets cross-chain\n */\n function getBridge() external view returns (address bridge) {\n assembly {\n bridge := sload(_bridgeSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Bridge module address\n * @param bridge address of the Holograph Bridge smart contract to use\n */\n function setBridge(address bridge) external onlyAdmin {\n assembly {\n sstore(_bridgeSlot, bridge)\n }\n }\n\n /**\n * @notice Get the Holograph Protocol contract\n * @dev This contract stores a reference to all the primary modules and variables of the protocol\n */\n function getHolograph() external view returns (address holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Protocol contract address\n * @param holograph address of the Holograph Protocol smart contract to use\n */\n function setHolograph(address holograph) external onlyAdmin {\n assembly {\n sstore(_holographSlot, holograph)\n }\n }\n\n /**\n * @notice Get the address of the Holograph Operator module\n * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module\n */\n function getOperator() external view returns (address operator) {\n assembly {\n operator := sload(_operatorSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Operator module address\n * @param operator address of the Holograph Operator smart contract to use\n */\n function setOperator(address operator) external onlyAdmin {\n assembly {\n sstore(_operatorSlot, operator)\n }\n }\n\n /**\n * @notice Get the Holograph Registry module\n * @dev This module stores a reference for all deployed holographable smart contracts\n */\n function getRegistry() external view returns (address registry) {\n assembly {\n registry := sload(_registrySlot)\n }\n }\n\n /**\n * @notice Update the Holograph Registry module address\n * @param registry address of the Holograph Registry smart contract to use\n */\n function setRegistry(address registry) external onlyAdmin {\n assembly {\n sstore(_registrySlot, registry)\n }\n }\n\n function _bridge() private view returns (address bridge) {\n assembly {\n bridge := sload(_bridgeSlot)\n }\n }\n\n function _holograph() private view returns (address holograph) {\n assembly {\n holograph := sload(_holographSlot)\n }\n }\n\n function _operator() private view returns (address operator) {\n assembly {\n operator := sload(_operatorSlot)\n }\n }\n\n function _registry() private view returns (address registry) {\n assembly {\n registry := sload(_registrySlot)\n }\n }\n\n /**\n * @dev Purposefully left empty to ensure ether transfers use least amount of gas possible\n */\n receive() external payable {}\n\n /**\n * @dev Purposefully reverts to prevent any calls to undefined functions\n */\n fallback() external payable {\n revert();\n }\n}\n" + }, + "contracts/interface/CollectionURI.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\ninterface CollectionURI {\n function contractURI() external view returns (string memory);\n}\n" + }, + "contracts/interface/CrossChainMessageInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\ninterface CrossChainMessageInterface {\n function send(\n uint256 gasLimit,\n uint256 gasPrice,\n uint32 toChain,\n address msgSender,\n uint256 msgValue,\n bytes calldata crossChainPayload\n ) external payable;\n\n function getMessageFee(\n uint32 toChain,\n uint256 gasLimit,\n uint256 gasPrice,\n bytes calldata crossChainPayload\n ) external view returns (uint256 hlgFee, uint256 msgFee, uint256 dstGasPrice);\n\n function getHlgFee(\n uint32 toChain,\n uint256 gasLimit,\n uint256 gasPrice,\n bytes calldata crossChainPayload\n ) external view returns (uint256 hlgFee);\n}\n" + }, + "contracts/interface/ERC1271.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1271.sol)\n\npragma solidity 0.8.13;\n\n/**\n * @dev Interface of the ERC1271 standard signature validation method for\n * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271].\n *\n * _Available since v4.1._\n */\ninterface ERC1271 {\n /**\n * @dev Should return whether the signature provided is valid for the provided data\n * @param hash Hash of the data to be signed\n * @param signature Signature byte array associated with _data\n */\n function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue);\n}\n" + }, + "contracts/interface/ERC165.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity 0.8.13;\n\ninterface ERC165 {\n /// @notice Query if a contract implements an interface\n /// @param interfaceID The interface identifier, as specified in ERC-165\n /// @dev Interface identification is specified in ERC-165. This function\n /// uses less than 30,000 gas.\n /// @return `true` if the contract implements `interfaceID` and\n /// `interfaceID` is not 0xffffffff, `false` otherwise\n function supportsInterface(bytes4 interfaceID) external view returns (bool);\n}\n" + }, + "contracts/interface/ERC20.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity 0.8.13;\n\ninterface ERC20 {\n function totalSupply() external view returns (uint256);\n\n function balanceOf(address _owner) external view returns (uint256 balance);\n\n function transfer(address _to, uint256 _value) external returns (bool success);\n\n function transferFrom(address _from, address _to, uint256 _value) external returns (bool success);\n\n function approve(address _spender, uint256 _value) external returns (bool success);\n\n function allowance(address _owner, address _spender) external view returns (uint256 remaining);\n\n event Transfer(address indexed _from, address indexed _to, uint256 _value);\n\n event Approval(address indexed _owner, address indexed _spender, uint256 _value);\n}\n" + }, + "contracts/interface/ERC20Burnable.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity 0.8.13;\n\ninterface ERC20Burnable {\n function burn(uint256 amount) external;\n\n function burnFrom(address account, uint256 amount) external returns (bool);\n}\n" + }, + "contracts/interface/ERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity 0.8.13;\n\ninterface ERC20Metadata {\n function decimals() external view returns (uint8);\n\n function name() external view returns (string memory);\n\n function symbol() external view returns (string memory);\n}\n" + }, + "contracts/interface/ERC20Permit.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)\n\npragma solidity 0.8.13;\n\n/**\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n */\ninterface ERC20Permit {\n /**\n * @dev Sets `value` as the allowance of `spender` over ``account``'s tokens,\n * given ``account``'s signed approval.\n *\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n * ordering also apply here.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `deadline` must be a timestamp in the future.\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `account`\n * over the EIP712-formatted function arguments.\n * - the signature must use ``account``'s current nonce (see {nonces}).\n *\n * For more information on the signature format, see the\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n * section].\n */\n function permit(\n address account,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n /**\n * @dev Returns the current nonce for `account`. This value must be\n * included whenever a signature is generated for {permit}.\n *\n * Every successful call to {permit} increases ``account``'s nonce by one. This\n * prevents a signature from being used multiple times.\n */\n function nonces(address account) external view returns (uint256);\n\n /**\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n" + }, + "contracts/interface/ERC20Receiver.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity 0.8.13;\n\ninterface ERC20Receiver {\n function onERC20Received(\n address account,\n address recipient,\n uint256 amount,\n bytes memory data\n ) external returns (bytes4);\n}\n" + }, + "contracts/interface/ERC20Safer.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity 0.8.13;\n\ninterface ERC20Safer {\n function safeTransfer(address recipient, uint256 amount) external returns (bool);\n\n function safeTransfer(address recipient, uint256 amount, bytes memory data) external returns (bool);\n\n function safeTransferFrom(address account, address recipient, uint256 amount) external returns (bool);\n\n function safeTransferFrom(\n address account,\n address recipient,\n uint256 amount,\n bytes memory data\n ) external returns (bool);\n}\n" + }, + "contracts/interface/ERC721.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity 0.8.13;\n\n/// @title ERC-721 Non-Fungible Token Standard\n/// @dev See https://eips.ethereum.org/EIPS/eip-721\n/// Note: the ERC-165 identifier for this interface is 0x80ac58cd.\n/* is ERC165 */\ninterface ERC721 {\n /// @dev This emits when ownership of any NFT changes by any mechanism.\n /// This event emits when NFTs are created (`from` == 0) and destroyed\n /// (`to` == 0). Exception: during contract creation, any number of NFTs\n /// may be created and assigned without emitting Transfer. At the time of\n /// any transfer, the approved address for that NFT (if any) is reset to none.\n event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId);\n\n /// @dev This emits when the approved address for an NFT is changed or\n /// reaffirmed. The zero address indicates there is no approved address.\n /// When a Transfer event emits, this also indicates that the approved\n /// address for that NFT (if any) is reset to none.\n event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId);\n\n /// @dev This emits when an operator is enabled or disabled for an owner.\n /// The operator can manage all NFTs of the owner.\n event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved);\n\n /// @notice Count all NFTs assigned to an owner\n /// @dev NFTs assigned to the zero address are considered invalid, and this\n /// function throws for queries about the zero address.\n /// @param _owner An address for whom to query the balance\n /// @return The number of NFTs owned by `_owner`, possibly zero\n function balanceOf(address _owner) external view returns (uint256);\n\n /// @notice Find the owner of an NFT\n /// @dev NFTs assigned to zero address are considered invalid, and queries\n /// about them do throw.\n /// @param _tokenId The identifier for an NFT\n /// @return The address of the owner of the NFT\n function ownerOf(uint256 _tokenId) external view returns (address);\n\n /// @notice Transfers the ownership of an NFT from one address to another address\n /// @dev Throws unless `msg.sender` is the current owner, an authorized\n /// operator, or the approved address for this NFT. Throws if `_from` is\n /// not the current owner. Throws if `_to` is the zero address. Throws if\n /// `_tokenId` is not a valid NFT. When transfer is complete, this function\n /// checks if `_to` is a smart contract (code size > 0). If so, it calls\n /// `onERC721Received` on `_to` and throws if the return value is not\n /// `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`.\n /// @param _from The current owner of the NFT\n /// @param _to The new owner\n /// @param _tokenId The NFT to transfer\n /// @param data Additional data with no specified format, sent in call to `_to`\n function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes calldata data) external payable;\n\n /// @notice Transfers the ownership of an NFT from one address to another address\n /// @dev This works identically to the other function with an extra data parameter,\n /// except this function just sets data to \"\".\n /// @param _from The current owner of the NFT\n /// @param _to The new owner\n /// @param _tokenId The NFT to transfer\n function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable;\n\n /// @notice Transfer ownership of an NFT -- THE CALLER IS RESPONSIBLE\n /// TO CONFIRM THAT `_to` IS CAPABLE OF RECEIVING NFTS OR ELSE\n /// THEY MAY BE PERMANENTLY LOST\n /// @dev Throws unless `msg.sender` is the current owner, an authorized\n /// operator, or the approved address for this NFT. Throws if `_from` is\n /// not the current owner. Throws if `_to` is the zero address. Throws if\n /// `_tokenId` is not a valid NFT.\n /// @param _from The current owner of the NFT\n /// @param _to The new owner\n /// @param _tokenId The NFT to transfer\n function transferFrom(address _from, address _to, uint256 _tokenId) external payable;\n\n /// @notice Change or reaffirm the approved address for an NFT\n /// @dev The zero address indicates there is no approved address.\n /// Throws unless `msg.sender` is the current NFT owner, or an authorized\n /// operator of the current owner.\n /// @param _approved The new approved NFT controller\n /// @param _tokenId The NFT to approve\n function approve(address _approved, uint256 _tokenId) external payable;\n\n /// @notice Enable or disable approval for a third party (\"operator\") to manage\n /// all of `msg.sender`'s assets\n /// @dev Emits the ApprovalForAll event. The contract MUST allow\n /// multiple operators per owner.\n /// @param _operator Address to add to the set of authorized operators\n /// @param _approved True if the operator is approved, false to revoke approval\n function setApprovalForAll(address _operator, bool _approved) external;\n\n /// @notice Get the approved address for a single NFT\n /// @dev Throws if `_tokenId` is not a valid NFT.\n /// @param _tokenId The NFT to find the approved address for\n /// @return The approved address for this NFT, or the zero address if there is none\n function getApproved(uint256 _tokenId) external view returns (address);\n\n /// @notice Query if an address is an authorized operator for another address\n /// @param _owner The address that owns the NFTs\n /// @param _operator The address that acts on behalf of the owner\n /// @return True if `_operator` is an approved operator for `_owner`, false otherwise\n function isApprovedForAll(address _owner, address _operator) external view returns (bool);\n}\n" + }, + "contracts/interface/ERC721Enumerable.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity 0.8.13;\n\n/// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension\n/// @dev See https://eips.ethereum.org/EIPS/eip-721\n/// Note: the ERC-165 identifier for this interface is 0x780e9d63.\n/* is ERC721 */\ninterface ERC721Enumerable {\n /// @notice Count NFTs tracked by this contract\n /// @return A count of valid NFTs tracked by this contract, where each one of\n /// them has an assigned and queryable owner not equal to the zero address\n function totalSupply() external view returns (uint256);\n\n /// @notice Enumerate valid NFTs\n /// @dev Throws if `_index` >= `totalSupply()`.\n /// @param _index A counter less than `totalSupply()`\n /// @return The token identifier for the `_index`th NFT,\n /// (sort order not specified)\n function tokenByIndex(uint256 _index) external view returns (uint256);\n\n /// @notice Enumerate NFTs assigned to an owner\n /// @dev Throws if `_index` >= `balanceOf(_owner)` or if\n /// `_owner` is the zero address, representing invalid NFTs.\n /// @param _owner An address where we are interested in NFTs owned by them\n /// @param _index A counter less than `balanceOf(_owner)`\n /// @return The token identifier for the `_index`th NFT assigned to `_owner`,\n /// (sort order not specified)\n function tokenOfOwnerByIndex(address _owner, uint256 _index) external view returns (uint256);\n}\n" + }, + "contracts/interface/ERC721Metadata.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity 0.8.13;\n\n/// @title ERC-721 Non-Fungible Token Standard, optional metadata extension\n/// @dev See https://eips.ethereum.org/EIPS/eip-721\n/// Note: the ERC-165 identifier for this interface is 0x5b5e139f.\n/* is ERC721 */\ninterface ERC721Metadata {\n /// @notice A descriptive name for a collection of NFTs in this contract\n function name() external view returns (string memory _name);\n\n /// @notice An abbreviated name for NFTs in this contract\n function symbol() external view returns (string memory _symbol);\n\n /// @notice A distinct Uniform Resource Identifier (URI) for a given asset.\n /// @dev Throws if `_tokenId` is not a valid NFT. URIs are defined in RFC\n /// 3986. The URI may point to a JSON file that conforms to the \"ERC721\n /// Metadata JSON Schema\".\n function tokenURI(uint256 _tokenId) external view returns (string memory);\n}\n" + }, + "contracts/interface/ERC721TokenReceiver.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\n/// @dev Note: the ERC-165 identifier for this interface is 0x150b7a02.\ninterface ERC721TokenReceiver {\n /// @notice Handle the receipt of an NFT\n /// @dev The ERC721 smart contract calls this function on the recipient\n /// after a `transfer`. This function MAY throw to revert and reject the\n /// transfer. Return of other than the magic value MUST result in the\n /// transaction being reverted.\n /// Note: the contract address is always the message sender.\n /// @param _operator The address which called `safeTransferFrom` function\n /// @param _from The address which previously owned the token\n /// @param _tokenId The NFT identifier which is being transferred\n /// @param _data Additional data with no specified format\n /// @return `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`\n /// unless throwing\n function onERC721Received(\n address _operator,\n address _from,\n uint256 _tokenId,\n bytes calldata _data\n ) external returns (bytes4);\n}\n" + }, + "contracts/interface/Holographable.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\ninterface Holographable {\n function bridgeIn(uint32 fromChain, bytes calldata payload) external returns (bytes4);\n\n function bridgeOut(\n uint32 toChain,\n address sender,\n bytes calldata payload\n ) external returns (bytes4 selector, bytes memory data);\n}\n" + }, + "contracts/interface/HolographBridgeInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\n/**\n * @title Holograph Bridge\n * @author https://github.com/holographxyz\n * @notice Beam any holographable contracts and assets across blockchains\n * @dev The contract abstracts all the complexities of making bridge requests and uses a universal interface to bridge any type of holographable assets\n */\ninterface HolographBridgeInterface {\n /**\n * @notice Receive a beam from another chain\n * @dev This function can only be called by the Holograph Operator module\n * @param fromChain Holograph Chain ID where the brigeOutRequest was created\n * @param holographableContract address of the destination contract that the bridgeInRequest is targeted for\n * @param hToken address of the hToken contract that wrapped the origin chain native gas token\n * @param hTokenRecipient address of recipient for the hToken reward\n * @param hTokenValue exact amount of hToken reward in wei\n * @param doNotRevert boolean used to specify if the call should revert\n * @param bridgeInPayload actual abi encoded bytes of the data that the holographable contract bridgeIn function will receive\n */\n function bridgeInRequest(\n uint256 nonce,\n uint32 fromChain,\n address holographableContract,\n address hToken,\n address hTokenRecipient,\n uint256 hTokenValue,\n bool doNotRevert,\n bytes calldata bridgeInPayload\n ) external payable;\n\n /**\n * @notice Create a beam request for a destination chain\n * @dev This function works for deploying contracts and beaming supported holographable assets across chains\n * @param toChain Holograph Chain ID where the beam is being sent to\n * @param holographableContract address of the contract for which the bridge request is being made\n * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain\n * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\n */\n function bridgeOutRequest(\n uint32 toChain,\n address holographableContract,\n uint256 gasLimit,\n uint256 gasPrice,\n bytes calldata bridgeOutPayload\n ) external payable;\n\n /**\n * @notice Do not call this function, it will always revert\n * @dev Used by getBridgeOutRequestPayload function\n * It is purposefully inverted to always revert on a successful call\n * Marked as external and not private to allow use inside try/catch of getBridgeOutRequestPayload function\n * If this function does not revert and returns a string, it is the actual revert reason\n * @param sender address of actual sender that is planning to make a bridgeOutRequest call\n * @param toChain holograph chain id of destination chain\n * @param holographableContract address of the contract for which the bridge request is being made\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\n */\n function revertedBridgeOutRequest(\n address sender,\n uint32 toChain,\n address holographableContract,\n bytes calldata bridgeOutPayload\n ) external returns (string memory revertReason);\n\n /**\n * @notice Get the payload created by the bridgeOutRequest function\n * @dev Use this function to get the payload that will be generated by a bridgeOutRequest\n * Only use this with a static call\n * @param toChain Holograph Chain ID where the beam is being sent to\n * @param holographableContract address of the contract for which the bridge request is being made\n * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain\n * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain\n * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive\n * @return samplePayload bytes made up of the bridgeOutRequest payload\n */\n function getBridgeOutRequestPayload(\n uint32 toChain,\n address holographableContract,\n uint256 gasLimit,\n uint256 gasPrice,\n bytes calldata bridgeOutPayload\n ) external returns (bytes memory samplePayload);\n\n /**\n * @notice Get the fees associated with sending specific payload\n * @dev Will provide exact costs on protocol and message side, combine the two to get total\n * @param toChain holograph chain id of destination chain for payload\n * @param gasLimit amount of gas to provide for executing payload on destination chain\n * @param gasPrice maximum amount to pay for gas price, can be set to 0 and will be chose automatically\n * @param crossChainPayload the entire packet being sent cross-chain\n * @return hlgFee the amount (in wei) of native gas token that will cost for finalizing job on destiantion chain\n * @return msgFee the amount (in wei) of native gas token that will cost for sending message to destiantion chain\n * @return dstGasPrice the amount (in wei) that destination message maximum gas price will be\n */\n function getMessageFee(\n uint32 toChain,\n uint256 gasLimit,\n uint256 gasPrice,\n bytes calldata crossChainPayload\n ) external view returns (uint256 hlgFee, uint256 msgFee, uint256 dstGasPrice);\n\n /**\n * @notice Get the address of the Holograph Factory module\n * @dev Used for deploying holographable smart contracts\n */\n function getFactory() external view returns (address factory);\n\n /**\n * @notice Update the Holograph Factory module address\n * @param factory address of the Holograph Factory smart contract to use\n */\n function setFactory(address factory) external;\n\n /**\n * @notice Get the Holograph Protocol contract\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\n */\n function getHolograph() external view returns (address holograph);\n\n /**\n * @notice Update the Holograph Protocol contract address\n * @param holograph address of the Holograph Protocol smart contract to use\n */\n function setHolograph(address holograph) external;\n\n /**\n * @notice Get the latest job nonce\n * @dev You can use the job nonce as a way to calculate total amount of bridge requests that have been made\n */\n function getJobNonce() external view returns (uint256 jobNonce);\n\n /**\n * @notice Get the address of the Holograph Operator module\n * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module\n */\n function getOperator() external view returns (address operator);\n\n /**\n * @notice Update the Holograph Operator module address\n * @param operator address of the Holograph Operator smart contract to use\n */\n function setOperator(address operator) external;\n\n /**\n * @notice Get the Holograph Registry module\n * @dev This module stores a reference for all deployed holographable smart contracts\n */\n function getRegistry() external view returns (address registry);\n\n /**\n * @notice Update the Holograph Registry module address\n * @param registry address of the Holograph Registry smart contract to use\n */\n function setRegistry(address registry) external;\n}\n" + }, + "contracts/interface/HolographedERC1155.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\n/// @title Holograph ERC-1155 Non-Fungible Token Standard\n/// @dev See https://holograph.network/standard/ERC-1155\n/// Note: the ERC-165 identifier for this interface is 0xFFFFFFFF.\ninterface HolographedERC1155 {\n // event id = 1\n function bridgeIn(\n uint32 _chainId,\n address _from,\n address _to,\n uint256 _tokenId,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 2\n function bridgeOut(\n uint32 _chainId,\n address _from,\n address _to,\n uint256 _tokenId,\n uint256 _amount\n ) external returns (bytes memory _data);\n\n // event id = 3\n function afterApprove(address _owner, address _to, uint256 _tokenId, uint256 _amount) external returns (bool success);\n\n // event id = 4\n function beforeApprove(\n address _owner,\n address _to,\n uint256 _tokenId,\n uint256 _amount\n ) external returns (bool success);\n\n // event id = 5\n function afterApprovalAll(address _to, bool _approved) external returns (bool success);\n\n // event id = 6\n function beforeApprovalAll(address _to, bool _approved) external returns (bool success);\n\n // event id = 7\n function afterBurn(address _owner, uint256 _tokenId, uint256 _amount) external returns (bool success);\n\n // event id = 8\n function beforeBurn(address _owner, uint256 _tokenId, uint256 _amount) external returns (bool success);\n\n // event id = 9\n function afterMint(address _owner, uint256 _tokenId, uint256 _amount) external returns (bool success);\n\n // event id = 10\n function beforeMint(address _owner, uint256 _tokenId, uint256 _amount) external returns (bool success);\n\n // event id = 11\n function afterSafeTransfer(\n address _from,\n address _to,\n uint256 _tokenId,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 12\n function beforeSafeTransfer(\n address _from,\n address _to,\n uint256 _tokenId,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 13\n function afterTransfer(\n address _from,\n address _to,\n uint256 _tokenId,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 14\n function beforeTransfer(\n address _from,\n address _to,\n uint256 _tokenId,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 15\n function afterOnERC1155Received(\n address _operator,\n address _from,\n address _to,\n uint256 _tokenId,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 16\n function beforeOnERC1155Received(\n address _operator,\n address _from,\n address _to,\n uint256 _tokenId,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n}\n" + }, + "contracts/interface/HolographedERC20.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\n/// @title Holograph ERC-20 Fungible Token Standard\n/// @dev See https://holograph.network/standard/ERC-20\n/// Note: the ERC-165 identifier for this interface is 0xFFFFFFFF.\ninterface HolographedERC20 {\n // event id = 1\n function bridgeIn(\n uint32 _chainId,\n address _from,\n address _to,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 2\n function bridgeOut(\n uint32 _chainId,\n address _from,\n address _to,\n uint256 _amount\n ) external returns (bytes memory _data);\n\n // event id = 3\n function afterApprove(address _owner, address _to, uint256 _amount) external returns (bool success);\n\n // event id = 4\n function beforeApprove(address _owner, address _to, uint256 _amount) external returns (bool success);\n\n // event id = 5\n function afterOnERC20Received(\n address _token,\n address _from,\n address _to,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 6\n function beforeOnERC20Received(\n address _token,\n address _from,\n address _to,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 7\n function afterBurn(address _owner, uint256 _amount) external returns (bool success);\n\n // event id = 8\n function beforeBurn(address _owner, uint256 _amount) external returns (bool success);\n\n // event id = 9\n function afterMint(address _owner, uint256 _amount) external returns (bool success);\n\n // event id = 10\n function beforeMint(address _owner, uint256 _amount) external returns (bool success);\n\n // event id = 11\n function afterSafeTransfer(\n address _from,\n address _to,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 12\n function beforeSafeTransfer(\n address _from,\n address _to,\n uint256 _amount,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 13\n function afterTransfer(address _from, address _to, uint256 _amount) external returns (bool success);\n\n // event id = 14\n function beforeTransfer(address _from, address _to, uint256 _amount) external returns (bool success);\n\n // event id = 15\n function onAllowance(address _owner, address _to, uint256 _amount) external returns (bool success);\n}\n" + }, + "contracts/interface/HolographedERC721.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\n/// @title Holograph ERC-721 Non-Fungible Token Standard\n/// @dev See https://holograph.network/standard/ERC-721\n/// Note: the ERC-165 identifier for this interface is 0xFFFFFFFF.\ninterface HolographedERC721 {\n // event id = 1\n function bridgeIn(\n uint32 _chainId,\n address _from,\n address _to,\n uint256 _tokenId,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 2\n function bridgeOut(\n uint32 _chainId,\n address _from,\n address _to,\n uint256 _tokenId\n ) external returns (bytes memory _data);\n\n // event id = 3\n function afterApprove(address _owner, address _to, uint256 _tokenId) external returns (bool success);\n\n // event id = 4\n function beforeApprove(address _owner, address _to, uint256 _tokenId) external returns (bool success);\n\n // event id = 5\n function afterApprovalAll(address _sender, address _to, bool _approved) external returns (bool success);\n\n // event id = 6\n function beforeApprovalAll(address _sender, address _to, bool _approved) external returns (bool success);\n\n // event id = 7\n function afterBurn(address _owner, uint256 _tokenId) external returns (bool success);\n\n // event id = 8\n function beforeBurn(address _owner, uint256 _tokenId) external returns (bool success);\n\n // event id = 9\n function afterMint(address _owner, uint256 _tokenId) external returns (bool success);\n\n // event id = 10\n function beforeMint(address _owner, uint256 _tokenId) external returns (bool success);\n\n // event id = 11\n function afterSafeTransfer(\n address _from,\n address _to,\n uint256 _tokenId,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 12\n function beforeSafeTransfer(\n address _from,\n address _to,\n uint256 _tokenId,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 13\n function afterTransfer(\n address _from,\n address _to,\n uint256 _tokenId,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 14\n function beforeTransfer(\n address _from,\n address _to,\n uint256 _tokenId,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 15\n function afterOnERC721Received(\n address _operator,\n address _from,\n address _to,\n uint256 _tokenId,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 16\n function beforeOnERC721Received(\n address _operator,\n address _from,\n address _to,\n uint256 _tokenId,\n bytes calldata _data\n ) external returns (bool success);\n\n // event id = 17\n function onIsApprovedForAll(address _wallet, address _operator) external view returns (bool approved);\n\n // event id = 18\n function contractURI() external view returns (string memory contractJSON);\n}\n" + }, + "contracts/interface/HolographedGeneric.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\n/// @title Holograph Generic Standard\ninterface HolographedGeneric {\n // event id = 1\n function bridgeIn(uint32 _chainId, bytes calldata _data) external returns (bool success);\n\n // event id = 2\n function bridgeOut(uint32 _chainId, address _sender, bytes calldata _payload) external returns (bytes memory _data);\n}\n" + }, + "contracts/interface/HolographERC20Interface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./ERC20.sol\";\nimport \"./ERC20Burnable.sol\";\nimport \"./ERC20Metadata.sol\";\nimport \"./ERC20Permit.sol\";\nimport \"./ERC20Receiver.sol\";\nimport \"./ERC20Safer.sol\";\nimport \"./ERC165.sol\";\nimport \"./Holographable.sol\";\n\ninterface HolographERC20Interface is\n ERC165,\n ERC20,\n ERC20Burnable,\n ERC20Metadata,\n ERC20Receiver,\n ERC20Safer,\n ERC20Permit,\n Holographable\n{\n function holographBridgeMint(address to, uint256 amount) external returns (bytes4);\n\n function sourceBurn(address from, uint256 amount) external;\n\n function sourceMint(address to, uint256 amount) external;\n\n function sourceMintBatch(address[] calldata wallets, uint256[] calldata amounts) external;\n\n function sourceTransfer(address from, address to, uint256 amount) external;\n\n function sourceTransfer(address payable destination, uint256 amount) external;\n\n function sourceExternalCall(address target, bytes calldata data) external;\n}\n" + }, + "contracts/interface/HolographERC721Interface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./CollectionURI.sol\";\nimport \"./ERC165.sol\";\nimport \"./ERC721.sol\";\nimport \"./ERC721Enumerable.sol\";\nimport \"./ERC721Metadata.sol\";\nimport \"./ERC721TokenReceiver.sol\";\nimport \"./Holographable.sol\";\n\ninterface HolographERC721Interface is\n ERC165,\n ERC721,\n ERC721Enumerable,\n ERC721Metadata,\n ERC721TokenReceiver,\n CollectionURI,\n Holographable\n{\n function approve(address to, uint256 tokenId) external payable;\n\n function burn(uint256 tokenId) external;\n\n function safeTransferFrom(address from, address to, uint256 tokenId) external payable;\n\n function setApprovalForAll(address to, bool approved) external;\n\n function sourceBurn(uint256 tokenId) external;\n\n function sourceMint(address to, uint224 tokenId) external;\n\n function sourceGetChainPrepend() external view returns (uint256);\n\n function sourceTransfer(address to, uint256 tokenId) external;\n\n function sourceExternalCall(address target, bytes calldata data) external;\n\n function transfer(address to, uint256 tokenId) external payable;\n\n function contractURI() external view returns (string memory);\n\n function getApproved(uint256 tokenId) external view returns (address);\n\n function isApprovedForAll(address wallet, address operator) external view returns (bool);\n\n function name() external view returns (string memory);\n\n function burned(uint256 tokenId) external view returns (bool);\n\n function decimals() external pure returns (uint256);\n\n function exists(uint256 tokenId) external view returns (bool);\n\n function ownerOf(uint256 tokenId) external view returns (address);\n\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n\n function symbol() external view returns (string memory);\n\n function tokenByIndex(uint256 index) external view returns (uint256);\n\n function tokenOfOwnerByIndex(address wallet, uint256 index) external view returns (uint256);\n\n function tokensOfOwner(address wallet) external view returns (uint256[] memory);\n\n function tokenURI(uint256 tokenId) external view returns (string memory);\n\n function totalSupply() external view returns (uint256);\n}\n" + }, + "contracts/interface/HolographerInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\ninterface HolographerInterface {\n function getContractType() external view returns (bytes32 contractType);\n\n function getDeploymentBlock() external view returns (uint256 deploymentBlock);\n\n function getHolograph() external view returns (address holograph);\n\n function getHolographEnforcer() external view returns (address);\n\n function getOriginChain() external view returns (uint32 originChain);\n\n function getSourceContract() external view returns (address sourceContract);\n}\n" + }, + "contracts/interface/HolographFactoryInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../struct/DeploymentConfig.sol\";\nimport \"../struct/Verification.sol\";\n\n/**\n * @title Holograph Factory\n * @author https://github.com/holographxyz\n * @notice Deploy holographable contracts\n * @dev The contract provides methods that allow for the creation of Holograph Protocol compliant smart contracts, that are capable of minting holographable assets\n */\ninterface HolographFactoryInterface {\n /**\n * @dev This event is fired every time that a bridgeable contract is deployed.\n */\n event BridgeableContractDeployed(address indexed contractAddress, bytes32 indexed hash);\n\n /**\n * @notice Deploy a holographable smart contract\n * @dev Using this function allows to deploy smart contracts that have the same address across all EVM chains\n * @param config contract deployement configurations\n * @param signature that was created by the wallet that created the original payload\n * @param signer address of wallet that created the payload\n */\n function deployHolographableContract(\n DeploymentConfig memory config,\n Verification memory signature,\n address signer\n ) external;\n\n /**\n * @notice Get the Holograph Protocol contract\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\n */\n function getHolograph() external view returns (address holograph);\n\n /**\n * @notice Update the Holograph Protocol contract address\n * @param holograph address of the Holograph Protocol smart contract to use\n */\n function setHolograph(address holograph) external;\n\n /**\n * @notice Get the Holograph Registry module\n * @dev This module stores a reference for all deployed holographable smart contracts\n */\n function getRegistry() external view returns (address registry);\n\n /**\n * @notice Update the Holograph Registry module address\n * @param registry address of the Holograph Registry smart contract to use\n */\n function setRegistry(address registry) external;\n}\n" + }, + "contracts/interface/HolographGenericInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./ERC165.sol\";\nimport \"./Holographable.sol\";\n\ninterface HolographGenericInterface is ERC165, Holographable {\n function sourceEmit(bytes calldata eventData) external;\n\n function sourceEmit(bytes32 eventId, bytes calldata eventData) external;\n\n function sourceEmit(bytes32 eventId, bytes32 topic1, bytes calldata eventData) external;\n\n function sourceEmit(bytes32 eventId, bytes32 topic1, bytes32 topic2, bytes calldata eventData) external;\n\n function sourceEmit(\n bytes32 eventId,\n bytes32 topic1,\n bytes32 topic2,\n bytes32 topic3,\n bytes calldata eventData\n ) external;\n}\n" + }, + "contracts/interface/HolographInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\n/**\n * @title Holograph Protocol\n * @author https://github.com/holographxyz\n * @notice This is the primary Holograph Protocol smart contract\n * @dev This contract stores a reference to all the primary modules and variables of the protocol\n */\ninterface HolographInterface {\n /**\n * @notice Get the address of the Holograph Bridge module\n * @dev Used for beaming holographable assets cross-chain\n */\n function getBridge() external view returns (address bridge);\n\n /**\n * @notice Update the Holograph Bridge module address\n * @param bridge address of the Holograph Bridge smart contract to use\n */\n function setBridge(address bridge) external;\n\n /**\n * @notice Get the chain ID that the Protocol was deployed on\n * @dev Useful for checking if/when a hard fork occurs\n */\n function getChainId() external view returns (uint256 chainId);\n\n /**\n * @notice Update the chain ID\n * @dev Useful for updating once a hard fork has been mitigated\n * @param chainId EVM chain ID to use\n */\n function setChainId(uint256 chainId) external;\n\n /**\n * @notice Get the address of the Holograph Factory module\n * @dev Used for deploying holographable smart contracts\n */\n function getFactory() external view returns (address factory);\n\n /**\n * @notice Update the Holograph Factory module address\n * @param factory address of the Holograph Factory smart contract to use\n */\n function setFactory(address factory) external;\n\n /**\n * @notice Get the Holograph chain Id\n * @dev Holograph uses an internal chain id mapping\n */\n function getHolographChainId() external view returns (uint32 holographChainId);\n\n /**\n * @notice Update the Holograph chain ID\n * @dev Useful for updating once a hard fork was mitigated\n * @param holographChainId Holograph chain ID to use\n */\n function setHolographChainId(uint32 holographChainId) external;\n\n /**\n * @notice Get the address of the Holograph Interfaces module\n * @dev Holograph uses this contract to store data that needs to be accessed by a large portion of the modules\n */\n function getInterfaces() external view returns (address interfaces);\n\n /**\n * @notice Update the Holograph Interfaces module address\n * @param interfaces address of the Holograph Interfaces smart contract to use\n */\n function setInterfaces(address interfaces) external;\n\n /**\n * @notice Get the address of the Holograph Operator module\n * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module\n */\n function getOperator() external view returns (address operator);\n\n /**\n * @notice Update the Holograph Operator module address\n * @param operator address of the Holograph Operator smart contract to use\n */\n function setOperator(address operator) external;\n\n /**\n * @notice Get the Holograph Registry module\n * @dev This module stores a reference for all deployed holographable smart contracts\n */\n function getRegistry() external view returns (address registry);\n\n /**\n * @notice Update the Holograph Registry module address\n * @param registry address of the Holograph Registry smart contract to use\n */\n function setRegistry(address registry) external;\n\n /**\n * @notice Get the Holograph Treasury module\n * @dev All of the Holograph Protocol assets are stored and managed by this module\n */\n function getTreasury() external view returns (address treasury);\n\n /**\n * @notice Update the Holograph Treasury module address\n * @param treasury address of the Holograph Treasury smart contract to use\n */\n function setTreasury(address treasury) external;\n\n /**\n * @notice Get the Holograph Utility Token address\n * @dev This is the official utility token of the Holograph Protocol\n */\n function getUtilityToken() external view returns (address utilityToken);\n\n /**\n * @notice Update the Holograph Utility Token address\n * @param utilityToken address of the Holograph Utility Token smart contract to use\n */\n function setUtilityToken(address utilityToken) external;\n}\n" + }, + "contracts/interface/HolographInterfacesInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../enum/ChainIdType.sol\";\nimport \"../enum/InterfaceType.sol\";\nimport \"../enum/TokenUriType.sol\";\n\ninterface HolographInterfacesInterface {\n function contractURI(\n string calldata name,\n string calldata imageURL,\n string calldata externalLink,\n uint16 bps,\n address contractAddress\n ) external pure returns (string memory);\n\n function getUriPrepend(TokenUriType uriType) external view returns (string memory prepend);\n\n function updateUriPrepend(TokenUriType uriType, string calldata prepend) external;\n\n function updateUriPrepends(TokenUriType[] calldata uriTypes, string[] calldata prepends) external;\n\n function getChainId(\n ChainIdType fromChainType,\n uint256 fromChainId,\n ChainIdType toChainType\n ) external view returns (uint256 toChainId);\n\n function updateChainIdMap(\n ChainIdType fromChainType,\n uint256 fromChainId,\n ChainIdType toChainType,\n uint256 toChainId\n ) external;\n\n function updateChainIdMaps(\n ChainIdType[] calldata fromChainType,\n uint256[] calldata fromChainId,\n ChainIdType[] calldata toChainType,\n uint256[] calldata toChainId\n ) external;\n\n function supportsInterface(InterfaceType interfaceType, bytes4 interfaceId) external view returns (bool);\n\n function updateInterface(InterfaceType interfaceType, bytes4 interfaceId, bool supported) external;\n\n function updateInterfaces(InterfaceType interfaceType, bytes4[] calldata interfaceIds, bool supported) external;\n}\n" + }, + "contracts/interface/HolographOperatorInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../struct/OperatorJob.sol\";\n\ninterface HolographOperatorInterface {\n /**\n * @dev Event is emitted for every time that a valid job is available.\n */\n event AvailableOperatorJob(bytes32 jobHash, bytes payload);\n\n /**\n * @dev Event is emitted for every time that a job is completed.\n */\n event FinishedOperatorJob(bytes32 jobHash, address operator);\n\n /**\n * @dev Event is emitted every time a cross-chain message is sent\n */\n event CrossChainMessageSent(bytes32 messageHash);\n\n /**\n * @dev Event is emitted if an operator job execution fails\n */\n event FailedOperatorJob(bytes32 jobHash);\n\n /**\n * @notice Execute an available operator job\n * @dev When making this call, if operating criteria is not met, the call will revert\n * @param bridgeInRequestPayload the entire cross chain message payload\n */\n function executeJob(bytes calldata bridgeInRequestPayload) external payable;\n\n function nonRevertingBridgeCall(address msgSender, bytes calldata payload) external payable;\n\n /**\n * @notice Receive a cross-chain message\n * @dev This function is restricted for use by Holograph Messaging Module only\n */\n function crossChainMessage(bytes calldata bridgeInRequestPayload) external payable;\n\n /**\n * @notice Calculate the amount of gas needed to execute a bridgeInRequest\n * @dev Use this function to estimate the amount of gas that will be used by the bridgeInRequest function\n * Set a specific gas limit when making this call, subtract return value, to get total gas used\n * Only use this with a static call\n * @param bridgeInRequestPayload abi encoded bytes making up the bridgeInRequest payload\n * @return the gas amount remaining after the static call is returned\n */\n function jobEstimator(bytes calldata bridgeInRequestPayload) external payable returns (uint256);\n\n /**\n * @notice Send cross chain bridge request message\n * @dev This function is restricted to only be callable by Holograph Bridge\n * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain\n * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain\n * @param toChain Holograph Chain ID where the beam is being sent to\n * @param nonce incremented number used to ensure job hashes are unique\n * @param holographableContract address of the contract for which the bridge request is being made\n * @param bridgeOutPayload bytes made up of the bridgeOutRequest payload\n */\n function send(\n uint256 gasLimit,\n uint256 gasPrice,\n uint32 toChain,\n address msgSender,\n uint256 nonce,\n address holographableContract,\n bytes calldata bridgeOutPayload\n ) external payable;\n\n /**\n * @notice Get the fees associated with sending specific payload\n * @dev Will provide exact costs on protocol and message side, combine the two to get total\n * @param toChain holograph chain id of destination chain for payload\n * @param gasLimit amount of gas to provide for executing payload on destination chain\n * @param gasPrice maximum amount to pay for gas price, can be set to 0 and will be chose automatically\n * @param crossChainPayload the entire packet being sent cross-chain\n * @return hlgFee the amount (in wei) of native gas token that will cost for finalizing job on destiantion chain\n * @return msgFee the amount (in wei) of native gas token that will cost for sending message to destiantion chain\n * @return dstGasPrice the amount (in wei) that destination message maximum gas price will be\n */\n function getMessageFee(\n uint32 toChain,\n uint256 gasLimit,\n uint256 gasPrice,\n bytes calldata crossChainPayload\n ) external view returns (uint256 hlgFee, uint256 msgFee, uint256 dstGasPrice);\n\n /**\n * @notice Get the details for an available operator job\n * @dev The job hash is a keccak256 hash of the entire job payload\n * @param jobHash keccak256 hash of the job\n * @return an OperatorJob struct with details about a specific job\n */\n function getJobDetails(bytes32 jobHash) external view returns (OperatorJob memory);\n\n /**\n * @notice Get number of pods available\n * @dev This returns number of pods that have been opened via bonding\n */\n function getTotalPods() external view returns (uint256 totalPods);\n\n /**\n * @notice Get total number of operators in a pod\n * @dev Use in conjunction with paginated getPodOperators function\n * @param pod the pod to query\n * @return total operators in a pod\n */\n function getPodOperatorsLength(uint256 pod) external view returns (uint256);\n\n /**\n * @notice Get list of operators in a pod\n * @dev Use paginated getPodOperators function instead if list gets too long\n * @param pod the pod to query\n * @return operators array list of operators in a pod\n */\n function getPodOperators(uint256 pod) external view returns (address[] memory operators);\n\n /**\n * @notice Get paginated list of operators in a pod\n * @dev Use in conjunction with getPodOperatorsLength to know the total length of results\n * @param pod the pod to query\n * @param index the array index to start from\n * @param length the length of result set to be (will be shorter if reached end of array)\n * @return operators a paginated array of operators\n */\n function getPodOperators(\n uint256 pod,\n uint256 index,\n uint256 length\n ) external view returns (address[] memory operators);\n\n /**\n * @notice Check the base and current price for bonding to a particular pod\n * @dev Useful for understanding what is required for bonding to a pod\n * @param pod the pod to get bonding amounts for\n * @return base the base bond amount required for a pod\n * @return current the current bond amount required for a pod\n */\n function getPodBondAmounts(uint256 pod) external view returns (uint256 base, uint256 current);\n\n /**\n * @notice Get an operator's currently bonded amount\n * @dev Useful for checking how much an operator has bonded\n * @param operator address of operator to check\n * @return amount total number of utility token bonded\n */\n function getBondedAmount(address operator) external view returns (uint256 amount);\n\n /**\n * @notice Get an operator's currently bonded pod\n * @dev Useful for checking if an operator is currently bonded\n * @param operator address of operator to check\n * @return pod number that operator is bonded on, returns zero if not bonded or selected for job\n */\n function getBondedPod(address operator) external view returns (uint256 pod);\n\n /**\n * @notice Get an operator's currently bonded pod index\n * @dev Useful for checking if an operator is a fallback for active job\n * @param operator address of operator to check\n * @return index currently bonded pod's operator index, returns zero if not in pod or moved out for active job\n */\n function getBondedPodIndex(address operator) external view returns (uint256 index);\n\n /**\n * @notice Topup a bonded operator with more utility tokens\n * @dev Useful function if an operator got slashed and wants to add a safety buffer to not get unbonded\n * @param operator address of operator to topup\n * @param amount utility token amount to add\n */\n function topupUtilityToken(address operator, uint256 amount) external;\n\n /**\n * @notice Bond utility tokens and become an operator\n * @dev An operator can only bond to one pod at a time, per network\n * @param operator address of operator to bond (can be an ownable smart contract)\n * @param amount utility token amount to bond (can be greater than minimum)\n * @param pod number of pod to bond to (can be for one that does not exist yet)\n */\n function bondUtilityToken(address operator, uint256 amount, uint256 pod) external;\n\n /**\n * @notice Unbond HLG utility tokens and stop being an operator\n * @dev A bonded operator selected for a job cannot unbond until they complete the job, or are slashed\n * @param operator address of operator to unbond\n * @param recipient address where to send the bonded tokens\n */\n function unbondUtilityToken(address operator, address recipient) external;\n\n /**\n * @notice Get the address of the Holograph Bridge module\n * @dev Used for beaming holographable assets cross-chain\n */\n function getBridge() external view returns (address bridge);\n\n /**\n * @notice Update the Holograph Bridge module address\n * @param bridge address of the Holograph Bridge smart contract to use\n */\n function setBridge(address bridge) external;\n\n /**\n * @notice Get the Holograph Protocol contract\n * @dev Used for storing a reference to all the primary modules and variables of the protocol\n */\n function getHolograph() external view returns (address holograph);\n\n /**\n * @notice Update the Holograph Protocol contract address\n * @param holograph address of the Holograph Protocol smart contract to use\n */\n function setHolograph(address holograph) external;\n\n /**\n * @notice Get the address of the Holograph Interfaces module\n * @dev Holograph uses this contract to store data that needs to be accessed by a large portion of the modules\n */\n function getInterfaces() external view returns (address interfaces);\n\n /**\n * @notice Update the Holograph Interfaces module address\n * @param interfaces address of the Holograph Interfaces smart contract to use\n */\n function setInterfaces(address interfaces) external;\n\n /**\n * @notice Get the address of the Holograph Messaging Module\n * @dev All cross-chain message requests will get forwarded to this adress\n */\n function getMessagingModule() external view returns (address messagingModule);\n\n /**\n * @notice Update the Holograph Messaging Module address\n * @param messagingModule address of the LayerZero Endpoint to use\n */\n function setMessagingModule(address messagingModule) external;\n\n /**\n * @notice Get the Holograph Registry module\n * @dev This module stores a reference for all deployed holographable smart contracts\n */\n function getRegistry() external view returns (address registry);\n\n /**\n * @notice Update the Holograph Registry module address\n * @param registry address of the Holograph Registry smart contract to use\n */\n function setRegistry(address registry) external;\n\n /**\n * @notice Get the Holograph Utility Token address\n * @dev This is the official utility token of the Holograph Protocol\n */\n function getUtilityToken() external view returns (address utilityToken);\n\n /**\n * @notice Update the Holograph Utility Token address\n * @param utilityToken address of the Holograph Utility Token smart contract to use\n */\n function setUtilityToken(address utilityToken) external;\n\n /**\n * @notice Get the Minimum Gas Price\n * @dev This amount is used as the value that will define a job as underpriced is lower than\n */\n function getMinGasPrice() external view returns (uint256 minGasPrice);\n\n /**\n * @notice Update the Minimum Gas Price\n * @param minGasPrice amount to set for minimum gas price\n */\n function setMinGasPrice(uint256 minGasPrice) external;\n}\n" + }, + "contracts/interface/HolographRegistryInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\ninterface HolographRegistryInterface {\n event HolographableContractEvent(address indexed _holographableContract, bytes _payload);\n\n function isHolographedContract(address smartContract) external view returns (bool);\n\n function isHolographedHashDeployed(bytes32 hash) external view returns (bool);\n\n function referenceContractTypeAddress(address contractAddress) external returns (bytes32);\n\n function getContractTypeAddress(bytes32 contractType) external view returns (address);\n\n function setContractTypeAddress(bytes32 contractType, address contractAddress) external;\n\n function getHolograph() external view returns (address holograph);\n\n function setHolograph(address holograph) external;\n\n function getHolographableContracts(uint256 index, uint256 length) external view returns (address[] memory contracts);\n\n function getHolographableContractsLength() external view returns (uint256);\n\n function getHolographedHashAddress(bytes32 hash) external view returns (address);\n\n function setHolographedHashAddress(bytes32 hash, address contractAddress) external;\n\n function getHToken(uint32 chainId) external view returns (address);\n\n function setHToken(uint32 chainId, address hToken) external;\n\n function getReservedContractTypeAddress(bytes32 contractType) external view returns (address contractTypeAddress);\n\n function setReservedContractTypeAddress(bytes32 hash, bool reserved) external;\n\n function setReservedContractTypeAddresses(bytes32[] calldata hashes, bool[] calldata reserved) external;\n\n function getUtilityToken() external view returns (address utilityToken);\n\n function setUtilityToken(address utilityToken) external;\n\n function holographableEvent(bytes calldata payload) external;\n}\n" + }, + "contracts/interface/HolographRoyaltiesInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../struct/ZoraBidShares.sol\";\n\ninterface HolographRoyaltiesInterface {\n function initHolographRoyalties(bytes memory data) external returns (bytes4);\n\n function configurePayouts(address payable[] memory addresses, uint256[] memory bps) external;\n\n function getPayoutInfo() external view returns (address payable[] memory addresses, uint256[] memory bps);\n\n function getEthPayout() external;\n\n function getTokenPayout(address tokenAddress) external;\n\n function getTokensPayout(address[] memory tokenAddresses) external;\n\n function supportsInterface(bytes4 interfaceId) external pure returns (bool);\n\n function setRoyalties(uint256 tokenId, address payable receiver, uint256 bp) external;\n\n function royaltyInfo(uint256 tokenId, uint256 value) external view returns (address, uint256);\n\n function getFeeBps(uint256 tokenId) external view returns (uint256[] memory);\n\n function getFeeRecipients(uint256 tokenId) external view returns (address payable[] memory);\n\n function getRoyalties(uint256 tokenId) external view returns (address payable[] memory, uint256[] memory);\n\n function getFees(uint256 tokenId) external view returns (address payable[] memory, uint256[] memory);\n\n function tokenCreator(address /* contractAddress*/, uint256 tokenId) external view returns (address);\n\n function calculateRoyaltyFee(\n address /* contractAddress */,\n uint256 tokenId,\n uint256 amount\n ) external view returns (uint256);\n\n function marketContract() external view returns (address);\n\n function tokenCreators(uint256 tokenId) external view returns (address);\n\n function bidSharesForToken(uint256 tokenId) external view returns (HolographBidShares memory bidShares);\n\n function getStorageSlot(string calldata slot) external pure returns (bytes32);\n\n function getTokenAddress(string memory tokenName) external view returns (address);\n}\n" + }, + "contracts/interface/HolographTreasuryInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\ninterface HolographTreasuryInterface {\n // purposefully left blank\n}\n" + }, + "contracts/interface/InitializableInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\n/**\n * @title Initializable\n * @author https://github.com/holographxyz\n * @notice Use init instead of constructor\n * @dev This allows for use of init function to make one time initializations without the need of a constructor\n */\ninterface InitializableInterface {\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external returns (bytes4);\n}\n" + }, + "contracts/interface/LayerZeroEndpointInterface.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport \"./LayerZeroUserApplicationConfigInterface.sol\";\n\ninterface LayerZeroEndpointInterface is LayerZeroUserApplicationConfigInterface {\n // @notice send a LayerZero message to the specified address at a LayerZero endpoint.\n // @param _dstChainId - the destination chain identifier\n // @param _destination - the address on destination chain (in bytes). address length/format may vary by chains\n // @param _payload - a custom bytes payload to send to the destination contract\n // @param _refundAddress - if the source transaction is cheaper than the amount of value passed, refund the additional amount to this address\n // @param _zroPaymentAddress - the address of the ZRO token holder who would pay for the transaction\n // @param _adapterParams - parameters for custom functionality. e.g. receive airdropped native gas from the relayer on destination\n function send(\n uint16 _dstChainId,\n bytes calldata _destination,\n bytes calldata _payload,\n address payable _refundAddress,\n address _zroPaymentAddress,\n bytes calldata _adapterParams\n ) external payable;\n\n // @notice used by the messaging library to publish verified payload\n // @param _srcChainId - the source chain identifier\n // @param _srcAddress - the source contract (as bytes) at the source chain\n // @param _dstAddress - the address on destination chain\n // @param _nonce - the unbound message ordering nonce\n // @param _gasLimit - the gas limit for external contract execution\n // @param _payload - verified payload to send to the destination contract\n function receivePayload(\n uint16 _srcChainId,\n bytes calldata _srcAddress,\n address _dstAddress,\n uint64 _nonce,\n uint256 _gasLimit,\n bytes calldata _payload\n ) external;\n\n // @notice get the inboundNonce of a lzApp from a source chain which could be EVM or non-EVM chain\n // @param _srcChainId - the source chain identifier\n // @param _srcAddress - the source chain contract address\n function getInboundNonce(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (uint64);\n\n // @notice get the outboundNonce from this source chain which, consequently, is always an EVM\n // @param _srcAddress - the source chain contract address\n function getOutboundNonce(uint16 _dstChainId, address _srcAddress) external view returns (uint64);\n\n // @notice gets a quote in source native gas, for the amount that send() requires to pay for message delivery\n // @param _dstChainId - the destination chain identifier\n // @param _userApplication - the user app address on this EVM chain\n // @param _payload - the custom message to send over LayerZero\n // @param _payInZRO - if false, user app pays the protocol fee in native token\n // @param _adapterParam - parameters for the adapter service, e.g. send some dust native token to dstChain\n function estimateFees(\n uint16 _dstChainId,\n address _userApplication,\n bytes calldata _payload,\n bool _payInZRO,\n bytes calldata _adapterParam\n ) external view returns (uint256 nativeFee, uint256 zroFee);\n\n // @notice get this Endpoint's immutable source identifier\n function getChainId() external view returns (uint16);\n\n // @notice the interface to retry failed message on this Endpoint destination\n // @param _srcChainId - the source chain identifier\n // @param _srcAddress - the source chain contract address\n // @param _payload - the payload to be retried\n function retryPayload(uint16 _srcChainId, bytes calldata _srcAddress, bytes calldata _payload) external;\n\n // @notice query if any STORED payload (message blocking) at the endpoint.\n // @param _srcChainId - the source chain identifier\n // @param _srcAddress - the source chain contract address\n function hasStoredPayload(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool);\n\n // @notice query if the _libraryAddress is valid for sending msgs.\n // @param _userApplication - the user app address on this EVM chain\n function getSendLibraryAddress(address _userApplication) external view returns (address);\n\n // @notice query if the _libraryAddress is valid for receiving msgs.\n // @param _userApplication - the user app address on this EVM chain\n function getReceiveLibraryAddress(address _userApplication) external view returns (address);\n\n // @notice query if the non-reentrancy guard for send() is on\n // @return true if the guard is on. false otherwise\n function isSendingPayload() external view returns (bool);\n\n // @notice query if the non-reentrancy guard for receive() is on\n // @return true if the guard is on. false otherwise\n function isReceivingPayload() external view returns (bool);\n\n // @notice get the configuration of the LayerZero messaging library of the specified version\n // @param _version - messaging library version\n // @param _chainId - the chainId for the pending config change\n // @param _userApplication - the contract address of the user application\n // @param _configType - type of configuration. every messaging library has its own convention.\n function getConfig(\n uint16 _version,\n uint16 _chainId,\n address _userApplication,\n uint256 _configType\n ) external view returns (bytes memory);\n\n // @notice get the send() LayerZero messaging library version\n // @param _userApplication - the contract address of the user application\n function getSendVersion(address _userApplication) external view returns (uint16);\n\n // @notice get the lzReceive() LayerZero messaging library version\n // @param _userApplication - the contract address of the user application\n function getReceiveVersion(address _userApplication) external view returns (uint16);\n}\n" + }, + "contracts/interface/LayerZeroModuleInterface.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\ninterface LayerZeroModuleInterface {\n function lzReceive(\n uint16 _srcChainId,\n bytes calldata _srcAddress,\n uint64 _nonce,\n bytes calldata _payload\n ) external payable;\n\n function getInterfaces() external view returns (address interfaces);\n\n function setInterfaces(address interfaces) external;\n\n function getLZEndpoint() external view returns (address lZEndpoint);\n\n function setLZEndpoint(address lZEndpoint) external;\n\n function getOperator() external view returns (address operator);\n\n function setOperator(address operator) external;\n}\n" + }, + "contracts/interface/LayerZeroOverrides.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\ninterface LayerZeroOverrides {\n // @dev defaultAppConfig struct\n struct ApplicationConfiguration {\n uint16 inboundProofLibraryVersion;\n uint64 inboundBlockConfirmations;\n address relayer;\n uint16 outboundProofType;\n uint64 outboundBlockConfirmations;\n address oracle;\n }\n\n struct DstPrice {\n uint128 dstPriceRatio; // 10^10\n uint128 dstGasPriceInWei;\n }\n\n struct DstConfig {\n uint128 dstNativeAmtCap;\n uint64 baseGas;\n uint64 gasPerByte;\n }\n\n // @dev using this to retrieve UltraLightNodeV2 address\n function defaultSendLibrary() external view returns (address);\n\n // @dev using this to extract defaultAppConfig\n function getAppConfig(\n uint16 destinationChainId,\n address userApplicationAddress\n ) external view returns (ApplicationConfiguration memory);\n\n // @dev using this to extract defaultAppConfig directly from storage slot\n function defaultAppConfig(\n uint16 destinationChainId\n )\n external\n view\n returns (\n uint16 inboundProofLibraryVersion,\n uint64 inboundBlockConfirmations,\n address relayer,\n uint16 outboundProofType,\n uint64 outboundBlockConfirmations,\n address oracle\n );\n\n // @dev access the mapping to get base price fee\n function dstPriceLookup(\n uint16 destinationChainId\n ) external view returns (uint128 dstPriceRatio, uint128 dstGasPriceInWei);\n\n // @dev access the mapping to get base gas and gas per byte\n function dstConfigLookup(\n uint16 destinationChainId,\n uint16 outboundProofType\n ) external view returns (uint128 dstNativeAmtCap, uint64 baseGas, uint64 gasPerByte);\n\n // @dev send message to LayerZero Endpoint\n function send(\n uint16 _dstChainId,\n bytes calldata _destination,\n bytes calldata _payload,\n address payable _refundAddress,\n address _zroPaymentAddress,\n bytes calldata _adapterParams\n ) external payable;\n\n // @dev estimate LayerZero message cost\n function estimateFees(\n uint16 _dstChainId,\n address _userApplication,\n bytes calldata _payload,\n bool _payInZRO,\n bytes calldata _adapterParam\n ) external view returns (uint256 nativeFee, uint256 zroFee);\n}\n" + }, + "contracts/interface/LayerZeroReceiverInterface.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\ninterface LayerZeroReceiverInterface {\n // @notice LayerZero endpoint will invoke this function to deliver the message on the destination\n // @param _srcChainId - the source endpoint identifier\n // @param _srcAddress - the source sending contract address from the source chain\n // @param _nonce - the ordered message nonce\n // @param _payload - the signed payload is the UA bytes has encoded to be sent\n function lzReceive(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes calldata _payload) external;\n}\n" + }, + "contracts/interface/LayerZeroUserApplicationConfigInterface.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\ninterface LayerZeroUserApplicationConfigInterface {\n // @notice set the configuration of the LayerZero messaging library of the specified version\n // @param _version - messaging library version\n // @param _chainId - the chainId for the pending config change\n // @param _configType - type of configuration. every messaging library has its own convention.\n // @param _config - configuration in the bytes. can encode arbitrary content.\n function setConfig(uint16 _version, uint16 _chainId, uint256 _configType, bytes calldata _config) external;\n\n // @notice set the send() LayerZero messaging library version to _version\n // @param _version - new messaging library version\n function setSendVersion(uint16 _version) external;\n\n // @notice set the lzReceive() LayerZero messaging library version to _version\n // @param _version - new messaging library version\n function setReceiveVersion(uint16 _version) external;\n\n // @notice Only when the UA needs to resume the message flow in blocking mode and clear the stored payload\n // @param _srcChainId - the chainId of the source chain\n // @param _srcAddress - the contract address of the source contract at the source chain\n function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external;\n}\n" + }, + "contracts/interface/Ownable.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\ninterface Ownable {\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n function owner() external view returns (address);\n\n function transferOwnership(address _newOwner) external;\n\n function isOwner() external view returns (bool);\n\n function isOwner(address wallet) external view returns (bool);\n}\n" + }, + "contracts/library/Base64.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nlibrary Base64 {\n bytes private constant base64stdchars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\n bytes private constant base64urlchars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_\";\n\n function encode(string memory _str) internal pure returns (string memory) {\n bytes memory _bs = bytes(_str);\n return encode(_bs);\n }\n\n function encode(bytes memory _bs) internal pure returns (string memory) {\n uint256 rem = _bs.length % 3;\n\n uint256 res_length = ((_bs.length + 2) / 3) * 4 - ((3 - rem) % 3);\n bytes memory res = new bytes(res_length);\n\n uint256 i = 0;\n uint256 j = 0;\n\n for (; i + 3 <= _bs.length; i += 3) {\n (res[j], res[j + 1], res[j + 2], res[j + 3]) = encode3(uint8(_bs[i]), uint8(_bs[i + 1]), uint8(_bs[i + 2]));\n\n j += 4;\n }\n\n if (rem != 0) {\n uint8 la0 = uint8(_bs[_bs.length - rem]);\n uint8 la1 = 0;\n\n if (rem == 2) {\n la1 = uint8(_bs[_bs.length - 1]);\n }\n\n (bytes1 b0, bytes1 b1, bytes1 b2 /* bytes1 b3*/, ) = encode3(la0, la1, 0);\n res[j] = b0;\n res[j + 1] = b1;\n if (rem == 2) {\n res[j + 2] = b2;\n }\n }\n\n return string(res);\n }\n\n function encode3(\n uint256 a0,\n uint256 a1,\n uint256 a2\n ) private pure returns (bytes1 b0, bytes1 b1, bytes1 b2, bytes1 b3) {\n uint256 n = (a0 << 16) | (a1 << 8) | a2;\n\n uint256 c0 = (n >> 18) & 63;\n uint256 c1 = (n >> 12) & 63;\n uint256 c2 = (n >> 6) & 63;\n uint256 c3 = (n) & 63;\n\n b0 = base64urlchars[c0];\n b1 = base64urlchars[c1];\n b2 = base64urlchars[c2];\n b3 = base64urlchars[c3];\n }\n}\n" + }, + "contracts/library/Bytes.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nlibrary Bytes {\n function getBoolean(uint192 _packedBools, uint192 _boolNumber) internal pure returns (bool) {\n uint192 flag = (_packedBools >> _boolNumber) & uint192(1);\n return (flag == 1 ? true : false);\n }\n\n function setBoolean(uint192 _packedBools, uint192 _boolNumber, bool _value) internal pure returns (uint192) {\n if (_value) {\n return _packedBools | (uint192(1) << _boolNumber);\n } else {\n return _packedBools & ~(uint192(1) << _boolNumber);\n }\n }\n\n function slice(bytes memory _bytes, uint256 _start, uint256 _length) internal pure returns (bytes memory) {\n require(_length + 31 >= _length, \"slice_overflow\");\n require(_bytes.length >= _start + _length, \"slice_outOfBounds\");\n bytes memory tempBytes;\n assembly {\n switch iszero(_length)\n case 0 {\n tempBytes := mload(0x40)\n let lengthmod := and(_length, 31)\n let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod)))\n let end := add(mc, _length)\n for {\n let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start)\n } lt(mc, end) {\n mc := add(mc, 0x20)\n cc := add(cc, 0x20)\n } {\n mstore(mc, mload(cc))\n }\n mstore(tempBytes, _length)\n mstore(0x40, and(add(mc, 31), not(31)))\n }\n default {\n tempBytes := mload(0x40)\n mstore(tempBytes, 0)\n mstore(0x40, add(tempBytes, 0x20))\n }\n }\n return tempBytes;\n }\n\n function trim(bytes32 source) internal pure returns (bytes memory) {\n uint256 temp = uint256(source);\n uint256 length = 0;\n while (temp != 0) {\n length++;\n temp >>= 8;\n }\n return slice(abi.encodePacked(source), 32 - length, length);\n }\n}\n" + }, + "contracts/library/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/cryptography/ECDSA.sol)\n\npragma solidity 0.8.13;\n\nimport \"./Strings.sol\";\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSA {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS,\n InvalidSignatureV\n }\n\n function _throwError(RecoverError error) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert(\"ECDSA: invalid signature\");\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert(\"ECDSA: invalid signature length\");\n } else if (error == RecoverError.InvalidSignatureS) {\n revert(\"ECDSA: invalid signature 's' value\");\n } else if (error == RecoverError.InvalidSignatureV) {\n revert(\"ECDSA: invalid signature 'v' value\");\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature` or error string. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\n // Check the signature length\n // - case 65: r,s,v signature (standard)\n // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._\n if (signature.length == 65) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n assembly {\n r := mload(add(signature, 0x20))\n s := mload(add(signature, 0x40))\n v := byte(0, mload(add(signature, 0x60)))\n }\n return tryRecover(hash, v, r, s);\n } else if (signature.length == 64) {\n bytes32 r;\n bytes32 vs;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n assembly {\n r := mload(add(signature, 0x20))\n vs := mload(add(signature, 0x40))\n }\n return tryRecover(hash, r, vs);\n } else {\n return (address(0), RecoverError.InvalidSignatureLength);\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, signature);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n *\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n *\n * _Available since v4.2._\n */\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n * `r` and `s` signature fields separately.\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS);\n }\n if (v != 27 && v != 28) {\n return (address(0), RecoverError.InvalidSignatureV);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature);\n }\n\n return (signer, RecoverError.NoError);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\n // 32 is the length in bytes of hash,\n // enforced by the type signature above\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", hash));\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from `s`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n\", Strings.toString(s.length), s));\n }\n\n /**\n * @dev Returns an Ethereum Signed Typed Data, created from a\n * `domainSeparator` and a `structHash`. This produces hash corresponding\n * to the one signed with the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\n * JSON-RPC method as part of EIP-712.\n *\n * See {recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n }\n}\n" + }, + "contracts/library/Strings.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nlibrary Strings {\n function toHexString(address account) internal pure returns (string memory) {\n return toHexString(uint256(uint160(account)));\n }\n\n function toHexString(uint256 value) internal pure returns (string memory) {\n if (value == 0) {\n return \"0x00\";\n }\n uint256 temp = value;\n uint256 length = 0;\n while (temp != 0) {\n length++;\n temp >>= 8;\n }\n return toHexString(value, length);\n }\n\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = bytes16(\"0123456789abcdef\")[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n\n function toAsciiString(address x) internal pure returns (string memory) {\n bytes memory s = new bytes(40);\n for (uint256 i = 0; i < 20; i++) {\n bytes1 b = bytes1(uint8(uint256(uint160(x)) / (2 ** (8 * (19 - i)))));\n bytes1 hi = bytes1(uint8(b) / 16);\n bytes1 lo = bytes1(uint8(b) - 16 * uint8(hi));\n s[2 * i] = char(hi);\n s[2 * i + 1] = char(lo);\n }\n return string(s);\n }\n\n function char(bytes1 b) internal pure returns (bytes1 c) {\n if (uint8(b) < 10) {\n return bytes1(uint8(b) + 0x30);\n } else {\n return bytes1(uint8(b) + 0x57);\n }\n }\n\n function uint2str(uint256 _i) internal pure returns (string memory _uint256AsString) {\n if (_i == 0) {\n return \"0\";\n }\n uint256 j = _i;\n uint256 len;\n while (j != 0) {\n len++;\n j /= 10;\n }\n bytes memory bstr = new bytes(len);\n uint256 k = len;\n while (_i != 0) {\n k = k - 1;\n uint8 temp = (48 + uint8(_i - (_i / 10) * 10));\n bytes1 b1 = bytes1(temp);\n bstr[k] = b1;\n _i /= 10;\n }\n return string(bstr);\n }\n\n function toString(uint256 value) internal pure returns (string memory) {\n if (value == 0) {\n return \"0\";\n }\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n bytes memory buffer = new bytes(digits);\n while (value != 0) {\n digits -= 1;\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n value /= 10;\n }\n return string(buffer);\n }\n}\n" + }, + "contracts/mock/ERC20Mock.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/EIP712.sol\";\nimport \"../abstract/NonReentrant.sol\";\n\nimport \"../interface/ERC20.sol\";\nimport \"../interface/ERC20Burnable.sol\";\nimport \"../interface/HolographERC20Interface.sol\";\nimport \"../interface/ERC20Metadata.sol\";\nimport \"../interface/ERC20Permit.sol\";\nimport \"../interface/ERC20Receiver.sol\";\nimport \"../interface/ERC20Safer.sol\";\nimport \"../interface/ERC165.sol\";\nimport \"../interface/ERC165.sol\";\n\nimport \"../library/ECDSA.sol\";\n\n/**\n * @title Mock ERC20 Token\n * @author Holograph Foundation\n * @notice Used for imitating the likes of WETH and WMATIC tokens.\n * @dev The entire logic and functionality of the smart contract is self-contained.\n */\ncontract ERC20Mock is\n ERC165,\n ERC20,\n ERC20Burnable,\n ERC20Metadata,\n ERC20Receiver,\n ERC20Safer,\n ERC20Permit,\n NonReentrant,\n EIP712\n{\n bool private _works;\n\n /**\n * @dev Mapping of all the addresse's balances.\n */\n mapping(address => uint256) private _balances;\n\n /**\n * @dev Mapping of all authorized operators, and capped amounts.\n */\n mapping(address => mapping(address => uint256)) private _allowances;\n\n /**\n * @dev Total number of token in circulation.\n */\n uint256 private _totalSupply;\n\n /**\n * @dev Token name.\n */\n string private _name;\n\n /**\n * @dev Token ticker symbol.\n */\n string private _symbol;\n\n /**\n * @dev Token number of decimal places.\n */\n uint8 private _decimals;\n\n /**\n * @dev List of all supported ERC165 interfaces.\n */\n mapping(bytes4 => bool) private _supportedInterfaces;\n\n /**\n * @dev List of used up nonces. Used in the ERC20Permit interface functionality.\n */\n mapping(address => uint256) private _nonces;\n\n /**\n * @dev Constructor does not accept any parameters.\n */\n constructor(\n string memory contractName,\n string memory contractSymbol,\n uint8 contractDecimals,\n string memory domainSeperator,\n string memory domainVersion\n ) {\n _works = true;\n _name = contractName;\n _symbol = contractSymbol;\n _decimals = contractDecimals;\n\n // ERC165\n _supportedInterfaces[ERC165.supportsInterface.selector] = true;\n\n // ERC20\n _supportedInterfaces[ERC20.allowance.selector] = true;\n _supportedInterfaces[ERC20.approve.selector] = true;\n _supportedInterfaces[ERC20.balanceOf.selector] = true;\n _supportedInterfaces[ERC20.totalSupply.selector] = true;\n _supportedInterfaces[ERC20.transfer.selector] = true;\n _supportedInterfaces[ERC20.transferFrom.selector] = true;\n _supportedInterfaces[\n ERC20.allowance.selector ^\n ERC20.approve.selector ^\n ERC20.balanceOf.selector ^\n ERC20.totalSupply.selector ^\n ERC20.transfer.selector ^\n ERC20.transferFrom.selector\n ] = true;\n\n // ERC20Metadata\n _supportedInterfaces[ERC20Metadata.name.selector] = true;\n _supportedInterfaces[ERC20Metadata.symbol.selector] = true;\n _supportedInterfaces[ERC20Metadata.decimals.selector] = true;\n _supportedInterfaces[\n ERC20Metadata.name.selector ^ ERC20Metadata.symbol.selector ^ ERC20Metadata.decimals.selector\n ] = true;\n\n // ERC20Burnable\n _supportedInterfaces[ERC20Burnable.burn.selector] = true;\n _supportedInterfaces[ERC20Burnable.burnFrom.selector] = true;\n _supportedInterfaces[ERC20Burnable.burn.selector ^ ERC20Burnable.burnFrom.selector] = true;\n\n // ERC20Safer\n // bytes4(keccak256(abi.encodePacked('safeTransfer(address,uint256)'))) == 0x423f6cef\n _supportedInterfaces[0x423f6cef] = true;\n // bytes4(keccak256(abi.encodePacked('safeTransfer(address,uint256,bytes)'))) == 0xeb795549\n _supportedInterfaces[0xeb795549] = true;\n // bytes4(keccak256(abi.encodePacked('safeTransferFrom(address,address,uint256)'))) == 0x42842e0e\n _supportedInterfaces[0x42842e0e] = true;\n // bytes4(keccak256(abi.encodePacked('safeTransferFrom(address,address,uint256,bytes)'))) == 0xb88d4fde\n _supportedInterfaces[0xb88d4fde] = true;\n _supportedInterfaces[bytes4(0x423f6cef) ^ bytes4(0xeb795549) ^ bytes4(0x42842e0e) ^ bytes4(0xb88d4fde)] = true;\n\n // ERC20Receiver\n _supportedInterfaces[ERC20Receiver.onERC20Received.selector] = true;\n\n // ERC20Permit\n _supportedInterfaces[ERC20Permit.permit.selector] = true;\n _supportedInterfaces[ERC20Permit.nonces.selector] = true;\n _supportedInterfaces[ERC20Permit.DOMAIN_SEPARATOR.selector] = true;\n _supportedInterfaces[\n ERC20Permit.permit.selector ^ ERC20Permit.nonces.selector ^ ERC20Permit.DOMAIN_SEPARATOR.selector\n ] = true;\n _eip712_init(domainSeperator, domainVersion);\n }\n\n function toggleWorks(bool active) external {\n _works = active;\n }\n\n function transferTokens(address payable token, address to, uint256 amount) external {\n ERC20(token).transfer(to, amount);\n }\n\n /**\n * @dev Purposefully left empty, to prevent running out of gas errors when receiving native token payments.\n */\n receive() external payable {}\n\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n /**\n * @dev Although EIP-165 is not required for ERC20 contracts, we still decided to implement it.\n *\n * This makes it easier for external smart contracts to easily identify a valid ERC20 token contract.\n */\n function supportsInterface(bytes4 interfaceId) public view returns (bool) {\n return _supportedInterfaces[interfaceId];\n }\n\n function allowance(address account, address spender) public view returns (uint256) {\n return _allowances[account][spender];\n }\n\n function balanceOf(address account) public view returns (uint256) {\n return _balances[account];\n }\n\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() public view returns (bytes32) {\n return _domainSeparatorV4();\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function nonces(address account) public view returns (uint256) {\n return _nonces[account];\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function totalSupply() public view returns (uint256) {\n return _totalSupply;\n }\n\n function approve(address spender, uint256 amount) public returns (bool) {\n _approve(msg.sender, spender, amount);\n return true;\n }\n\n function burn(uint256 amount) public {\n _burn(msg.sender, amount);\n }\n\n function burnFrom(address account, uint256 amount) public returns (bool) {\n uint256 currentAllowance = _allowances[account][msg.sender];\n require(currentAllowance >= amount, \"ERC20: amount exceeds allowance\");\n unchecked {\n _allowances[account][msg.sender] = currentAllowance - amount;\n }\n _burn(account, amount);\n return true;\n }\n\n function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {\n uint256 currentAllowance = _allowances[msg.sender][spender];\n require(currentAllowance >= subtractedValue, \"ERC20: decreased below zero\");\n uint256 newAllowance;\n unchecked {\n newAllowance = currentAllowance - subtractedValue;\n }\n _approve(msg.sender, spender, newAllowance);\n return true;\n }\n\n function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {\n uint256 currentAllowance = _allowances[msg.sender][spender];\n uint256 newAllowance;\n unchecked {\n newAllowance = currentAllowance + addedValue;\n }\n unchecked {\n require(newAllowance >= currentAllowance, \"ERC20: increased above max value\");\n }\n _approve(msg.sender, spender, newAllowance);\n return true;\n }\n\n function mint(address account, uint256 amount) external {\n _mint(account, amount);\n }\n\n function onERC20Received(\n address account,\n address /* sender*/,\n uint256 amount,\n bytes calldata /* data*/\n ) public returns (bytes4) {\n assembly {\n // used to drop \"change function to view\" compiler warning\n sstore(0x17fb676f92438402d8ef92193dd096c59ee1f4ba1bb57f67f3e6d2eef8aeed5e, amount)\n }\n if (_works) {\n require(_isContract(account), \"ERC20: operator not contract\");\n try ERC20(account).balanceOf(address(this)) returns (uint256 balance) {\n require(balance >= amount, \"ERC20: balance check failed\");\n } catch {\n revert(\"ERC20: failed getting balance\");\n }\n return ERC20Receiver.onERC20Received.selector;\n } else {\n return 0x00000000;\n }\n }\n\n function permit(\n address account,\n address spender,\n uint256 amount,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) public {\n require(block.timestamp <= deadline, \"ERC20: expired deadline\");\n // keccak256(\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\")\n // == 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9\n bytes32 structHash = keccak256(\n abi.encode(\n 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9,\n account,\n spender,\n amount,\n _useNonce(account),\n deadline\n )\n );\n bytes32 hash = _hashTypedDataV4(structHash);\n address signer = ECDSA.recover(hash, v, r, s);\n require(signer == account, \"ERC20: invalid signature\");\n _approve(account, spender, amount);\n }\n\n function safeTransfer(address recipient, uint256 amount) public returns (bool) {\n return safeTransfer(recipient, amount, \"\");\n }\n\n function safeTransfer(address recipient, uint256 amount, bytes memory data) public returns (bool) {\n _transfer(msg.sender, recipient, amount);\n require(_checkOnERC20Received(msg.sender, recipient, amount, data), \"ERC20: non ERC20Receiver\");\n return true;\n }\n\n function safeTransferFrom(address account, address recipient, uint256 amount) public returns (bool) {\n return safeTransferFrom(account, recipient, amount, \"\");\n }\n\n function safeTransferFrom(\n address account,\n address recipient,\n uint256 amount,\n bytes memory data\n ) public returns (bool) {\n if (account != msg.sender) {\n uint256 currentAllowance = _allowances[account][msg.sender];\n require(currentAllowance >= amount, \"ERC20: amount exceeds allowance\");\n unchecked {\n _allowances[account][msg.sender] = currentAllowance - amount;\n }\n }\n _transfer(account, recipient, amount);\n require(_checkOnERC20Received(account, recipient, amount, data), \"ERC20: non ERC20Receiver\");\n return true;\n }\n\n function transfer(address recipient, uint256 amount) public returns (bool) {\n _transfer(msg.sender, recipient, amount);\n return true;\n }\n\n function transferFrom(address account, address recipient, uint256 amount) public returns (bool) {\n if (account != msg.sender) {\n uint256 currentAllowance = _allowances[account][msg.sender];\n require(currentAllowance >= amount, \"ERC20: amount exceeds allowance\");\n unchecked {\n _allowances[account][msg.sender] = currentAllowance - amount;\n }\n }\n _transfer(account, recipient, amount);\n return true;\n }\n\n function _approve(address account, address spender, uint256 amount) internal {\n require(account != address(0), \"ERC20: account is zero address\");\n require(spender != address(0), \"ERC20: spender is zero address\");\n _allowances[account][spender] = amount;\n emit Approval(account, spender, amount);\n }\n\n function _burn(address account, uint256 amount) internal {\n require(account != address(0), \"ERC20: account is zero address\");\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n }\n _totalSupply -= amount;\n emit Transfer(account, address(0), amount);\n }\n\n function _checkOnERC20Received(\n address account,\n address recipient,\n uint256 amount,\n bytes memory data\n ) internal nonReentrant returns (bool) {\n if (_isContract(recipient)) {\n try ERC165(recipient).supportsInterface(0x01ffc9a7) returns (bool erc165support) {\n require(erc165support, \"ERC20: no ERC165 support\");\n // we have erc165 support\n if (ERC165(recipient).supportsInterface(0x534f5876)) {\n // we have eip-4524 support\n try ERC20Receiver(recipient).onERC20Received(msg.sender, account, amount, data) returns (bytes4 retval) {\n return retval == ERC20Receiver.onERC20Received.selector;\n } catch (bytes memory reason) {\n if (reason.length == 0) {\n revert(\"ERC20: non ERC20Receiver\");\n } else {\n assembly {\n revert(add(32, reason), mload(reason))\n }\n }\n }\n } else {\n revert(\"ERC20: eip-4524 not supported\");\n }\n } catch (bytes memory reason) {\n if (reason.length == 0) {\n revert(\"ERC20: no ERC165 support\");\n } else {\n assembly {\n revert(add(32, reason), mload(reason))\n }\n }\n }\n } else {\n return true;\n }\n }\n\n /**\n * @notice Mints tokens.\n * @dev Mint a specific amount of tokens to a specific address.\n * @param to Address to mint to.\n * @param amount Amount of tokens to mint.\n */\n function _mint(address to, uint256 amount) internal {\n require(to != address(0), \"ERC20: minting to burn address\");\n _totalSupply += amount;\n _balances[to] += amount;\n emit Transfer(address(0), to, amount);\n }\n\n function _transfer(address account, address recipient, uint256 amount) internal {\n require(account != address(0), \"ERC20: account is zero address\");\n require(recipient != address(0), \"ERC20: recipient is zero address\");\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n }\n _balances[recipient] += amount;\n emit Transfer(account, recipient, amount);\n }\n\n /**\n * @dev \"Consume a nonce\": return the current value and increment.\n *\n * _Available since v4.1._\n */\n function _useNonce(address account) internal returns (uint256 current) {\n current = _nonces[account];\n _nonces[account]++;\n }\n\n function _isContract(address contractAddress) private view returns (bool) {\n bytes32 codehash;\n assembly {\n codehash := extcodehash(contractAddress)\n }\n return (codehash != 0x0 && codehash != 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470);\n }\n}\n" + }, + "contracts/mock/LZEndpointMock.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../interface/LayerZeroReceiverInterface.sol\";\nimport \"../interface/LayerZeroEndpointInterface.sol\";\n\n/**\nmocking multi endpoint connection.\n- send() will short circuit to lzReceive() directly\n- no reentrancy guard. the real LayerZero endpoint on main net has a send and receive guard, respectively.\nif we run a ping-pong-like application, the recursive call might use all gas limit in the block.\n- not using any messaging library, hence all messaging library func, e.g. estimateFees, version, will not work\n*/\ncontract LZEndpointMock is LayerZeroEndpointInterface {\n mapping(address => address) public lzEndpointLookup;\n\n uint16 public mockChainId;\n address payable public mockOracle;\n address payable public mockRelayer;\n uint256 public mockBlockConfirmations;\n uint16 public mockLibraryVersion;\n uint256 public mockStaticNativeFee;\n uint16 public mockLayerZeroVersion;\n uint256 public nativeFee;\n uint256 public zroFee;\n bool nextMsgBLocked;\n\n struct StoredPayload {\n uint64 payloadLength;\n address dstAddress;\n bytes32 payloadHash;\n }\n\n struct QueuedPayload {\n address dstAddress;\n uint64 nonce;\n bytes payload;\n }\n\n // inboundNonce = [srcChainId][srcAddress].\n mapping(uint16 => mapping(bytes => uint64)) public inboundNonce;\n // outboundNonce = [dstChainId][srcAddress].\n mapping(uint16 => mapping(address => uint64)) public outboundNonce;\n // storedPayload = [srcChainId][srcAddress]\n mapping(uint16 => mapping(bytes => StoredPayload)) public storedPayload;\n // msgToDeliver = [srcChainId][srcAddress]\n mapping(uint16 => mapping(bytes => QueuedPayload[])) public msgsToDeliver;\n\n event UaForceResumeReceive(uint16 chainId, bytes srcAddress);\n event PayloadCleared(uint16 srcChainId, bytes srcAddress, uint64 nonce, address dstAddress);\n event PayloadStored(\n uint16 srcChainId,\n bytes srcAddress,\n address dstAddress,\n uint64 nonce,\n bytes payload,\n bytes reason\n );\n\n constructor(uint16 _chainId) {\n mockStaticNativeFee = 42;\n mockLayerZeroVersion = 1;\n mockChainId = _chainId;\n }\n\n // mock helper to set the value returned by `estimateNativeFees`\n function setEstimatedFees(uint256 _nativeFee, uint256 _zroFee) public {\n nativeFee = _nativeFee;\n zroFee = _zroFee;\n }\n\n function getChainId() external view override returns (uint16) {\n return mockChainId;\n }\n\n function setDestLzEndpoint(address destAddr, address lzEndpointAddr) external {\n lzEndpointLookup[destAddr] = lzEndpointAddr;\n }\n\n function send(\n uint16 _chainId,\n bytes calldata _destination,\n bytes calldata _payload,\n address payable, // _refundAddress\n address, // _zroPaymentAddress\n bytes memory _adapterParams\n ) external payable override {\n address destAddr = packedBytesToAddr(_destination);\n address lzEndpoint = lzEndpointLookup[destAddr];\n\n require(lzEndpoint != address(0), \"LayerZeroMock: destination LayerZero Endpoint not found\");\n\n uint64 nonce;\n {\n nonce = ++outboundNonce[_chainId][msg.sender];\n }\n\n // Mock the relayer paying the dstNativeAddr the amount of extra native token\n {\n uint256 extraGas;\n uint256 dstNative;\n address dstNativeAddr;\n assembly {\n extraGas := mload(add(_adapterParams, 34))\n dstNative := mload(add(_adapterParams, 66))\n dstNativeAddr := mload(add(_adapterParams, 86))\n }\n\n // to simulate actually sending the ether, add a transfer call and ensure the LZEndpointMock contract has an ether balance\n }\n\n bytes memory bytesSourceUserApplicationAddr = addrToPackedBytes(address(msg.sender)); // cast this address to bytes\n\n // not using the extra gas parameter because this is a single tx call, not split between different chains\n // LZEndpointMock(lzEndpoint).receivePayload(mockChainId, bytesSourceUserApplicationAddr, destAddr, nonce, extraGas, _payload);\n LZEndpointMock(lzEndpoint).receivePayload(\n mockChainId,\n bytesSourceUserApplicationAddr,\n destAddr,\n nonce,\n 0,\n _payload\n );\n }\n\n function receivePayload(\n uint16 _srcChainId,\n bytes calldata _srcAddress,\n address _dstAddress,\n uint64 _nonce,\n uint256 /*_gasLimit*/,\n bytes calldata _payload\n ) external override {\n StoredPayload storage sp = storedPayload[_srcChainId][_srcAddress];\n\n // assert and increment the nonce. no message shuffling\n require(_nonce == ++inboundNonce[_srcChainId][_srcAddress], \"LayerZero: wrong nonce\");\n\n // queue the following msgs inside of a stack to simulate a successful send on src, but not fully delivered on dst\n if (sp.payloadHash != bytes32(0)) {\n QueuedPayload[] storage msgs = msgsToDeliver[_srcChainId][_srcAddress];\n QueuedPayload memory newMsg = QueuedPayload(_dstAddress, _nonce, _payload);\n\n // warning, might run into gas issues trying to forward through a bunch of queued msgs\n // shift all the msgs over so we can treat this like a fifo via array.pop()\n if (msgs.length > 0) {\n // extend the array\n msgs.push(newMsg);\n\n // shift all the indexes up for pop()\n for (uint256 i = 0; i < msgs.length - 1; i++) {\n msgs[i + 1] = msgs[i];\n }\n\n // put the newMsg at the bottom of the stack\n msgs[0] = newMsg;\n } else {\n msgs.push(newMsg);\n }\n } else if (nextMsgBLocked) {\n storedPayload[_srcChainId][_srcAddress] = StoredPayload(\n uint64(_payload.length),\n _dstAddress,\n keccak256(_payload)\n );\n emit PayloadStored(_srcChainId, _srcAddress, _dstAddress, _nonce, _payload, bytes(\"\"));\n // ensure the next msgs that go through are no longer blocked\n nextMsgBLocked = false;\n } else {\n // we ignore the gas limit because this call is made in one tx due to being \"same chain\"\n // LayerZeroReceiverInterface(_dstAddress).lzReceive{gas: _gasLimit}(_srcChainId, _srcAddress, _nonce, _payload); // invoke lzReceive\n LayerZeroReceiverInterface(_dstAddress).lzReceive(_srcChainId, _srcAddress, _nonce, _payload); // invoke lzReceive\n }\n }\n\n // used to simulate messages received get stored as a payload\n function blockNextMsg() external {\n nextMsgBLocked = true;\n }\n\n function getLengthOfQueue(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (uint256) {\n return msgsToDeliver[_srcChainId][_srcAddress].length;\n }\n\n // @notice gets a quote in source native gas, for the amount that send() requires to pay for message delivery\n // @param _dstChainId - the destination chain identifier\n // @param _userApplication - the user app address on this EVM chain\n // @param _payload - the custom message to send over LayerZero\n // @param _payInZRO - if false, user app pays the protocol fee in native token\n // @param _adapterParam - parameters for the adapter service, e.g. send some dust native token to dstChain\n function estimateFees(\n uint16,\n address,\n bytes memory,\n bool,\n bytes memory\n ) external view override returns (uint256 _nativeFee, uint256 _zroFee) {\n _nativeFee = nativeFee;\n _zroFee = zroFee;\n }\n\n // give 20 bytes, return the decoded address\n function packedBytesToAddr(bytes calldata _b) public pure returns (address) {\n address addr;\n assembly {\n let ptr := mload(0x40)\n calldatacopy(ptr, sub(_b.offset, 2), add(_b.length, 2))\n addr := mload(sub(ptr, 10))\n }\n return addr;\n }\n\n // given an address, return the 20 bytes\n function addrToPackedBytes(address _a) public pure returns (bytes memory) {\n bytes memory data = abi.encodePacked(_a);\n return data;\n }\n\n function setConfig(\n uint16 /*_version*/,\n uint16 /*_chainId*/,\n uint256 /*_configType*/,\n bytes memory /*_config*/\n ) external override {}\n\n function getConfig(\n uint16 /*_version*/,\n uint16 /*_chainId*/,\n address /*_ua*/,\n uint256 /*_configType*/\n ) external pure override returns (bytes memory) {\n return \"\";\n }\n\n function setSendVersion(uint16 /*version*/) external override {}\n\n function setReceiveVersion(uint16 /*version*/) external override {}\n\n function getSendVersion(address /*_userApplication*/) external pure override returns (uint16) {\n return 1;\n }\n\n function getReceiveVersion(address /*_userApplication*/) external pure override returns (uint16) {\n return 1;\n }\n\n function getInboundNonce(uint16 _chainID, bytes calldata _srcAddress) external view override returns (uint64) {\n return inboundNonce[_chainID][_srcAddress];\n }\n\n function getOutboundNonce(uint16 _chainID, address _srcAddress) external view override returns (uint64) {\n return outboundNonce[_chainID][_srcAddress];\n }\n\n // simulates the relayer pushing through the rest of the msgs that got delayed due to the stored payload\n function _clearMsgQue(uint16 _srcChainId, bytes calldata _srcAddress) internal {\n QueuedPayload[] storage msgs = msgsToDeliver[_srcChainId][_srcAddress];\n\n // warning, might run into gas issues trying to forward through a bunch of queued msgs\n while (msgs.length > 0) {\n QueuedPayload memory payload = msgs[msgs.length - 1];\n LayerZeroReceiverInterface(payload.dstAddress).lzReceive(\n _srcChainId,\n _srcAddress,\n payload.nonce,\n payload.payload\n );\n msgs.pop();\n }\n }\n\n function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external override {\n StoredPayload storage sp = storedPayload[_srcChainId][_srcAddress];\n // revert if no messages are cached. safeguard malicious UA behaviour\n require(sp.payloadHash != bytes32(0), \"LayerZero: no stored payload\");\n require(sp.dstAddress == msg.sender, \"LayerZero: invalid caller\");\n\n // empty the storedPayload\n sp.payloadLength = 0;\n sp.dstAddress = address(0);\n sp.payloadHash = bytes32(0);\n\n emit UaForceResumeReceive(_srcChainId, _srcAddress);\n\n // resume the receiving of msgs after we force clear the \"stuck\" msg\n _clearMsgQue(_srcChainId, _srcAddress);\n }\n\n function retryPayload(uint16 _srcChainId, bytes calldata _srcAddress, bytes calldata _payload) external override {\n StoredPayload storage sp = storedPayload[_srcChainId][_srcAddress];\n require(sp.payloadHash != bytes32(0), \"LayerZero: no stored payload\");\n require(_payload.length == sp.payloadLength && keccak256(_payload) == sp.payloadHash, \"LayerZero: invalid payload\");\n\n address dstAddress = sp.dstAddress;\n // empty the storedPayload\n sp.payloadLength = 0;\n sp.dstAddress = address(0);\n sp.payloadHash = bytes32(0);\n\n uint64 nonce = inboundNonce[_srcChainId][_srcAddress];\n\n LayerZeroReceiverInterface(dstAddress).lzReceive(_srcChainId, _srcAddress, nonce, _payload);\n emit PayloadCleared(_srcChainId, _srcAddress, nonce, dstAddress);\n }\n\n function hasStoredPayload(uint16 _srcChainId, bytes calldata _srcAddress) external view override returns (bool) {\n StoredPayload storage sp = storedPayload[_srcChainId][_srcAddress];\n return sp.payloadHash != bytes32(0);\n }\n\n function isSendingPayload() external pure override returns (bool) {\n return false;\n }\n\n function isReceivingPayload() external pure override returns (bool) {\n return false;\n }\n\n function getSendLibraryAddress(address) external view override returns (address) {\n return address(this);\n }\n\n function getReceiveLibraryAddress(address) external view override returns (address) {\n return address(this);\n }\n}\n" + }, + "contracts/mock/Mock.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Initializable.sol\";\nimport \"../abstract/Owner.sol\";\n\nimport \"../interface/InitializableInterface.sol\";\n\ncontract Mock is Initializable, Owner {\n constructor() {}\n\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"MOCK: already initialized\");\n bytes32 arbitraryData = abi.decode(initPayload, (bytes32));\n bool shouldFail = false;\n assembly {\n // we leave slot 0 available for fallback calls\n sstore(0x01, arbitraryData)\n switch arbitraryData\n case 0 {\n shouldFail := 0x01\n }\n sstore(_ownerSlot, caller())\n }\n _setInitialized();\n if (shouldFail) {\n return bytes4(0x12345678);\n } else {\n return InitializableInterface.init.selector;\n }\n }\n\n function getStorage(uint256 slot) public view returns (bytes32 data) {\n assembly {\n data := sload(slot)\n }\n }\n\n function setStorage(uint256 slot, bytes32 data) public {\n assembly {\n sstore(slot, data)\n }\n }\n\n function mockCall(address target, bytes calldata data) public payable {\n assembly {\n calldatacopy(0, data.offset, data.length)\n let result := call(gas(), target, callvalue(), 0, data.length, 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n function mockStaticCall(address target, bytes calldata data) public view returns (bytes memory) {\n assembly {\n calldatacopy(0, data.offset, data.length)\n let result := staticcall(gas(), target, 0, data.length, 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n function mockDelegateCall(address target, bytes calldata data) public returns (bytes memory) {\n assembly {\n calldatacopy(0, data.offset, data.length)\n let result := delegatecall(gas(), target, 0, data.length, 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n receive() external payable {}\n\n fallback() external payable {\n assembly {\n calldatacopy(0, 0, calldatasize())\n let result := call(gas(), sload(0), callvalue(), 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/mock/MockERC721Receiver.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../interface/ERC721.sol\";\nimport \"../interface/ERC165.sol\";\nimport \"../interface/ERC721TokenReceiver.sol\";\n\ncontract MockERC721Receiver is ERC165, ERC721TokenReceiver {\n bool private _works;\n\n constructor() {\n _works = true;\n }\n\n function toggleWorks(bool active) external {\n _works = active;\n }\n\n function supportsInterface(bytes4 interfaceID) external pure returns (bool) {\n if (interfaceID == 0x01ffc9a7 || interfaceID == 0x150b7a02) {\n return true;\n } else {\n return false;\n }\n }\n\n function onERC721Received(\n address /*operator*/,\n address /*from*/,\n uint256 /*tokenId*/,\n bytes calldata /*data*/\n ) external view returns (bytes4) {\n if (_works) {\n return 0x150b7a02;\n } else {\n return 0x00000000;\n }\n }\n\n function transferNFT(address payable token, uint256 tokenId, address to) external {\n ERC721(token).safeTransferFrom(address(this), to, tokenId);\n }\n}\n" + }, + "contracts/mock/MockExternalCall.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\ncontract MockExternalCall {\n function callExternalFn(address contractAddress, bytes calldata encodedSignature) public {\n (bool success, ) = address(contractAddress).call(encodedSignature);\n require(success, \"Failed\");\n }\n}\n" + }, + "contracts/mock/MockHolographChild.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../Holograph.sol\";\n\ncontract MockHolographChild is Holograph {\n constructor() {}\n\n function emptyFunction() external pure returns (string memory) {\n return \"on purpose to remove verification conflict\";\n }\n}\n" + }, + "contracts/mock/MockHolographGenesisChild.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../HolographGenesis.sol\";\n\ncontract MockHolographGenesisChild is HolographGenesis {\n constructor() {}\n\n function approveDeployerMock(address newDeployer, bool approve) external onlyDeployer {\n return this.approveDeployer(newDeployer, approve);\n }\n\n function isApprovedDeployerMock(address deployer) external view returns (bool) {\n return this.isApprovedDeployer(deployer);\n }\n}\n" + }, + "contracts/mock/MockLZEndpoint.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\n\nimport \"../interface/HolographOperatorInterface.sol\";\nimport \"../interface/LayerZeroOverrides.sol\";\n\ncontract MockLZEndpoint is Admin {\n event LzEvent(uint16 _dstChainId, bytes _destination, bytes _payload);\n\n constructor() {\n assembly {\n sstore(_adminSlot, origin())\n }\n }\n\n function send(\n uint16 _dstChainId,\n bytes calldata _destination,\n bytes calldata _payload,\n address payable /* _refundAddress*/,\n address /* _zroPaymentAddress*/,\n bytes calldata /* _adapterParams*/\n ) external payable {\n // we really don't care about anything and just emit an event that we can leverage for multichain replication\n emit LzEvent(_dstChainId, _destination, _payload);\n }\n\n function estimateFees(\n uint16,\n address,\n bytes calldata,\n bool,\n bytes calldata\n ) external pure returns (uint256 nativeFee, uint256 zroFee) {\n nativeFee = 10 ** 15;\n zroFee = 10 ** 7;\n }\n\n function defaultSendLibrary() external view returns (address) {\n return address(this);\n }\n\n function getAppConfig(uint16, address) external view returns (LayerZeroOverrides.ApplicationConfiguration memory) {\n return LayerZeroOverrides.ApplicationConfiguration(0, 0, address(this), 0, 0, address(this));\n }\n\n function dstPriceLookup(uint16) external pure returns (uint128 dstPriceRatio, uint128 dstGasPriceInWei) {\n dstPriceRatio = 10 ** 10;\n dstGasPriceInWei = 1000000000;\n }\n\n function dstConfigLookup(\n uint16,\n uint16\n ) external pure returns (uint128 dstNativeAmtCap, uint64 baseGas, uint64 gasPerByte) {\n dstNativeAmtCap = 10 ** 18;\n baseGas = 50000;\n gasPerByte = 25;\n }\n\n function crossChainMessage(address target, uint256 gasLimit, bytes calldata payload) external {\n HolographOperatorInterface(target).crossChainMessage{gas: gasLimit}(payload);\n }\n}\n" + }, + "contracts/module/LayerZeroModule.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\n\nimport \"../enum/ChainIdType.sol\";\n\nimport \"../interface/CrossChainMessageInterface.sol\";\nimport \"../interface/HolographOperatorInterface.sol\";\nimport \"../interface/InitializableInterface.sol\";\nimport \"../interface/HolographInterfacesInterface.sol\";\nimport \"../interface/LayerZeroModuleInterface.sol\";\nimport \"../interface/LayerZeroOverrides.sol\";\n\nimport \"../struct/GasParameters.sol\";\n\nimport \"./OVM_GasPriceOracle.sol\";\n\n/**\n * @title Holograph LayerZero Module\n * @author https://github.com/holographxyz\n * @notice Holograph module for enabling LayerZero cross-chain messaging\n * @dev This contract abstracts all of the LayerZero specific logic into an isolated module\n */\ncontract LayerZeroModule is Admin, Initializable, CrossChainMessageInterface, LayerZeroModuleInterface {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.bridge')) - 1)\n */\n bytes32 constant _bridgeSlot = 0xeb87cbb21687feb327e3d58c6c16d552231d12c7a0e8115042a4165fac8a77f9;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.interfaces')) - 1)\n */\n bytes32 constant _interfacesSlot = 0xbd3084b8c09da87ad159c247a60e209784196be2530cecbbd8f337fdd1848827;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.lZEndpoint')) - 1)\n */\n bytes32 constant _lZEndpointSlot = 0x56825e447adf54cdde5f04815fcf9b1dd26ef9d5c053625147c18b7c13091686;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.operator')) - 1)\n */\n bytes32 constant _operatorSlot = 0x7caba557ad34138fa3b7e43fb574e0e6cc10481c3073e0dffbc560db81b5c60f;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.gasParameters')) - 1)\n */\n bytes32 constant _gasParametersSlot = 0x15eee82a0af3c04e4b65c3842105c973a6b0fb2a68728bf035809e13b38ce8cf;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.gasParameters')) - 1)\n */\n bytes32 constant _optimismGasPriceOracleSlot = 0x46043c284a96474ab4a54c741ea0d0fce54e98eea878b99d4b85808fa6f71a5f;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (\n address bridge,\n address interfaces,\n address operator,\n address optimismGasPriceOracle,\n uint32[] memory chainIds,\n GasParameters[] memory gasParameters\n ) = abi.decode(initPayload, (address, address, address, address, uint32[], GasParameters[]));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_bridgeSlot, bridge)\n sstore(_interfacesSlot, interfaces)\n sstore(_operatorSlot, operator)\n sstore(_optimismGasPriceOracleSlot, optimismGasPriceOracle)\n }\n require(chainIds.length == gasParameters.length, \"HOLOGRAPH: wrong array lengths\");\n for (uint256 i = 0; i < chainIds.length; i++) {\n _setGasParameters(chainIds[i], gasParameters[i]);\n }\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n /**\n * @notice Receive cross-chain message from LayerZero\n * @dev This function only allows calls from the configured LayerZero endpoint address\n */\n function lzReceive(\n uint16 /* _srcChainId*/,\n bytes calldata _srcAddress,\n uint64 /* _nonce*/,\n bytes calldata _payload\n ) external payable {\n assembly {\n /**\n * @dev check if msg.sender is LayerZero Endpoint\n */\n switch eq(sload(_lZEndpointSlot), caller())\n case 0 {\n /**\n * @dev this is the assembly version of -> revert(\"HOLOGRAPH: LZ only endpoint\");\n */\n mstore(0x80, 0x08c379a000000000000000000000000000000000000000000000000000000000)\n mstore(0xa0, 0x0000002000000000000000000000000000000000000000000000000000000000)\n mstore(0xc0, 0x0000001b484f4c4f47524150483a204c5a206f6e6c7920656e64706f696e7400)\n mstore(0xe0, 0x0000000000000000000000000000000000000000000000000000000000000000)\n revert(0x80, 0xc4)\n }\n let ptr := mload(0x40)\n calldatacopy(add(ptr, 0x0c), _srcAddress.offset, _srcAddress.length)\n /**\n * @dev check if LZ from address is same as address(this)\n */\n switch eq(mload(ptr), address())\n case 0 {\n /**\n * @dev this is the assembly version of -> revert(\"HOLOGRAPH: unauthorized sender\");\n */\n mstore(0x80, 0x08c379a000000000000000000000000000000000000000000000000000000000)\n mstore(0xa0, 0x0000002000000000000000000000000000000000000000000000000000000000)\n mstore(0xc0, 0x0000001e484f4c4f47524150483a20756e617574686f72697a65642073656e64)\n mstore(0xe0, 0x6572000000000000000000000000000000000000000000000000000000000000)\n revert(0x80, 0xc4)\n }\n }\n /**\n * @dev if validation has passed, submit payload to Holograph Operator for converting into an operator job\n */\n _operator().crossChainMessage(_payload);\n }\n\n /**\n * @dev Need to add an extra function to get LZ gas amount needed for their internal cross-chain message verification\n */\n function send(\n uint256 /* gasLimit*/,\n uint256 /* gasPrice*/,\n uint32 toChain,\n address msgSender,\n uint256 msgValue,\n bytes calldata crossChainPayload\n ) external payable {\n require(msg.sender == address(_operator()), \"HOLOGRAPH: operator only call\");\n LayerZeroOverrides lZEndpoint;\n assembly {\n lZEndpoint := sload(_lZEndpointSlot)\n }\n GasParameters memory gasParameters = _gasParameters(toChain);\n // need to recalculate the gas amounts for LZ to deliver message\n lZEndpoint.send{value: msgValue}(\n uint16(_interfaces().getChainId(ChainIdType.HOLOGRAPH, uint256(toChain), ChainIdType.LAYERZERO)),\n abi.encodePacked(address(this), address(this)),\n crossChainPayload,\n payable(msgSender),\n address(this),\n abi.encodePacked(\n uint16(1),\n uint256(gasParameters.msgBaseGas + (crossChainPayload.length * gasParameters.msgGasPerByte))\n )\n );\n }\n\n function getMessageFee(\n uint32 toChain,\n uint256 gasLimit,\n uint256 gasPrice,\n bytes calldata crossChainPayload\n ) external view returns (uint256 hlgFee, uint256 msgFee, uint256 dstGasPrice) {\n uint16 lzDestChain = uint16(\n _interfaces().getChainId(ChainIdType.HOLOGRAPH, uint256(toChain), ChainIdType.LAYERZERO)\n );\n LayerZeroOverrides lz;\n assembly {\n lz := sload(_lZEndpointSlot)\n }\n // convert holograph chain id to lz chain id\n (uint128 dstPriceRatio, uint128 dstGasPriceInWei) = _getPricing(lz, lzDestChain);\n if (gasPrice == 0) {\n gasPrice = dstGasPriceInWei;\n }\n GasParameters memory gasParameters = _gasParameters(toChain);\n require(gasPrice > gasParameters.minGasPrice, \"HOLOGRAPH: gas price too low\");\n bytes memory adapterParams = abi.encodePacked(\n uint16(1),\n uint256(gasParameters.msgBaseGas + (crossChainPayload.length * gasParameters.msgGasPerByte))\n );\n gasLimit = gasLimit + gasParameters.jobBaseGas + (crossChainPayload.length * gasParameters.jobGasPerByte);\n gasLimit = gasLimit + (gasLimit / 10);\n require(gasLimit < gasParameters.maxGasLimit, \"HOLOGRAPH: gas limit over max\");\n (uint256 nativeFee, ) = lz.estimateFees(lzDestChain, address(this), crossChainPayload, false, adapterParams);\n hlgFee = ((gasPrice * gasLimit) * dstPriceRatio) / (10 ** 20);\n /*\n * @dev toChain is a ChainIdType.HOLOGRAPH, which can be found at https://github.com/holographxyz/networks/blob/main/src/networks.ts\n * chainId 7 == optimism\n * chainId 4000000015 == optimismTestnetGoerli\n */\n if (toChain == uint32(7) || toChain == uint32(4000000015)) {\n hlgFee += (_optimismGasPriceOracle().getL1Fee(crossChainPayload) * dstPriceRatio) / (10 ** 20);\n }\n msgFee = nativeFee;\n dstGasPrice = (dstGasPriceInWei * dstPriceRatio) / (10 ** 20);\n }\n\n function getHlgFee(\n uint32 toChain,\n uint256 gasLimit,\n uint256 gasPrice,\n bytes calldata crossChainPayload\n ) external view returns (uint256 hlgFee) {\n LayerZeroOverrides lz;\n assembly {\n lz := sload(_lZEndpointSlot)\n }\n uint16 lzDestChain = uint16(\n _interfaces().getChainId(ChainIdType.HOLOGRAPH, uint256(toChain), ChainIdType.LAYERZERO)\n );\n (uint128 dstPriceRatio, uint128 dstGasPriceInWei) = _getPricing(lz, lzDestChain);\n if (gasPrice == 0) {\n gasPrice = dstGasPriceInWei;\n }\n GasParameters memory gasParameters = _gasParameters(toChain);\n require(gasPrice > gasParameters.minGasPrice, \"HOLOGRAPH: gas price too low\");\n gasLimit = gasLimit + gasParameters.jobBaseGas + (crossChainPayload.length * gasParameters.jobGasPerByte);\n gasLimit = gasLimit + (gasLimit / 10);\n require(gasLimit < gasParameters.maxGasLimit, \"HOLOGRAPH: gas limit over max\");\n hlgFee = ((gasPrice * gasLimit) * dstPriceRatio) / (10 ** 20);\n /*\n * @dev toChain is a ChainIdType.HOLOGRAPH, which can be found at https://github.com/holographxyz/networks/blob/main/src/networks.ts\n * chainId 7 == optimism\n * chainId 4000000015 == optimismTestnetGoerli\n */\n if (toChain == uint32(7) || toChain == uint32(4000000015)) {\n hlgFee += (_optimismGasPriceOracle().getL1Fee(crossChainPayload) * dstPriceRatio) / (10 ** 20);\n }\n }\n\n function _getPricing(\n LayerZeroOverrides lz,\n uint16 lzDestChain\n ) private view returns (uint128 dstPriceRatio, uint128 dstGasPriceInWei) {\n return\n LayerZeroOverrides(LayerZeroOverrides(lz.defaultSendLibrary()).getAppConfig(lzDestChain, address(this)).relayer)\n .dstPriceLookup(lzDestChain);\n }\n\n /**\n * @notice Get the address of the Holograph Bridge module\n * @dev Used for beaming holographable assets cross-chain\n */\n function getBridge() external view returns (address bridge) {\n assembly {\n bridge := sload(_bridgeSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Bridge module address\n * @param bridge address of the Holograph Bridge smart contract to use\n */\n function setBridge(address bridge) external onlyAdmin {\n assembly {\n sstore(_bridgeSlot, bridge)\n }\n }\n\n /**\n * @notice Get the address of the Holograph Interfaces module\n * @dev Holograph uses this contract to store data that needs to be accessed by a large portion of the modules\n */\n function getInterfaces() external view returns (address interfaces) {\n assembly {\n interfaces := sload(_interfacesSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Interfaces module address\n * @param interfaces address of the Holograph Interfaces smart contract to use\n */\n function setInterfaces(address interfaces) external onlyAdmin {\n assembly {\n sstore(_interfacesSlot, interfaces)\n }\n }\n\n /**\n * @notice Get the address of the approved LayerZero Endpoint\n * @dev All lzReceive function calls allow only requests from this address\n */\n function getLZEndpoint() external view returns (address lZEndpoint) {\n assembly {\n lZEndpoint := sload(_lZEndpointSlot)\n }\n }\n\n /**\n * @notice Update the approved LayerZero Endpoint address\n * @param lZEndpoint address of the LayerZero Endpoint to use\n */\n function setLZEndpoint(address lZEndpoint) external onlyAdmin {\n assembly {\n sstore(_lZEndpointSlot, lZEndpoint)\n }\n }\n\n /**\n * @notice Get the address of the Holograph Operator module\n * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module\n */\n function getOperator() external view returns (address operator) {\n assembly {\n operator := sload(_operatorSlot)\n }\n }\n\n /**\n * @notice Update the Holograph Operator module address\n * @param operator address of the Holograph Operator smart contract to use\n */\n function setOperator(address operator) external onlyAdmin {\n assembly {\n sstore(_operatorSlot, operator)\n }\n }\n\n /**\n * @notice Get the address of the Optimism Gas Price Oracle module\n * @dev Allows to properly calculate the L1 security fee for Optimism bridge transactions\n */\n function getOptimismGasPriceOracle() external view returns (address optimismGasPriceOracle) {\n assembly {\n optimismGasPriceOracle := sload(_optimismGasPriceOracleSlot)\n }\n }\n\n /**\n * @notice Update the Optimism Gas Price Oracle module address\n * @param optimismGasPriceOracle address of the Optimism Gas Price Oracle smart contract to use\n */\n function setOptimismGasPriceOracle(address optimismGasPriceOracle) external onlyAdmin {\n assembly {\n sstore(_optimismGasPriceOracleSlot, optimismGasPriceOracle)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Bridge Interface\n */\n function _bridge() private view returns (address bridge) {\n assembly {\n bridge := sload(_bridgeSlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Interfaces Interface\n */\n function _interfaces() private view returns (HolographInterfacesInterface interfaces) {\n assembly {\n interfaces := sload(_interfacesSlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the Holograph Operator Interface\n */\n function _operator() private view returns (HolographOperatorInterface operator) {\n assembly {\n operator := sload(_operatorSlot)\n }\n }\n\n /**\n * @dev Internal function used for getting the Optimism Gas Price Oracle Interface\n */\n function _optimismGasPriceOracle() private view returns (OVM_GasPriceOracle optimismGasPriceOracle) {\n assembly {\n optimismGasPriceOracle := sload(_optimismGasPriceOracleSlot)\n }\n }\n\n /**\n * @dev Purposefully reverts to prevent having any type of ether transfered into the contract\n */\n receive() external payable {\n revert();\n }\n\n /**\n * @dev Purposefully reverts to prevent any calls to undefined functions\n */\n fallback() external payable {\n revert();\n }\n\n /**\n * @notice Get the default or chain-specific GasParameters\n * @param chainId the Holograph ChainId to get gas parameters for, set to 0 for default\n */\n function getGasParameters(uint32 chainId) external view returns (GasParameters memory gasParameters) {\n return _gasParameters(chainId);\n }\n\n /**\n * @notice Update the default or chain-specific GasParameters\n * @param chainId the Holograph ChainId to set gas parameters for, set to 0 for default\n * @param gasParameters struct of all the gas parameters to set\n */\n function setGasParameters(uint32 chainId, GasParameters memory gasParameters) external onlyAdmin {\n _setGasParameters(chainId, gasParameters);\n }\n\n /**\n * @notice Update the default or chain-specific GasParameters\n * @param chainIds array of Holograph ChainId to set gas parameters for\n * @param gasParameters array of all the gas parameters to set\n */\n function setGasParameters(uint32[] memory chainIds, GasParameters[] memory gasParameters) external onlyAdmin {\n require(chainIds.length == gasParameters.length, \"HOLOGRAPH: wrong array lengths\");\n for (uint256 i = 0; i < chainIds.length; i++) {\n _setGasParameters(chainIds[i], gasParameters[i]);\n }\n }\n\n /**\n * @notice Internal function for setting the default or chain-specific GasParameters\n * @param chainId the Holograph ChainId to set gas parameters for, set to 0 for default\n * @param gasParameters struct of all the gas parameters to set\n */\n function _setGasParameters(uint32 chainId, GasParameters memory gasParameters) private {\n bytes32 slot = chainId == 0 ? _gasParametersSlot : keccak256(abi.encode(chainId, _gasParametersSlot));\n assembly {\n let pos := gasParameters\n for {\n let i := 0\n } lt(i, 6) {\n i := add(i, 1)\n } {\n sstore(add(slot, i), mload(pos))\n pos := add(pos, 32)\n }\n }\n }\n\n /**\n * @dev Internal function used for getting the default or chain-specific GasParameters\n * @param chainId the Holograph ChainId to get gas parameters for, set to 0 for default\n */\n function _gasParameters(uint32 chainId) private view returns (GasParameters memory gasParameters) {\n bytes32 slot = chainId == 0 ? _gasParametersSlot : keccak256(abi.encode(chainId, _gasParametersSlot));\n assembly {\n let pos := gasParameters\n for {\n let i := 0\n } lt(i, 6) {\n i := add(i, 1)\n } {\n mstore(pos, sload(add(slot, i)))\n pos := add(pos, 32)\n }\n }\n }\n}\n" + }, + "contracts/module/OVM_GasPriceOracle.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\n\n/**\n * @title OVM_GasPriceOracle\n * @dev This contract exposes the current l2 gas price, a measure of how congested the network\n * currently is. This measure is used by the Sequencer to determine what fee to charge for\n * transactions. When the system is more congested, the l2 gas price will increase and fees\n * will also increase as a result.\n *\n * All public variables are set while generating the initial L2 state. The\n * constructor doesn't run in practice as the L2 state generation script uses\n * the deployed bytecode instead of running the initcode.\n */\ncontract OVM_GasPriceOracle is Admin, Initializable {\n // Current L2 gas price\n uint256 public gasPrice;\n // Current L1 base fee\n uint256 public l1BaseFee;\n // Amortized cost of batch submission per transaction\n uint256 public overhead;\n // Value to scale the fee up by\n uint256 public scalar;\n // Number of decimals of the scalar\n uint256 public decimals;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (uint256 _gasPrice, uint256 _l1BaseFee, uint256 _overhead, uint256 _scalar, uint256 _decimals) = abi.decode(\n initPayload,\n (uint256, uint256, uint256, uint256, uint256)\n );\n gasPrice = _gasPrice;\n l1BaseFee = _l1BaseFee;\n overhead = _overhead;\n scalar = _scalar;\n decimals = _decimals;\n assembly {\n sstore(_adminSlot, origin())\n }\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n event GasPriceUpdated(uint256);\n event L1BaseFeeUpdated(uint256);\n event OverheadUpdated(uint256);\n event ScalarUpdated(uint256);\n event DecimalsUpdated(uint256);\n\n /**\n * Allows the owner to modify the l2 gas price.\n * @param _gasPrice New l2 gas price.\n */\n function setGasPrice(uint256 _gasPrice) external onlyAdmin {\n gasPrice = _gasPrice;\n emit GasPriceUpdated(_gasPrice);\n }\n\n /**\n * Allows the owner to modify the l1 base fee.\n * @param _baseFee New l1 base fee\n */\n function setL1BaseFee(uint256 _baseFee) external onlyAdmin {\n l1BaseFee = _baseFee;\n emit L1BaseFeeUpdated(_baseFee);\n }\n\n /**\n * Allows the owner to modify the overhead.\n * @param _overhead New overhead\n */\n function setOverhead(uint256 _overhead) external onlyAdmin {\n overhead = _overhead;\n emit OverheadUpdated(_overhead);\n }\n\n /**\n * Allows the owner to modify the scalar.\n * @param _scalar New scalar\n */\n function setScalar(uint256 _scalar) external onlyAdmin {\n scalar = _scalar;\n emit ScalarUpdated(_scalar);\n }\n\n /**\n * Allows the owner to modify the decimals.\n * @param _decimals New decimals\n */\n function setDecimals(uint256 _decimals) external onlyAdmin {\n decimals = _decimals;\n emit DecimalsUpdated(_decimals);\n }\n\n /**\n * Computes the L1 portion of the fee\n * based on the size of the RLP encoded tx\n * and the current l1BaseFee\n * @param _data Unsigned RLP encoded tx, 6 elements\n * @return L1 fee that should be paid for the tx\n */\n function getL1Fee(bytes memory _data) external view returns (uint256) {\n uint256 l1GasUsed = getL1GasUsed(_data);\n uint256 l1Fee = l1GasUsed * l1BaseFee;\n uint256 divisor = 10 ** decimals;\n uint256 unscaled = l1Fee * scalar;\n uint256 scaled = unscaled / divisor;\n return scaled;\n }\n\n /**\n * Computes the amount of L1 gas used for a transaction\n * The overhead represents the per batch gas overhead of\n * posting both transaction and state roots to L1 given larger\n * batch sizes.\n * 4 gas for 0 byte\n * https://github.com/ethereum/go-ethereum/blob/9ada4a2e2c415e6b0b51c50e901336872e028872/params/protocol_params.go#L33\n * 16 gas for non zero byte\n * https://github.com/ethereum/go-ethereum/blob/9ada4a2e2c415e6b0b51c50e901336872e028872/params/protocol_params.go#L87\n * This will need to be updated if calldata gas prices change\n * Account for the transaction being unsigned\n * Padding is added to account for lack of signature on transaction\n * 1 byte for RLP V prefix\n * 1 byte for V\n * 1 byte for RLP R prefix\n * 32 bytes for R\n * 1 byte for RLP S prefix\n * 32 bytes for S\n * Total: 68 bytes of padding\n * @param _data Unsigned RLP encoded tx, 6 elements\n * @return Amount of L1 gas used for a transaction\n */\n function getL1GasUsed(bytes memory _data) public view returns (uint256) {\n uint256 total = 0;\n for (uint256 i = 0; i < _data.length; i++) {\n if (_data[i] == 0) {\n total += 4;\n } else {\n total += 16;\n }\n }\n uint256 unsigned = total + overhead;\n return unsigned + (68 * 16);\n }\n}\n" + }, + "contracts/proxy/CxipERC721Proxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\n\nimport \"../interface/InitializableInterface.sol\";\nimport \"../interface/HolographRegistryInterface.sol\";\n\ncontract CxipERC721Proxy is Admin, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.contractType')) - 1)\n */\n bytes32 constant _contractTypeSlot = 0x0b671eb65810897366dd82c4cbb7d9dff8beda8484194956e81e89b8a361d9c7;\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\n */\n bytes32 constant _registrySlot = 0xce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7;\n\n constructor() {}\n\n function init(bytes memory data) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (bytes32 contractType, address registry, bytes memory initCode) = abi.decode(data, (bytes32, address, bytes));\n assembly {\n sstore(_contractTypeSlot, contractType)\n sstore(_registrySlot, registry)\n }\n (bool success, bytes memory returnData) = getCxipERC721Source().delegatecall(\n abi.encodeWithSignature(\"init(bytes)\", initCode)\n );\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == InitializableInterface.init.selector, \"initialization failed\");\n\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n function getCxipERC721Source() public view returns (address) {\n HolographRegistryInterface registry;\n bytes32 contractType;\n assembly {\n registry := sload(_registrySlot)\n contractType := sload(_contractTypeSlot)\n }\n return registry.getContractTypeAddress(contractType);\n }\n\n receive() external payable {}\n\n fallback() external payable {\n address cxipErc721Source = getCxipERC721Source();\n assembly {\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), cxipErc721Source, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/proxy/HolographBridgeProxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\n\nimport \"../interface/InitializableInterface.sol\";\n\ncontract HolographBridgeProxy is Admin, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.bridge')) - 1)\n */\n bytes32 constant _bridgeSlot = 0xeb87cbb21687feb327e3d58c6c16d552231d12c7a0e8115042a4165fac8a77f9;\n\n constructor() {}\n\n function init(bytes memory data) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address bridge, bytes memory initCode) = abi.decode(data, (address, bytes));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_bridgeSlot, bridge)\n }\n (bool success, bytes memory returnData) = bridge.delegatecall(abi.encodeWithSignature(\"init(bytes)\", initCode));\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == InitializableInterface.init.selector, \"initialization failed\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n function getBridge() external view returns (address bridge) {\n assembly {\n bridge := sload(_bridgeSlot)\n }\n }\n\n function setBridge(address bridge) external onlyAdmin {\n assembly {\n sstore(_bridgeSlot, bridge)\n }\n }\n\n receive() external payable {}\n\n fallback() external payable {\n assembly {\n let bridge := sload(_bridgeSlot)\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), bridge, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/proxy/HolographFactoryProxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\n\nimport \"../interface/InitializableInterface.sol\";\n\ncontract HolographFactoryProxy is Admin, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.factory')) - 1)\n */\n bytes32 constant _factorySlot = 0xa49f20855ba576e09d13c8041c8039fa655356ea27f6c40f1ec46a4301cd5b23;\n\n constructor() {}\n\n function init(bytes memory data) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address factory, bytes memory initCode) = abi.decode(data, (address, bytes));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_factorySlot, factory)\n }\n (bool success, bytes memory returnData) = factory.delegatecall(abi.encodeWithSignature(\"init(bytes)\", initCode));\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == InitializableInterface.init.selector, \"initialization failed\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n function getFactory() external view returns (address factory) {\n assembly {\n factory := sload(_factorySlot)\n }\n }\n\n function setFactory(address factory) external onlyAdmin {\n assembly {\n sstore(_factorySlot, factory)\n }\n }\n\n receive() external payable {}\n\n fallback() external payable {\n assembly {\n let factory := sload(_factorySlot)\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), factory, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/proxy/HolographOperatorProxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\n\nimport \"../interface/InitializableInterface.sol\";\n\ncontract HolographOperatorProxy is Admin, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.operator')) - 1)\n */\n bytes32 constant _operatorSlot = 0x7caba557ad34138fa3b7e43fb574e0e6cc10481c3073e0dffbc560db81b5c60f;\n\n constructor() {}\n\n function init(bytes memory data) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address operator, bytes memory initCode) = abi.decode(data, (address, bytes));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_operatorSlot, operator)\n }\n (bool success, bytes memory returnData) = operator.delegatecall(abi.encodeWithSignature(\"init(bytes)\", initCode));\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == InitializableInterface.init.selector, \"initialization failed\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n function getOperator() external view returns (address operator) {\n assembly {\n operator := sload(_operatorSlot)\n }\n }\n\n function setOperator(address operator) external onlyAdmin {\n assembly {\n sstore(_operatorSlot, operator)\n }\n }\n\n receive() external payable {}\n\n fallback() external payable {\n assembly {\n let operator := sload(_operatorSlot)\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), operator, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/proxy/HolographRegistryProxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\n\nimport \"../interface/InitializableInterface.sol\";\n\ncontract HolographRegistryProxy is Admin, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)\n */\n bytes32 constant _registrySlot = 0xce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7;\n\n constructor() {}\n\n function init(bytes memory data) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address registry, bytes memory initCode) = abi.decode(data, (address, bytes));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_registrySlot, registry)\n }\n (bool success, bytes memory returnData) = registry.delegatecall(abi.encodeWithSignature(\"init(bytes)\", initCode));\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == InitializableInterface.init.selector, \"initialization failed\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n function getRegistry() external view returns (address registry) {\n assembly {\n registry := sload(_registrySlot)\n }\n }\n\n function setRegistry(address registry) external onlyAdmin {\n assembly {\n sstore(_registrySlot, registry)\n }\n }\n\n receive() external payable {}\n\n fallback() external payable {\n assembly {\n let registry := sload(_registrySlot)\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), registry, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/proxy/HolographTreasuryProxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/Admin.sol\";\nimport \"../abstract/Initializable.sol\";\n\nimport \"../interface/InitializableInterface.sol\";\n\ncontract HolographTreasuryProxy is Admin, Initializable {\n /**\n * @dev bytes32(uint256(keccak256('eip1967.Holograph.treasury')) - 1)\n */\n bytes32 constant _treasurySlot = 0x4215e7a38d75164ca078bbd61d0992cdeb1ba16f3b3ead5944966d3e4080e8b6;\n\n constructor() {}\n\n function init(bytes memory data) external override returns (bytes4) {\n require(!_isInitialized(), \"HOLOGRAPH: already initialized\");\n (address treasury, bytes memory initCode) = abi.decode(data, (address, bytes));\n assembly {\n sstore(_adminSlot, origin())\n sstore(_treasurySlot, treasury)\n }\n (bool success, bytes memory returnData) = treasury.delegatecall(abi.encodeWithSignature(\"init(bytes)\", initCode));\n bytes4 selector = abi.decode(returnData, (bytes4));\n require(success && selector == InitializableInterface.init.selector, \"initialization failed\");\n _setInitialized();\n return InitializableInterface.init.selector;\n }\n\n function getTreasury() external view returns (address treasury) {\n assembly {\n treasury := sload(_treasurySlot)\n }\n }\n\n function setTreasury(address treasury) external onlyAdmin {\n assembly {\n sstore(_treasurySlot, treasury)\n }\n }\n\n receive() external payable {}\n\n fallback() external payable {\n assembly {\n let treasury := sload(_treasurySlot)\n calldatacopy(0, 0, calldatasize())\n let result := delegatecall(gas(), treasury, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/struct/BridgeSettings.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nstruct BridgeSettings {\n uint256 value;\n uint256 gasLimit;\n uint256 gasPrice;\n uint32 toChain;\n}\n" + }, + "contracts/struct/DeploymentConfig.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nstruct DeploymentConfig {\n bytes32 contractType;\n uint32 chainType;\n bytes32 salt;\n bytes byteCode;\n bytes initCode;\n}\n" + }, + "contracts/struct/GasParameters.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nstruct GasParameters {\n uint256 msgBaseGas;\n uint256 msgGasPerByte;\n uint256 jobBaseGas;\n uint256 jobGasPerByte;\n uint256 minGasPrice;\n uint256 maxGasLimit;\n}\n" + }, + "contracts/struct/OperatorJob.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nstruct OperatorJob {\n uint8 pod;\n uint16 blockTimes;\n address operator;\n uint40 startBlock;\n uint64 startTimestamp;\n uint16[5] fallbackOperators;\n}\n\n/*\n\nuint\t\tDigits\tMax value\n-----------------------------\nuint8\t\t3\t\t255\nuint16\t\t5\t\t65,535\nuint24\t\t8\t\t16,777,215\nuint32\t\t10\t\t4,294,967,295\nuint40\t\t13\t\t1,099,511,627,775\nuint48\t\t15\t\t281,474,976,710,655\nuint56\t\t17\t\t72,057,594,037,927,935\nuint64\t\t20\t\t18,446,744,073,709,551,615\nuint72\t\t22\t\t4,722,366,482,869,645,213,695\nuint80\t\t25\t\t1,208,925,819,614,629,174,706,175\nuint88\t\t27\t\t309,485,009,821,345,068,724,781,055\nuint96\t\t29\t\t79,228,162,514,264,337,593,543,950,335\n...\nuint128\t\t39\t\t340,282,366,920,938,463,463,374,607,431,768,211,455\n...\nuint256\t\t78\t\t115,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\n\n*/\n" + }, + "contracts/struct/Verification.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nstruct Verification {\n bytes32 r;\n bytes32 s;\n uint8 v;\n}\n" + }, + "contracts/struct/ZoraBidShares.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"./ZoraDecimal.sol\";\n\nstruct HolographBidShares {\n // % of sale value that goes to the _previous_ owner of the nft\n HolographDecimal prevOwner;\n // % of sale value that goes to the original creator of the nft\n HolographDecimal creator;\n // % of sale value that goes to the seller (current owner) of the nft\n HolographDecimal owner;\n}\n" + }, + "contracts/struct/ZoraDecimal.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nstruct HolographDecimal {\n uint256 value;\n}\n" + }, + "contracts/token/CxipERC721.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/ERC721H.sol\";\n\nimport \"../enum/TokenUriType.sol\";\n\nimport \"../interface/HolographERC721Interface.sol\";\nimport \"../interface/HolographInterfacesInterface.sol\";\nimport \"../interface/HolographInterface.sol\";\nimport \"../interface/HolographerInterface.sol\";\n\n/**\n * @title CXIP ERC-721 Collection that is bridgeable via Holograph\n * @author Holograph Foundation\n * @notice A smart contract for minting and managing Holograph Bridgeable ERC721 NFTs.\n * @dev The entire logic and functionality of the smart contract is self-contained.\n */\ncontract CxipERC721 is ERC721H {\n /**\n * @dev Internal reference used for minting incremental token ids.\n */\n uint224 private _currentTokenId;\n\n /**\n * @dev Enum of type of token URI to use globally for the entire contract.\n */\n TokenUriType private _uriType;\n\n /**\n * @dev Enum mapping of type of token URI to use for specific tokenId.\n */\n mapping(uint256 => TokenUriType) private _tokenUriType;\n\n /**\n * @dev Mapping of IPFS URIs for tokenIds.\n */\n mapping(uint256 => mapping(TokenUriType => string)) private _tokenURIs;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n // we set this as default type since that's what Mint is currently using\n _uriType = TokenUriType.IPFS;\n address owner = abi.decode(initPayload, (address));\n _setOwner(owner);\n // run underlying initializer logic\n return _init(initPayload);\n }\n\n /**\n * @notice Get's the URI of the token.\n * @return string The URI.\n */\n function tokenURI(uint256 _tokenId) external view onlyHolographer returns (string memory) {\n TokenUriType uriType = _tokenUriType[_tokenId];\n if (uriType == TokenUriType.UNDEFINED) {\n uriType = _uriType;\n }\n return\n string(\n abi.encodePacked(\n HolographInterfacesInterface(\n HolographInterface(HolographerInterface(holographer()).getHolograph()).getInterfaces()\n ).getUriPrepend(uriType),\n _tokenURIs[_tokenId][uriType]\n )\n );\n }\n\n function cxipMint(\n uint224 tokenId,\n TokenUriType uriType,\n string calldata tokenUri\n ) external onlyHolographer onlyOwner {\n HolographERC721Interface H721 = HolographERC721Interface(holographer());\n uint256 chainPrepend = H721.sourceGetChainPrepend();\n if (tokenId == 0) {\n _currentTokenId += 1;\n while (\n H721.exists(chainPrepend + uint256(_currentTokenId)) || H721.burned(chainPrepend + uint256(_currentTokenId))\n ) {\n _currentTokenId += 1;\n }\n tokenId = _currentTokenId;\n }\n H721.sourceMint(msgSender(), tokenId);\n uint256 id = chainPrepend + uint256(tokenId);\n if (uriType == TokenUriType.UNDEFINED) {\n uriType = _uriType;\n }\n _tokenUriType[id] = uriType;\n _tokenURIs[id][uriType] = tokenUri;\n }\n\n function bridgeIn(\n uint32 /* _chainId*/,\n address /* _from*/,\n address /* _to*/,\n uint256 _tokenId,\n bytes calldata _data\n ) external onlyHolographer returns (bool) {\n (TokenUriType uriType, string memory tokenUri) = abi.decode(_data, (TokenUriType, string));\n _tokenUriType[_tokenId] = uriType;\n _tokenURIs[_tokenId][uriType] = tokenUri;\n return true;\n }\n\n function bridgeOut(\n uint32 /* _chainId*/,\n address /* _from*/,\n address /* _to*/,\n uint256 _tokenId\n ) external view onlyHolographer returns (bytes memory _data) {\n TokenUriType uriType = _tokenUriType[_tokenId];\n if (uriType == TokenUriType.UNDEFINED) {\n uriType = _uriType;\n }\n _data = abi.encode(uriType, _tokenURIs[_tokenId][uriType]);\n }\n\n function afterBurn(address /* _owner*/, uint256 _tokenId) external onlyHolographer returns (bool) {\n TokenUriType uriType = _tokenUriType[_tokenId];\n if (uriType == TokenUriType.UNDEFINED) {\n uriType = _uriType;\n }\n delete _tokenURIs[_tokenId][uriType];\n return true;\n }\n}\n" + }, + "contracts/token/HolographUtilityToken.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/HLGERC20H.sol\";\n\nimport \"../interface/ERC20.sol\";\nimport \"../interface/HolographERC20Interface.sol\";\nimport \"../interface/HolographInterface.sol\";\nimport \"../interface/HolographerInterface.sol\";\n\n/**\n * @title Holograph Utility Token.\n * @author Holograph Foundation\n * @notice A smart contract for minting and managing Holograph's ERC20 Utility Tokens.\n * @dev The entire logic and functionality of the smart contract is self-contained.\n */\ncontract HolographUtilityToken is HLGERC20H {\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n (address contractOwner, uint256 tokenAmount, uint256 targetChain, address tokenRecipient) = abi.decode(\n initPayload,\n (address, uint256, uint256, address)\n );\n _setOwner(contractOwner);\n /*\n * @dev Mint token only if target chain matches current chain. Or if no target chain has been selected.\n * Goal of this is to restrict minting on Ethereum only for mainnet deployment.\n */\n if (block.chainid == targetChain || targetChain == 0) {\n if (tokenAmount > 0) {\n HolographERC20Interface(msg.sender).sourceMint(tokenRecipient, tokenAmount);\n }\n }\n // run underlying initializer logic\n return _init(initPayload);\n }\n\n /**\n * @dev Temporarily placed to bypass bytecode conflicts\n */\n function isHLG() external pure returns (bool) {\n return true;\n }\n}\n" + }, + "contracts/token/hToken.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/HLGERC20H.sol\";\n\nimport \"../interface/ERC20.sol\";\nimport \"../interface/HolographERC20Interface.sol\";\nimport \"../interface/HolographInterface.sol\";\nimport \"../interface/HolographerInterface.sol\";\n\n/**\n * @title Holograph token (aka hToken), used to wrap and bridge native tokens across blockchains.\n * @author Holograph Foundation\n * @notice A smart contract for minting and managing Holograph's Bridgeable ERC20 Tokens.\n * @dev The entire logic and functionality of the smart contract is self-contained.\n */\ncontract hToken is HLGERC20H {\n /**\n * @dev Sample fee for unwrapping.\n */\n uint16 private _feeBp; // 10000 == 100.00%\n\n /**\n * @dev List of supported Wrapped Tokens (equivalent), on current-chain.\n */\n mapping(address => bool) private _supportedWrappers;\n\n /**\n * @dev Event that is triggered when native token is converted into hToken.\n */\n event Deposit(address indexed from, uint256 amount);\n\n /**\n * @dev Event that is triggered when ERC20 token is converted into hToken.\n */\n event TokenDeposit(address indexed token, address indexed from, uint256 amount);\n\n /**\n * @dev Event that is triggered when hToken is converted into native token.\n */\n event Withdrawal(address indexed to, uint256 amount);\n\n /**\n * @dev Event that is triggered when hToken is converted into ERC20 token.\n */\n event TokenWithdrawal(address indexed token, address indexed to, uint256 amount);\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n (address contractOwner, uint16 fee) = abi.decode(initPayload, (address, uint16));\n _setOwner(contractOwner);\n _feeBp = fee;\n // run underlying initializer logic\n return _init(initPayload);\n }\n\n /**\n * @dev Send native token value, get back hToken equivalent.\n * @param recipient Address of where to send the hToken(s) to.\n */\n function holographNativeToken(address recipient) external payable onlyHolographer {\n require(\n (HolographerInterface(holographer()).getOriginChain() ==\n HolographInterface(HolographerInterface(holographer()).getHolograph()).getHolographChainId()),\n \"hToken: not native token\"\n );\n require(msg.value > 0, \"hToken: no value received\");\n address sender = msgSender();\n if (recipient == address(0)) {\n recipient = sender;\n }\n HolographERC20Interface(holographer()).sourceMint(recipient, msg.value);\n emit Deposit(sender, msg.value);\n }\n\n /**\n * @dev Send hToken, get back native token value equivalent.\n * @param recipient Address of where to send the native token(s) to.\n */\n function extractNativeToken(address payable recipient, uint256 amount) external onlyHolographer {\n address sender = msgSender();\n require(ERC20(address(this)).balanceOf(sender) >= amount, \"hToken: not enough hToken(s)\");\n require(\n (HolographerInterface(holographer()).getOriginChain() ==\n HolographInterface(HolographerInterface(holographer()).getHolograph()).getHolographChainId()),\n \"hToken: not on native chain\"\n );\n require(address(this).balance >= amount, \"hToken: not enough native tokens\");\n HolographERC20Interface(holographer()).sourceBurn(sender, amount);\n // HERE WE NEED TO ADD FEE MECHANISM TO EXTRACT xx.xxxx% FROM NATIVE TOKEN AMOUNT\n // THIS SHOULD GO SOMEWHERE TO REWARD CAPITAL PROVIDERS\n uint256 fee = (amount / 10000) * _feeBp;\n // for now we just leave fee in contract balance\n //\n // amount is updated to reflect fee subtraction\n amount = amount - fee;\n recipient.transfer(amount);\n emit Withdrawal(recipient, amount);\n }\n\n /**\n * @dev Send supported wrapped token, get back hToken equivalent.\n * @param recipient Address of where to send the hToken(s) to.\n */\n function holographWrappedToken(address token, address recipient, uint256 amount) external onlyHolographer {\n require(_supportedWrappers[token], \"hToken: unsupported token type\");\n ERC20 erc20 = ERC20(token);\n address sender = msgSender();\n require(erc20.allowance(sender, address(this)) >= amount, \"hToken: allowance too low\");\n uint256 previousBalance = erc20.balanceOf(address(this));\n require(erc20.transferFrom(sender, address(this), amount), \"hToken: ERC20 transfer failed\");\n uint256 currentBalance = erc20.balanceOf(address(this));\n uint256 difference = currentBalance - previousBalance;\n require(difference >= 0, \"hToken: no tokens transferred\");\n if (difference < amount) {\n // adjust for fee-based mechanisms\n // this allows for discrepancies to not fail the entire operation\n amount = difference;\n }\n if (recipient == address(0)) {\n recipient = sender;\n }\n HolographERC20Interface(holographer()).sourceMint(recipient, amount);\n emit TokenDeposit(token, sender, amount);\n }\n\n /**\n * @dev Send hToken, get back native token value equivalent.\n * @param recipient Address of where to send the native token(s) to.\n */\n function extractWrappedToken(address token, address payable recipient, uint256 amount) external onlyHolographer {\n require(_supportedWrappers[token], \"hToken: unsupported token type\");\n address sender = msgSender();\n require(ERC20(address(this)).balanceOf(sender) >= amount, \"hToken: not enough hToken(s)\");\n ERC20 erc20 = ERC20(token);\n uint256 previousBalance = erc20.balanceOf(address(this));\n require(previousBalance >= amount, \"hToken: not enough ERC20 tokens\");\n if (recipient == address(0)) {\n recipient = payable(sender);\n }\n // HERE WE NEED TO ADD FEE MECHANISM TO EXTRACT xx.xxxx% FROM NATIVE TOKEN AMOUNT\n // THIS SHOULD GO SOMEWHERE TO REWARD CAPITAL PROVIDERS\n uint256 fee = (amount / 10000) * _feeBp;\n uint256 adjustedAmount = amount - fee;\n // for now we just leave fee in contract balance\n erc20.transfer(recipient, adjustedAmount);\n uint256 currentBalance = erc20.balanceOf(address(this));\n uint256 difference = currentBalance - previousBalance;\n require(difference == adjustedAmount, \"hToken: incorrect new balance\");\n HolographERC20Interface(holographer()).sourceBurn(sender, amount);\n emit TokenWithdrawal(token, recipient, adjustedAmount);\n }\n\n function availableNativeTokens() external view onlyHolographer returns (uint256) {\n if (\n HolographerInterface(holographer()).getOriginChain() ==\n HolographInterface(HolographerInterface(holographer()).getHolograph()).getHolographChainId()\n ) {\n return address(this).balance;\n } else {\n return 0;\n }\n }\n\n function availableWrappedTokens(address token) external view onlyHolographer returns (uint256) {\n require(_supportedWrappers[token], \"hToken: unsupported token type\");\n return ERC20(token).balanceOf(address(this));\n }\n\n function updateSupportedWrapper(address token, bool supported) external onlyHolographer onlyOwner {\n _supportedWrappers[token] = supported;\n }\n\n /**\n * @dev Temporarily placed to bypass bytecode conflicts\n */\n function isHToken() external pure returns (bool) {\n return true;\n }\n}\n" + }, + "contracts/token/SampleERC20.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/StrictERC20H.sol\";\n\nimport \"../interface/HolographERC20Interface.sol\";\n\n/**\n * @title Sample ERC-20 token that is bridgeable via Holograph\n * @author Holograph Foundation\n * @notice A smart contract for minting and managing Holograph Bridgeable ERC20 Tokens.\n * @dev The entire logic and functionality of the smart contract is self-contained.\n */\ncontract SampleERC20 is StrictERC20H {\n /**\n * @dev Just a dummy value for now to test transferring of data.\n */\n mapping(address => bytes32) private _walletSalts;\n\n /**\n * @dev Temporary implementation to suppress compiler state mutability warnings.\n */\n bool private _dummy;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n // do your own custom logic here\n address contractOwner = abi.decode(initPayload, (address));\n _setOwner(contractOwner);\n // run underlying initializer logic\n return _init(initPayload);\n }\n\n /**\n * @dev Sample mint where anyone can mint any amounts of tokens.\n */\n function mint(address to, uint256 amount) external onlyHolographer onlyOwner {\n HolographERC20Interface(holographer()).sourceMint(to, amount);\n if (_walletSalts[to] == bytes32(0)) {\n _walletSalts[to] = keccak256(\n abi.encodePacked(to, amount, block.timestamp, block.number, blockhash(block.number - 1))\n );\n }\n }\n\n function bridgeIn(\n uint32 /* _chainId*/,\n address /* _from*/,\n address _to,\n uint256 /* _amount*/,\n bytes calldata _data\n ) external override onlyHolographer returns (bool) {\n bytes32 salt = abi.decode(_data, (bytes32));\n _walletSalts[_to] = salt;\n return true;\n }\n\n function bridgeOut(\n uint32 /* _chainId*/,\n address /* _from*/,\n address _to,\n uint256 /* _amount*/\n ) external override onlyHolographer returns (bytes memory _data) {\n _dummy = false;\n _data = abi.encode(_walletSalts[_to]);\n }\n}\n" + }, + "contracts/token/SampleERC721.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\n/*\n\n ┌───────────┐\n │ HOLOGRAPH │\n └───────────┘\n╔═════════════════════════════════════════════════════════════╗\n║ ║\n║ / ^ \\ ║\n║ ~~*~~ ¸ ║\n║ [ '<>:<>' ] │░░░ ║\n║ ╔╗ _/\"\\_ ╔╣ ║\n║ ┌─╬╬─┐ \"\"\" ┌─╬╬─┐ ║\n║ ┌─┬┘ ╠╣ └┬─┐ \\_/ ┌─┬┘ ╠╣ └┬─┐ ║\n║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║\n║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║\n║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║\n╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣\n║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║\n╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣\n╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣\n║ ╠╣ ╠╣ ║\n║ ╠╣ ╠╣ ║\n║ , ╠╣ , ,' * ╠╣ ║\n║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║\n╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝\n - one protocol, one bridge = infinite possibilities -\n\n\n ***************************************************************\n\n DISCLAIMER: U.S Patent Pending\n\n LICENSE: Holograph Limited Public License (H-LPL)\n\n https://holograph.xyz/licenses/h-lpl/1.0.0\n\n This license governs use of the accompanying software. If you\n use the software, you accept this license. If you do not accept\n the license, you are not permitted to use the software.\n\n 1. Definitions\n\n The terms \"reproduce,\" \"reproduction,\" \"derivative works,\" and\n \"distribution\" have the same meaning here as under U.S.\n copyright law. A \"contribution\" is the original software, or\n any additions or changes to the software. A \"contributor\" is\n any person that distributes its contribution under this\n license. \"Licensed patents\" are a contributor’s patent claims\n that read directly on its contribution.\n\n 2. Grant of Rights\n\n A) Copyright Grant- Subject to the terms of this license,\n including the license conditions and limitations in sections 3\n and 4, each contributor grants you a non-exclusive, worldwide,\n royalty-free copyright license to reproduce its contribution,\n prepare derivative works of its contribution, and distribute\n its contribution or any derivative works that you create.\n B) Patent Grant- Subject to the terms of this license,\n including the license conditions and limitations in section 3,\n each contributor grants you a non-exclusive, worldwide,\n royalty-free license under its licensed patents to make, have\n made, use, sell, offer for sale, import, and/or otherwise\n dispose of its contribution in the software or derivative works\n of the contribution in the software.\n\n 3. Conditions and Limitations\n\n A) No Trademark License- This license does not grant you rights\n to use any contributors’ name, logo, or trademarks.\n B) If you bring a patent claim against any contributor over\n patents that you claim are infringed by the software, your\n patent license from such contributor is terminated with\n immediate effect.\n C) If you distribute any portion of the software, you must\n retain all copyright, patent, trademark, and attribution\n notices that are present in the software.\n D) If you distribute any portion of the software in source code\n form, you may do so only under this license by including a\n complete copy of this license with your distribution. If you\n distribute any portion of the software in compiled or object\n code form, you may only do so under a license that complies\n with this license.\n E) The software is licensed “as-is.” You bear all risks of\n using it. The contributors give no express warranties,\n guarantees, or conditions. You may have additional consumer\n rights under your local laws which this license cannot change.\n To the extent permitted under your local laws, the contributors\n exclude all implied warranties, including those of\n merchantability, fitness for a particular purpose and\n non-infringement.\n\n 4. (F) Platform Limitation- The licenses granted in sections\n 2.A & 2.B extend only to the software or derivative works that\n you create that run on a Holograph system product.\n\n ***************************************************************\n\n*/\n\npragma solidity 0.8.13;\n\nimport \"../abstract/StrictERC721H.sol\";\n\nimport \"../interface/HolographERC721Interface.sol\";\n\n/**\n * @title Sample ERC-721 Collection that is bridgeable via Holograph\n * @author Holograph Foundation\n * @notice A smart contract for minting and managing Holograph Bridgeable ERC721 NFTs.\n * @dev The entire logic and functionality of the smart contract is self-contained.\n */\ncontract SampleERC721 is StrictERC721H {\n /**\n * @dev Mapping of all token URIs.\n */\n mapping(uint256 => string) private _tokenURIs;\n\n /**\n * @dev Internal reference used for minting incremental token ids.\n */\n uint224 private _currentTokenId;\n\n /**\n * @dev Temporary implementation to suppress compiler state mutability warnings.\n */\n bool private _dummy;\n\n /**\n * @dev Constructor is left empty and init is used instead\n */\n constructor() {}\n\n /**\n * @notice Used internally to initialize the contract instead of through a constructor\n * @dev This function is called by the deployer/factory when creating a contract\n * @param initPayload abi encoded payload to use for contract initilaization\n */\n function init(bytes memory initPayload) external override returns (bytes4) {\n // do your own custom logic here\n address contractOwner = abi.decode(initPayload, (address));\n _setOwner(contractOwner);\n // run underlying initializer logic\n return _init(initPayload);\n }\n\n /**\n * @notice Get's the URI of the token.\n * @dev Defaults the the Arweave URI\n * @return string The URI.\n */\n function tokenURI(uint256 _tokenId) external view onlyHolographer returns (string memory) {\n return _tokenURIs[_tokenId];\n }\n\n /**\n * @dev Sample mint where anyone can mint specific token, with a custom URI\n */\n function mint(address to, uint224 tokenId, string calldata URI) external onlyHolographer onlyOwner {\n HolographERC721Interface H721 = HolographERC721Interface(holographer());\n if (tokenId == 0) {\n _currentTokenId += 1;\n while (H721.exists(uint256(_currentTokenId)) || H721.burned(uint256(_currentTokenId))) {\n _currentTokenId += 1;\n }\n tokenId = _currentTokenId;\n }\n H721.sourceMint(to, tokenId);\n uint256 id = H721.sourceGetChainPrepend() + uint256(tokenId);\n _tokenURIs[id] = URI;\n }\n\n function bridgeIn(\n uint32 /* _chainId*/,\n address /* _from*/,\n address /* _to*/,\n uint256 _tokenId,\n bytes calldata _data\n ) external override onlyHolographer returns (bool) {\n string memory URI = abi.decode(_data, (string));\n _tokenURIs[_tokenId] = URI;\n return true;\n }\n\n function bridgeOut(\n uint32 /* _chainId*/,\n address /* _from*/,\n address /* _to*/,\n uint256 _tokenId\n ) external override onlyHolographer returns (bytes memory _data) {\n _dummy = false;\n _data = abi.encode(_tokenURIs[_tokenId]);\n }\n\n function afterBurn(address /* _owner*/, uint256 _tokenId) external override onlyHolographer returns (bool) {\n delete _tokenURIs[_tokenId];\n return true;\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 999999 + }, + "metadata": { + "bytecodeHash": "none", + "useLiteralContent": true + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": ["ast"] + } + }, + "remappings": [ + "ds-test/=lib/forge-std/lib/ds-test/src/", + "erc721a-upgradeable/=erc721a-upgradeable/", + "forge-std/=lib/forge-std/src/" + ] + } +} diff --git a/hardhat.config.ts b/hardhat.config.ts index ab53de1af..03d3573cb 100755 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -399,6 +399,7 @@ const config: HardhatUserConfig = { arbitrumOne: process.env.ARBISCAN_API_KEY || '', arbitrumGoerli: process.env.ARBISCAN_API_KEY || '', arbitrumNova: process.env.ARBISCAN_NOVA_API_KEY || '', + mantleTestnet: 'NO-API' || process.env.MANTLE_API_KEY, }, customChains: [ { @@ -409,6 +410,14 @@ const config: HardhatUserConfig = { browserURL: 'https://nova.arbiscan.io', }, }, + { + network: 'mantleTestnet', + chainId: 5001, + urls: { + apiURL: 'https://explorer.testnet.mantle.xyz/api', + browserURL: 'https://explorer.testnet.mantle.xyz', + }, + }, ], }, hardhatHolographContractBuilder: { diff --git a/src/HolographFactory.sol b/src/HolographFactory.sol index 6557cb51e..b68807ebb 100755 --- a/src/HolographFactory.sol +++ b/src/HolographFactory.sol @@ -18,6 +18,8 @@ import "./struct/BridgeSettings.sol"; import "./struct/DeploymentConfig.sol"; import "./struct/Verification.sol"; +import "./library/Strings.sol"; + /** * @title Holograph Factory * @author https://github.com/holographxyz @@ -273,6 +275,15 @@ contract HolographFactory is Admin, Initializable, Holographable, HolographFacto */ return (signer != address(0) && (ecrecover(keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)), v, r, s) == signer || + ( + ecrecover( + keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n66", Strings.toHexString(uint256(hash), 32))), + v, + r, + s + ) + ) == + signer || ecrecover(hash, v, r, s) == signer)); }