From af5a2068c1805d2d0658ab8d2597cf43850b1fbc Mon Sep 17 00:00:00 2001 From: Felipe Faria Date: Tue, 21 Nov 2023 09:20:21 -0300 Subject: [PATCH] deployment files --- .../deploy/deployments/mumbai/Exchange.json | 1926 ++++++++++++++ .../mumbai/Exchange_Implementation.json | 2227 +++++++++++++++++ .../deployments/mumbai/Exchange_Proxy.json | 358 +++ .../deployments/mumbai/OrderValidator.json | 917 +++++++ .../mumbai/OrderValidator_Implementation.json | 1126 +++++++++ .../mumbai/OrderValidator_Proxy.json | 289 +++ .../deployments/mumbai/RoyaltiesRegistry.json | 613 +++++ .../RoyaltiesRegistry_Implementation.json | 698 ++++++ .../mumbai/RoyaltiesRegistry_Proxy.json | 276 ++ .../e65e4ae76ce109b65d6560f491fa920e.json | 173 ++ 10 files changed, 8603 insertions(+) create mode 100644 packages/deploy/deployments/mumbai/Exchange.json create mode 100644 packages/deploy/deployments/mumbai/Exchange_Implementation.json create mode 100644 packages/deploy/deployments/mumbai/Exchange_Proxy.json create mode 100644 packages/deploy/deployments/mumbai/OrderValidator.json create mode 100644 packages/deploy/deployments/mumbai/OrderValidator_Implementation.json create mode 100644 packages/deploy/deployments/mumbai/OrderValidator_Proxy.json create mode 100644 packages/deploy/deployments/mumbai/RoyaltiesRegistry.json create mode 100644 packages/deploy/deployments/mumbai/RoyaltiesRegistry_Implementation.json create mode 100644 packages/deploy/deployments/mumbai/RoyaltiesRegistry_Proxy.json create mode 100644 packages/deploy/deployments/mumbai/solcInputs/e65e4ae76ce109b65d6560f491fa920e.json diff --git a/packages/deploy/deployments/mumbai/Exchange.json b/packages/deploy/deployments/mumbai/Exchange.json new file mode 100644 index 0000000000..1796f021ab --- /dev/null +++ b/packages/deploy/deployments/mumbai/Exchange.json @@ -0,0 +1,1926 @@ +{ + "address": "0x63c583F540aC452A8D35888D0988832001c09444", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "admin_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "changeAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "orderKeyHash", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "address", + "name": "maker", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "internalType": "enum LibAsset.AssetClass", + "name": "assetClass", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct LibAsset.AssetType", + "name": "assetType", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "internalType": "struct LibAsset.Asset", + "name": "makeAsset", + "type": "tuple" + }, + { + "internalType": "address", + "name": "taker", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "internalType": "enum LibAsset.AssetClass", + "name": "assetClass", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct LibAsset.AssetType", + "name": "assetType", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "internalType": "struct LibAsset.Asset", + "name": "takeAsset", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "start", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "indexed": false, + "internalType": "struct LibOrder.Order", + "name": "order", + "type": "tuple" + } + ], + "name": "Cancel", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newDefaultFeeReceiver", + "type": "address" + } + ], + "name": "DefaultFeeReceiverSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "orderKeyHashLeft", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "orderKeyHashRight", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "address", + "name": "maker", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "internalType": "enum LibAsset.AssetClass", + "name": "assetClass", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct LibAsset.AssetType", + "name": "assetType", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "internalType": "struct LibAsset.Asset", + "name": "makeAsset", + "type": "tuple" + }, + { + "internalType": "address", + "name": "taker", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "internalType": "enum LibAsset.AssetClass", + "name": "assetClass", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct LibAsset.AssetType", + "name": "assetType", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "internalType": "struct LibAsset.Asset", + "name": "takeAsset", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "start", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "indexed": false, + "internalType": "struct LibOrder.Order", + "name": "orderLeft", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "maker", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "internalType": "enum LibAsset.AssetClass", + "name": "assetClass", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct LibAsset.AssetType", + "name": "assetType", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "internalType": "struct LibAsset.Asset", + "name": "makeAsset", + "type": "tuple" + }, + { + "internalType": "address", + "name": "taker", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "internalType": "enum LibAsset.AssetClass", + "name": "assetClass", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct LibAsset.AssetType", + "name": "assetType", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "internalType": "struct LibAsset.Asset", + "name": "takeAsset", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "start", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "indexed": false, + "internalType": "struct LibOrder.Order", + "name": "orderRight", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "leftValue", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rightValue", + "type": "uint256" + } + ], + "indexed": false, + "internalType": "struct LibOrder.FillResult", + "name": "newFill", + "type": "tuple" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalFillLeft", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalFillRight", + "type": "uint256" + } + ], + "name": "Match", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "newMatchOrdersLimit", + "type": "uint256" + } + ], + "name": "MatchOrdersLimitSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IOrderValidator", + "name": "contractAddress", + "type": "address" + } + ], + "name": "OrderValidatorSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "newProtocolFeePrimary", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "newProtocolFeeSecondary", + "type": "uint256" + } + ], + "name": "ProtocolFeeSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IRoyaltiesProvider", + "name": "newRoyaltiesRegistry", + "type": "address" + } + ], + "name": "RoyaltiesRegistrySet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldTrustedForwarder", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newTrustedForwarder", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "TrustedForwarderSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ERC1776_OPERATOR_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "EXCHANGE_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PAUSER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "maker", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "internalType": "enum LibAsset.AssetClass", + "name": "assetClass", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct LibAsset.AssetType", + "name": "assetType", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "internalType": "struct LibAsset.Asset", + "name": "makeAsset", + "type": "tuple" + }, + { + "internalType": "address", + "name": "taker", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "internalType": "enum LibAsset.AssetClass", + "name": "assetClass", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct LibAsset.AssetType", + "name": "assetType", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "internalType": "struct LibAsset.Asset", + "name": "takeAsset", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "start", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "internalType": "struct LibOrder.Order", + "name": "order", + "type": "tuple" + }, + { + "internalType": "bytes32", + "name": "orderKeyHash", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "defaultFeeReceiver", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "orderKeyHash", + "type": "bytes32" + } + ], + "name": "fills", + "outputs": [ + { + "internalType": "uint256", + "name": "orderFillValue", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "getRoleMember", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleMemberCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getTrustedForwarder", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "admin", + "type": "address" + }, + { + "internalType": "address", + "name": "newTrustedForwarder", + "type": "address" + }, + { + "internalType": "uint256", + "name": "newProtocolFeePrimary", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "newProtocolFeeSecondary", + "type": "uint256" + }, + { + "internalType": "address", + "name": "newDefaultFeeReceiver", + "type": "address" + }, + { + "internalType": "contract IRoyaltiesProvider", + "name": "newRoyaltiesProvider", + "type": "address" + }, + { + "internalType": "contract IOrderValidator", + "name": "orderValidatorAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "newMatchOrdersLimit", + "type": "uint256" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "forwarder", + "type": "address" + } + ], + "name": "isTrustedForwarder", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "address", + "name": "maker", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "internalType": "enum LibAsset.AssetClass", + "name": "assetClass", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct LibAsset.AssetType", + "name": "assetType", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "internalType": "struct LibAsset.Asset", + "name": "makeAsset", + "type": "tuple" + }, + { + "internalType": "address", + "name": "taker", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "internalType": "enum LibAsset.AssetClass", + "name": "assetClass", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct LibAsset.AssetType", + "name": "assetType", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "internalType": "struct LibAsset.Asset", + "name": "takeAsset", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "start", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "internalType": "struct LibOrder.Order", + "name": "orderLeft", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "signatureLeft", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "address", + "name": "maker", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "internalType": "enum LibAsset.AssetClass", + "name": "assetClass", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct LibAsset.AssetType", + "name": "assetType", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "internalType": "struct LibAsset.Asset", + "name": "makeAsset", + "type": "tuple" + }, + { + "internalType": "address", + "name": "taker", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "internalType": "enum LibAsset.AssetClass", + "name": "assetClass", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct LibAsset.AssetType", + "name": "assetType", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "internalType": "struct LibAsset.Asset", + "name": "takeAsset", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "start", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "internalType": "struct LibOrder.Order", + "name": "orderRight", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "signatureRight", + "type": "bytes" + } + ], + "internalType": "struct ExchangeCore.ExchangeMatch[]", + "name": "matchedOrders", + "type": "tuple[]" + } + ], + "name": "matchOrders", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "internalType": "address", + "name": "maker", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "internalType": "enum LibAsset.AssetClass", + "name": "assetClass", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct LibAsset.AssetType", + "name": "assetType", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "internalType": "struct LibAsset.Asset", + "name": "makeAsset", + "type": "tuple" + }, + { + "internalType": "address", + "name": "taker", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "internalType": "enum LibAsset.AssetClass", + "name": "assetClass", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct LibAsset.AssetType", + "name": "assetType", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "internalType": "struct LibAsset.Asset", + "name": "takeAsset", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "start", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "internalType": "struct LibOrder.Order", + "name": "orderLeft", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "signatureLeft", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "address", + "name": "maker", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "internalType": "enum LibAsset.AssetClass", + "name": "assetClass", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct LibAsset.AssetType", + "name": "assetType", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "internalType": "struct LibAsset.Asset", + "name": "makeAsset", + "type": "tuple" + }, + { + "internalType": "address", + "name": "taker", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "internalType": "enum LibAsset.AssetClass", + "name": "assetClass", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct LibAsset.AssetType", + "name": "assetType", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "internalType": "struct LibAsset.Asset", + "name": "takeAsset", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "start", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "internalType": "struct LibOrder.Order", + "name": "orderRight", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "signatureRight", + "type": "bytes" + } + ], + "internalType": "struct ExchangeCore.ExchangeMatch[]", + "name": "matchedOrders", + "type": "tuple[]" + } + ], + "name": "matchOrdersFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "orderValidator", + "outputs": [ + { + "internalType": "contract IOrderValidator", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "protocolFeePrimary", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "protocolFeeSecondary", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "royaltiesRegistry", + "outputs": [ + { + "internalType": "contract IRoyaltiesProvider", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newDefaultFeeReceiver", + "type": "address" + } + ], + "name": "setDefaultFeeReceiver", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newMatchOrdersLimit", + "type": "uint256" + } + ], + "name": "setMatchOrdersLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IOrderValidator", + "name": "contractAddress", + "type": "address" + } + ], + "name": "setOrderValidatorContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newProtocolFeePrimary", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "newProtocolFeeSecondary", + "type": "uint256" + } + ], + "name": "setProtocolFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IRoyaltiesProvider", + "name": "newRoyaltiesRegistry", + "type": "address" + } + ], + "name": "setRoyaltiesRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newTrustedForwarder", + "type": "address" + } + ], + "name": "setTrustedForwarder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "admin_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0x4ce31e6adb238ec8d4d5ae8baff49f75aa7c60df639245fd9f51421bcfc51b27", + "receipt": { + "to": null, + "from": "0x5F890c9522dCE5670d741D4277BFCC2d9cA8Af02", + "contractAddress": "0x63c583F540aC452A8D35888D0988832001c09444", + "transactionIndex": 6, + "gasUsed": "993873", + "logsBloom": "0x00080004000000000000008000080000400000000000000000000080020000000102000002008400000000000001000000009000000000000400000000000000400000000000080000000004000002808000000000080000000100080000008000000100020000000000020200004800000002800800000080000000000000004000011840000000000200000000000000000000200080000000000000a00000200000000000000000000000000400000000000000000000001000000000004000000020800002000401000000040004000000000410000100108006000820002000000000000080000000000000000004000000000080004000020000180000", + "blockHash": "0xa91cea759465b4d2d97f414299f8f6921491e4f8ffa08aa72b51d5fc1aa6fb4f", + "transactionHash": "0x4ce31e6adb238ec8d4d5ae8baff49f75aa7c60df639245fd9f51421bcfc51b27", + "logs": [ + { + "transactionIndex": 6, + "blockNumber": 42631864, + "transactionHash": "0x4ce31e6adb238ec8d4d5ae8baff49f75aa7c60df639245fd9f51421bcfc51b27", + "address": "0x63c583F540aC452A8D35888D0988832001c09444", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000d7b0efa0ef34c25e90d914b167a159854c59a2c9" + ], + "data": "0x", + "logIndex": 28, + "blockHash": "0xa91cea759465b4d2d97f414299f8f6921491e4f8ffa08aa72b51d5fc1aa6fb4f" + }, + { + "transactionIndex": 6, + "blockNumber": 42631864, + "transactionHash": "0x4ce31e6adb238ec8d4d5ae8baff49f75aa7c60df639245fd9f51421bcfc51b27", + "address": "0x63c583F540aC452A8D35888D0988832001c09444", + "topics": [ + "0x8ca022029d8ff7ad974913f8970aeed6c5e0e7eaf494a0c5b262249f6b5759e5", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000069015912aa33720b842dcd6ac059ed623f28d9f7", + "0x0000000000000000000000005f890c9522dce5670d741d4277bfcc2d9ca8af02" + ], + "data": "0x", + "logIndex": 29, + "blockHash": "0xa91cea759465b4d2d97f414299f8f6921491e4f8ffa08aa72b51d5fc1aa6fb4f" + }, + { + "transactionIndex": 6, + "blockNumber": 42631864, + "transactionHash": "0x4ce31e6adb238ec8d4d5ae8baff49f75aa7c60df639245fd9f51421bcfc51b27", + "address": "0x63c583F540aC452A8D35888D0988832001c09444", + "topics": [ + "0xfa4067f2d0249edb7594284cabb394f2ec0e4f6168dbd1e3a63f861b67f1188f", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000000000000000000000000000000000000000000fa" + ], + "data": "0x", + "logIndex": 30, + "blockHash": "0xa91cea759465b4d2d97f414299f8f6921491e4f8ffa08aa72b51d5fc1aa6fb4f" + }, + { + "transactionIndex": 6, + "blockNumber": 42631864, + "transactionHash": "0x4ce31e6adb238ec8d4d5ae8baff49f75aa7c60df639245fd9f51421bcfc51b27", + "address": "0x63c583F540aC452A8D35888D0988832001c09444", + "topics": [ + "0x5d039c612419cd7b6696e7d5c8ccaef3362188cc98db01e07fb55bb85b33541d", + "0x000000000000000000000000c66d094ed928f7840a6b0d373c1cd825c97e3c7c" + ], + "data": "0x", + "logIndex": 31, + "blockHash": "0xa91cea759465b4d2d97f414299f8f6921491e4f8ffa08aa72b51d5fc1aa6fb4f" + }, + { + "transactionIndex": 6, + "blockNumber": 42631864, + "transactionHash": "0x4ce31e6adb238ec8d4d5ae8baff49f75aa7c60df639245fd9f51421bcfc51b27", + "address": "0x63c583F540aC452A8D35888D0988832001c09444", + "topics": [ + "0x6932f02a24181a8c1b9fa7bdc7453f15ecba05c354c9da94e97bac1abb133978", + "0x0000000000000000000000009473a3b21fe192b491cdba305a9b143e06d903a0" + ], + "data": "0x", + "logIndex": 32, + "blockHash": "0xa91cea759465b4d2d97f414299f8f6921491e4f8ffa08aa72b51d5fc1aa6fb4f" + }, + { + "transactionIndex": 6, + "blockNumber": 42631864, + "transactionHash": "0x4ce31e6adb238ec8d4d5ae8baff49f75aa7c60df639245fd9f51421bcfc51b27", + "address": "0x63c583F540aC452A8D35888D0988832001c09444", + "topics": [ + "0xf605132f819f46ab9f362495c159c83b8a080f3b8b22f8a684018837eae0bed3", + "0x00000000000000000000000056077297c98d81a90c1cc26c13d16884c4b15abf" + ], + "data": "0x", + "logIndex": 33, + "blockHash": "0xa91cea759465b4d2d97f414299f8f6921491e4f8ffa08aa72b51d5fc1aa6fb4f" + }, + { + "transactionIndex": 6, + "blockNumber": 42631864, + "transactionHash": "0x4ce31e6adb238ec8d4d5ae8baff49f75aa7c60df639245fd9f51421bcfc51b27", + "address": "0x63c583F540aC452A8D35888D0988832001c09444", + "topics": [ + "0xa461ccf4a7e6996574f5a69258032896cd5082cf3264467d1b8875a3f98538d7", + "0x0000000000000000000000000000000000000000000000000000000000000032" + ], + "data": "0x", + "logIndex": 34, + "blockHash": "0xa91cea759465b4d2d97f414299f8f6921491e4f8ffa08aa72b51d5fc1aa6fb4f" + }, + { + "transactionIndex": 6, + "blockNumber": 42631864, + "transactionHash": "0x4ce31e6adb238ec8d4d5ae8baff49f75aa7c60df639245fd9f51421bcfc51b27", + "address": "0x63c583F540aC452A8D35888D0988832001c09444", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000049c4d4c94829b9c44052c5f5cb164fc612181165", + "0x0000000000000000000000005f890c9522dce5670d741d4277bfcc2d9ca8af02" + ], + "data": "0x", + "logIndex": 35, + "blockHash": "0xa91cea759465b4d2d97f414299f8f6921491e4f8ffa08aa72b51d5fc1aa6fb4f" + }, + { + "transactionIndex": 6, + "blockNumber": 42631864, + "transactionHash": "0x4ce31e6adb238ec8d4d5ae8baff49f75aa7c60df639245fd9f51421bcfc51b27", + "address": "0x63c583F540aC452A8D35888D0988832001c09444", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 36, + "blockHash": "0xa91cea759465b4d2d97f414299f8f6921491e4f8ffa08aa72b51d5fc1aa6fb4f" + }, + { + "transactionIndex": 6, + "blockNumber": 42631864, + "transactionHash": "0x4ce31e6adb238ec8d4d5ae8baff49f75aa7c60df639245fd9f51421bcfc51b27", + "address": "0x63c583F540aC452A8D35888D0988832001c09444", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045023af7b33994a22740bc51c3ca90a7ed82e124", + "logIndex": 37, + "blockHash": "0xa91cea759465b4d2d97f414299f8f6921491e4f8ffa08aa72b51d5fc1aa6fb4f" + }, + { + "transactionIndex": 6, + "blockNumber": 42631864, + "transactionHash": "0x4ce31e6adb238ec8d4d5ae8baff49f75aa7c60df639245fd9f51421bcfc51b27", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x0000000000000000000000005f890c9522dce5670d741d4277bfcc2d9ca8af02", + "0x0000000000000000000000005082f249cdb2f2c1ee035e4f423c46ea2dab3ab1" + ], + "data": "0x00000000000000000000000000000000000000000000000000054be222acdf0000000000000000000000000000000000000000000000000f2ea9043161f033fc0000000000000000000000000000000000000000000003b78e790e073f83059800000000000000000000000000000000000000000000000f2ea3b84f3f4354fc0000000000000000000000000000000000000000000003b78e7e59e9622fe498", + "logIndex": 38, + "blockHash": "0xa91cea759465b4d2d97f414299f8f6921491e4f8ffa08aa72b51d5fc1aa6fb4f" + } + ], + "blockNumber": 42631864, + "cumulativeGasUsed": "2363571", + "status": 1, + "byzantium": true + }, + "args": [ + "0xd7b0efA0EF34C25e90D914b167A159854C59a2c9", + "0x45023af7B33994a22740Bc51C3Ca90A7Ed82e124", + "0xc36e69e900000000000000000000000049c4d4c94829b9c44052c5f5cb164fc61218116500000000000000000000000069015912aa33720b842dcd6ac059ed623f28d9f7000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fa000000000000000000000000c66d094ed928f7840a6b0d373c1cd825c97e3c7c0000000000000000000000009473a3b21fe192b491cdba305a9b143e06d903a000000000000000000000000056077297c98d81a90c1cc26c13d16884c4b15abf0000000000000000000000000000000000000000000000000000000000000032" + ], + "numDeployments": 1, + "solcInputHash": "0e89febeebc7444140de8e67c9067d2c", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"changeAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \\\"admin cannot fallback to proxy target\\\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\",\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"changeAdmin(address)\":{\"details\":\"Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\"},\"constructor\":{\"details\":\"Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/openzeppelin/proxy/transparent/TransparentUpgradeableProxy.sol\":\"TransparentUpgradeableProxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x93b4e21c931252739a1ec13ea31d3d35a5c068be3163ccab83e4d70c40355f03\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1));\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(Address.isContract(IBeacon(newBeacon).implementation()), \\\"ERC1967: beacon implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x17668652127feebed0ce8d9431ef95ccc8c4292f03e3b8cf06c6ca16af396633\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xd5d1fd16e9faff7fcb3a52e02a8d49156f42a38a03f07b5f1810c21c2149a8ab\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n assert(_ADMIN_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n _changeAdmin(admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\n */\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\n _changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n}\\n\",\"keccak256\":\"0x140055a64cf579d622e04f5a198595832bf2cb193cd0005f4f2d4d61ca906253\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\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 Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\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 require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\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\\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}\\n\",\"keccak256\":\"0x3777e696b62134e6177440dbe6e6601c0c156a443f57167194b67e75527439de\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6080604052604051620011b2380380620011b2833981016040819052620000269162000519565b82816200005560017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd620005f9565b6000805160206200116b833981519152146200007557620000756200061f565b6200008382826000620000e7565b50620000b3905060017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6104620005f9565b6000805160206200114b83398151915214620000d357620000d36200061f565b620000de8262000124565b50505062000688565b620000f2836200017f565b600082511180620001005750805b156200011f576200011d8383620001c160201b620002ff1760201c565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6200014f620001f0565b604080516001600160a01b03928316815291841660208301520160405180910390a16200017c8162000229565b50565b6200018a81620002de565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060620001e983836040518060600160405280602781526020016200118b6027913962000381565b9392505050565b60006200021a6000805160206200114b83398151915260001b6200046760201b620002731760201c565b546001600160a01b0316919050565b6001600160a01b038116620002945760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b80620002bd6000805160206200114b83398151915260001b6200046760201b620002731760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b620002f4816200046a60201b6200032b1760201c565b620003585760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016200028b565b80620002bd6000805160206200116b83398151915260001b6200046760201b620002731760201c565b60606001600160a01b0384163b620003eb5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200028b565b600080856001600160a01b03168560405162000408919062000635565b600060405180830381855af49150503d806000811462000445576040519150601f19603f3d011682016040523d82523d6000602084013e6200044a565b606091505b5090925090506200045d82828662000479565b9695505050505050565b90565b6001600160a01b03163b151590565b606083156200048a575081620001e9565b8251156200049b5782518084602001fd5b8160405162461bcd60e51b81526004016200028b919062000653565b80516001600160a01b0381168114620004cf57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101562000507578181015183820152602001620004ed565b838111156200011d5750506000910152565b6000806000606084860312156200052f57600080fd5b6200053a84620004b7565b92506200054a60208501620004b7565b60408501519092506001600160401b03808211156200056857600080fd5b818601915086601f8301126200057d57600080fd5b815181811115620005925762000592620004d4565b604051601f8201601f19908116603f01168101908382118183101715620005bd57620005bd620004d4565b81604052828152896020848701011115620005d757600080fd5b620005ea836020830160208801620004ea565b80955050505050509250925092565b6000828210156200061a57634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b6000825162000649818460208701620004ea565b9190910192915050565b602081526000825180602084015262000674816040850160208701620004ea565b601f01601f19169190910160400192915050565b610ab380620006986000396000f3fe60806040526004361061005e5760003560e01c80635c60da1b116100435780635c60da1b146100a85780638f283970146100e6578063f851a440146101065761006d565b80633659cfe6146100755780634f1ef286146100955761006d565b3661006d5761006b61011b565b005b61006b61011b565b34801561008157600080fd5b5061006b61009036600461091f565b610135565b61006b6100a336600461093a565b610196565b3480156100b457600080fd5b506100bd610221565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100f257600080fd5b5061006b61010136600461091f565b610276565b34801561011257600080fd5b506100bd6102ba565b610123610347565b61013361012e610435565b61043f565b565b61013d610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561018e5761018b816040518060200160405280600081525060006104a3565b50565b61018b61011b565b61019e610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610219576102148383838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250600192506104a3915050565b505050565b61021461011b565b600061022b610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561026b57610266610435565b905090565b61027361011b565b90565b61027e610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561018e5761018b816104ce565b60006102c4610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561026b57610266610463565b60606103248383604051806060016040528060278152602001610a576027913961052f565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b61034f610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610133576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b6000610266610657565b3660008037600080366000845af43d6000803e80801561045e573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b5473ffffffffffffffffffffffffffffffffffffffff16919050565b6104ac8361067f565b6000825111806104b95750805b15610214576104c883836102ff565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6104f7610463565b6040805173ffffffffffffffffffffffffffffffffffffffff928316815291841660208301520160405180910390a161018b816106cc565b606073ffffffffffffffffffffffffffffffffffffffff84163b6105d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e74726163740000000000000000000000000000000000000000000000000000606482015260840161042c565b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516105fd91906109e9565b600060405180830381855af49150503d8060008114610638576040519150601f19603f3d011682016040523d82523d6000602084013e61063d565b606091505b509150915061064d8282866107d8565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610487565b6106888161082b565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b73ffffffffffffffffffffffffffffffffffffffff811661076f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161042c565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9290921691909117905550565b606083156107e7575081610324565b8251156107f75782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161042c9190610a05565b73ffffffffffffffffffffffffffffffffffffffff81163b6108cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e747261637400000000000000000000000000000000000000606482015260840161042c565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610792565b803573ffffffffffffffffffffffffffffffffffffffff8116811461091a57600080fd5b919050565b60006020828403121561093157600080fd5b610324826108f6565b60008060006040848603121561094f57600080fd5b610958846108f6565b9250602084013567ffffffffffffffff8082111561097557600080fd5b818601915086601f83011261098957600080fd5b81358181111561099857600080fd5b8760208285010111156109aa57600080fd5b6020830194508093505050509250925092565b60005b838110156109d85781810151838201526020016109c0565b838111156104c85750506000910152565b600082516109fb8184602087016109bd565b9190910192915050565b6020815260008251806020840152610a248160408501602087016109bd565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220b29caa54336b3ee836679675e9732ec5e526fb3f803cca2fe336cc3555aba62264736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040526004361061005e5760003560e01c80635c60da1b116100435780635c60da1b146100a85780638f283970146100e6578063f851a440146101065761006d565b80633659cfe6146100755780634f1ef286146100955761006d565b3661006d5761006b61011b565b005b61006b61011b565b34801561008157600080fd5b5061006b61009036600461091f565b610135565b61006b6100a336600461093a565b610196565b3480156100b457600080fd5b506100bd610221565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100f257600080fd5b5061006b61010136600461091f565b610276565b34801561011257600080fd5b506100bd6102ba565b610123610347565b61013361012e610435565b61043f565b565b61013d610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561018e5761018b816040518060200160405280600081525060006104a3565b50565b61018b61011b565b61019e610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610219576102148383838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250600192506104a3915050565b505050565b61021461011b565b600061022b610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561026b57610266610435565b905090565b61027361011b565b90565b61027e610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561018e5761018b816104ce565b60006102c4610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561026b57610266610463565b60606103248383604051806060016040528060278152602001610a576027913961052f565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b61034f610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610133576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b6000610266610657565b3660008037600080366000845af43d6000803e80801561045e573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b5473ffffffffffffffffffffffffffffffffffffffff16919050565b6104ac8361067f565b6000825111806104b95750805b15610214576104c883836102ff565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6104f7610463565b6040805173ffffffffffffffffffffffffffffffffffffffff928316815291841660208301520160405180910390a161018b816106cc565b606073ffffffffffffffffffffffffffffffffffffffff84163b6105d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e74726163740000000000000000000000000000000000000000000000000000606482015260840161042c565b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516105fd91906109e9565b600060405180830381855af49150503d8060008114610638576040519150601f19603f3d011682016040523d82523d6000602084013e61063d565b606091505b509150915061064d8282866107d8565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610487565b6106888161082b565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b73ffffffffffffffffffffffffffffffffffffffff811661076f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161042c565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9290921691909117905550565b606083156107e7575081610324565b8251156107f75782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161042c9190610a05565b73ffffffffffffffffffffffffffffffffffffffff81163b6108cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e747261637400000000000000000000000000000000000000606482015260840161042c565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610792565b803573ffffffffffffffffffffffffffffffffffffffff8116811461091a57600080fd5b919050565b60006020828403121561093157600080fd5b610324826108f6565b60008060006040848603121561094f57600080fd5b610958846108f6565b9250602084013567ffffffffffffffff8082111561097557600080fd5b818601915086601f83011261098957600080fd5b81358181111561099857600080fd5b8760208285010111156109aa57600080fd5b6020830194508093505050509250925092565b60005b838110156109d85781810151838201526020016109c0565b838111156104c85750506000910152565b600082516109fb8184602087016109bd565b9190910192915050565b6020815260008251806020840152610a248160408501602087016109bd565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220b29caa54336b3ee836679675e9732ec5e526fb3f803cca2fe336cc3555aba62264736f6c634300080a0033", + "execute": { + "methodName": "initialize", + "args": [ + "0x49c4D4C94829B9c44052C5f5Cb164Fc612181165", + "0x69015912aa33720b842dcd6ac059ed623f28d9f7", + 0, + 250, + "0xC66D094eD928f7840A6B0d373c1cd825C97e3C7c", + "0x9473A3B21fe192b491CDbA305a9b143e06D903a0", + "0x56077297C98d81A90c1cc26c13D16884C4b15AbF", + 50 + ] + }, + "implementation": "0xd7b0efA0EF34C25e90D914b167A159854C59a2c9", + "devdoc": { + "details": "This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \"admin cannot fallback to proxy target\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.", + "kind": "dev", + "methods": { + "admin()": { + "details": "Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`" + }, + "changeAdmin(address)": { + "details": "Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}." + }, + "constructor": { + "details": "Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}." + }, + "implementation()": { + "details": "Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`" + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/packages/deploy/deployments/mumbai/Exchange_Implementation.json b/packages/deploy/deployments/mumbai/Exchange_Implementation.json new file mode 100644 index 0000000000..8180f94b08 --- /dev/null +++ b/packages/deploy/deployments/mumbai/Exchange_Implementation.json @@ -0,0 +1,2227 @@ +{ + "address": "0xd7b0efA0EF34C25e90D914b167A159854C59a2c9", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "orderKeyHash", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "address", + "name": "maker", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "internalType": "enum LibAsset.AssetClass", + "name": "assetClass", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct LibAsset.AssetType", + "name": "assetType", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "internalType": "struct LibAsset.Asset", + "name": "makeAsset", + "type": "tuple" + }, + { + "internalType": "address", + "name": "taker", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "internalType": "enum LibAsset.AssetClass", + "name": "assetClass", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct LibAsset.AssetType", + "name": "assetType", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "internalType": "struct LibAsset.Asset", + "name": "takeAsset", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "start", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "indexed": false, + "internalType": "struct LibOrder.Order", + "name": "order", + "type": "tuple" + } + ], + "name": "Cancel", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newDefaultFeeReceiver", + "type": "address" + } + ], + "name": "DefaultFeeReceiverSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "orderKeyHashLeft", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "orderKeyHashRight", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "address", + "name": "maker", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "internalType": "enum LibAsset.AssetClass", + "name": "assetClass", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct LibAsset.AssetType", + "name": "assetType", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "internalType": "struct LibAsset.Asset", + "name": "makeAsset", + "type": "tuple" + }, + { + "internalType": "address", + "name": "taker", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "internalType": "enum LibAsset.AssetClass", + "name": "assetClass", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct LibAsset.AssetType", + "name": "assetType", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "internalType": "struct LibAsset.Asset", + "name": "takeAsset", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "start", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "indexed": false, + "internalType": "struct LibOrder.Order", + "name": "orderLeft", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "maker", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "internalType": "enum LibAsset.AssetClass", + "name": "assetClass", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct LibAsset.AssetType", + "name": "assetType", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "internalType": "struct LibAsset.Asset", + "name": "makeAsset", + "type": "tuple" + }, + { + "internalType": "address", + "name": "taker", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "internalType": "enum LibAsset.AssetClass", + "name": "assetClass", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct LibAsset.AssetType", + "name": "assetType", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "internalType": "struct LibAsset.Asset", + "name": "takeAsset", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "start", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "indexed": false, + "internalType": "struct LibOrder.Order", + "name": "orderRight", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "leftValue", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rightValue", + "type": "uint256" + } + ], + "indexed": false, + "internalType": "struct LibOrder.FillResult", + "name": "newFill", + "type": "tuple" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalFillLeft", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalFillRight", + "type": "uint256" + } + ], + "name": "Match", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "newMatchOrdersLimit", + "type": "uint256" + } + ], + "name": "MatchOrdersLimitSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IOrderValidator", + "name": "contractAddress", + "type": "address" + } + ], + "name": "OrderValidatorSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "newProtocolFeePrimary", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "newProtocolFeeSecondary", + "type": "uint256" + } + ], + "name": "ProtocolFeeSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IRoyaltiesProvider", + "name": "newRoyaltiesRegistry", + "type": "address" + } + ], + "name": "RoyaltiesRegistrySet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldTrustedForwarder", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newTrustedForwarder", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "TrustedForwarderSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ERC1776_OPERATOR_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "EXCHANGE_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PAUSER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "maker", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "internalType": "enum LibAsset.AssetClass", + "name": "assetClass", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct LibAsset.AssetType", + "name": "assetType", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "internalType": "struct LibAsset.Asset", + "name": "makeAsset", + "type": "tuple" + }, + { + "internalType": "address", + "name": "taker", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "internalType": "enum LibAsset.AssetClass", + "name": "assetClass", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct LibAsset.AssetType", + "name": "assetType", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "internalType": "struct LibAsset.Asset", + "name": "takeAsset", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "start", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "internalType": "struct LibOrder.Order", + "name": "order", + "type": "tuple" + }, + { + "internalType": "bytes32", + "name": "orderKeyHash", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "defaultFeeReceiver", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "orderKeyHash", + "type": "bytes32" + } + ], + "name": "fills", + "outputs": [ + { + "internalType": "uint256", + "name": "orderFillValue", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "getRoleMember", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleMemberCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getTrustedForwarder", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "admin", + "type": "address" + }, + { + "internalType": "address", + "name": "newTrustedForwarder", + "type": "address" + }, + { + "internalType": "uint256", + "name": "newProtocolFeePrimary", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "newProtocolFeeSecondary", + "type": "uint256" + }, + { + "internalType": "address", + "name": "newDefaultFeeReceiver", + "type": "address" + }, + { + "internalType": "contract IRoyaltiesProvider", + "name": "newRoyaltiesProvider", + "type": "address" + }, + { + "internalType": "contract IOrderValidator", + "name": "orderValidatorAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "newMatchOrdersLimit", + "type": "uint256" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "forwarder", + "type": "address" + } + ], + "name": "isTrustedForwarder", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "address", + "name": "maker", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "internalType": "enum LibAsset.AssetClass", + "name": "assetClass", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct LibAsset.AssetType", + "name": "assetType", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "internalType": "struct LibAsset.Asset", + "name": "makeAsset", + "type": "tuple" + }, + { + "internalType": "address", + "name": "taker", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "internalType": "enum LibAsset.AssetClass", + "name": "assetClass", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct LibAsset.AssetType", + "name": "assetType", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "internalType": "struct LibAsset.Asset", + "name": "takeAsset", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "start", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "internalType": "struct LibOrder.Order", + "name": "orderLeft", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "signatureLeft", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "address", + "name": "maker", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "internalType": "enum LibAsset.AssetClass", + "name": "assetClass", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct LibAsset.AssetType", + "name": "assetType", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "internalType": "struct LibAsset.Asset", + "name": "makeAsset", + "type": "tuple" + }, + { + "internalType": "address", + "name": "taker", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "internalType": "enum LibAsset.AssetClass", + "name": "assetClass", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct LibAsset.AssetType", + "name": "assetType", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "internalType": "struct LibAsset.Asset", + "name": "takeAsset", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "start", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "internalType": "struct LibOrder.Order", + "name": "orderRight", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "signatureRight", + "type": "bytes" + } + ], + "internalType": "struct ExchangeCore.ExchangeMatch[]", + "name": "matchedOrders", + "type": "tuple[]" + } + ], + "name": "matchOrders", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "internalType": "address", + "name": "maker", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "internalType": "enum LibAsset.AssetClass", + "name": "assetClass", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct LibAsset.AssetType", + "name": "assetType", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "internalType": "struct LibAsset.Asset", + "name": "makeAsset", + "type": "tuple" + }, + { + "internalType": "address", + "name": "taker", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "internalType": "enum LibAsset.AssetClass", + "name": "assetClass", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct LibAsset.AssetType", + "name": "assetType", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "internalType": "struct LibAsset.Asset", + "name": "takeAsset", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "start", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "internalType": "struct LibOrder.Order", + "name": "orderLeft", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "signatureLeft", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "address", + "name": "maker", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "internalType": "enum LibAsset.AssetClass", + "name": "assetClass", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct LibAsset.AssetType", + "name": "assetType", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "internalType": "struct LibAsset.Asset", + "name": "makeAsset", + "type": "tuple" + }, + { + "internalType": "address", + "name": "taker", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "internalType": "enum LibAsset.AssetClass", + "name": "assetClass", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct LibAsset.AssetType", + "name": "assetType", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "internalType": "struct LibAsset.Asset", + "name": "takeAsset", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "start", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "internalType": "struct LibOrder.Order", + "name": "orderRight", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "signatureRight", + "type": "bytes" + } + ], + "internalType": "struct ExchangeCore.ExchangeMatch[]", + "name": "matchedOrders", + "type": "tuple[]" + } + ], + "name": "matchOrdersFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "orderValidator", + "outputs": [ + { + "internalType": "contract IOrderValidator", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "protocolFeePrimary", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "protocolFeeSecondary", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "royaltiesRegistry", + "outputs": [ + { + "internalType": "contract IRoyaltiesProvider", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newDefaultFeeReceiver", + "type": "address" + } + ], + "name": "setDefaultFeeReceiver", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newMatchOrdersLimit", + "type": "uint256" + } + ], + "name": "setMatchOrdersLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IOrderValidator", + "name": "contractAddress", + "type": "address" + } + ], + "name": "setOrderValidatorContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newProtocolFeePrimary", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "newProtocolFeeSecondary", + "type": "uint256" + } + ], + "name": "setProtocolFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IRoyaltiesProvider", + "name": "newRoyaltiesRegistry", + "type": "address" + } + ], + "name": "setRoyaltiesRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newTrustedForwarder", + "type": "address" + } + ], + "name": "setTrustedForwarder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xb289ce70c8e19cd3f71353b976011104bc1755abd5594b28077ac8cf42732513", + "receipt": { + "to": null, + "from": "0x5F890c9522dCE5670d741D4277BFCC2d9cA8Af02", + "contractAddress": "0xd7b0efA0EF34C25e90D914b167A159854C59a2c9", + "transactionIndex": 2, + "gasUsed": "3600244", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000020000000002000002000000000000000000000000008000000000000000000000000000000800000000000000000000000000800000000000000000000100000000000000000000008000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000080000000000000200000200000000000000000000000000400000000010000000000000000000000004000000000000000000001000000040000000000000000000000108000000000000000000000000080000000000000000000000000000000000000000000100000", + "blockHash": "0x89484e91c3d146542d366bb0eeafcfe78ea0d61f77ee68531777a99c330646f6", + "transactionHash": "0xb289ce70c8e19cd3f71353b976011104bc1755abd5594b28077ac8cf42732513", + "logs": [ + { + "transactionIndex": 2, + "blockNumber": 42631861, + "transactionHash": "0xb289ce70c8e19cd3f71353b976011104bc1755abd5594b28077ac8cf42732513", + "address": "0xd7b0efA0EF34C25e90D914b167A159854C59a2c9", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", + "logIndex": 7, + "blockHash": "0x89484e91c3d146542d366bb0eeafcfe78ea0d61f77ee68531777a99c330646f6" + }, + { + "transactionIndex": 2, + "blockNumber": 42631861, + "transactionHash": "0xb289ce70c8e19cd3f71353b976011104bc1755abd5594b28077ac8cf42732513", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x0000000000000000000000005f890c9522dce5670d741d4277bfcc2d9ca8af02", + "0x0000000000000000000000005082f249cdb2f2c1ee035e4f423c46ea2dab3ab1" + ], + "data": "0x0000000000000000000000000000000000000000000000000017a7ee58b50e8c00000000000000000000000000000000000000000000000f2ec0ac1fbddd4a540000000000000000000000000000000000000000000003b78e30c84c6adaebfe00000000000000000000000000000000000000000000000f2ea9043165283bc80000000000000000000000000000000000000000000003b78e48703ac38ffa8a", + "logIndex": 8, + "blockHash": "0x89484e91c3d146542d366bb0eeafcfe78ea0d61f77ee68531777a99c330646f6" + } + ], + "blockNumber": 42631861, + "cumulativeGasUsed": "3872974", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "e65e4ae76ce109b65d6560f491fa920e", + "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"orderKeyHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"maker\",\"type\":\"address\"},{\"components\":[{\"components\":[{\"internalType\":\"enum LibAsset.AssetClass\",\"name\":\"assetClass\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"struct LibAsset.AssetType\",\"name\":\"assetType\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"internalType\":\"struct LibAsset.Asset\",\"name\":\"makeAsset\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"taker\",\"type\":\"address\"},{\"components\":[{\"components\":[{\"internalType\":\"enum LibAsset.AssetClass\",\"name\":\"assetClass\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"struct LibAsset.AssetType\",\"name\":\"assetType\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"internalType\":\"struct LibAsset.Asset\",\"name\":\"takeAsset\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"salt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"start\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"end\",\"type\":\"uint256\"}],\"indexed\":false,\"internalType\":\"struct LibOrder.Order\",\"name\":\"order\",\"type\":\"tuple\"}],\"name\":\"Cancel\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newDefaultFeeReceiver\",\"type\":\"address\"}],\"name\":\"DefaultFeeReceiverSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"orderKeyHashLeft\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"orderKeyHashRight\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"maker\",\"type\":\"address\"},{\"components\":[{\"components\":[{\"internalType\":\"enum LibAsset.AssetClass\",\"name\":\"assetClass\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"struct LibAsset.AssetType\",\"name\":\"assetType\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"internalType\":\"struct LibAsset.Asset\",\"name\":\"makeAsset\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"taker\",\"type\":\"address\"},{\"components\":[{\"components\":[{\"internalType\":\"enum LibAsset.AssetClass\",\"name\":\"assetClass\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"struct LibAsset.AssetType\",\"name\":\"assetType\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"internalType\":\"struct LibAsset.Asset\",\"name\":\"takeAsset\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"salt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"start\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"end\",\"type\":\"uint256\"}],\"indexed\":false,\"internalType\":\"struct LibOrder.Order\",\"name\":\"orderLeft\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"maker\",\"type\":\"address\"},{\"components\":[{\"components\":[{\"internalType\":\"enum LibAsset.AssetClass\",\"name\":\"assetClass\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"struct LibAsset.AssetType\",\"name\":\"assetType\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"internalType\":\"struct LibAsset.Asset\",\"name\":\"makeAsset\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"taker\",\"type\":\"address\"},{\"components\":[{\"components\":[{\"internalType\":\"enum LibAsset.AssetClass\",\"name\":\"assetClass\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"struct LibAsset.AssetType\",\"name\":\"assetType\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"internalType\":\"struct LibAsset.Asset\",\"name\":\"takeAsset\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"salt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"start\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"end\",\"type\":\"uint256\"}],\"indexed\":false,\"internalType\":\"struct LibOrder.Order\",\"name\":\"orderRight\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"leftValue\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rightValue\",\"type\":\"uint256\"}],\"indexed\":false,\"internalType\":\"struct LibOrder.FillResult\",\"name\":\"newFill\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalFillLeft\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalFillRight\",\"type\":\"uint256\"}],\"name\":\"Match\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"newMatchOrdersLimit\",\"type\":\"uint256\"}],\"name\":\"MatchOrdersLimitSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IOrderValidator\",\"name\":\"contractAddress\",\"type\":\"address\"}],\"name\":\"OrderValidatorSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"newProtocolFeePrimary\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"newProtocolFeeSecondary\",\"type\":\"uint256\"}],\"name\":\"ProtocolFeeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IRoyaltiesProvider\",\"name\":\"newRoyaltiesRegistry\",\"type\":\"address\"}],\"name\":\"RoyaltiesRegistrySet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldTrustedForwarder\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newTrustedForwarder\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"TrustedForwarderSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ERC1776_OPERATOR_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"EXCHANGE_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PAUSER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"maker\",\"type\":\"address\"},{\"components\":[{\"components\":[{\"internalType\":\"enum LibAsset.AssetClass\",\"name\":\"assetClass\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"struct LibAsset.AssetType\",\"name\":\"assetType\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"internalType\":\"struct LibAsset.Asset\",\"name\":\"makeAsset\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"taker\",\"type\":\"address\"},{\"components\":[{\"components\":[{\"internalType\":\"enum LibAsset.AssetClass\",\"name\":\"assetClass\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"struct LibAsset.AssetType\",\"name\":\"assetType\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"internalType\":\"struct LibAsset.Asset\",\"name\":\"takeAsset\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"salt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"start\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"end\",\"type\":\"uint256\"}],\"internalType\":\"struct LibOrder.Order\",\"name\":\"order\",\"type\":\"tuple\"},{\"internalType\":\"bytes32\",\"name\":\"orderKeyHash\",\"type\":\"bytes32\"}],\"name\":\"cancel\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"defaultFeeReceiver\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"orderKeyHash\",\"type\":\"bytes32\"}],\"name\":\"fills\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"orderFillValue\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRoleMember\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleMemberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTrustedForwarder\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"newTrustedForwarder\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"newProtocolFeePrimary\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"newProtocolFeeSecondary\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"newDefaultFeeReceiver\",\"type\":\"address\"},{\"internalType\":\"contract IRoyaltiesProvider\",\"name\":\"newRoyaltiesProvider\",\"type\":\"address\"},{\"internalType\":\"contract IOrderValidator\",\"name\":\"orderValidatorAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"newMatchOrdersLimit\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"forwarder\",\"type\":\"address\"}],\"name\":\"isTrustedForwarder\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"maker\",\"type\":\"address\"},{\"components\":[{\"components\":[{\"internalType\":\"enum LibAsset.AssetClass\",\"name\":\"assetClass\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"struct LibAsset.AssetType\",\"name\":\"assetType\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"internalType\":\"struct LibAsset.Asset\",\"name\":\"makeAsset\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"taker\",\"type\":\"address\"},{\"components\":[{\"components\":[{\"internalType\":\"enum LibAsset.AssetClass\",\"name\":\"assetClass\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"struct LibAsset.AssetType\",\"name\":\"assetType\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"internalType\":\"struct LibAsset.Asset\",\"name\":\"takeAsset\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"salt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"start\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"end\",\"type\":\"uint256\"}],\"internalType\":\"struct LibOrder.Order\",\"name\":\"orderLeft\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"signatureLeft\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"maker\",\"type\":\"address\"},{\"components\":[{\"components\":[{\"internalType\":\"enum LibAsset.AssetClass\",\"name\":\"assetClass\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"struct LibAsset.AssetType\",\"name\":\"assetType\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"internalType\":\"struct LibAsset.Asset\",\"name\":\"makeAsset\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"taker\",\"type\":\"address\"},{\"components\":[{\"components\":[{\"internalType\":\"enum LibAsset.AssetClass\",\"name\":\"assetClass\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"struct LibAsset.AssetType\",\"name\":\"assetType\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"internalType\":\"struct LibAsset.Asset\",\"name\":\"takeAsset\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"salt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"start\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"end\",\"type\":\"uint256\"}],\"internalType\":\"struct LibOrder.Order\",\"name\":\"orderRight\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"signatureRight\",\"type\":\"bytes\"}],\"internalType\":\"struct ExchangeCore.ExchangeMatch[]\",\"name\":\"matchedOrders\",\"type\":\"tuple[]\"}],\"name\":\"matchOrders\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"maker\",\"type\":\"address\"},{\"components\":[{\"components\":[{\"internalType\":\"enum LibAsset.AssetClass\",\"name\":\"assetClass\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"struct LibAsset.AssetType\",\"name\":\"assetType\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"internalType\":\"struct LibAsset.Asset\",\"name\":\"makeAsset\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"taker\",\"type\":\"address\"},{\"components\":[{\"components\":[{\"internalType\":\"enum LibAsset.AssetClass\",\"name\":\"assetClass\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"struct LibAsset.AssetType\",\"name\":\"assetType\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"internalType\":\"struct LibAsset.Asset\",\"name\":\"takeAsset\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"salt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"start\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"end\",\"type\":\"uint256\"}],\"internalType\":\"struct LibOrder.Order\",\"name\":\"orderLeft\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"signatureLeft\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"maker\",\"type\":\"address\"},{\"components\":[{\"components\":[{\"internalType\":\"enum LibAsset.AssetClass\",\"name\":\"assetClass\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"struct LibAsset.AssetType\",\"name\":\"assetType\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"internalType\":\"struct LibAsset.Asset\",\"name\":\"makeAsset\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"taker\",\"type\":\"address\"},{\"components\":[{\"components\":[{\"internalType\":\"enum LibAsset.AssetClass\",\"name\":\"assetClass\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"struct LibAsset.AssetType\",\"name\":\"assetType\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"internalType\":\"struct LibAsset.Asset\",\"name\":\"takeAsset\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"salt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"start\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"end\",\"type\":\"uint256\"}],\"internalType\":\"struct LibOrder.Order\",\"name\":\"orderRight\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"signatureRight\",\"type\":\"bytes\"}],\"internalType\":\"struct ExchangeCore.ExchangeMatch[]\",\"name\":\"matchedOrders\",\"type\":\"tuple[]\"}],\"name\":\"matchOrdersFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"orderValidator\",\"outputs\":[{\"internalType\":\"contract IOrderValidator\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"protocolFeePrimary\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"protocolFeeSecondary\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"royaltiesRegistry\",\"outputs\":[{\"internalType\":\"contract IRoyaltiesProvider\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newDefaultFeeReceiver\",\"type\":\"address\"}],\"name\":\"setDefaultFeeReceiver\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newMatchOrdersLimit\",\"type\":\"uint256\"}],\"name\":\"setMatchOrdersLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOrderValidator\",\"name\":\"contractAddress\",\"type\":\"address\"}],\"name\":\"setOrderValidatorContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newProtocolFeePrimary\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"newProtocolFeeSecondary\",\"type\":\"uint256\"}],\"name\":\"setProtocolFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IRoyaltiesProvider\",\"name\":\"newRoyaltiesRegistry\",\"type\":\"address\"}],\"name\":\"setRoyaltiesRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newTrustedForwarder\",\"type\":\"address\"}],\"name\":\"setTrustedForwarder\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"The Sandbox\",\"details\":\"Main functions are in ExchangeCoreTransferManager is used to execute token transfers\",\"events\":{\"Cancel(bytes32,(address,((uint8,bytes),uint256),address,((uint8,bytes),uint256),uint256,uint256,uint256))\":{\"params\":{\"order\":\"The details of the order being canceled.\",\"orderKeyHash\":\"The hash of the order being canceled.\"}},\"DefaultFeeReceiverSet(address)\":{\"params\":{\"newDefaultFeeReceiver\":\"address that gets the fees\"}},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"Match(address,bytes32,bytes32,(address,((uint8,bytes),uint256),address,((uint8,bytes),uint256),uint256,uint256,uint256),(address,((uint8,bytes),uint256),address,((uint8,bytes),uint256),uint256,uint256,uint256),(uint256,uint256),uint256,uint256)\":{\"params\":{\"from\":\"Address that initiated the match.\",\"newFill\":\"Fill details resulting from the order match.\",\"orderKeyHashLeft\":\"Hash of the left order.\",\"orderKeyHashRight\":\"Hash of the right order.\",\"orderLeft\":\"Details of the left order.\",\"orderRight\":\"Details of the right order.\",\"totalFillLeft\":\"Total fill amount for the left order.\",\"totalFillRight\":\"Total fill amount for the right order.\"}},\"MatchOrdersLimitSet(uint256)\":{\"params\":{\"newMatchOrdersLimit\":\"The new limit for matching orders in one transaction.\"}},\"OrderValidatorSet(address)\":{\"params\":{\"contractAddress\":\"Address of the new OrderValidator contract.\"}},\"Paused(address)\":{\"details\":\"Emitted when the pause is triggered by `account`.\"},\"ProtocolFeeSet(uint256,uint256)\":{\"params\":{\"newProtocolFeePrimary\":\"fee for primary market\",\"newProtocolFeeSecondary\":\"fee for secondary market\"}},\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\"},\"RoyaltiesRegistrySet(address)\":{\"params\":{\"newRoyaltiesRegistry\":\"address of new royalties registry\"}},\"TrustedForwarderSet(address,address,address)\":{\"params\":{\"newTrustedForwarder\":\"new trusted forwarder\",\"oldTrustedForwarder\":\"old trusted forwarder\",\"operator\":\"the sender of the transaction\"}},\"Unpaused(address)\":{\"details\":\"Emitted when the pause is lifted by `account`.\"}},\"kind\":\"dev\",\"methods\":{\"cancel((address,((uint8,bytes),uint256),address,((uint8,bytes),uint256),uint256,uint256,uint256),bytes32)\":{\"params\":{\"order\":\"The order to be canceled.\",\"orderKeyHash\":\"Used as a checksum to avoid mistakes in the order values.\"}},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\",\"details\":\"This protects the implementation contract from being initialized.\"},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"getRoleMember(bytes32,uint256)\":{\"details\":\"Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.\"},\"getRoleMemberCount(bytes32)\":{\"details\":\"Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role.\"},\"getTrustedForwarder()\":{\"returns\":{\"_0\":\"return the address of the trusted forwarder\"}},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"initialize(address,address,uint256,uint256,address,address,address,uint256)\":{\"params\":{\"admin\":\"The admin user that can grant/revoke roles, etc.\",\"newDefaultFeeReceiver\":\"Market fee receiver.\",\"newProtocolFeePrimary\":\"Protocol fee applied to primary markets.\",\"newProtocolFeeSecondary\":\"Protocol fee applied to secondary markets.\",\"newRoyaltiesProvider\":\"Registry for the different types of royalties.\",\"newTrustedForwarder\":\"Address for the trusted forwarder that will execute meta transactions.\",\"orderValidatorAddress\":\"New OrderValidator contract address.\"}},\"isTrustedForwarder(address)\":{\"params\":{\"forwarder\":\"trusted forwarder address to check\"},\"returns\":{\"_0\":\"true if the address is the same as the trusted forwarder\"}},\"matchOrders(((address,((uint8,bytes),uint256),address,((uint8,bytes),uint256),uint256,uint256,uint256),bytes,(address,((uint8,bytes),uint256),address,((uint8,bytes),uint256),uint256,uint256,uint256),bytes)[])\":{\"params\":{\"matchedOrders\":\"A list of left/right orders that match each other.\"}},\"matchOrdersFrom(address,((address,((uint8,bytes),uint256),address,((uint8,bytes),uint256),uint256,uint256,uint256),bytes,(address,((uint8,bytes),uint256),address,((uint8,bytes),uint256),uint256,uint256,uint256),bytes)[])\":{\"details\":\"This method supports ERC1776 native meta transactions.\",\"params\":{\"matchedOrders\":\"A list of left/right orders that match each other.\",\"sender\":\"The original sender of the transaction.\"}},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event.\"},\"setDefaultFeeReceiver(address)\":{\"params\":{\"newDefaultFeeReceiver\":\"Address to receive the fees.\"}},\"setMatchOrdersLimit(uint256)\":{\"params\":{\"newMatchOrdersLimit\":\"New value for max orders that can be matched.\"}},\"setOrderValidatorContract(address)\":{\"params\":{\"contractAddress\":\"New OrderValidator contract address.\"}},\"setProtocolFee(uint256,uint256)\":{\"params\":{\"newProtocolFeePrimary\":\"Fee for the primary market.\",\"newProtocolFeeSecondary\":\"Fee for the secondary market.\"}},\"setRoyaltiesRegistry(address)\":{\"params\":{\"newRoyaltiesRegistry\":\"Address of the new royalties registry.\"}},\"setTrustedForwarder(address)\":{\"params\":{\"newTrustedForwarder\":\"The new trusted forwarder address.\"}},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"}},\"stateVariables\":{\"ERC1776_OPERATOR_ROLE\":{\"return\":\"Hash for ERC1776_OPERATOR_ROLE.\",\"returns\":{\"_0\":\"Hash for ERC1776_OPERATOR_ROLE.\"}},\"EXCHANGE_ADMIN_ROLE\":{\"return\":\"Hash for EXCHANGE_ADMIN_ROLE.\",\"returns\":{\"_0\":\"Hash for EXCHANGE_ADMIN_ROLE.\"}},\"PAUSER_ROLE\":{\"return\":\"Hash for PAUSER_ROLE.\",\"returns\":{\"_0\":\"Hash for PAUSER_ROLE.\"}}},\"title\":\"Exchange contract with meta transactions\",\"version\":1},\"userdoc\":{\"events\":{\"Cancel(bytes32,(address,((uint8,bytes),uint256),address,((uint8,bytes),uint256),uint256,uint256,uint256))\":{\"notice\":\"Event emitted when an order is canceled.\"},\"DefaultFeeReceiverSet(address)\":{\"notice\":\"Emitted when the default fee receiver is updated.\"},\"Match(address,bytes32,bytes32,(address,((uint8,bytes),uint256),address,((uint8,bytes),uint256),uint256,uint256,uint256),(address,((uint8,bytes),uint256),address,((uint8,bytes),uint256),uint256,uint256,uint256),(uint256,uint256),uint256,uint256)\":{\"notice\":\"Event emitted when two orders are matched.\"},\"MatchOrdersLimitSet(uint256)\":{\"notice\":\"Event emitted when the match orders limit is updated.\"},\"OrderValidatorSet(address)\":{\"notice\":\"Event emitted when a new OrderValidator contract is set.\"},\"ProtocolFeeSet(uint256,uint256)\":{\"notice\":\"Emitted when protocol fees are updated.\"},\"TrustedForwarderSet(address,address,address)\":{\"notice\":\"Emitted when a `newTrustedForwarder` is set, replacing the `oldTrustedForwarder`\"}},\"kind\":\"user\",\"methods\":{\"ERC1776_OPERATOR_ROLE()\":{\"notice\":\"Role for ERC1776 trusted meta transaction contracts (like SAND).\"},\"EXCHANGE_ADMIN_ROLE()\":{\"notice\":\"Role for business addresses that can change values like fees and royalties.\"},\"PAUSER_ROLE()\":{\"notice\":\"Role for business addresses that can react to emergencies and pause.\"},\"cancel((address,((uint8,bytes),uint256),address,((uint8,bytes),uint256),uint256,uint256,uint256),bytes32)\":{\"notice\":\"Cancel an order.\"},\"defaultFeeReceiver()\":{\"notice\":\"Default receiver of protocol fees\"},\"getTrustedForwarder()\":{\"notice\":\"return the address of the trusted forwarder\"},\"initialize(address,address,uint256,uint256,address,address,address,uint256)\":{\"notice\":\"Exchange contract initializer.\"},\"isTrustedForwarder(address)\":{\"notice\":\"return true if the forwarder is the trusted forwarder\"},\"matchOrders(((address,((uint8,bytes),uint256),address,((uint8,bytes),uint256),uint256,uint256,uint256),bytes,(address,((uint8,bytes),uint256),address,((uint8,bytes),uint256),uint256,uint256,uint256),bytes)[])\":{\"notice\":\"Match orders and transact.\"},\"matchOrdersFrom(address,((address,((uint8,bytes),uint256),address,((uint8,bytes),uint256),uint256,uint256,uint256),bytes,(address,((uint8,bytes),uint256),address,((uint8,bytes),uint256),uint256,uint256,uint256),bytes)[])\":{\"notice\":\"Match orders and transact.\"},\"pause()\":{\"notice\":\"Pause the contract operations.\"},\"protocolFeePrimary()\":{\"notice\":\"Fee applied to primary sales.\"},\"protocolFeeSecondary()\":{\"notice\":\"Fee applied to secondary sales.\"},\"royaltiesRegistry()\":{\"notice\":\"Registry for the different royalties\"},\"setDefaultFeeReceiver(address)\":{\"notice\":\"Set the default fee receiver.\"},\"setMatchOrdersLimit(uint256)\":{\"notice\":\"Set the limit for matching orders.\"},\"setOrderValidatorContract(address)\":{\"notice\":\"Set the OrderValidator address.\"},\"setProtocolFee(uint256,uint256)\":{\"notice\":\"Set the protocol fees.\"},\"setRoyaltiesRegistry(address)\":{\"notice\":\"Set the royalty registry.\"},\"setTrustedForwarder(address)\":{\"notice\":\"Change the address of the trusted forwarder for meta-transactions.\"},\"unpause()\":{\"notice\":\"Resume the contract operations.\"}},\"notice\":\"Used to exchange assets, that is, tokens.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"@sandbox-smart-contracts/marketplace/contracts/Exchange.sol\":\"Exchange\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":2000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlEnumerableUpgradeable.sol\\\";\\nimport \\\"./AccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/structs/EnumerableSetUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\\n */\\nabstract contract AccessControlEnumerableUpgradeable is Initializable, IAccessControlEnumerableUpgradeable, AccessControlUpgradeable {\\n function __AccessControlEnumerable_init() internal onlyInitializing {\\n }\\n\\n function __AccessControlEnumerable_init_unchained() internal onlyInitializing {\\n }\\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;\\n\\n mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private _roleMembers;\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlEnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) {\\n return _roleMembers[role].at(index);\\n }\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) {\\n return _roleMembers[role].length();\\n }\\n\\n /**\\n * @dev Overload {_grantRole} to track enumerable memberships\\n */\\n function _grantRole(bytes32 role, address account) internal virtual override {\\n super._grantRole(role, account);\\n _roleMembers[role].add(account);\\n }\\n\\n /**\\n * @dev Overload {_revokeRole} to track enumerable memberships\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual override {\\n super._revokeRole(role, account);\\n _roleMembers[role].remove(account);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xc2dfd6ba9449f61b6b03b262182faf302f093a8c05dd10792aeecb4ed1663c0c\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```solidity\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```solidity\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}\\n * to enforce additional security measures for this role.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\\n function __AccessControl_init() internal onlyInitializing {\\n }\\n\\n function __AccessControl_init_unchained() internal onlyInitializing {\\n }\\n struct RoleData {\\n mapping(address => bool) members;\\n bytes32 adminRole;\\n }\\n\\n mapping(bytes32 => RoleData) private _roles;\\n\\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n /**\\n * @dev Modifier that checks that an account has a specific role. Reverts\\n * with a standardized message including the required role.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n *\\n * _Available since v4.1._\\n */\\n modifier onlyRole(bytes32 role) {\\n _checkRole(role);\\n _;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlUpgradeable).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\n return _roles[role].members[account];\\n }\\n\\n /**\\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\\n * Overriding this function changes the behavior of the {onlyRole} modifier.\\n *\\n * Format of the revert message is described in {_checkRole}.\\n *\\n * _Available since v4.6._\\n */\\n function _checkRole(bytes32 role) internal view virtual {\\n _checkRole(role, _msgSender());\\n }\\n\\n /**\\n * @dev Revert with a standard message if `account` is missing `role`.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n */\\n function _checkRole(bytes32 role, address account) internal view virtual {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n StringsUpgradeable.toHexString(account),\\n \\\" is missing role \\\",\\n StringsUpgradeable.toHexString(uint256(role), 32)\\n )\\n )\\n );\\n }\\n }\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {\\n return _roles[role].adminRole;\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been revoked `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function renounceRole(bytes32 role, address account) public virtual override {\\n require(account == _msgSender(), \\\"AccessControl: can only renounce roles for self\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event. Note that unlike {grantRole}, this function doesn't perform any\\n * checks on the calling account.\\n *\\n * May emit a {RoleGranted} event.\\n *\\n * [WARNING]\\n * ====\\n * This function should only be called from the constructor when setting\\n * up the initial roles for the system.\\n *\\n * Using this function in any other way is effectively circumventing the admin\\n * system imposed by {AccessControl}.\\n * ====\\n *\\n * NOTE: This function is deprecated in favor of {_grantRole}.\\n */\\n function _setupRole(bytes32 role, address account) internal virtual {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Sets `adminRole` as ``role``'s admin role.\\n *\\n * Emits a {RoleAdminChanged} event.\\n */\\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\\n bytes32 previousAdminRole = getRoleAdmin(role);\\n _roles[role].adminRole = adminRole;\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function _grantRole(bytes32 role, address account) internal virtual {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xfeefb24d068524440e1ba885efdf105d91f83504af3c2d745ffacc4595396831\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlEnumerableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\n\\n/**\\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\\n */\\ninterface IAccessControlEnumerableUpgradeable is IAccessControlUpgradeable {\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) external view returns (address);\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x7acbc538aad6eb4614e26612a8c5c0149bb8808db95e2638d245a8365f63e572\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControlUpgradeable {\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {AccessControl-_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) external view returns (bool);\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) external;\\n}\\n\",\"keccak256\":\"0xb8f5302f12138c5561362e88a78d061573e6298b7a1a5afe84a1e2c8d4d5aeaa\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n function __Pausable_init() internal onlyInitializing {\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal onlyInitializing {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n _requireNotPaused();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n _requirePaused();\\n _;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Throws if the contract is paused.\\n */\\n function _requireNotPaused() internal view virtual {\\n require(!paused(), \\\"Pausable: paused\\\");\\n }\\n\\n /**\\n * @dev Throws if the contract is not paused.\\n */\\n function _requirePaused() internal view virtual {\\n require(paused(), \\\"Pausable: not paused\\\");\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x40c636b4572ff5f1dc50cf22097e93c0723ee14eff87e99ac2b02636eeca1250\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/IERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165Upgradeable.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155Upgradeable is IERC165Upgradeable {\\n /**\\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\\n */\\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\\n\\n /**\\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\\n * transfers.\\n */\\n event TransferBatch(\\n address indexed operator,\\n address indexed from,\\n address indexed to,\\n uint256[] ids,\\n uint256[] values\\n );\\n\\n /**\\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\\n * `approved`.\\n */\\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\\n\\n /**\\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\\n *\\n * If an {URI} event was emitted for `id`, the standard\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\\n * returned by {IERC1155MetadataURI-uri}.\\n */\\n event URI(string value, uint256 indexed id);\\n\\n /**\\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) external view returns (uint256);\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(\\n address[] calldata accounts,\\n uint256[] calldata ids\\n ) external view returns (uint256[] memory);\\n\\n /**\\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\\n *\\n * Emits an {ApprovalForAll} event.\\n *\\n * Requirements:\\n *\\n * - `operator` cannot be the caller.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\\n *\\n * See {setApprovalForAll}.\\n */\\n function isApprovedForAll(address account, address operator) external view returns (bool);\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] calldata ids,\\n uint256[] calldata amounts,\\n bytes calldata data\\n ) external;\\n}\\n\",\"keccak256\":\"0xf51f292659a77777c0ed7375a39683d8bee53b86a6e7bd0c76f34ce7aa37a3a8\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20Upgradeable {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x0e1f0f5f62f67a881cd1a9597acbc0a5e4071f3c2c10449a183b922ae7272e3f\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20PermitUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\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 IERC20PermitUpgradeable {\\n /**\\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\\n * given ``owner``'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 `owner`\\n * over the EIP712-formatted function arguments.\\n * - the signature must use ``owner``'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 owner,\\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 `owner`. This value must be\\n * included whenever a signature is generated for {permit}.\\n *\\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n * prevents a signature from being used multiple times.\\n */\\n function nonces(address owner) 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\",\"keccak256\":\"0xd60f939a3ca0199014d079b4dd66aa757954334947d81eb5c1d35d7a83061ab3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20Upgradeable.sol\\\";\\nimport \\\"../extensions/IERC20PermitUpgradeable.sol\\\";\\nimport \\\"../../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20Upgradeable {\\n using AddressUpgradeable for address;\\n\\n /**\\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeTransfer(IERC20Upgradeable token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n /**\\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\\n */\\n function safeTransferFrom(IERC20Upgradeable token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20Upgradeable token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n /**\\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeIncreaseAllowance(IERC20Upgradeable token, address spender, uint256 value) internal {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\\n }\\n\\n /**\\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeDecreaseAllowance(IERC20Upgradeable token, address spender, uint256 value) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\\n }\\n }\\n\\n /**\\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\\n * to be set to zero before setting it to a non-zero value, such as USDT.\\n */\\n function forceApprove(IERC20Upgradeable token, address spender, uint256 value) internal {\\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\\n\\n if (!_callOptionalReturnBool(token, approvalCall)) {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\\n _callOptionalReturn(token, approvalCall);\\n }\\n }\\n\\n /**\\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\\n * Revert on invalid signature.\\n */\\n function safePermit(\\n IERC20PermitUpgradeable token,\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal {\\n uint256 nonceBefore = token.nonces(owner);\\n token.permit(owner, spender, value, deadline, v, r, s);\\n uint256 nonceAfter = token.nonces(owner);\\n require(nonceAfter == nonceBefore + 1, \\\"SafeERC20: permit did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20Upgradeable token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n require(returndata.length == 0 || abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n *\\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20Upgradeable token, bytes memory data) private returns (bool) {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\\n // and not revert is the subcall reverts.\\n\\n (bool success, bytes memory returndata) = address(token).call(data);\\n return\\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && AddressUpgradeable.isContract(address(token));\\n }\\n}\\n\",\"keccak256\":\"0x23b997be73d3dd46885262704f0f8cfc7273fdadfe303d37969a9561373972b5\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165Upgradeable.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721Upgradeable is IERC165Upgradeable {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\\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 *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721\\n * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\\n * understand this adds an external call which potentially creates a reentrancy vulnerability.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xbe63437e37e32162d5d11ea8f11a44378c092b4bcbb05b51a813fe4bf33297d4\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\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 Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\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 /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\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\",\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal onlyInitializing {\\n }\\n\\n function __Context_init_unchained() internal onlyInitializing {\\n }\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/MathUpgradeable.sol\\\";\\nimport \\\"./math/SignedMathUpgradeable.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\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 = MathUpgradeable.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 `int256` to its ASCII `string` decimal representation.\\n */\\n function toString(int256 value) internal pure returns (string memory) {\\n return string(abi.encodePacked(value < 0 ? \\\"-\\\" : \\\"\\\", toString(SignedMathUpgradeable.abs(value))));\\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, MathUpgradeable.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 /**\\n * @dev Returns true if the two strings are equal.\\n */\\n function equal(string memory a, string memory b) internal pure returns (bool) {\\n return keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0xb96dc79b65b7c37937919dcdb356a969ce0aa2e8338322bf4dc027a3c9c9a7eb\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165CheckerUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/introspection/ERC165Checker.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165Upgradeable.sol\\\";\\n\\n/**\\n * @dev Library used to query support of an interface declared via {IERC165}.\\n *\\n * Note that these functions return the actual result of the query: they do not\\n * `revert` if an interface is not supported. It is up to the caller to decide\\n * what to do in these cases.\\n */\\nlibrary ERC165CheckerUpgradeable {\\n // As per the EIP-165 spec, no interface should ever match 0xffffffff\\n bytes4 private constant _INTERFACE_ID_INVALID = 0xffffffff;\\n\\n /**\\n * @dev Returns true if `account` supports the {IERC165} interface.\\n */\\n function supportsERC165(address account) internal view returns (bool) {\\n // Any contract that implements ERC165 must explicitly indicate support of\\n // InterfaceId_ERC165 and explicitly indicate non-support of InterfaceId_Invalid\\n return\\n supportsERC165InterfaceUnchecked(account, type(IERC165Upgradeable).interfaceId) &&\\n !supportsERC165InterfaceUnchecked(account, _INTERFACE_ID_INVALID);\\n }\\n\\n /**\\n * @dev Returns true if `account` supports the interface defined by\\n * `interfaceId`. Support for {IERC165} itself is queried automatically.\\n *\\n * See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(address account, bytes4 interfaceId) internal view returns (bool) {\\n // query support of both ERC165 as per the spec and support of _interfaceId\\n return supportsERC165(account) && supportsERC165InterfaceUnchecked(account, interfaceId);\\n }\\n\\n /**\\n * @dev Returns a boolean array where each value corresponds to the\\n * interfaces passed in and whether they're supported or not. This allows\\n * you to batch check interfaces for a contract where your expectation\\n * is that some interfaces may not be supported.\\n *\\n * See {IERC165-supportsInterface}.\\n *\\n * _Available since v3.4._\\n */\\n function getSupportedInterfaces(\\n address account,\\n bytes4[] memory interfaceIds\\n ) internal view returns (bool[] memory) {\\n // an array of booleans corresponding to interfaceIds and whether they're supported or not\\n bool[] memory interfaceIdsSupported = new bool[](interfaceIds.length);\\n\\n // query support of ERC165 itself\\n if (supportsERC165(account)) {\\n // query support of each interface in interfaceIds\\n for (uint256 i = 0; i < interfaceIds.length; i++) {\\n interfaceIdsSupported[i] = supportsERC165InterfaceUnchecked(account, interfaceIds[i]);\\n }\\n }\\n\\n return interfaceIdsSupported;\\n }\\n\\n /**\\n * @dev Returns true if `account` supports all the interfaces defined in\\n * `interfaceIds`. Support for {IERC165} itself is queried automatically.\\n *\\n * Batch-querying can lead to gas savings by skipping repeated checks for\\n * {IERC165} support.\\n *\\n * See {IERC165-supportsInterface}.\\n */\\n function supportsAllInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool) {\\n // query support of ERC165 itself\\n if (!supportsERC165(account)) {\\n return false;\\n }\\n\\n // query support of each interface in interfaceIds\\n for (uint256 i = 0; i < interfaceIds.length; i++) {\\n if (!supportsERC165InterfaceUnchecked(account, interfaceIds[i])) {\\n return false;\\n }\\n }\\n\\n // all interfaces supported\\n return true;\\n }\\n\\n /**\\n * @notice Query if a contract implements an interface, does not check ERC165 support\\n * @param account The address of the contract to query for support of an interface\\n * @param interfaceId The interface identifier, as specified in ERC-165\\n * @return true if the contract at account indicates support of the interface with\\n * identifier interfaceId, false otherwise\\n * @dev Assumes that account contains a contract that supports ERC165, otherwise\\n * the behavior of this method is undefined. This precondition can be checked\\n * with {supportsERC165}.\\n *\\n * Some precompiled contracts will falsely indicate support for a given interface, so caution\\n * should be exercised when using this function.\\n *\\n * Interface identification is specified in ERC-165.\\n */\\n function supportsERC165InterfaceUnchecked(address account, bytes4 interfaceId) internal view returns (bool) {\\n // prepare call\\n bytes memory encodedParams = abi.encodeWithSelector(IERC165Upgradeable.supportsInterface.selector, interfaceId);\\n\\n // perform static call\\n bool success;\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly {\\n success := staticcall(30000, account, add(encodedParams, 0x20), mload(encodedParams), 0x00, 0x20)\\n returnSize := returndatasize()\\n returnValue := mload(0x00)\\n }\\n\\n return success && returnSize >= 0x20 && returnValue > 0;\\n }\\n}\\n\",\"keccak256\":\"0x94edef8687cf1335a114f7e7267fa92cb0d9e61afde8d62589aceede6c245caf\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165Upgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable {\\n function __ERC165_init() internal onlyInitializing {\\n }\\n\\n function __ERC165_init_unchained() internal onlyInitializing {\\n }\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165Upgradeable).interfaceId;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x9a3b990bd56d139df3e454a9edf1c64668530b5a77fc32eb063bc206f958274a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165Upgradeable {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xc6cef87559d0aeffdf0a99803de655938a7779ec0a3cd5d4383483ad85565a09\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary MathUpgradeable {\\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 // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\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 // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `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 256, 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 << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2bc0007987c229ae7624eb29be6a9b84f6a6a5872f76248b15208b131ea41c4e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/SignedMathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMathUpgradeable {\\n /**\\n * @dev Returns the largest of two signed numbers.\\n */\\n function max(int256 a, int256 b) internal pure returns (int256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two signed numbers.\\n */\\n function min(int256 a, int256 b) internal pure returns (int256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two signed numbers without overflow.\\n * The result is rounded towards zero.\\n */\\n function average(int256 a, int256 b) internal pure returns (int256) {\\n // Formula from the book \\\"Hacker's Delight\\\"\\n int256 x = (a & b) + ((a ^ b) >> 1);\\n return x + (int256(uint256(x) >> 255) & (a ^ b));\\n }\\n\\n /**\\n * @dev Returns the absolute unsigned value of a signed value.\\n */\\n function abs(int256 n) internal pure returns (uint256) {\\n unchecked {\\n // must be unchecked in order to support `n = type(int256).min`\\n return uint256(n >= 0 ? n : -n);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x88f6b7bba3ee33eeb741f9a0f5bc98b6e6e352d0fe4905377bb328590f84095a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSetUpgradeable {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x1c65595a26548a1b2263315b08a56334a2d7087319814437559c3c96025e939f\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/dependency-metatx/contracts/ERC2771HandlerAbstract.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n/// @dev minimal ERC2771 handler to keep bytecode-size down\\n/// based on: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/metatx/ERC2771Context.sol\\nabstract contract ERC2771HandlerAbstract {\\n /// @notice return true if the forwarder is the trusted forwarder\\n /// @param forwarder trusted forwarder address to check\\n /// @return true if the address is the same as the trusted forwarder\\n function isTrustedForwarder(address forwarder) external view returns (bool) {\\n return _isTrustedForwarder(forwarder);\\n }\\n\\n /// @notice if the call is from the trusted forwarder the sender is extracted from calldata, msg.sender otherwise\\n /// @return sender the calculated address of the sender\\n function _msgSender() internal view virtual returns (address sender) {\\n if (_isTrustedForwarder(msg.sender) && msg.data.length >= 20) {\\n // The assembly code is more direct than the Solidity version using `abi.decode`.\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sender := shr(96, calldataload(sub(calldatasize(), 20)))\\n }\\n } else {\\n sender = msg.sender;\\n }\\n }\\n\\n /// @notice if the call is from the trusted forwarder the sender is removed from calldata\\n /// @return the calldata without the sender\\n function _msgData() internal view virtual returns (bytes calldata) {\\n if (_isTrustedForwarder(msg.sender) && msg.data.length >= 20) {\\n return msg.data[:msg.data.length - 20];\\n } else {\\n return msg.data;\\n }\\n }\\n\\n /// @notice return true if the forwarder is the trusted forwarder\\n /// @param forwarder trusted forwarder address to check\\n /// @return true if the address is the same as the trusted forwarder\\n /// @dev this function must be IMPLEMENTED\\n function _isTrustedForwarder(address forwarder) internal view virtual returns (bool);\\n}\\n\",\"keccak256\":\"0xc4f349865ea7146f51b69f1edacdef60e0a2a7cf4dab538a5ae53ee9a0036231\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/dependency-metatx/contracts/ERC2771HandlerUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport {Initializable} from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport {ERC2771HandlerAbstract} from \\\"./ERC2771HandlerAbstract.sol\\\";\\n\\n/// @dev minimal ERC2771 handler to keep bytecode-size down\\n/// based on: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/metatx/ERC2771Context.sol\\ncontract ERC2771HandlerUpgradeable is Initializable, ERC2771HandlerAbstract {\\n address private _trustedForwarder;\\n\\n /// @notice Emitted when a `newTrustedForwarder` is set, replacing the `oldTrustedForwarder`\\n /// @param oldTrustedForwarder old trusted forwarder\\n /// @param newTrustedForwarder new trusted forwarder\\n /// @param operator the sender of the transaction\\n event TrustedForwarderSet(\\n address indexed oldTrustedForwarder,\\n address indexed newTrustedForwarder,\\n address indexed operator\\n );\\n\\n /// @notice initialize the trusted forwarder address\\n /// @param forwarder trusted forwarder address or zero to disable it\\n // solhint-disable-next-line func-name-mixedcase\\n function __ERC2771Handler_init(address forwarder) internal onlyInitializing {\\n __ERC2771Handler_init_unchained(forwarder);\\n }\\n\\n /// @notice initialize the trusted forwarder address\\n /// @param forwarder trusted forwarder address or zero to disable it\\n // solhint-disable-next-line func-name-mixedcase\\n function __ERC2771Handler_init_unchained(address forwarder) internal onlyInitializing {\\n _setTrustedForwarder(forwarder);\\n }\\n\\n /// @notice return the address of the trusted forwarder\\n /// @return return the address of the trusted forwarder\\n function getTrustedForwarder() external view returns (address) {\\n return _trustedForwarder;\\n }\\n\\n /// @notice set the address of the trusted forwarder\\n /// @param newForwarder the address of the new forwarder.\\n function _setTrustedForwarder(address newForwarder) internal virtual {\\n require(newForwarder != _trustedForwarder, \\\"ERC2771HandlerUpgradeable: forwarder already set\\\");\\n emit TrustedForwarderSet(_trustedForwarder, newForwarder, _msgSender());\\n _trustedForwarder = newForwarder;\\n }\\n\\n /// @notice return true if the forwarder is the trusted forwarder\\n /// @param forwarder trusted forwarder address to check\\n /// @return true if the address is the same as the trusted forwarder\\n function _isTrustedForwarder(address forwarder) internal view virtual override returns (bool) {\\n return forwarder == _trustedForwarder;\\n }\\n\\n /// @notice if the call is from the trusted forwarder the sender is extracted from calldata, msg.sender otherwise\\n /// @return sender the calculated address of the sender\\n function _msgSender() internal view virtual override returns (address sender) {\\n return super._msgSender();\\n }\\n\\n /// @notice if the call is from the trusted forwarder the sender is removed from calldata\\n /// @return the calldata without the sender\\n function _msgData() internal view virtual override returns (bytes calldata) {\\n return super._msgData();\\n }\\n\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x63b605598cecd8d66880b7978e17036367dfa8b0f236c2d5eaf0bff6328d26b8\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/dependency-royalty-management/contracts/interfaces/IRoyaltyUGC.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n/// @title IRoyaltyUGC\\n/// @notice interface define function for managing creator of UGC (User-Generated Content)\\ninterface IRoyaltyUGC {\\n ///@notice Gets the address of the creator associated with a specific token.\\n ///@param tokenId the Id of token to retrieve the creator address for\\n ///@return creator the address of creator\\n function getCreatorAddress(uint256 tokenId) external pure returns (address creator);\\n}\\n\",\"keccak256\":\"0x621ac01b122e55554c87437ca7f64f571c18b43d100e2d2205ca06e9ae72a464\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/marketplace/contracts/Exchange.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.19;\\n\\nimport {PausableUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\\\";\\nimport {Initializable} from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport {AccessControlEnumerableUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol\\\";\\nimport {ContextUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\\\";\\nimport {ERC2771HandlerUpgradeable} from \\\"@sandbox-smart-contracts/dependency-metatx/contracts/ERC2771HandlerUpgradeable.sol\\\";\\nimport {IOrderValidator} from \\\"./interfaces/IOrderValidator.sol\\\";\\nimport {TransferManager, IRoyaltiesProvider} from \\\"./TransferManager.sol\\\";\\nimport {LibOrder} from \\\"./libraries/LibOrder.sol\\\";\\nimport {ExchangeCore} from \\\"./ExchangeCore.sol\\\";\\n\\n/// @author The Sandbox\\n/// @title Exchange contract with meta transactions\\n/// @notice Used to exchange assets, that is, tokens.\\n/// @dev Main functions are in ExchangeCore\\n/// @dev TransferManager is used to execute token transfers\\ncontract Exchange is\\n Initializable,\\n AccessControlEnumerableUpgradeable,\\n ExchangeCore,\\n TransferManager,\\n ERC2771HandlerUpgradeable,\\n PausableUpgradeable\\n{\\n /// @notice Role for ERC1776 trusted meta transaction contracts (like SAND).\\n /// @return Hash for ERC1776_OPERATOR_ROLE.\\n bytes32 public constant ERC1776_OPERATOR_ROLE = keccak256(\\\"ERC1776_OPERATOR_ROLE\\\");\\n\\n /// @notice Role for business addresses that can change values like fees and royalties.\\n /// @return Hash for EXCHANGE_ADMIN_ROLE.\\n bytes32 public constant EXCHANGE_ADMIN_ROLE = keccak256(\\\"EXCHANGE_ADMIN_ROLE\\\");\\n\\n /// @notice Role for business addresses that can react to emergencies and pause.\\n /// @return Hash for PAUSER_ROLE.\\n bytes32 public constant PAUSER_ROLE = keccak256(\\\"PAUSER_ROLE\\\");\\n\\n /// @dev This protects the implementation contract from being initialized.\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @notice Exchange contract initializer.\\n /// @param admin The admin user that can grant/revoke roles, etc.\\n /// @param newTrustedForwarder Address for the trusted forwarder that will execute meta transactions.\\n /// @param newProtocolFeePrimary Protocol fee applied to primary markets.\\n /// @param newProtocolFeeSecondary Protocol fee applied to secondary markets.\\n /// @param newDefaultFeeReceiver Market fee receiver.\\n /// @param newRoyaltiesProvider Registry for the different types of royalties.\\n /// @param orderValidatorAddress New OrderValidator contract address.\\n function initialize(\\n address admin,\\n address newTrustedForwarder,\\n uint256 newProtocolFeePrimary,\\n uint256 newProtocolFeeSecondary,\\n address newDefaultFeeReceiver,\\n IRoyaltiesProvider newRoyaltiesProvider,\\n IOrderValidator orderValidatorAddress,\\n uint256 newMatchOrdersLimit\\n ) external initializer {\\n __ERC2771Handler_init_unchained(newTrustedForwarder);\\n __AccessControlEnumerable_init_unchained();\\n __Pausable_init_unchained();\\n __TransferManager_init_unchained(\\n newProtocolFeePrimary,\\n newProtocolFeeSecondary,\\n newDefaultFeeReceiver,\\n newRoyaltiesProvider\\n );\\n __ExchangeCoreInitialize(orderValidatorAddress, newMatchOrdersLimit);\\n _grantRole(DEFAULT_ADMIN_ROLE, admin);\\n }\\n\\n /// @notice Match orders and transact.\\n /// @param matchedOrders A list of left/right orders that match each other.\\n function matchOrders(ExchangeMatch[] calldata matchedOrders) external whenNotPaused {\\n _matchOrders(_msgSender(), matchedOrders);\\n }\\n\\n /// @notice Match orders and transact.\\n /// @param sender The original sender of the transaction.\\n /// @param matchedOrders A list of left/right orders that match each other.\\n /// @dev This method supports ERC1776 native meta transactions.\\n function matchOrdersFrom(\\n address sender,\\n ExchangeMatch[] calldata matchedOrders\\n ) external onlyRole(ERC1776_OPERATOR_ROLE) whenNotPaused {\\n require(sender != address(0), \\\"invalid sender\\\");\\n _matchOrders(sender, matchedOrders);\\n }\\n\\n /// @notice Cancel an order.\\n /// @param order The order to be canceled.\\n /// @param orderKeyHash Used as a checksum to avoid mistakes in the order values.\\n function cancel(LibOrder.Order calldata order, bytes32 orderKeyHash) external {\\n require(_msgSender() == order.maker, \\\"not maker\\\");\\n _cancel(order, orderKeyHash);\\n }\\n\\n /// @notice Set the royalty registry.\\n /// @param newRoyaltiesRegistry Address of the new royalties registry.\\n function setRoyaltiesRegistry(IRoyaltiesProvider newRoyaltiesRegistry) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n _setRoyaltiesRegistry(newRoyaltiesRegistry);\\n }\\n\\n /// @notice Set the OrderValidator address.\\n /// @param contractAddress New OrderValidator contract address.\\n function setOrderValidatorContract(IOrderValidator contractAddress) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n _setOrderValidatorContract(contractAddress);\\n }\\n\\n /// @notice Set the limit for matching orders.\\n /// @param newMatchOrdersLimit New value for max orders that can be matched.\\n function setMatchOrdersLimit(uint256 newMatchOrdersLimit) external onlyRole(EXCHANGE_ADMIN_ROLE) {\\n _setMatchOrdersLimit(newMatchOrdersLimit);\\n }\\n\\n /// @notice Change the address of the trusted forwarder for meta-transactions.\\n /// @param newTrustedForwarder The new trusted forwarder address.\\n function setTrustedForwarder(address newTrustedForwarder) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n _setTrustedForwarder(newTrustedForwarder);\\n }\\n\\n /// @notice Set the protocol fees.\\n /// @param newProtocolFeePrimary Fee for the primary market.\\n /// @param newProtocolFeeSecondary Fee for the secondary market.\\n function setProtocolFee(\\n uint256 newProtocolFeePrimary,\\n uint256 newProtocolFeeSecondary\\n ) external onlyRole(EXCHANGE_ADMIN_ROLE) {\\n _setProtocolFee(newProtocolFeePrimary, newProtocolFeeSecondary);\\n }\\n\\n /// @notice Set the default fee receiver.\\n /// @param newDefaultFeeReceiver Address to receive the fees.\\n function setDefaultFeeReceiver(address newDefaultFeeReceiver) external onlyRole(EXCHANGE_ADMIN_ROLE) {\\n _setDefaultFeeReceiver(newDefaultFeeReceiver);\\n }\\n\\n /// @notice Pause the contract operations.\\n function pause() external onlyRole(PAUSER_ROLE) {\\n _pause();\\n }\\n\\n /// @notice Resume the contract operations.\\n function unpause() external onlyRole(EXCHANGE_ADMIN_ROLE) {\\n _unpause();\\n }\\n\\n /// @dev Check if fees & royalties should be skipped for users with the EXCHANGE_ADMIN_ROLE.\\n /// @param from Address to check.\\n /// @return True if fees should be skipped, false otherwise.\\n function _mustSkipFees(address from) internal view override returns (bool) {\\n return hasRole(EXCHANGE_ADMIN_ROLE, from);\\n }\\n\\n function _msgSender()\\n internal\\n view\\n virtual\\n override(ContextUpgradeable, ERC2771HandlerUpgradeable)\\n returns (address)\\n {\\n return ERC2771HandlerUpgradeable._msgSender();\\n }\\n\\n // slither-disable-next-line dead-code needed because of inheritance\\n function _msgData() internal view override(ContextUpgradeable, ERC2771HandlerUpgradeable) returns (bytes calldata) {\\n return ERC2771HandlerUpgradeable._msgData();\\n }\\n}\\n\",\"keccak256\":\"0x273b7ab72bf8f3b4f9c971047ef6aac759d8c06e24d36c3e4091755e017be280\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/marketplace/contracts/ExchangeCore.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.19;\\n\\nimport {Initializable} from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport {AddressUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\\\";\\nimport {LibAsset} from \\\"./libraries/LibAsset.sol\\\";\\nimport {LibOrder} from \\\"./libraries/LibOrder.sol\\\";\\nimport {ITransferManager} from \\\"./interfaces/ITransferManager.sol\\\";\\nimport {IOrderValidator} from \\\"./interfaces/IOrderValidator.sol\\\";\\n\\n/// @author The Sandbox\\n/// @title ExchangeCore Contract\\n/// @notice Contains the main functions for the marketplace.\\n/// @dev This is an abstract contract that requires implementation.\\nabstract contract ExchangeCore is Initializable, ITransferManager {\\n using AddressUpgradeable for address;\\n /// @dev Stores left and right orders that match each other.\\n /// Left and right are symmetrical except for fees that are taken from the left side first.\\n struct ExchangeMatch {\\n LibOrder.Order orderLeft; // Left order details\\n bytes signatureLeft; // Signature of the left order\\n LibOrder.Order orderRight; // Right order details\\n bytes signatureRight; // Signature of the right order\\n }\\n\\n /// @dev Address of the OrderValidator contract.\\n IOrderValidator public orderValidator;\\n\\n /// @dev Limit for the number of orders that can be matched in a single transaction.\\n uint256 private matchOrdersLimit;\\n\\n /// @dev Mapping to store the fill amount for each order, identified by its hash.\\n mapping(bytes32 orderKeyHash => uint256 orderFillValue) public fills;\\n\\n /// @notice Event emitted when an order is canceled.\\n /// @param orderKeyHash The hash of the order being canceled.\\n /// @param order The details of the order being canceled.\\n event Cancel(bytes32 indexed orderKeyHash, LibOrder.Order order);\\n\\n /// @notice Event emitted when two orders are matched.\\n /// @param from Address that initiated the match.\\n /// @param orderKeyHashLeft Hash of the left order.\\n /// @param orderKeyHashRight Hash of the right order.\\n /// @param orderLeft Details of the left order.\\n /// @param orderRight Details of the right order.\\n /// @param newFill Fill details resulting from the order match.\\n /// @param totalFillLeft Total fill amount for the left order.\\n /// @param totalFillRight Total fill amount for the right order.\\n event Match(\\n address indexed from,\\n bytes32 indexed orderKeyHashLeft,\\n bytes32 indexed orderKeyHashRight,\\n LibOrder.Order orderLeft,\\n LibOrder.Order orderRight,\\n LibOrder.FillResult newFill,\\n uint256 totalFillLeft,\\n uint256 totalFillRight\\n );\\n\\n /// @notice Event emitted when a new OrderValidator contract is set.\\n /// @param contractAddress Address of the new OrderValidator contract.\\n event OrderValidatorSet(IOrderValidator indexed contractAddress);\\n\\n /// @notice Event emitted when the match orders limit is updated.\\n /// @param newMatchOrdersLimit The new limit for matching orders in one transaction.\\n event MatchOrdersLimitSet(uint256 indexed newMatchOrdersLimit);\\n\\n /// @dev Constructor to disable initializers for this contract.\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @notice Initializes the ExchangeCore contract.\\n /// @param newOrderValidatorAddress Address of the new OrderValidator contract.\\n /// @param newMatchOrdersLimit The limit for matching orders in one transaction.\\n // solhint-disable-next-line func-name-mixedcase\\n function __ExchangeCoreInitialize(\\n IOrderValidator newOrderValidatorAddress,\\n uint256 newMatchOrdersLimit\\n ) internal onlyInitializing {\\n _setOrderValidatorContract(newOrderValidatorAddress);\\n _setMatchOrdersLimit(newMatchOrdersLimit);\\n }\\n\\n /// @notice Updates the OrderValidator contract address.\\n /// @param contractAddress Address of the new OrderValidator contract.\\n function _setOrderValidatorContract(IOrderValidator contractAddress) internal {\\n require(address(contractAddress).isContract(), \\\"invalid order validator\\\");\\n orderValidator = contractAddress;\\n emit OrderValidatorSet(contractAddress);\\n }\\n\\n /// @notice Updates the limit for the number of orders that can be matched in a single transaction.\\n /// @param newMatchOrdersLimit The new limit for matching orders.\\n function _setMatchOrdersLimit(uint256 newMatchOrdersLimit) internal {\\n require(newMatchOrdersLimit > 0, \\\"invalid quantity\\\");\\n matchOrdersLimit = newMatchOrdersLimit;\\n emit MatchOrdersLimitSet(matchOrdersLimit);\\n }\\n\\n /// @notice Cancels a specified order.\\n /// @param order Details of the order to be canceled.\\n /// @param orderKeyHash The hash of the order, used for verification.\\n function _cancel(LibOrder.Order calldata order, bytes32 orderKeyHash) internal {\\n require(order.salt != 0, \\\"0 salt can't be used\\\");\\n bytes32 _orderKeyHash = LibOrder.hashKey(order);\\n require(_orderKeyHash == orderKeyHash, \\\"invalid orderHash\\\");\\n fills[orderKeyHash] = type(uint256).max;\\n emit Cancel(orderKeyHash, order);\\n }\\n\\n /// @notice Matches provided orders and performs the transaction.\\n /// @param sender The original sender of the transaction.\\n /// @param matchedOrders Array of orders that are matched with each other.\\n function _matchOrders(address sender, ExchangeMatch[] calldata matchedOrders) internal {\\n uint256 len = matchedOrders.length;\\n require(len > 0, \\\"ExchangeMatch cannot be empty\\\");\\n require(len <= matchOrdersLimit, \\\"too many ExchangeMatch\\\");\\n for (uint256 i; i < len; i++) {\\n ExchangeMatch calldata m = matchedOrders[i];\\n _validateOrders(sender, m.orderLeft, m.signatureLeft, m.orderRight, m.signatureRight);\\n _matchAndTransfer(sender, m.orderLeft, m.orderRight);\\n }\\n }\\n\\n /// @dev Validates the provided orders.\\n /// @param sender Address of the sender.\\n /// @param orderLeft Details of the left order.\\n /// @param signatureLeft Signature of the left order.\\n /// @param orderRight Details of the right order.\\n /// @param signatureRight Signature of the right order.\\n function _validateOrders(\\n address sender,\\n LibOrder.Order memory orderLeft,\\n bytes memory signatureLeft,\\n LibOrder.Order memory orderRight,\\n bytes memory signatureRight\\n ) internal view {\\n // validate must force order.maker != address(0)\\n orderValidator.validate(orderLeft, signatureLeft, sender);\\n orderValidator.validate(orderRight, signatureRight, sender);\\n if (orderLeft.taker != address(0)) {\\n require(orderRight.maker == orderLeft.taker, \\\"leftOrder.taker failed\\\");\\n }\\n if (orderRight.taker != address(0)) {\\n require(orderRight.taker == orderLeft.maker, \\\"rightOrder.taker failed\\\");\\n }\\n }\\n\\n /// @notice Matches valid orders and transfers the associated assets.\\n /// @param sender Address initiating the match.\\n /// @param orderLeft The left order.\\n /// @param orderRight The right order.\\n function _matchAndTransfer(\\n address sender,\\n LibOrder.Order calldata orderLeft,\\n LibOrder.Order calldata orderRight\\n ) internal {\\n LibAsset.AssetType memory makeMatch = LibAsset.matchAssets(\\n orderLeft.makeAsset.assetType,\\n orderRight.takeAsset.assetType\\n );\\n LibAsset.AssetType memory takeMatch = LibAsset.matchAssets(\\n orderLeft.takeAsset.assetType,\\n orderRight.makeAsset.assetType\\n );\\n\\n LibOrder.FillResult memory newFill = _parseOrdersSetFillEmitMatch(sender, orderLeft, orderRight);\\n\\n doTransfers(\\n ITransferManager.DealSide(LibAsset.Asset(makeMatch, newFill.leftValue), orderLeft.maker),\\n ITransferManager.DealSide(LibAsset.Asset(takeMatch, newFill.rightValue), orderRight.maker),\\n LibAsset.getFeeSide(makeMatch.assetClass, takeMatch.assetClass)\\n );\\n }\\n\\n /// @notice Parse orders to get the order data, then create a new fill with setFillEmitMatch()\\n /// @param sender The message sender\\n /// @param orderLeft Left order\\n /// @param orderRight Right order\\n /// @return newFill Fill result\\n function _parseOrdersSetFillEmitMatch(\\n address sender,\\n LibOrder.Order calldata orderLeft,\\n LibOrder.Order calldata orderRight\\n ) internal returns (LibOrder.FillResult memory newFill) {\\n bytes32 orderKeyHashLeft = LibOrder.hashKey(orderLeft);\\n bytes32 orderKeyHashRight = LibOrder.hashKey(orderRight);\\n\\n uint256 leftOrderFill = _getOrderFill(orderLeft.salt, orderKeyHashLeft);\\n uint256 rightOrderFill = _getOrderFill(orderRight.salt, orderKeyHashRight);\\n newFill = LibOrder.fillOrder(orderLeft, orderRight, leftOrderFill, rightOrderFill);\\n\\n require(newFill.rightValue > 0 && newFill.leftValue > 0, \\\"nothing to fill\\\");\\n\\n if (orderLeft.salt != 0) {\\n fills[orderKeyHashLeft] = leftOrderFill + newFill.rightValue;\\n }\\n\\n if (orderRight.salt != 0) {\\n fills[orderKeyHashRight] = rightOrderFill + newFill.leftValue;\\n }\\n\\n emit Match({\\n from: sender,\\n orderKeyHashLeft: orderKeyHashLeft,\\n orderKeyHashRight: orderKeyHashRight,\\n orderLeft: orderLeft,\\n orderRight: orderRight,\\n newFill: newFill,\\n totalFillLeft: fills[orderKeyHashLeft],\\n totalFillRight: fills[orderKeyHashRight]\\n });\\n return newFill;\\n }\\n\\n /// @notice Return fill corresponding to order hash\\n /// @param salt If salt 0, fill = 0\\n /// @param hash Order hash\\n function _getOrderFill(uint256 salt, bytes32 hash) internal view returns (uint256 fill) {\\n if (salt == 0) {\\n fill = 0;\\n } else {\\n fill = fills[hash];\\n }\\n }\\n\\n // slither-disable-next-line unused-state\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x551d5555ffa5792840d61c2447390224a4c914b1cdb8c9cc2862a9a07eaf6281\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/marketplace/contracts/TransferManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.19;\\n\\nimport {ERC165CheckerUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165CheckerUpgradeable.sol\\\";\\nimport {IERC1155Upgradeable} from \\\"@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol\\\";\\nimport {IERC721Upgradeable} from \\\"@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol\\\";\\nimport {IERC20Upgradeable} from \\\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\\\";\\nimport {AddressUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\\\";\\nimport {IRoyaltyUGC} from \\\"@sandbox-smart-contracts/dependency-royalty-management/contracts/interfaces/IRoyaltyUGC.sol\\\";\\nimport {SafeERC20Upgradeable} from \\\"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\\\";\\nimport {IRoyaltiesProvider, TOTAL_BASIS_POINTS} from \\\"./interfaces/IRoyaltiesProvider.sol\\\";\\nimport {ITransferManager} from \\\"./interfaces/ITransferManager.sol\\\";\\nimport {LibAsset} from \\\"./libraries/LibAsset.sol\\\";\\nimport {Initializable} from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\n\\n/// @author The Sandbox\\n/// @title TransferManager\\n/// @notice Manages the transfer of assets with support for different fee structures and beneficiaries.\\n/// @dev This contract can handle various assets like ERC20, ERC721, and ERC1155 tokens.\\nabstract contract TransferManager is Initializable, ITransferManager {\\n using AddressUpgradeable for address;\\n using ERC165CheckerUpgradeable for address;\\n\\n /// @notice Defines the base for representing fees to avoid rounding: 50% == 0.5 * 10000 == 5000.\\n uint256 internal constant PROTOCOL_FEE_MULTIPLIER = 10000;\\n\\n /// @notice The maximum allowable fee which cannot exceed 50%.\\n uint256 internal constant PROTOCOL_FEE_SHARE_LIMIT = 5000;\\n\\n /// @notice Royalties are represented in IRoyaltiesProvider.BASE_POINT, they\\n /// @notice cannot exceed 50% == 0.5 * BASE_POINTS == 5000\\n uint256 internal constant ROYALTY_SHARE_LIMIT = 5000;\\n\\n /// @notice Fee applied to primary sales.\\n /// @return uint256 of primary sale fee in PROTOCOL_FEE_MULTIPLIER units\\n uint256 public protocolFeePrimary;\\n\\n /// @notice Fee applied to secondary sales.\\n /// @return uint256 of secondary sale fee in PROTOCOL_FEE_MULTIPLIER units\\n uint256 public protocolFeeSecondary;\\n\\n /// @notice Registry for the different royalties\\n /// @return address of royaltiesRegistry\\n IRoyaltiesProvider public royaltiesRegistry;\\n\\n /// @notice Default receiver of protocol fees\\n /// @return address of defaultFeeReceiver\\n address public defaultFeeReceiver;\\n\\n /// @notice Emitted when protocol fees are updated.\\n /// @param newProtocolFeePrimary fee for primary market\\n /// @param newProtocolFeeSecondary fee for secondary market\\n event ProtocolFeeSet(uint256 indexed newProtocolFeePrimary, uint256 indexed newProtocolFeeSecondary);\\n\\n //// @notice Emitted when the royalties registry is updated.\\n /// @param newRoyaltiesRegistry address of new royalties registry\\n event RoyaltiesRegistrySet(IRoyaltiesProvider indexed newRoyaltiesRegistry);\\n\\n /// @notice Emitted when the default fee receiver is updated.\\n /// @param newDefaultFeeReceiver address that gets the fees\\n event DefaultFeeReceiverSet(address indexed newDefaultFeeReceiver);\\n\\n /// @dev This protects the implementation contract from being initialized.\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @notice Initializer for TransferExecutor\\n /// @param newProtocolFeePrimary Fee for the primary market\\n /// @param newProtocolFeeSecondary Fee for the secondary market\\n /// @param newDefaultFeeReceiver Address for account receiving fees\\n /// @param newRoyaltiesProvider Address of royalties registry\\n // solhint-disable-next-line func-name-mixedcase\\n function __TransferManager_init_unchained(\\n uint256 newProtocolFeePrimary,\\n uint256 newProtocolFeeSecondary,\\n address newDefaultFeeReceiver,\\n IRoyaltiesProvider newRoyaltiesProvider\\n ) internal onlyInitializing {\\n _setProtocolFee(newProtocolFeePrimary, newProtocolFeeSecondary);\\n _setDefaultFeeReceiver(newDefaultFeeReceiver);\\n _setRoyaltiesRegistry(newRoyaltiesProvider);\\n }\\n\\n /// @notice Executes transfers for 2 matched orders\\n /// @param left DealSide from the left order\\n /// @param right DealSide from the right order\\n /// @dev This is the main entry point, when used as a separated contract this method will be external\\n function doTransfers(DealSide memory left, DealSide memory right, LibAsset.FeeSide feeSide) internal override {\\n DealSide memory paymentSide;\\n DealSide memory nftSide;\\n if (feeSide == LibAsset.FeeSide.LEFT) {\\n paymentSide = left;\\n nftSide = right;\\n } else {\\n paymentSide = right;\\n nftSide = left;\\n }\\n // Transfer NFT or left side if FeeSide.NONE\\n _transfer(nftSide.asset, nftSide.account, paymentSide.account);\\n // Transfer ERC20 or right side if FeeSide.NONE\\n if (feeSide == LibAsset.FeeSide.NONE || _mustSkipFees(paymentSide.account)) {\\n _transfer(paymentSide.asset, paymentSide.account, nftSide.account);\\n } else {\\n _doTransfersWithFeesAndRoyalties(paymentSide, nftSide);\\n }\\n }\\n\\n /// @notice Sets the royalties registry.\\n /// @param newRoyaltiesRegistry Address of new royalties registry\\n function _setRoyaltiesRegistry(IRoyaltiesProvider newRoyaltiesRegistry) internal {\\n require(address(newRoyaltiesRegistry).isContract(), \\\"invalid Royalties Registry\\\");\\n royaltiesRegistry = newRoyaltiesRegistry;\\n\\n emit RoyaltiesRegistrySet(newRoyaltiesRegistry);\\n }\\n\\n /// @notice Sets the protocol fees.\\n /// @param newProtocolFeePrimary Fee for the primary market\\n /// @param newProtocolFeeSecondary Fee for the secondary market\\n function _setProtocolFee(uint256 newProtocolFeePrimary, uint256 newProtocolFeeSecondary) internal {\\n require(newProtocolFeePrimary < PROTOCOL_FEE_SHARE_LIMIT, \\\"invalid primary fee\\\");\\n require(newProtocolFeeSecondary < PROTOCOL_FEE_SHARE_LIMIT, \\\"invalid secondary fee\\\");\\n protocolFeePrimary = newProtocolFeePrimary;\\n protocolFeeSecondary = newProtocolFeeSecondary;\\n\\n emit ProtocolFeeSet(newProtocolFeePrimary, newProtocolFeeSecondary);\\n }\\n\\n /// @notice Sets the default fee receiver.\\n /// @param newDefaultFeeReceiver Address that gets the fees\\n function _setDefaultFeeReceiver(address newDefaultFeeReceiver) internal {\\n require(newDefaultFeeReceiver != address(0), \\\"invalid default fee receiver\\\");\\n defaultFeeReceiver = newDefaultFeeReceiver;\\n\\n emit DefaultFeeReceiverSet(newDefaultFeeReceiver);\\n }\\n\\n /// @notice Transfer protocol fees and royalties.\\n /// @param paymentSide DealSide of the fee-side order\\n /// @param nftSide DealSide of the nft-side order\\n function _doTransfersWithFeesAndRoyalties(DealSide memory paymentSide, DealSide memory nftSide) internal {\\n uint256 fees;\\n uint256 remainder = paymentSide.asset.value;\\n if (_isPrimaryMarket(nftSide)) {\\n fees = protocolFeePrimary;\\n // No royalties\\n } else {\\n fees = protocolFeeSecondary;\\n remainder = _transferRoyalties(remainder, paymentSide, nftSide);\\n }\\n if (fees > 0 && remainder > 0) {\\n remainder = _transferPercentage(remainder, paymentSide, defaultFeeReceiver, fees, PROTOCOL_FEE_MULTIPLIER);\\n }\\n if (remainder > 0) {\\n _transfer(LibAsset.Asset(paymentSide.asset.assetType, remainder), paymentSide.account, nftSide.account);\\n }\\n }\\n\\n /// @notice Return if this tx is on primary market\\n /// @param nftSide DealSide of the nft-side order\\n /// @return creator Address or zero if is not able to retrieve it\\n function _isPrimaryMarket(DealSide memory nftSide) internal view returns (bool) {\\n address creator = _getCreator(nftSide.asset.assetType);\\n return creator != address(0) && nftSide.account == creator;\\n }\\n\\n /// @notice Transfer royalties.\\n /// @param remainder How much of the amount left after previous transfers\\n /// @param paymentSide DealSide of the fee-side order\\n /// @param nftSide DealSide of the nft-side order\\n /// @return How much left after paying royalties\\n function _transferRoyalties(\\n uint256 remainder,\\n DealSide memory paymentSide,\\n DealSide memory nftSide\\n ) internal returns (uint256) {\\n (address token, uint256 tokenId) = LibAsset.decodeToken(nftSide.asset.assetType);\\n IRoyaltiesProvider.Part[] memory royalties = royaltiesRegistry.getRoyalties(token, tokenId);\\n uint256 totalRoyalties;\\n uint256 len = royalties.length;\\n for (uint256 i; i < len; i++) {\\n IRoyaltiesProvider.Part memory r = royalties[i];\\n totalRoyalties = totalRoyalties + r.basisPoints;\\n if (r.account == nftSide.account) {\\n // We just skip the transfer because the nftSide will get the full payment anyway.\\n continue;\\n }\\n remainder = _transferPercentage(remainder, paymentSide, r.account, r.basisPoints, TOTAL_BASIS_POINTS);\\n }\\n require(totalRoyalties <= ROYALTY_SHARE_LIMIT, \\\"royalties are too high (>50%)\\\");\\n return remainder;\\n }\\n\\n /// @notice Do a transfer based on a percentage (in basis points)\\n /// @param remainder How much of the amount left after previous transfers\\n /// @param paymentSide DealSide of the fee-side order\\n /// @param to Account that will receive the asset\\n /// @param percentage Percentage to be transferred multiplied by the multiplier\\n /// @param multiplier Percentage is multiplied by this number to avoid rounding (2.5% == 0.025) * multiplier\\n /// @return How much left after current transfer\\n function _transferPercentage(\\n uint256 remainder,\\n DealSide memory paymentSide,\\n address to,\\n uint256 percentage,\\n uint256 multiplier\\n ) internal returns (uint256) {\\n LibAsset.Asset memory payment = LibAsset.Asset(paymentSide.asset.assetType, 0);\\n uint256 fee = (paymentSide.asset.value * percentage) / multiplier;\\n if (remainder > fee) {\\n remainder = remainder - fee;\\n payment.value = fee;\\n } else {\\n payment.value = remainder;\\n remainder = 0;\\n }\\n if (payment.value > 0) {\\n _transfer(payment, paymentSide.account, to);\\n }\\n return remainder;\\n }\\n\\n /// @notice Return the creator of the token if the token supports IRoyaltyUGC\\n /// @param assetType Asset type\\n /// @return creator Address or zero if is not able to retrieve it\\n function _getCreator(LibAsset.AssetType memory assetType) internal view returns (address creator) {\\n (address token, uint256 tokenId) = LibAsset.decodeToken(assetType);\\n if (token.supportsInterface(type(IRoyaltyUGC).interfaceId)) {\\n creator = IRoyaltyUGC(token).getCreatorAddress(tokenId);\\n }\\n }\\n\\n /// @notice Function should be able to transfer any supported Asset\\n /// @param asset Asset to be transferred\\n /// @param from Account holding the asset\\n /// @param to Account that will receive the asset\\n /// @dev This is the main entry point, when used as a separated contract this method will be external\\n function _transfer(LibAsset.Asset memory asset, address from, address to) internal {\\n if (asset.assetType.assetClass == LibAsset.AssetClass.ERC20) {\\n address token = LibAsset.decodeAddress(asset.assetType);\\n // slither-disable-next-line arbitrary-send-erc20\\n SafeERC20Upgradeable.safeTransferFrom(IERC20Upgradeable(token), from, to, asset.value);\\n } else if (asset.assetType.assetClass == LibAsset.AssetClass.ERC721) {\\n (address token, uint256 tokenId) = LibAsset.decodeToken(asset.assetType);\\n require(asset.value == 1, \\\"erc721 value error\\\");\\n IERC721Upgradeable(token).safeTransferFrom(from, to, tokenId);\\n } else if (asset.assetType.assetClass == LibAsset.AssetClass.ERC1155) {\\n (address token, uint256 tokenId) = LibAsset.decodeToken(asset.assetType);\\n IERC1155Upgradeable(token).safeTransferFrom(from, to, tokenId, asset.value, \\\"\\\");\\n } else {\\n revert(\\\"invalid asset class\\\");\\n }\\n }\\n\\n /// @notice Function deciding if the fees are applied or not, to be override\\n /// @param from Address to check\\n function _mustSkipFees(address from) internal virtual returns (bool);\\n\\n // slither-disable-next-line unused-state\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xd0727b4c043078b4810febd90cf3de7d2b196e074e31cce8b76462ea6e2aa307\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/marketplace/contracts/interfaces/IOrderValidator.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.19;\\n\\nimport {LibOrder} from \\\"../libraries/LibOrder.sol\\\";\\n\\n/// @author The Sandbox\\n/// @title OrderValidator contract interface\\n/// @notice Contains the signature for validate, isPurchaseValid and verifyERC20Whitelist functions\\ninterface IOrderValidator {\\n /// @notice Verifies order\\n /// @param order Order to be validated\\n /// @param signature Signature of order\\n /// @param sender Order sender\\n function validate(LibOrder.Order memory order, bytes memory signature, address sender) external view;\\n}\\n\",\"keccak256\":\"0x0b88d05e24a53fe183b4d56c689f0a65199dc7530a0d2548fab8fcfa24efd647\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/marketplace/contracts/interfaces/IRoyaltiesProvider.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.19;\\n\\n// The IRoyaltiesProvider.Part.basisPoints represents percentages in base points: 2.5 % == 0.025 * 10000 == 250.\\n// We expect external contracts to return the values with this precision.\\nuint256 constant TOTAL_BASIS_POINTS = 10000;\\n\\n/// @author The Sandbox\\n/// @title RoyaltiesProvider contract interface\\n/// @notice Contains the signature for the getRoyalties function\\ninterface IRoyaltiesProvider {\\n struct Part {\\n address account;\\n uint256 basisPoints;\\n }\\n\\n /// @notice Calculates all royalties in token for tokenId\\n /// @param token Address of token\\n /// @param tokenId of the token we want to calculate royalties\\n /// @return A part with all royalties for token\\n function getRoyalties(address token, uint256 tokenId) external returns (Part[] memory);\\n}\\n\",\"keccak256\":\"0xdb67e9a7128c33290b9cb64ade84bfac064e0936933b7385a4c1238df098aa41\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/marketplace/contracts/interfaces/ITransferManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.19;\\n\\nimport {LibAsset} from \\\"../libraries/LibAsset.sol\\\";\\n\\n/// @author The Sandbox\\n/// @title ITransferManager Interface\\n/// @notice Provides an interface for managing transfers of assets between matched orders.\\nabstract contract ITransferManager {\\n /// @dev Represents a side (either maker or taker) of a deal.\\n /// Each side has an associated asset and an account address.\\n struct DealSide {\\n LibAsset.Asset asset; // The asset associated with this side of the deal.\\n address account; // The account address associated with this side of the deal.\\n }\\n\\n /// @notice Executes the asset transfers associated with two matched orders.\\n /// @param left The DealSide representing the left order's side.\\n /// @param right The DealSide representing the right order's side.\\n /// @param feeSide Indicates which side of the deal will bear the fee.\\n /// @dev This function serves as the primary entry point for asset transfers.\\n /// If used in a separate contract, the visibility of this method might change to external.\\n function doTransfers(DealSide memory left, DealSide memory right, LibAsset.FeeSide feeSide) internal virtual;\\n}\\n\",\"keccak256\":\"0x523411e1859bf13cceb77dc9b5c81ebbae7f9eb0a964a85a9db0bf11ff5acb39\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/marketplace/contracts/libraries/LibAsset.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.19;\\n\\n/// @author The Sandbox\\n/// @title LibAsset: A library for handling different types of Ethereum assets.\\n/// @notice This library contains structs, enums, and utility functions for managing and processing Ethereum assets.\\nlibrary LibAsset {\\n /// @dev Represents different types of assets on the Ethereum network.\\n enum AssetClass {\\n INVALID, // Represents an invalid asset type.\\n ERC20, // Represents an ERC20 token.\\n ERC721, // Represents a single ERC721 token.\\n ERC1155 // Represents an ERC1155 token.\\n }\\n\\n /// @dev Represents the side of the trade from which a fee should be taken, if any.\\n enum FeeSide {\\n NONE, // No fees are taken.\\n LEFT, // Fees are taken from the left side of the trade.\\n RIGHT // Fees are taken from the right side of the trade.\\n }\\n\\n /// @dev Represents the type of a specific asset.\\n /// AssetType can represent a specific ERC-721 token (defined by the token contract address and tokenId) or\\n /// a specific ERC-20 token (like DAI).\\n struct AssetType {\\n AssetClass assetClass; // The class of the asset (ERC20, ERC721, etc.).\\n bytes data; // Contains the token's contract address and possibly its tokenId.\\n }\\n\\n /// @dev Represents any asset on the Ethereum blockchain with its type and value.\\n struct Asset {\\n AssetType assetType; // The type of the asset.\\n uint256 value; // The amount or value of the asset.\\n }\\n\\n bytes32 internal constant ASSET_TYPE_TYPEHASH = keccak256(\\\"AssetType(uint256 assetClass,bytes data)\\\");\\n\\n bytes32 internal constant ASSET_TYPEHASH =\\n keccak256(\\\"Asset(AssetType assetType,uint256 value)AssetType(uint256 assetClass,bytes data)\\\");\\n\\n /// @notice Determine which side of a trade should bear the fee, based on the asset types.\\n /// @param leftClass The asset class type of the left side of the trade.\\n /// @param rightClass The asset class type of the right side of the trade.\\n /// @return FeeSide representing which side should bear the fee, if any.\\n function getFeeSide(AssetClass leftClass, AssetClass rightClass) internal pure returns (FeeSide) {\\n if (leftClass == AssetClass.ERC20 && rightClass != AssetClass.ERC20) {\\n return FeeSide.LEFT;\\n }\\n if (rightClass == AssetClass.ERC20 && leftClass != AssetClass.ERC20) {\\n return FeeSide.RIGHT;\\n }\\n return FeeSide.NONE;\\n }\\n\\n /// @notice Check if two asset types match.\\n /// @param leftType Asset type on the left side of a trade.\\n /// @param rightType Asset type on the right side of a trade.\\n /// @return AssetType representing the matched asset type.\\n function matchAssets(\\n AssetType calldata leftType,\\n AssetType calldata rightType\\n ) internal pure returns (AssetType memory) {\\n AssetClass classLeft = leftType.assetClass;\\n AssetClass classRight = rightType.assetClass;\\n\\n require(classLeft != AssetClass.INVALID, \\\"invalid left asset class\\\");\\n require(classRight != AssetClass.INVALID, \\\"invalid right asset class\\\");\\n require(classLeft == classRight, \\\"assets don't match\\\");\\n\\n bytes32 leftHash = keccak256(leftType.data);\\n bytes32 rightHash = keccak256(rightType.data);\\n require(leftHash == rightHash, \\\"assets don't match\\\");\\n\\n return leftType;\\n }\\n\\n /// @notice Compute the hash of an asset type.\\n /// @param assetType The asset type to hash.\\n /// @return The hash of the asset type.\\n function hash(AssetType memory assetType) internal pure returns (bytes32) {\\n return keccak256(abi.encode(ASSET_TYPE_TYPEHASH, assetType.assetClass, keccak256(assetType.data)));\\n }\\n\\n /// @notice Compute the hash of an asset.\\n /// @param asset The asset to hash.\\n /// @return The hash of the asset.\\n function hash(Asset memory asset) internal pure returns (bytes32) {\\n return keccak256(abi.encode(ASSET_TYPEHASH, hash(asset.assetType), asset.value));\\n }\\n\\n /// @notice Decode the token details (address and tokenId) from an AssetType.\\n /// @param assetType The asset type to decode.\\n /// @return Address of the token\\n /// @return Id of the token\\n function decodeToken(AssetType memory assetType) internal pure returns (address, uint256) {\\n return abi.decode(assetType.data, (address, uint256));\\n }\\n\\n /// @notice Decode the token address from an AssetType.\\n /// @param assetType The asset type to decode.\\n /// @return The address of the token.\\n function decodeAddress(AssetType memory assetType) internal pure returns (address) {\\n return abi.decode(assetType.data, (address));\\n }\\n}\\n\",\"keccak256\":\"0xe23da99d5ce9a8129f0413a5f650e6a7c8d7a6a46b59fce546b8f19676d81fa2\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/marketplace/contracts/libraries/LibMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.19;\\n\\n/// @author The Sandbox\\n/// @title LibMath: A library for handling specific math operations.\\nlibrary LibMath {\\n uint256 internal constant ACCEPTABLE_RELATIVE_ERROR = 1000;\\n\\n /// @dev Calculates partial value given a numerator and denominator rounded down.\\n /// Reverts if rounding error is >= 0.1%\\n /// @param numerator Numerator.\\n /// @param denominator Denominator.\\n /// @param target Value to calculate partial of.\\n /// @return partialAmount value of target rounded down.\\n function safeGetPartialAmountFloor(\\n uint256 numerator,\\n uint256 denominator,\\n uint256 target\\n ) internal pure returns (uint256 partialAmount) {\\n if (isRoundingErrorFloor(numerator, denominator, target)) {\\n revert(\\\"rounding error\\\");\\n }\\n partialAmount = (numerator * target) / (denominator);\\n }\\n\\n /// @dev Checks if rounding error >= 0.1% when rounding down.\\n /// @param numerator Numerator.\\n /// @param denominator Denominator.\\n /// @param target Value to multiply with numerator/denominator.\\n /// @return isError Rounding error is present.\\n function isRoundingErrorFloor(\\n uint256 numerator,\\n uint256 denominator,\\n uint256 target\\n ) internal pure returns (bool isError) {\\n if (denominator == 0) {\\n revert(\\\"division by zero\\\");\\n }\\n\\n // The absolute rounding error is the difference between the rounded\\n // value and the ideal value. The relative rounding error is the\\n // absolute rounding error divided by the absolute value of the\\n // ideal value. This is undefined when the ideal value is zero.\\n //\\n // The ideal value is `numerator * target / denominator`.\\n // Let's call `numerator * target % denominator` the remainder.\\n // The absolute error is `remainder / denominator`.\\n //\\n // When the ideal value is zero, we require the absolute error to\\n // be zero. Fortunately, this is always the case. The ideal value is\\n // zero iff `numerator == 0` and/or `target == 0`. In this case the\\n // remainder and absolute error are also zero.\\n if (target == 0 || numerator == 0) {\\n return false;\\n }\\n\\n // Otherwise, we want the relative rounding error to be strictly\\n // less than 0.1%.\\n // The relative error is `remainder / (numerator * target)`.\\n // We want the relative error less than 1 / 1000:\\n // remainder / (numerator * target) < 1 / 1000\\n // or equivalently:\\n // 1000 * remainder < numerator * target\\n // so we have a rounding error iff:\\n // 1000 * remainder >= numerator * target\\n uint256 remainder = mulmod(target, numerator, denominator);\\n isError = remainder * ACCEPTABLE_RELATIVE_ERROR >= numerator * target;\\n }\\n}\\n\",\"keccak256\":\"0xa5daa3df082d3f8ff705f9d21f6e7f9fa1caffdc53bd53001e6285c35c58f33a\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/marketplace/contracts/libraries/LibOrder.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.19;\\n\\nimport {LibAsset} from \\\"./LibAsset.sol\\\";\\nimport {LibMath} from \\\"./LibMath.sol\\\";\\n\\n/// @author The Sandbox\\n/// @title Order Handling Library\\n/// @notice Provides tools for constructing, hashing, and validating orders.\\nlibrary LibOrder {\\n bytes32 internal constant ORDER_TYPEHASH =\\n keccak256(\\n \\\"Order(address maker,Asset makeAsset,address taker,Asset takeAsset,uint256 salt,uint256 start,uint256 end)Asset(AssetType assetType,uint256 value)AssetType(uint256 assetClass,bytes data)\\\"\\n );\\n\\n /// @dev Represents the structure of an order.\\n struct Order {\\n address maker; // Address of the maker.\\n LibAsset.Asset makeAsset; // Asset the maker is providing.\\n address taker; // Address of the taker.\\n LibAsset.Asset takeAsset; // Asset the taker is providing.\\n uint256 salt; // Random number to ensure unique order hash.\\n uint256 start; // Timestamp when the order becomes valid.\\n uint256 end; // Timestamp when the order expires.\\n }\\n\\n /// @dev Represents the result of filling two orders.\\n struct FillResult {\\n uint256 leftValue; // Amount filled from the left order.\\n uint256 rightValue; // Amount filled from the right order.\\n }\\n\\n /// @notice Computes the unique hash of an order.\\n /// @param order The order data.\\n /// @return The unique hash of the order.\\n function hashKey(Order calldata order) internal pure returns (bytes32) {\\n return\\n keccak256(\\n abi.encode(\\n order.maker,\\n LibAsset.hash(order.makeAsset.assetType),\\n LibAsset.hash(order.takeAsset.assetType),\\n order.salt\\n )\\n );\\n }\\n\\n /// @notice Computes the complete hash of an order, including domain-specific data.\\n /// @param order The order data.\\n /// @return The complete hash of the order.\\n function hash(Order calldata order) internal pure returns (bytes32) {\\n return\\n keccak256(\\n // solhint-disable-next-line func-named-parameters\\n abi.encode(\\n ORDER_TYPEHASH,\\n order.maker,\\n LibAsset.hash(order.makeAsset),\\n order.taker,\\n LibAsset.hash(order.takeAsset),\\n order.salt,\\n order.start,\\n order.end\\n )\\n );\\n }\\n\\n /// @notice Validates order time\\n /// @param order Whose time we want to validate\\n // solhint-disable not-rely-on-time\\n // slither-disable-start timestamp\\n function validateOrderTime(Order memory order) internal view {\\n require(order.start == 0 || order.start < block.timestamp, \\\"Order start validation failed\\\");\\n require(order.end == 0 || order.end > block.timestamp, \\\"Order end validation failed\\\");\\n }\\n\\n // slither-disable-end timestamp\\n // solhint-enable not-rely-on-time\\n\\n /// @notice Should return filled values\\n /// @param leftOrder Left order\\n /// @param rightOrder Right order\\n /// @param leftOrderFill Current fill of the left order (0 if order is unfilled)\\n /// @param rightOrderFill Current fill of the right order (0 if order is unfilled)\\n /// @dev We have 3 cases, 1st: left order should be fully filled\\n /// @dev 2nd: right order should be fully filled or 3d: both should be fully filled if required values are the same\\n /// @return The fill result of both orders\\n function fillOrder(\\n LibOrder.Order calldata leftOrder,\\n LibOrder.Order calldata rightOrder,\\n uint256 leftOrderFill,\\n uint256 rightOrderFill\\n ) internal pure returns (FillResult memory) {\\n (uint256 leftMakeValue, uint256 leftTakeValue) = calculateRemaining(leftOrder, leftOrderFill);\\n (uint256 rightMakeValue, uint256 rightTakeValue) = calculateRemaining(rightOrder, rightOrderFill);\\n\\n if (rightTakeValue > leftMakeValue) {\\n return _fillLeft(leftMakeValue, leftTakeValue, rightOrder.makeAsset.value, rightOrder.takeAsset.value);\\n }\\n return _fillRight(leftOrder.makeAsset.value, leftOrder.takeAsset.value, rightMakeValue, rightTakeValue);\\n }\\n\\n /// @notice Computes the remaining fillable amount of an order.\\n /// @param order The order to compute from.\\n /// @param fill The amount of the order already filled.\\n /// @return makeValue The remaining fillable amount from the maker's side.\\n /// @return takeValue The remaining fillable amount from the taker's side.\\n function calculateRemaining(\\n LibOrder.Order calldata order,\\n uint256 fill\\n ) internal pure returns (uint256 makeValue, uint256 takeValue) {\\n require(order.takeAsset.value >= fill, \\\"filling more than order permits\\\");\\n takeValue = order.takeAsset.value - fill;\\n makeValue = LibMath.safeGetPartialAmountFloor(order.makeAsset.value, order.takeAsset.value, takeValue);\\n }\\n\\n /// @notice Computes the fill values for a situation where the right order is expected to fill the left order.\\n /// @param leftMakeValue The amount the left order maker wants to trade.\\n /// @param leftTakeValue The amount the left order taker wants in return.\\n /// @param rightMakeValue The amount the right order maker wants to trade.\\n /// @param rightTakeValue The amount the right order taker wants in return.\\n /// @return The filled amounts for both the left and right orders.\\n function _fillRight(\\n uint256 leftMakeValue,\\n uint256 leftTakeValue,\\n uint256 rightMakeValue,\\n uint256 rightTakeValue\\n ) internal pure returns (FillResult memory) {\\n uint256 makerValue = LibMath.safeGetPartialAmountFloor(rightTakeValue, leftMakeValue, leftTakeValue);\\n require(makerValue <= rightMakeValue, \\\"fillRight: unable to fill\\\");\\n return FillResult(rightTakeValue, makerValue);\\n }\\n\\n /// @notice Computes the fill values for a situation where the left order is expected to fill the right order.\\n /// @param leftMakeValue The amount the left order maker wants to trade.\\n /// @param leftTakeValue The amount the left order taker wants in return.\\n /// @param rightMakeValue The amount the right order maker wants to trade.\\n /// @param rightTakeValue The amount the right order taker wants in return.\\n /// @return The filled amounts for both the left and right orders.\\n function _fillLeft(\\n uint256 leftMakeValue,\\n uint256 leftTakeValue,\\n uint256 rightMakeValue,\\n uint256 rightTakeValue\\n ) internal pure returns (FillResult memory) {\\n uint256 rightTake = LibMath.safeGetPartialAmountFloor(leftTakeValue, rightMakeValue, rightTakeValue);\\n require(rightTake <= leftMakeValue, \\\"fillLeft: unable to fill\\\");\\n return FillResult(leftMakeValue, leftTakeValue);\\n }\\n}\\n\",\"keccak256\":\"0x988f3a3a2acacf4b28e7854fffae94684b2ac2ee8fb35b0c2118222ab3eb87b2\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b506200001c62000036565b6200002662000036565b6200003062000036565b620000f7565b600054610100900460ff1615620000a35760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff90811614620000f5576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b613fd980620001076000396000f3fe608060405234801561001057600080fd5b506004361061020b5760003560e01c80636d8f06941161012a578063c36e69e9116100bd578063d547741f1161008c578063e63ab1e911610071578063e63ab1e9146104b6578063ec03ce82146104dd578063fb01d36b146104f057600080fd5b8063d547741f14610490578063da742228146104a357600080fd5b8063c36e69e91461044f578063c460028814610462578063ca15c8731461046b578063ce1b815f1461047e57600080fd5b806389de1d7a116100f957806389de1d7a146103f25780639010d07c146103fb57806391d148541461040e578063a217fddf1461044757600080fd5b80636d8f06941461039d5780638456cb59146103b05780638587177a146103b85780638830df0d146103cb57600080fd5b806336568abe116101a25780634ac0c183116101715780634ac0c18314610344578063572b6c051461036b5780635737e1961461037e5780635c975abb1461039157600080fd5b806336568abe146102ea5780633abf6fd4146102fd5780633be89922146103295780633f4ba83a1461033c57600080fd5b806320158c44116101de57806320158c4414610273578063240de277146102a1578063248a9ca3146102b45780632f2ff15d146102d757600080fd5b806301ffc9a714610210578063032566d3146102385780630c8b62881461024d5780631cdfe3d814610260575b600080fd5b61022361021e366004613367565b610503565b60405190151581526020015b60405180910390f35b61024b6102463660046133a9565b61055f565b005b61024b61025b36600461340e565b610596565b61024b61026e366004613475565b6105b0565b6102936102813660046133a9565b60cb6020526000908152604090205481565b60405190815260200161022f565b61024b6102af366004613492565b6105e3565b6102936102c23660046133a9565b60009081526065602052604090206001015490565b61024b6102e53660046134b4565b61061c565b61024b6102f83660046134b4565b610641565b61010054610311906001600160a01b031681565b6040516001600160a01b03909116815260200161022f565b61024b610337366004613475565b6106de565b61024b6106f2565b6102937f541943c4a49765b7940b4b1392c4b1f8ede6efd4e23572572987ae02e569a78681565b610223610379366004613475565b610727565b60c954610311906001600160a01b031681565b6101655460ff16610223565b60ff54610311906001600160a01b031681565b61024b610742565b61024b6103c6366004613475565b610774565b6102937f1d46dada6ac47de84b1e7381a753499bde9d44cc2b9eacc1ba89f2ac24be16cc81565b61029360fd5481565b610311610409366004613492565b610788565b61022361041c3660046134b4565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b610293600081565b61024b61045d3660046134e4565b6107a7565b61029360fe5481565b6102936104793660046133a9565b610901565b610133546001600160a01b0316610311565b61024b61049e3660046134b4565b610918565b61024b6104b1366004613475565b61093d565b6102937f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b61024b6104eb366004613572565b610951565b61024b6104fe3660046135bc565b6109cf565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f5a05180f000000000000000000000000000000000000000000000000000000001480610559575061055982610a68565b92915050565b7f541943c4a49765b7940b4b1392c4b1f8ede6efd4e23572572987ae02e569a78661058981610ae6565b61059282610af7565b5050565b61059e610b7a565b6105926105a9610bd0565b8383610bdf565b7f541943c4a49765b7940b4b1392c4b1f8ede6efd4e23572572987ae02e569a7866105da81610ae6565b61059282610da1565b7f541943c4a49765b7940b4b1392c4b1f8ede6efd4e23572572987ae02e569a78661060d81610ae6565b6106178383610e4f565b505050565b60008281526065602052604090206001015461063781610ae6565b6106178383610f2c565b610649610bd0565b6001600160a01b0316816001600160a01b0316146106d45760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b6105928282610f4e565b60006106e981610ae6565b61059282610f70565b7f541943c4a49765b7940b4b1392c4b1f8ede6efd4e23572572987ae02e569a78661071c81610ae6565b61072461101e565b50565b600061055982610133546001600160a01b0391821691161490565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a61076c81610ae6565b610724611077565b600061077f81610ae6565b610592826110b6565b60008281526097602052604081206107a09083611164565b9392505050565b600054610100900460ff16158080156107c75750600054600160ff909116105b806107e15750303b1580156107e1575060005460ff166001145b6108535760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016106cb565b6000805460ff191660011790558015610876576000805461ff0019166101001790555b61087f88611170565b6108876111e4565b61088f61124f565b61089b878787876112c7565b6108a5838361134e565b6108b060008a610f2c565b80156108f6576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050505050565b6000818152609760205260408120610559906113cb565b60008281526065602052604090206001015461093381610ae6565b6106178383610f4e565b600061094881610ae6565b610592826113d5565b61095e6020830183613475565b6001600160a01b031661096f610bd0565b6001600160a01b0316146109c55760405162461bcd60e51b815260206004820152600960248201527f6e6f74206d616b6572000000000000000000000000000000000000000000000060448201526064016106cb565b61059282826114d1565b7f1d46dada6ac47de84b1e7381a753499bde9d44cc2b9eacc1ba89f2ac24be16cc6109f981610ae6565b610a01610b7a565b6001600160a01b038416610a575760405162461bcd60e51b815260206004820152600e60248201527f696e76616c69642073656e64657200000000000000000000000000000000000060448201526064016106cb565b610a62848484610bdf565b50505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061055957506301ffc9a760e01b7fffffffff00000000000000000000000000000000000000000000000000000000831614610559565b61072481610af2610bd0565b6115d3565b60008111610b475760405162461bcd60e51b815260206004820152601060248201527f696e76616c6964207175616e746974790000000000000000000000000000000060448201526064016106cb565b60ca81905560405181907fa461ccf4a7e6996574f5a69258032896cd5082cf3264467d1b8875a3f98538d790600090a250565b6101655460ff1615610bce5760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016106cb565b565b6000610bda611648565b905090565b8080610c2d5760405162461bcd60e51b815260206004820152601d60248201527f45786368616e67654d617463682063616e6e6f7420626520656d70747900000060448201526064016106cb565b60ca54811115610c7f5760405162461bcd60e51b815260206004820152601660248201527f746f6f206d616e792045786368616e67654d617463680000000000000000000060448201526064016106cb565b60005b81811015610d9a5736848483818110610c9d57610c9d613611565b9050602002810190610caf9190613627565b9050610d6786610cbf8380613665565b610cc89061383c565b610cd560208501856138ec565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610d17925050506040860186613665565b610d209061383c565b610d2d60608701876138ec565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061165292505050565b610d8786610d758380613665565b610d826040850185613665565b611844565b5080610d9281613949565b915050610c82565b5050505050565b6001600160a01b038116610df75760405162461bcd60e51b815260206004820152601c60248201527f696e76616c69642064656661756c74206665652072656365697665720000000060448201526064016106cb565b610100805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040517f5d039c612419cd7b6696e7d5c8ccaef3362188cc98db01e07fb55bb85b33541d90600090a250565b6113888210610ea05760405162461bcd60e51b815260206004820152601360248201527f696e76616c6964207072696d617279206665650000000000000000000000000060448201526064016106cb565b6113888110610ef15760405162461bcd60e51b815260206004820152601560248201527f696e76616c6964207365636f6e6461727920666565000000000000000000000060448201526064016106cb565b60fd82905560fe819055604051819083907ffa4067f2d0249edb7594284cabb394f2ec0e4f6168dbd1e3a63f861b67f1188f90600090a35050565b610f368282611947565b600082815260976020526040902061061790826119ea565b610f5882826119ff565b60008281526097602052604090206106179082611aa0565b6001600160a01b0381163b610fc75760405162461bcd60e51b815260206004820152601a60248201527f696e76616c696420526f79616c7469657320526567697374727900000000000060448201526064016106cb565b60ff805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040517f6932f02a24181a8c1b9fa7bdc7453f15ecba05c354c9da94e97bac1abb13397890600090a250565b611026611ab5565b610165805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61105a610bd0565b6040516001600160a01b03909116815260200160405180910390a1565b61107f610b7a565b610165805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861105a610bd0565b6001600160a01b0381163b61110d5760405162461bcd60e51b815260206004820152601760248201527f696e76616c6964206f726465722076616c696461746f7200000000000000000060448201526064016106cb565b60c9805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040517ff605132f819f46ab9f362495c159c83b8a080f3b8b22f8a684018837eae0bed390600090a250565b60006107a08383611b08565b600054610100900460ff166111db5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016106cb565b610724816113d5565b600054610100900460ff16610bce5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016106cb565b600054610100900460ff166112ba5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016106cb565b610165805460ff19169055565b600054610100900460ff166113325760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016106cb565b61133c8484610e4f565b61134582610da1565b610a6281610f70565b600054610100900460ff166113b95760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016106cb565b6113c2826110b6565b61059281610af7565b6000610559825490565b610133546001600160a01b039081169082160361145a5760405162461bcd60e51b815260206004820152603060248201527f4552433237373148616e646c65725570677261646561626c653a20666f72776160448201527f7264657220616c7265616479207365740000000000000000000000000000000060648201526084016106cb565b611462610bd0565b610133546040516001600160a01b03928316928481169216907f8ca022029d8ff7ad974913f8970aeed6c5e0e7eaf494a0c5b262249f6b5759e590600090a4610133805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b81608001356000036115255760405162461bcd60e51b815260206004820152601460248201527f302073616c742063616e2774206265207573656400000000000000000000000060448201526064016106cb565b600061153083611b32565b90508181146115815760405162461bcd60e51b815260206004820152601160248201527f696e76616c6964206f726465724861736800000000000000000000000000000060448201526064016106cb565b600082815260cb60205260409081902060001990555182907f34e97b51b26b1b4b5889b90f9702b02688ef22aaf1679d0d697a7518de60abfa906115c6908690613afc565b60405180910390a2505050565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff166105925761160681611bc3565b611611836020611bd5565b604051602001611622929190613b33565b60408051601f198184030181529082905262461bcd60e51b82526106cb91600401613be0565b6000610bda611dfe565b60c9546040517fb45230ec0000000000000000000000000000000000000000000000000000000081526001600160a01b039091169063b45230ec9061169f90879087908a90600401613c35565b60006040518083038186803b1580156116b757600080fd5b505afa1580156116cb573d6000803e3d6000fd5b505060c9546040517fb45230ec0000000000000000000000000000000000000000000000000000000081526001600160a01b03909116925063b45230ec915061171c90859085908a90600401613c35565b60006040518083038186803b15801561173457600080fd5b505afa158015611748573d6000803e3d6000fd5b5050505060408401516001600160a01b0316156117c85783604001516001600160a01b031682600001516001600160a01b0316146117c85760405162461bcd60e51b815260206004820152601660248201527f6c6566744f726465722e74616b6572206661696c65640000000000000000000060448201526064016106cb565b60408201516001600160a01b031615610d9a5783600001516001600160a01b031682604001516001600160a01b031614610d9a5760405162461bcd60e51b815260206004820152601760248201527f72696768744f726465722e74616b6572206661696c656400000000000000000060448201526064016106cb565b600061187c6118566020850185613cfb565b6118609080613cfb565b61186d6060850185613cfb565b6118779080613cfb565b611e52565b905060006118a76118906060860186613cfb565b61189a9080613cfb565b61186d6020860186613cfb565b905060006118b686868661206e565b6040805160808101825290810185815282516060830152815290915061193f906020808201906118e890890189613475565b6001600160a01b031690526040805160808101825290810185815260208581015160608401529082528082019061192190890189613475565b6001600160a01b031690528551855161193a91906121ec565b612277565b505050505050565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff166105925760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556119a6610bd0565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006107a0836001600160a01b03841661237c565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16156105925760008281526065602090815260408083206001600160a01b03851684529091529020805460ff19169055611a5c610bd0565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b60006107a0836001600160a01b0384166123cb565b6101655460ff16610bce5760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016106cb565b6000826000018281548110611b1f57611b1f613611565b9060005260206000200154905092915050565b6000611b416020830183613475565b611b69611b516020850185613cfb565b611b5b9080613cfb565b611b6490613d11565b6124be565b611b79611b516060860186613cfb565b604080516001600160a01b03909416602085015283019190915260608201526080808401359082015260a0015b604051602081830303815290604052805190602001209050919050565b60606105596001600160a01b03831660145b60606000611be4836002613d1d565b611bef906002613d34565b67ffffffffffffffff811115611c0757611c07613699565b6040519080825280601f01601f191660200182016040528015611c31576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110611c6857611c68613611565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110611ccb57611ccb613611565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000611d07846002613d1d565b611d12906001613d34565b90505b6001811115611daf577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110611d5357611d53613611565b1a60f81b828281518110611d6957611d69613611565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c93611da881613d47565b9050611d15565b5083156107a05760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016106cb565b610133546000906001600160a01b031633148015611e1d575060143610155b15611e4d57507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec36013560601c90565b503390565b6040805180820190915260008152606060208201526000611e766020850185613d5e565b90506000611e876020850185613d5e565b90506000826003811115611e9d57611e9d613982565b03611eea5760405162461bcd60e51b815260206004820152601860248201527f696e76616c6964206c65667420617373657420636c617373000000000000000060448201526064016106cb565b6000816003811115611efe57611efe613982565b03611f4b5760405162461bcd60e51b815260206004820152601960248201527f696e76616c696420726967687420617373657420636c6173730000000000000060448201526064016106cb565b806003811115611f5d57611f5d613982565b826003811115611f6f57611f6f613982565b14611fbc5760405162461bcd60e51b815260206004820152601260248201527f61737365747320646f6e2774206d61746368000000000000000000000000000060448201526064016106cb565b6000611fcb60208701876138ec565b604051611fd9929190613d79565b60405190819003902090506000611ff360208701876138ec565b604051612001929190613d79565b6040518091039020905080821461205a5760405162461bcd60e51b815260206004820152601260248201527f61737365747320646f6e2774206d61746368000000000000000000000000000060448201526064016106cb565b61206387613d11565b979650505050505050565b6040805180820190915260008082526020820152600061208d84611b32565b9050600061209a84611b32565b905060006120ac866080013584612500565b905060006120be866080013584612500565b90506120cc87878484612527565b9450600085602001511180156120e25750845115155b61212e5760405162461bcd60e51b815260206004820152600f60248201527f6e6f7468696e6720746f2066696c6c000000000000000000000000000000000060448201526064016106cb565b6080870135156121575760208501516121479083613d34565b600085815260cb60205260409020555b60808601351561217d57845161216d9082613d34565b600084815260cb60205260409020555b600084815260cb60205260408082205485835291819020549051859287926001600160a01b038d16927f5f1f72885b9f262a0908dfcb03271aa93b00aa85f8105a1617f08c7a52192f50926121d9928e928e928e929091613d89565b60405180910390a4505050509392505050565b6000600183600381111561220257612202613982565b1480156122215750600182600381111561221e5761221e613982565b14155b1561222e57506001610559565b600182600381111561224257612242613982565b1480156122615750600183600381111561225e5761225e613982565b14155b1561226e57506002610559565b50600092915050565b6122b06040805160c081018252600060808201818152606060a08401819052938301908152928201529081908152600060209091015290565b6122e96040805160c081018252600060808201818152606060a08401819052938301908152928201529081908152600060209091015290565b60018360028111156122fd576122fd613982565b0361230c575083905082612312565b50829050835b6123298160000151826020015184602001516125d7565b600083600281111561233d5761233d613982565b148061235157506123518260200151612800565b156123725761236d8260000151836020015183602001516125d7565b610d9a565b610d9a8282612840565b60008181526001830160205260408120546123c357508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610559565b506000610559565b600081815260018301602052604081205480156124b45760006123ef600183613dd6565b855490915060009061240390600190613dd6565b905081811461246857600086600001828154811061242357612423613611565b906000526020600020015490508087600001848154811061244657612446613611565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061247957612479613de9565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610559565b6000915050610559565b8051602080830151805190820120604051600093611ba6937f75aacb2727a36600741802d07994792d9d768ee841822bca87180d320cea991293919201613dff565b60008260000361251257506000610559565b50600090815260cb6020526040902054919050565b604080518082019091526000808252602082015260008061254887866128df565b9150915060008061255988876128df565b915091508381111561259c57612591848461257760208c018c613cfb565b6020013561258860608d018d613cfb565b60200135612994565b9450505050506125cf565b6125c86125ac60208b018b613cfb565b602001356125bd60608c018c613cfb565b602001358484612a20565b9450505050505b949350505050565b600183515160038111156125ed576125ed613982565b036126135760006126018460000151612aad565b9050610a628184848760200151612ac7565b6002835151600381111561262957612629613982565b036127165760008061263e8560000151612b4f565b9150915084602001516001146126965760405162461bcd60e51b815260206004820152601260248201527f6572633732312076616c7565206572726f72000000000000000000000000000060448201526064016106cb565b6040517f42842e0e0000000000000000000000000000000000000000000000000000000081526001600160a01b0385811660048301528481166024830152604482018390528316906342842e0e906064015b600060405180830381600087803b15801561270257600080fd5b505af11580156108f6573d6000803e3d6000fd5b6003835151600381111561272c5761272c613982565b036127b8576000806127418560000151612b4f565b60208701516040517ff242432a0000000000000000000000000000000000000000000000000000000081526001600160a01b038881166004830152878116602483015260448201849052606482019290925260a06084820152600060a482015292945090925083169063f242432a9060c4016126e8565b60405162461bcd60e51b815260206004820152601360248201527f696e76616c696420617373657420636c6173730000000000000000000000000060448201526064016106cb565b6001600160a01b03811660009081527f90916b45ad713ccdf8d945eab9f58d0d1cfed58f8e47d57192d063a0ddbfe292602052604081205460ff16610559565b81516020015160009061285283612b73565b156128615760fd549150612874565b60fe549150612871818585612bb9565b90505b6000821180156128845750600081115b156128aa57610100546128a790829086906001600160a01b031685612710612d60565b90505b8015610a6257610a626040518060400160405280866000015160000151815260200183815250856020015185602001516125d7565b600080826128f06060860186613cfb565b6020013510156129425760405162461bcd60e51b815260206004820152601f60248201527f66696c6c696e67206d6f7265207468616e206f72646572207065726d6974730060448201526064016106cb565b826129506060860186613cfb565b6020013561295e9190613dd6565b905061298b6129706020860186613cfb565b602001356129816060870187613cfb565b6020013583612dec565b91509250929050565b604080518082019091526000808252602082015260006129b5858585612dec565b905085811115612a075760405162461bcd60e51b815260206004820152601860248201527f66696c6c4c6566743a20756e61626c6520746f2066696c6c000000000000000060448201526064016106cb565b5050604080518082019091529384525050602082015290565b60408051808201909152600080825260208201526000612a41838787612dec565b905083811115612a935760405162461bcd60e51b815260206004820152601960248201527f66696c6c52696768743a20756e61626c6520746f2066696c6c0000000000000060448201526064016106cb565b604080518082019091529283526020830152509392505050565b600081602001518060200190518101906105599190613e21565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052610a62908590612e5b565b6000808260200151806020019051810190612b6a9190613e3e565b91509150915091565b8051516000908190612b8490612f43565b90506001600160a01b038116158015906107a05750806001600160a01b031683602001516001600160a01b0316149392505050565b6000806000612bcf846000015160000151612b4f565b60ff546040517f9ca7dc7a0000000000000000000000000000000000000000000000000000000081526001600160a01b038085166004830152602482018490529395509193506000921690639ca7dc7a906044016000604051808303816000875af1158015612c42573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612c6a9190810190613e6c565b8051909150600090815b81811015612d00576000848281518110612c9057612c90613611565b60200260200101519050806020015184612caa9190613d34565b935088602001516001600160a01b031681600001516001600160a01b031603612cd35750612cee565b612cea8b8b83600001518460200151612710612d60565b9a50505b80612cf881613949565b915050612c74565b50611388821115612d535760405162461bcd60e51b815260206004820152601d60248201527f726f79616c746965732061726520746f6f206869676820283e3530252900000060448201526064016106cb565b5096979650505050505050565b604080518082019091528451518152600060208083018290528651015190919082908490612d8f908790613d1d565b612d999190613f4d565b905080881115612dbb57612dad8189613dd6565b602083018290529750612dc7565b60208201979097526000965b602082015115612de057612de0828860200151886125d7565b50959695505050505050565b6000612df984848461301a565b15612e465760405162461bcd60e51b815260206004820152600e60248201527f726f756e64696e67206572726f7200000000000000000000000000000000000060448201526064016106cb565b82612e518386613d1d565b6125cf9190613f4d565b6000612eb0826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166130ba9092919063ffffffff16565b9050805160001480612ed1575080806020019051810190612ed19190613f6f565b6106175760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016106cb565b6000806000612f5184612b4f565b9092509050612f896001600160a01b0383167fa30b4db9000000000000000000000000000000000000000000000000000000006130c9565b15613013576040517fa30b4db9000000000000000000000000000000000000000000000000000000008152600481018290526001600160a01b0383169063a30b4db990602401602060405180830381865afa158015612fec573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130109190613e21565b92505b5050919050565b60008260000361306c5760405162461bcd60e51b815260206004820152601060248201527f6469766973696f6e206279207a65726f0000000000000000000000000000000060448201526064016106cb565b811580613077575083155b15613084575060006107a0565b6000838061309457613094613f37565b85840990506130a38386613d1d565b6130af6103e883613d1d565b101595945050505050565b60606125cf84846000856130e5565b60006130d4836131cc565b80156107a057506107a08383613217565b60608247101561315d5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016106cb565b600080866001600160a01b031685876040516131799190613f91565b60006040518083038185875af1925050503d80600081146131b6576040519150601f19603f3d011682016040523d82523d6000602084013e6131bb565b606091505b5091509150612063878383876132c9565b60006131df826301ffc9a760e01b613217565b80156105595750613210827fffffffff00000000000000000000000000000000000000000000000000000000613217565b1592915050565b604080517fffffffff000000000000000000000000000000000000000000000000000000008316602480830191909152825180830390910181526044909101909152602080820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166301ffc9a760e01b178152825160009392849283928392918391908a617530fa92503d915060005190508280156132b6575060208210155b8015612063575015159695505050505050565b60608315613338578251600003613331576001600160a01b0385163b6133315760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016106cb565b50816125cf565b6125cf838381511561334d5781518083602001fd5b8060405162461bcd60e51b81526004016106cb9190613be0565b60006020828403121561337957600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146107a057600080fd5b6000602082840312156133bb57600080fd5b5035919050565b60008083601f8401126133d457600080fd5b50813567ffffffffffffffff8111156133ec57600080fd5b6020830191508360208260051b850101111561340757600080fd5b9250929050565b6000806020838503121561342157600080fd5b823567ffffffffffffffff81111561343857600080fd5b613444858286016133c2565b90969095509350505050565b6001600160a01b038116811461072457600080fd5b803561347081613450565b919050565b60006020828403121561348757600080fd5b81356107a081613450565b600080604083850312156134a557600080fd5b50508035926020909101359150565b600080604083850312156134c757600080fd5b8235915060208301356134d981613450565b809150509250929050565b600080600080600080600080610100898b03121561350157600080fd5b883561350c81613450565b9750602089013561351c81613450565b96506040890135955060608901359450608089013561353a81613450565b935060a089013561354a81613450565b925060c089013561355a81613450565b8092505060e089013590509295985092959890939650565b6000806040838503121561358557600080fd5b823567ffffffffffffffff81111561359c57600080fd5b830160e081860312156135ae57600080fd5b946020939093013593505050565b6000806000604084860312156135d157600080fd5b83356135dc81613450565b9250602084013567ffffffffffffffff8111156135f857600080fd5b613604868287016133c2565b9497909650939450505050565b634e487b7160e01b600052603260045260246000fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8183360301811261365b57600080fd5b9190910192915050565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff2183360301811261365b57600080fd5b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff811182821017156136d2576136d2613699565b60405290565b60405160e0810167ffffffffffffffff811182821017156136d2576136d2613699565b604051601f8201601f1916810167ffffffffffffffff8111828210171561372457613724613699565b604052919050565b80356004811061347057600080fd5b60006040828403121561374d57600080fd5b6137556136af565b90506137608261372c565b815260208083013567ffffffffffffffff8082111561377e57600080fd5b818501915085601f83011261379257600080fd5b8135818111156137a4576137a4613699565b6137b684601f19601f840116016136fb565b915080825286848285010111156137cc57600080fd5b80848401858401376000908201840152918301919091525092915050565b6000604082840312156137fc57600080fd5b6138046136af565b9050813567ffffffffffffffff81111561381d57600080fd5b6138298482850161373b565b8252506020820135602082015292915050565b600060e0823603121561384e57600080fd5b6138566136d8565b61385f83613465565b8152602083013567ffffffffffffffff8082111561387c57600080fd5b613888368387016137ea565b602084015261389960408601613465565b604084015260608501359150808211156138b257600080fd5b506138bf368286016137ea565b6060830152506080830135608082015260a083013560a082015260c083013560c082015280915050919050565b6000808335601e1984360301811261390357600080fd5b83018035915067ffffffffffffffff82111561391e57600080fd5b60200191503681900382131561340757600080fd5b634e487b7160e01b600052601160045260246000fd5b6000600019820361395c5761395c613933565b5060010190565b60008235603e1983360301811261397957600080fd5b90910192915050565b634e487b7160e01b600052602160045260246000fd5b600481106139b657634e487b7160e01b600052602160045260246000fd5b9052565b60006139c68283613963565b604084526139df604085016139da8361372c565b613998565b6020810135601e198236030181126139f657600080fd5b0160208101903567ffffffffffffffff811115613a1257600080fd5b803603821315613a2157600080fd5b60406060860152806080860152808260a0870137600060a082870101526020840135602086015260a0601f19601f8301168601019250505092915050565b60008135613a6c81613450565b6001600160a01b038082168552613a866020850185613963565b915060e06020860152613a9c60e08601836139ba565b91506040840135613aac81613450565b166040850152613abf6060840184613963565b8482036060860152613ad182826139ba565b9150506080830135608085015260a083013560a085015260c083013560c08501528091505092915050565b6020815260006107a06020830184613a5f565b60005b83811015613b2a578181015183820152602001613b12565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351613b6b816017850160208801613b0f565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351613ba8816028840160208801613b0f565b01602801949350505050565b60008151808452613bcc816020860160208601613b0f565b601f01601f19169290920160200192915050565b6020815260006107a06020830184613bb4565b6000815160408452613c09604085018251613998565b6020015160406060850152613c216080850182613bb4565b602093840151949093019390935250919050565b6060815260006001600160a01b03808651166060840152602086015160e06080850152613c66610140850182613bf3565b604088015190921660a08501525060608601518382037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa00160c085015290613cae8183613bf3565b915050608086015160e084015260a086015161010084015260c08601516101208401528281036020840152613ce38186613bb4565b9150506125cf60408301846001600160a01b03169052565b60008235603e1983360301811261365b57600080fd5b6000610559368361373b565b808202811582820484141761055957610559613933565b8082018082111561055957610559613933565b600081613d5657613d56613933565b506000190190565b600060208284031215613d7057600080fd5b6107a08261372c565b8183823760009101908152919050565b60c081526000613d9c60c0830188613a5f565b8281036020840152613dae8188613a5f565b8651604085015260209096015160608401525050608081019290925260a09091015292915050565b8181038181111561055957610559613933565b634e487b7160e01b600052603160045260246000fd5b83815260608101613e136020830185613998565b826040830152949350505050565b600060208284031215613e3357600080fd5b81516107a081613450565b60008060408385031215613e5157600080fd5b8251613e5c81613450565b6020939093015192949293505050565b60006020808385031215613e7f57600080fd5b825167ffffffffffffffff80821115613e9757600080fd5b818501915085601f830112613eab57600080fd5b815181811115613ebd57613ebd613699565b613ecb848260051b016136fb565b818152848101925060069190911b830184019087821115613eeb57600080fd5b928401925b818410156120635760408489031215613f095760008081fd5b613f116136af565b8451613f1c81613450565b81528486015186820152835260409093019291840191613ef0565b634e487b7160e01b600052601260045260246000fd5b600082613f6a57634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215613f8157600080fd5b815180151581146107a057600080fd5b6000825161365b818460208701613b0f56fea26469706673582212204fb4aef3d7226e3c51717ee1c7bd8270f126087fe0a8b6b0ed8c1147686fcfad64736f6c63430008130033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061020b5760003560e01c80636d8f06941161012a578063c36e69e9116100bd578063d547741f1161008c578063e63ab1e911610071578063e63ab1e9146104b6578063ec03ce82146104dd578063fb01d36b146104f057600080fd5b8063d547741f14610490578063da742228146104a357600080fd5b8063c36e69e91461044f578063c460028814610462578063ca15c8731461046b578063ce1b815f1461047e57600080fd5b806389de1d7a116100f957806389de1d7a146103f25780639010d07c146103fb57806391d148541461040e578063a217fddf1461044757600080fd5b80636d8f06941461039d5780638456cb59146103b05780638587177a146103b85780638830df0d146103cb57600080fd5b806336568abe116101a25780634ac0c183116101715780634ac0c18314610344578063572b6c051461036b5780635737e1961461037e5780635c975abb1461039157600080fd5b806336568abe146102ea5780633abf6fd4146102fd5780633be89922146103295780633f4ba83a1461033c57600080fd5b806320158c44116101de57806320158c4414610273578063240de277146102a1578063248a9ca3146102b45780632f2ff15d146102d757600080fd5b806301ffc9a714610210578063032566d3146102385780630c8b62881461024d5780631cdfe3d814610260575b600080fd5b61022361021e366004613367565b610503565b60405190151581526020015b60405180910390f35b61024b6102463660046133a9565b61055f565b005b61024b61025b36600461340e565b610596565b61024b61026e366004613475565b6105b0565b6102936102813660046133a9565b60cb6020526000908152604090205481565b60405190815260200161022f565b61024b6102af366004613492565b6105e3565b6102936102c23660046133a9565b60009081526065602052604090206001015490565b61024b6102e53660046134b4565b61061c565b61024b6102f83660046134b4565b610641565b61010054610311906001600160a01b031681565b6040516001600160a01b03909116815260200161022f565b61024b610337366004613475565b6106de565b61024b6106f2565b6102937f541943c4a49765b7940b4b1392c4b1f8ede6efd4e23572572987ae02e569a78681565b610223610379366004613475565b610727565b60c954610311906001600160a01b031681565b6101655460ff16610223565b60ff54610311906001600160a01b031681565b61024b610742565b61024b6103c6366004613475565b610774565b6102937f1d46dada6ac47de84b1e7381a753499bde9d44cc2b9eacc1ba89f2ac24be16cc81565b61029360fd5481565b610311610409366004613492565b610788565b61022361041c3660046134b4565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b610293600081565b61024b61045d3660046134e4565b6107a7565b61029360fe5481565b6102936104793660046133a9565b610901565b610133546001600160a01b0316610311565b61024b61049e3660046134b4565b610918565b61024b6104b1366004613475565b61093d565b6102937f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b61024b6104eb366004613572565b610951565b61024b6104fe3660046135bc565b6109cf565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f5a05180f000000000000000000000000000000000000000000000000000000001480610559575061055982610a68565b92915050565b7f541943c4a49765b7940b4b1392c4b1f8ede6efd4e23572572987ae02e569a78661058981610ae6565b61059282610af7565b5050565b61059e610b7a565b6105926105a9610bd0565b8383610bdf565b7f541943c4a49765b7940b4b1392c4b1f8ede6efd4e23572572987ae02e569a7866105da81610ae6565b61059282610da1565b7f541943c4a49765b7940b4b1392c4b1f8ede6efd4e23572572987ae02e569a78661060d81610ae6565b6106178383610e4f565b505050565b60008281526065602052604090206001015461063781610ae6565b6106178383610f2c565b610649610bd0565b6001600160a01b0316816001600160a01b0316146106d45760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b6105928282610f4e565b60006106e981610ae6565b61059282610f70565b7f541943c4a49765b7940b4b1392c4b1f8ede6efd4e23572572987ae02e569a78661071c81610ae6565b61072461101e565b50565b600061055982610133546001600160a01b0391821691161490565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a61076c81610ae6565b610724611077565b600061077f81610ae6565b610592826110b6565b60008281526097602052604081206107a09083611164565b9392505050565b600054610100900460ff16158080156107c75750600054600160ff909116105b806107e15750303b1580156107e1575060005460ff166001145b6108535760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016106cb565b6000805460ff191660011790558015610876576000805461ff0019166101001790555b61087f88611170565b6108876111e4565b61088f61124f565b61089b878787876112c7565b6108a5838361134e565b6108b060008a610f2c565b80156108f6576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050505050565b6000818152609760205260408120610559906113cb565b60008281526065602052604090206001015461093381610ae6565b6106178383610f4e565b600061094881610ae6565b610592826113d5565b61095e6020830183613475565b6001600160a01b031661096f610bd0565b6001600160a01b0316146109c55760405162461bcd60e51b815260206004820152600960248201527f6e6f74206d616b6572000000000000000000000000000000000000000000000060448201526064016106cb565b61059282826114d1565b7f1d46dada6ac47de84b1e7381a753499bde9d44cc2b9eacc1ba89f2ac24be16cc6109f981610ae6565b610a01610b7a565b6001600160a01b038416610a575760405162461bcd60e51b815260206004820152600e60248201527f696e76616c69642073656e64657200000000000000000000000000000000000060448201526064016106cb565b610a62848484610bdf565b50505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061055957506301ffc9a760e01b7fffffffff00000000000000000000000000000000000000000000000000000000831614610559565b61072481610af2610bd0565b6115d3565b60008111610b475760405162461bcd60e51b815260206004820152601060248201527f696e76616c6964207175616e746974790000000000000000000000000000000060448201526064016106cb565b60ca81905560405181907fa461ccf4a7e6996574f5a69258032896cd5082cf3264467d1b8875a3f98538d790600090a250565b6101655460ff1615610bce5760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016106cb565b565b6000610bda611648565b905090565b8080610c2d5760405162461bcd60e51b815260206004820152601d60248201527f45786368616e67654d617463682063616e6e6f7420626520656d70747900000060448201526064016106cb565b60ca54811115610c7f5760405162461bcd60e51b815260206004820152601660248201527f746f6f206d616e792045786368616e67654d617463680000000000000000000060448201526064016106cb565b60005b81811015610d9a5736848483818110610c9d57610c9d613611565b9050602002810190610caf9190613627565b9050610d6786610cbf8380613665565b610cc89061383c565b610cd560208501856138ec565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610d17925050506040860186613665565b610d209061383c565b610d2d60608701876138ec565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061165292505050565b610d8786610d758380613665565b610d826040850185613665565b611844565b5080610d9281613949565b915050610c82565b5050505050565b6001600160a01b038116610df75760405162461bcd60e51b815260206004820152601c60248201527f696e76616c69642064656661756c74206665652072656365697665720000000060448201526064016106cb565b610100805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040517f5d039c612419cd7b6696e7d5c8ccaef3362188cc98db01e07fb55bb85b33541d90600090a250565b6113888210610ea05760405162461bcd60e51b815260206004820152601360248201527f696e76616c6964207072696d617279206665650000000000000000000000000060448201526064016106cb565b6113888110610ef15760405162461bcd60e51b815260206004820152601560248201527f696e76616c6964207365636f6e6461727920666565000000000000000000000060448201526064016106cb565b60fd82905560fe819055604051819083907ffa4067f2d0249edb7594284cabb394f2ec0e4f6168dbd1e3a63f861b67f1188f90600090a35050565b610f368282611947565b600082815260976020526040902061061790826119ea565b610f5882826119ff565b60008281526097602052604090206106179082611aa0565b6001600160a01b0381163b610fc75760405162461bcd60e51b815260206004820152601a60248201527f696e76616c696420526f79616c7469657320526567697374727900000000000060448201526064016106cb565b60ff805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040517f6932f02a24181a8c1b9fa7bdc7453f15ecba05c354c9da94e97bac1abb13397890600090a250565b611026611ab5565b610165805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61105a610bd0565b6040516001600160a01b03909116815260200160405180910390a1565b61107f610b7a565b610165805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861105a610bd0565b6001600160a01b0381163b61110d5760405162461bcd60e51b815260206004820152601760248201527f696e76616c6964206f726465722076616c696461746f7200000000000000000060448201526064016106cb565b60c9805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040517ff605132f819f46ab9f362495c159c83b8a080f3b8b22f8a684018837eae0bed390600090a250565b60006107a08383611b08565b600054610100900460ff166111db5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016106cb565b610724816113d5565b600054610100900460ff16610bce5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016106cb565b600054610100900460ff166112ba5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016106cb565b610165805460ff19169055565b600054610100900460ff166113325760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016106cb565b61133c8484610e4f565b61134582610da1565b610a6281610f70565b600054610100900460ff166113b95760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016106cb565b6113c2826110b6565b61059281610af7565b6000610559825490565b610133546001600160a01b039081169082160361145a5760405162461bcd60e51b815260206004820152603060248201527f4552433237373148616e646c65725570677261646561626c653a20666f72776160448201527f7264657220616c7265616479207365740000000000000000000000000000000060648201526084016106cb565b611462610bd0565b610133546040516001600160a01b03928316928481169216907f8ca022029d8ff7ad974913f8970aeed6c5e0e7eaf494a0c5b262249f6b5759e590600090a4610133805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b81608001356000036115255760405162461bcd60e51b815260206004820152601460248201527f302073616c742063616e2774206265207573656400000000000000000000000060448201526064016106cb565b600061153083611b32565b90508181146115815760405162461bcd60e51b815260206004820152601160248201527f696e76616c6964206f726465724861736800000000000000000000000000000060448201526064016106cb565b600082815260cb60205260409081902060001990555182907f34e97b51b26b1b4b5889b90f9702b02688ef22aaf1679d0d697a7518de60abfa906115c6908690613afc565b60405180910390a2505050565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff166105925761160681611bc3565b611611836020611bd5565b604051602001611622929190613b33565b60408051601f198184030181529082905262461bcd60e51b82526106cb91600401613be0565b6000610bda611dfe565b60c9546040517fb45230ec0000000000000000000000000000000000000000000000000000000081526001600160a01b039091169063b45230ec9061169f90879087908a90600401613c35565b60006040518083038186803b1580156116b757600080fd5b505afa1580156116cb573d6000803e3d6000fd5b505060c9546040517fb45230ec0000000000000000000000000000000000000000000000000000000081526001600160a01b03909116925063b45230ec915061171c90859085908a90600401613c35565b60006040518083038186803b15801561173457600080fd5b505afa158015611748573d6000803e3d6000fd5b5050505060408401516001600160a01b0316156117c85783604001516001600160a01b031682600001516001600160a01b0316146117c85760405162461bcd60e51b815260206004820152601660248201527f6c6566744f726465722e74616b6572206661696c65640000000000000000000060448201526064016106cb565b60408201516001600160a01b031615610d9a5783600001516001600160a01b031682604001516001600160a01b031614610d9a5760405162461bcd60e51b815260206004820152601760248201527f72696768744f726465722e74616b6572206661696c656400000000000000000060448201526064016106cb565b600061187c6118566020850185613cfb565b6118609080613cfb565b61186d6060850185613cfb565b6118779080613cfb565b611e52565b905060006118a76118906060860186613cfb565b61189a9080613cfb565b61186d6020860186613cfb565b905060006118b686868661206e565b6040805160808101825290810185815282516060830152815290915061193f906020808201906118e890890189613475565b6001600160a01b031690526040805160808101825290810185815260208581015160608401529082528082019061192190890189613475565b6001600160a01b031690528551855161193a91906121ec565b612277565b505050505050565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff166105925760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556119a6610bd0565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006107a0836001600160a01b03841661237c565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16156105925760008281526065602090815260408083206001600160a01b03851684529091529020805460ff19169055611a5c610bd0565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b60006107a0836001600160a01b0384166123cb565b6101655460ff16610bce5760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016106cb565b6000826000018281548110611b1f57611b1f613611565b9060005260206000200154905092915050565b6000611b416020830183613475565b611b69611b516020850185613cfb565b611b5b9080613cfb565b611b6490613d11565b6124be565b611b79611b516060860186613cfb565b604080516001600160a01b03909416602085015283019190915260608201526080808401359082015260a0015b604051602081830303815290604052805190602001209050919050565b60606105596001600160a01b03831660145b60606000611be4836002613d1d565b611bef906002613d34565b67ffffffffffffffff811115611c0757611c07613699565b6040519080825280601f01601f191660200182016040528015611c31576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110611c6857611c68613611565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110611ccb57611ccb613611565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000611d07846002613d1d565b611d12906001613d34565b90505b6001811115611daf577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110611d5357611d53613611565b1a60f81b828281518110611d6957611d69613611565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c93611da881613d47565b9050611d15565b5083156107a05760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016106cb565b610133546000906001600160a01b031633148015611e1d575060143610155b15611e4d57507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec36013560601c90565b503390565b6040805180820190915260008152606060208201526000611e766020850185613d5e565b90506000611e876020850185613d5e565b90506000826003811115611e9d57611e9d613982565b03611eea5760405162461bcd60e51b815260206004820152601860248201527f696e76616c6964206c65667420617373657420636c617373000000000000000060448201526064016106cb565b6000816003811115611efe57611efe613982565b03611f4b5760405162461bcd60e51b815260206004820152601960248201527f696e76616c696420726967687420617373657420636c6173730000000000000060448201526064016106cb565b806003811115611f5d57611f5d613982565b826003811115611f6f57611f6f613982565b14611fbc5760405162461bcd60e51b815260206004820152601260248201527f61737365747320646f6e2774206d61746368000000000000000000000000000060448201526064016106cb565b6000611fcb60208701876138ec565b604051611fd9929190613d79565b60405190819003902090506000611ff360208701876138ec565b604051612001929190613d79565b6040518091039020905080821461205a5760405162461bcd60e51b815260206004820152601260248201527f61737365747320646f6e2774206d61746368000000000000000000000000000060448201526064016106cb565b61206387613d11565b979650505050505050565b6040805180820190915260008082526020820152600061208d84611b32565b9050600061209a84611b32565b905060006120ac866080013584612500565b905060006120be866080013584612500565b90506120cc87878484612527565b9450600085602001511180156120e25750845115155b61212e5760405162461bcd60e51b815260206004820152600f60248201527f6e6f7468696e6720746f2066696c6c000000000000000000000000000000000060448201526064016106cb565b6080870135156121575760208501516121479083613d34565b600085815260cb60205260409020555b60808601351561217d57845161216d9082613d34565b600084815260cb60205260409020555b600084815260cb60205260408082205485835291819020549051859287926001600160a01b038d16927f5f1f72885b9f262a0908dfcb03271aa93b00aa85f8105a1617f08c7a52192f50926121d9928e928e928e929091613d89565b60405180910390a4505050509392505050565b6000600183600381111561220257612202613982565b1480156122215750600182600381111561221e5761221e613982565b14155b1561222e57506001610559565b600182600381111561224257612242613982565b1480156122615750600183600381111561225e5761225e613982565b14155b1561226e57506002610559565b50600092915050565b6122b06040805160c081018252600060808201818152606060a08401819052938301908152928201529081908152600060209091015290565b6122e96040805160c081018252600060808201818152606060a08401819052938301908152928201529081908152600060209091015290565b60018360028111156122fd576122fd613982565b0361230c575083905082612312565b50829050835b6123298160000151826020015184602001516125d7565b600083600281111561233d5761233d613982565b148061235157506123518260200151612800565b156123725761236d8260000151836020015183602001516125d7565b610d9a565b610d9a8282612840565b60008181526001830160205260408120546123c357508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610559565b506000610559565b600081815260018301602052604081205480156124b45760006123ef600183613dd6565b855490915060009061240390600190613dd6565b905081811461246857600086600001828154811061242357612423613611565b906000526020600020015490508087600001848154811061244657612446613611565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061247957612479613de9565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610559565b6000915050610559565b8051602080830151805190820120604051600093611ba6937f75aacb2727a36600741802d07994792d9d768ee841822bca87180d320cea991293919201613dff565b60008260000361251257506000610559565b50600090815260cb6020526040902054919050565b604080518082019091526000808252602082015260008061254887866128df565b9150915060008061255988876128df565b915091508381111561259c57612591848461257760208c018c613cfb565b6020013561258860608d018d613cfb565b60200135612994565b9450505050506125cf565b6125c86125ac60208b018b613cfb565b602001356125bd60608c018c613cfb565b602001358484612a20565b9450505050505b949350505050565b600183515160038111156125ed576125ed613982565b036126135760006126018460000151612aad565b9050610a628184848760200151612ac7565b6002835151600381111561262957612629613982565b036127165760008061263e8560000151612b4f565b9150915084602001516001146126965760405162461bcd60e51b815260206004820152601260248201527f6572633732312076616c7565206572726f72000000000000000000000000000060448201526064016106cb565b6040517f42842e0e0000000000000000000000000000000000000000000000000000000081526001600160a01b0385811660048301528481166024830152604482018390528316906342842e0e906064015b600060405180830381600087803b15801561270257600080fd5b505af11580156108f6573d6000803e3d6000fd5b6003835151600381111561272c5761272c613982565b036127b8576000806127418560000151612b4f565b60208701516040517ff242432a0000000000000000000000000000000000000000000000000000000081526001600160a01b038881166004830152878116602483015260448201849052606482019290925260a06084820152600060a482015292945090925083169063f242432a9060c4016126e8565b60405162461bcd60e51b815260206004820152601360248201527f696e76616c696420617373657420636c6173730000000000000000000000000060448201526064016106cb565b6001600160a01b03811660009081527f90916b45ad713ccdf8d945eab9f58d0d1cfed58f8e47d57192d063a0ddbfe292602052604081205460ff16610559565b81516020015160009061285283612b73565b156128615760fd549150612874565b60fe549150612871818585612bb9565b90505b6000821180156128845750600081115b156128aa57610100546128a790829086906001600160a01b031685612710612d60565b90505b8015610a6257610a626040518060400160405280866000015160000151815260200183815250856020015185602001516125d7565b600080826128f06060860186613cfb565b6020013510156129425760405162461bcd60e51b815260206004820152601f60248201527f66696c6c696e67206d6f7265207468616e206f72646572207065726d6974730060448201526064016106cb565b826129506060860186613cfb565b6020013561295e9190613dd6565b905061298b6129706020860186613cfb565b602001356129816060870187613cfb565b6020013583612dec565b91509250929050565b604080518082019091526000808252602082015260006129b5858585612dec565b905085811115612a075760405162461bcd60e51b815260206004820152601860248201527f66696c6c4c6566743a20756e61626c6520746f2066696c6c000000000000000060448201526064016106cb565b5050604080518082019091529384525050602082015290565b60408051808201909152600080825260208201526000612a41838787612dec565b905083811115612a935760405162461bcd60e51b815260206004820152601960248201527f66696c6c52696768743a20756e61626c6520746f2066696c6c0000000000000060448201526064016106cb565b604080518082019091529283526020830152509392505050565b600081602001518060200190518101906105599190613e21565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052610a62908590612e5b565b6000808260200151806020019051810190612b6a9190613e3e565b91509150915091565b8051516000908190612b8490612f43565b90506001600160a01b038116158015906107a05750806001600160a01b031683602001516001600160a01b0316149392505050565b6000806000612bcf846000015160000151612b4f565b60ff546040517f9ca7dc7a0000000000000000000000000000000000000000000000000000000081526001600160a01b038085166004830152602482018490529395509193506000921690639ca7dc7a906044016000604051808303816000875af1158015612c42573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612c6a9190810190613e6c565b8051909150600090815b81811015612d00576000848281518110612c9057612c90613611565b60200260200101519050806020015184612caa9190613d34565b935088602001516001600160a01b031681600001516001600160a01b031603612cd35750612cee565b612cea8b8b83600001518460200151612710612d60565b9a50505b80612cf881613949565b915050612c74565b50611388821115612d535760405162461bcd60e51b815260206004820152601d60248201527f726f79616c746965732061726520746f6f206869676820283e3530252900000060448201526064016106cb565b5096979650505050505050565b604080518082019091528451518152600060208083018290528651015190919082908490612d8f908790613d1d565b612d999190613f4d565b905080881115612dbb57612dad8189613dd6565b602083018290529750612dc7565b60208201979097526000965b602082015115612de057612de0828860200151886125d7565b50959695505050505050565b6000612df984848461301a565b15612e465760405162461bcd60e51b815260206004820152600e60248201527f726f756e64696e67206572726f7200000000000000000000000000000000000060448201526064016106cb565b82612e518386613d1d565b6125cf9190613f4d565b6000612eb0826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166130ba9092919063ffffffff16565b9050805160001480612ed1575080806020019051810190612ed19190613f6f565b6106175760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016106cb565b6000806000612f5184612b4f565b9092509050612f896001600160a01b0383167fa30b4db9000000000000000000000000000000000000000000000000000000006130c9565b15613013576040517fa30b4db9000000000000000000000000000000000000000000000000000000008152600481018290526001600160a01b0383169063a30b4db990602401602060405180830381865afa158015612fec573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130109190613e21565b92505b5050919050565b60008260000361306c5760405162461bcd60e51b815260206004820152601060248201527f6469766973696f6e206279207a65726f0000000000000000000000000000000060448201526064016106cb565b811580613077575083155b15613084575060006107a0565b6000838061309457613094613f37565b85840990506130a38386613d1d565b6130af6103e883613d1d565b101595945050505050565b60606125cf84846000856130e5565b60006130d4836131cc565b80156107a057506107a08383613217565b60608247101561315d5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016106cb565b600080866001600160a01b031685876040516131799190613f91565b60006040518083038185875af1925050503d80600081146131b6576040519150601f19603f3d011682016040523d82523d6000602084013e6131bb565b606091505b5091509150612063878383876132c9565b60006131df826301ffc9a760e01b613217565b80156105595750613210827fffffffff00000000000000000000000000000000000000000000000000000000613217565b1592915050565b604080517fffffffff000000000000000000000000000000000000000000000000000000008316602480830191909152825180830390910181526044909101909152602080820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166301ffc9a760e01b178152825160009392849283928392918391908a617530fa92503d915060005190508280156132b6575060208210155b8015612063575015159695505050505050565b60608315613338578251600003613331576001600160a01b0385163b6133315760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016106cb565b50816125cf565b6125cf838381511561334d5781518083602001fd5b8060405162461bcd60e51b81526004016106cb9190613be0565b60006020828403121561337957600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146107a057600080fd5b6000602082840312156133bb57600080fd5b5035919050565b60008083601f8401126133d457600080fd5b50813567ffffffffffffffff8111156133ec57600080fd5b6020830191508360208260051b850101111561340757600080fd5b9250929050565b6000806020838503121561342157600080fd5b823567ffffffffffffffff81111561343857600080fd5b613444858286016133c2565b90969095509350505050565b6001600160a01b038116811461072457600080fd5b803561347081613450565b919050565b60006020828403121561348757600080fd5b81356107a081613450565b600080604083850312156134a557600080fd5b50508035926020909101359150565b600080604083850312156134c757600080fd5b8235915060208301356134d981613450565b809150509250929050565b600080600080600080600080610100898b03121561350157600080fd5b883561350c81613450565b9750602089013561351c81613450565b96506040890135955060608901359450608089013561353a81613450565b935060a089013561354a81613450565b925060c089013561355a81613450565b8092505060e089013590509295985092959890939650565b6000806040838503121561358557600080fd5b823567ffffffffffffffff81111561359c57600080fd5b830160e081860312156135ae57600080fd5b946020939093013593505050565b6000806000604084860312156135d157600080fd5b83356135dc81613450565b9250602084013567ffffffffffffffff8111156135f857600080fd5b613604868287016133c2565b9497909650939450505050565b634e487b7160e01b600052603260045260246000fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8183360301811261365b57600080fd5b9190910192915050565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff2183360301811261365b57600080fd5b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff811182821017156136d2576136d2613699565b60405290565b60405160e0810167ffffffffffffffff811182821017156136d2576136d2613699565b604051601f8201601f1916810167ffffffffffffffff8111828210171561372457613724613699565b604052919050565b80356004811061347057600080fd5b60006040828403121561374d57600080fd5b6137556136af565b90506137608261372c565b815260208083013567ffffffffffffffff8082111561377e57600080fd5b818501915085601f83011261379257600080fd5b8135818111156137a4576137a4613699565b6137b684601f19601f840116016136fb565b915080825286848285010111156137cc57600080fd5b80848401858401376000908201840152918301919091525092915050565b6000604082840312156137fc57600080fd5b6138046136af565b9050813567ffffffffffffffff81111561381d57600080fd5b6138298482850161373b565b8252506020820135602082015292915050565b600060e0823603121561384e57600080fd5b6138566136d8565b61385f83613465565b8152602083013567ffffffffffffffff8082111561387c57600080fd5b613888368387016137ea565b602084015261389960408601613465565b604084015260608501359150808211156138b257600080fd5b506138bf368286016137ea565b6060830152506080830135608082015260a083013560a082015260c083013560c082015280915050919050565b6000808335601e1984360301811261390357600080fd5b83018035915067ffffffffffffffff82111561391e57600080fd5b60200191503681900382131561340757600080fd5b634e487b7160e01b600052601160045260246000fd5b6000600019820361395c5761395c613933565b5060010190565b60008235603e1983360301811261397957600080fd5b90910192915050565b634e487b7160e01b600052602160045260246000fd5b600481106139b657634e487b7160e01b600052602160045260246000fd5b9052565b60006139c68283613963565b604084526139df604085016139da8361372c565b613998565b6020810135601e198236030181126139f657600080fd5b0160208101903567ffffffffffffffff811115613a1257600080fd5b803603821315613a2157600080fd5b60406060860152806080860152808260a0870137600060a082870101526020840135602086015260a0601f19601f8301168601019250505092915050565b60008135613a6c81613450565b6001600160a01b038082168552613a866020850185613963565b915060e06020860152613a9c60e08601836139ba565b91506040840135613aac81613450565b166040850152613abf6060840184613963565b8482036060860152613ad182826139ba565b9150506080830135608085015260a083013560a085015260c083013560c08501528091505092915050565b6020815260006107a06020830184613a5f565b60005b83811015613b2a578181015183820152602001613b12565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351613b6b816017850160208801613b0f565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351613ba8816028840160208801613b0f565b01602801949350505050565b60008151808452613bcc816020860160208601613b0f565b601f01601f19169290920160200192915050565b6020815260006107a06020830184613bb4565b6000815160408452613c09604085018251613998565b6020015160406060850152613c216080850182613bb4565b602093840151949093019390935250919050565b6060815260006001600160a01b03808651166060840152602086015160e06080850152613c66610140850182613bf3565b604088015190921660a08501525060608601518382037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa00160c085015290613cae8183613bf3565b915050608086015160e084015260a086015161010084015260c08601516101208401528281036020840152613ce38186613bb4565b9150506125cf60408301846001600160a01b03169052565b60008235603e1983360301811261365b57600080fd5b6000610559368361373b565b808202811582820484141761055957610559613933565b8082018082111561055957610559613933565b600081613d5657613d56613933565b506000190190565b600060208284031215613d7057600080fd5b6107a08261372c565b8183823760009101908152919050565b60c081526000613d9c60c0830188613a5f565b8281036020840152613dae8188613a5f565b8651604085015260209096015160608401525050608081019290925260a09091015292915050565b8181038181111561055957610559613933565b634e487b7160e01b600052603160045260246000fd5b83815260608101613e136020830185613998565b826040830152949350505050565b600060208284031215613e3357600080fd5b81516107a081613450565b60008060408385031215613e5157600080fd5b8251613e5c81613450565b6020939093015192949293505050565b60006020808385031215613e7f57600080fd5b825167ffffffffffffffff80821115613e9757600080fd5b818501915085601f830112613eab57600080fd5b815181811115613ebd57613ebd613699565b613ecb848260051b016136fb565b818152848101925060069190911b830184019087821115613eeb57600080fd5b928401925b818410156120635760408489031215613f095760008081fd5b613f116136af565b8451613f1c81613450565b81528486015186820152835260409093019291840191613ef0565b634e487b7160e01b600052601260045260246000fd5b600082613f6a57634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215613f8157600080fd5b815180151581146107a057600080fd5b6000825161365b818460208701613b0f56fea26469706673582212204fb4aef3d7226e3c51717ee1c7bd8270f126087fe0a8b6b0ed8c1147686fcfad64736f6c63430008130033", + "devdoc": { + "author": "The Sandbox", + "details": "Main functions are in ExchangeCoreTransferManager is used to execute token transfers", + "events": { + "Cancel(bytes32,(address,((uint8,bytes),uint256),address,((uint8,bytes),uint256),uint256,uint256,uint256))": { + "params": { + "order": "The details of the order being canceled.", + "orderKeyHash": "The hash of the order being canceled." + } + }, + "DefaultFeeReceiverSet(address)": { + "params": { + "newDefaultFeeReceiver": "address that gets the fees" + } + }, + "Initialized(uint8)": { + "details": "Triggered when the contract has been initialized or reinitialized." + }, + "Match(address,bytes32,bytes32,(address,((uint8,bytes),uint256),address,((uint8,bytes),uint256),uint256,uint256,uint256),(address,((uint8,bytes),uint256),address,((uint8,bytes),uint256),uint256,uint256,uint256),(uint256,uint256),uint256,uint256)": { + "params": { + "from": "Address that initiated the match.", + "newFill": "Fill details resulting from the order match.", + "orderKeyHashLeft": "Hash of the left order.", + "orderKeyHashRight": "Hash of the right order.", + "orderLeft": "Details of the left order.", + "orderRight": "Details of the right order.", + "totalFillLeft": "Total fill amount for the left order.", + "totalFillRight": "Total fill amount for the right order." + } + }, + "MatchOrdersLimitSet(uint256)": { + "params": { + "newMatchOrdersLimit": "The new limit for matching orders in one transaction." + } + }, + "OrderValidatorSet(address)": { + "params": { + "contractAddress": "Address of the new OrderValidator contract." + } + }, + "Paused(address)": { + "details": "Emitted when the pause is triggered by `account`." + }, + "ProtocolFeeSet(uint256,uint256)": { + "params": { + "newProtocolFeePrimary": "fee for primary market", + "newProtocolFeeSecondary": "fee for secondary market" + } + }, + "RoleAdminChanged(bytes32,bytes32,bytes32)": { + "details": "Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._" + }, + "RoleGranted(bytes32,address,address)": { + "details": "Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}." + }, + "RoleRevoked(bytes32,address,address)": { + "details": "Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)" + }, + "RoyaltiesRegistrySet(address)": { + "params": { + "newRoyaltiesRegistry": "address of new royalties registry" + } + }, + "TrustedForwarderSet(address,address,address)": { + "params": { + "newTrustedForwarder": "new trusted forwarder", + "oldTrustedForwarder": "old trusted forwarder", + "operator": "the sender of the transaction" + } + }, + "Unpaused(address)": { + "details": "Emitted when the pause is lifted by `account`." + } + }, + "kind": "dev", + "methods": { + "cancel((address,((uint8,bytes),uint256),address,((uint8,bytes),uint256),uint256,uint256,uint256),bytes32)": { + "params": { + "order": "The order to be canceled.", + "orderKeyHash": "Used as a checksum to avoid mistakes in the order values." + } + }, + "constructor": { + "custom:oz-upgrades-unsafe-allow": "constructor", + "details": "This protects the implementation contract from being initialized." + }, + "getRoleAdmin(bytes32)": { + "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." + }, + "getRoleMember(bytes32,uint256)": { + "details": "Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information." + }, + "getRoleMemberCount(bytes32)": { + "details": "Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role." + }, + "getTrustedForwarder()": { + "returns": { + "_0": "return the address of the trusted forwarder" + } + }, + "grantRole(bytes32,address)": { + "details": "Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event." + }, + "hasRole(bytes32,address)": { + "details": "Returns `true` if `account` has been granted `role`." + }, + "initialize(address,address,uint256,uint256,address,address,address,uint256)": { + "params": { + "admin": "The admin user that can grant/revoke roles, etc.", + "newDefaultFeeReceiver": "Market fee receiver.", + "newProtocolFeePrimary": "Protocol fee applied to primary markets.", + "newProtocolFeeSecondary": "Protocol fee applied to secondary markets.", + "newRoyaltiesProvider": "Registry for the different types of royalties.", + "newTrustedForwarder": "Address for the trusted forwarder that will execute meta transactions.", + "orderValidatorAddress": "New OrderValidator contract address." + } + }, + "isTrustedForwarder(address)": { + "params": { + "forwarder": "trusted forwarder address to check" + }, + "returns": { + "_0": "true if the address is the same as the trusted forwarder" + } + }, + "matchOrders(((address,((uint8,bytes),uint256),address,((uint8,bytes),uint256),uint256,uint256,uint256),bytes,(address,((uint8,bytes),uint256),address,((uint8,bytes),uint256),uint256,uint256,uint256),bytes)[])": { + "params": { + "matchedOrders": "A list of left/right orders that match each other." + } + }, + "matchOrdersFrom(address,((address,((uint8,bytes),uint256),address,((uint8,bytes),uint256),uint256,uint256,uint256),bytes,(address,((uint8,bytes),uint256),address,((uint8,bytes),uint256),uint256,uint256,uint256),bytes)[])": { + "details": "This method supports ERC1776 native meta transactions.", + "params": { + "matchedOrders": "A list of left/right orders that match each other.", + "sender": "The original sender of the transaction." + } + }, + "paused()": { + "details": "Returns true if the contract is paused, and false otherwise." + }, + "renounceRole(bytes32,address)": { + "details": "Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event." + }, + "revokeRole(bytes32,address)": { + "details": "Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event." + }, + "setDefaultFeeReceiver(address)": { + "params": { + "newDefaultFeeReceiver": "Address to receive the fees." + } + }, + "setMatchOrdersLimit(uint256)": { + "params": { + "newMatchOrdersLimit": "New value for max orders that can be matched." + } + }, + "setOrderValidatorContract(address)": { + "params": { + "contractAddress": "New OrderValidator contract address." + } + }, + "setProtocolFee(uint256,uint256)": { + "params": { + "newProtocolFeePrimary": "Fee for the primary market.", + "newProtocolFeeSecondary": "Fee for the secondary market." + } + }, + "setRoyaltiesRegistry(address)": { + "params": { + "newRoyaltiesRegistry": "Address of the new royalties registry." + } + }, + "setTrustedForwarder(address)": { + "params": { + "newTrustedForwarder": "The new trusted forwarder address." + } + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}." + } + }, + "stateVariables": { + "ERC1776_OPERATOR_ROLE": { + "return": "Hash for ERC1776_OPERATOR_ROLE.", + "returns": { + "_0": "Hash for ERC1776_OPERATOR_ROLE." + } + }, + "EXCHANGE_ADMIN_ROLE": { + "return": "Hash for EXCHANGE_ADMIN_ROLE.", + "returns": { + "_0": "Hash for EXCHANGE_ADMIN_ROLE." + } + }, + "PAUSER_ROLE": { + "return": "Hash for PAUSER_ROLE.", + "returns": { + "_0": "Hash for PAUSER_ROLE." + } + } + }, + "title": "Exchange contract with meta transactions", + "version": 1 + }, + "userdoc": { + "events": { + "Cancel(bytes32,(address,((uint8,bytes),uint256),address,((uint8,bytes),uint256),uint256,uint256,uint256))": { + "notice": "Event emitted when an order is canceled." + }, + "DefaultFeeReceiverSet(address)": { + "notice": "Emitted when the default fee receiver is updated." + }, + "Match(address,bytes32,bytes32,(address,((uint8,bytes),uint256),address,((uint8,bytes),uint256),uint256,uint256,uint256),(address,((uint8,bytes),uint256),address,((uint8,bytes),uint256),uint256,uint256,uint256),(uint256,uint256),uint256,uint256)": { + "notice": "Event emitted when two orders are matched." + }, + "MatchOrdersLimitSet(uint256)": { + "notice": "Event emitted when the match orders limit is updated." + }, + "OrderValidatorSet(address)": { + "notice": "Event emitted when a new OrderValidator contract is set." + }, + "ProtocolFeeSet(uint256,uint256)": { + "notice": "Emitted when protocol fees are updated." + }, + "TrustedForwarderSet(address,address,address)": { + "notice": "Emitted when a `newTrustedForwarder` is set, replacing the `oldTrustedForwarder`" + } + }, + "kind": "user", + "methods": { + "ERC1776_OPERATOR_ROLE()": { + "notice": "Role for ERC1776 trusted meta transaction contracts (like SAND)." + }, + "EXCHANGE_ADMIN_ROLE()": { + "notice": "Role for business addresses that can change values like fees and royalties." + }, + "PAUSER_ROLE()": { + "notice": "Role for business addresses that can react to emergencies and pause." + }, + "cancel((address,((uint8,bytes),uint256),address,((uint8,bytes),uint256),uint256,uint256,uint256),bytes32)": { + "notice": "Cancel an order." + }, + "defaultFeeReceiver()": { + "notice": "Default receiver of protocol fees" + }, + "getTrustedForwarder()": { + "notice": "return the address of the trusted forwarder" + }, + "initialize(address,address,uint256,uint256,address,address,address,uint256)": { + "notice": "Exchange contract initializer." + }, + "isTrustedForwarder(address)": { + "notice": "return true if the forwarder is the trusted forwarder" + }, + "matchOrders(((address,((uint8,bytes),uint256),address,((uint8,bytes),uint256),uint256,uint256,uint256),bytes,(address,((uint8,bytes),uint256),address,((uint8,bytes),uint256),uint256,uint256,uint256),bytes)[])": { + "notice": "Match orders and transact." + }, + "matchOrdersFrom(address,((address,((uint8,bytes),uint256),address,((uint8,bytes),uint256),uint256,uint256,uint256),bytes,(address,((uint8,bytes),uint256),address,((uint8,bytes),uint256),uint256,uint256,uint256),bytes)[])": { + "notice": "Match orders and transact." + }, + "pause()": { + "notice": "Pause the contract operations." + }, + "protocolFeePrimary()": { + "notice": "Fee applied to primary sales." + }, + "protocolFeeSecondary()": { + "notice": "Fee applied to secondary sales." + }, + "royaltiesRegistry()": { + "notice": "Registry for the different royalties" + }, + "setDefaultFeeReceiver(address)": { + "notice": "Set the default fee receiver." + }, + "setMatchOrdersLimit(uint256)": { + "notice": "Set the limit for matching orders." + }, + "setOrderValidatorContract(address)": { + "notice": "Set the OrderValidator address." + }, + "setProtocolFee(uint256,uint256)": { + "notice": "Set the protocol fees." + }, + "setRoyaltiesRegistry(address)": { + "notice": "Set the royalty registry." + }, + "setTrustedForwarder(address)": { + "notice": "Change the address of the trusted forwarder for meta-transactions." + }, + "unpause()": { + "notice": "Resume the contract operations." + } + }, + "notice": "Used to exchange assets, that is, tokens.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 783, + "contract": "@sandbox-smart-contracts/marketplace/contracts/Exchange.sol:Exchange", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 786, + "contract": "@sandbox-smart-contracts/marketplace/contracts/Exchange.sol:Exchange", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 2171, + "contract": "@sandbox-smart-contracts/marketplace/contracts/Exchange.sol:Exchange", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 3390, + "contract": "@sandbox-smart-contracts/marketplace/contracts/Exchange.sol:Exchange", + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 211, + "contract": "@sandbox-smart-contracts/marketplace/contracts/Exchange.sol:Exchange", + "label": "_roles", + "offset": 0, + "slot": "101", + "type": "t_mapping(t_bytes32,t_struct(RoleData)206_storage)" + }, + { + "astId": 506, + "contract": "@sandbox-smart-contracts/marketplace/contracts/Exchange.sol:Exchange", + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 60, + "contract": "@sandbox-smart-contracts/marketplace/contracts/Exchange.sol:Exchange", + "label": "_roleMembers", + "offset": 0, + "slot": "151", + "type": "t_mapping(t_bytes32,t_struct(AddressSet)4700_storage)" + }, + { + "astId": 170, + "contract": "@sandbox-smart-contracts/marketplace/contracts/Exchange.sol:Exchange", + "label": "__gap", + "offset": 0, + "slot": "152", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 5632, + "contract": "@sandbox-smart-contracts/marketplace/contracts/Exchange.sol:Exchange", + "label": "orderValidator", + "offset": 0, + "slot": "201", + "type": "t_contract(IOrderValidator)8328" + }, + { + "astId": 5635, + "contract": "@sandbox-smart-contracts/marketplace/contracts/Exchange.sol:Exchange", + "label": "matchOrdersLimit", + "offset": 0, + "slot": "202", + "type": "t_uint256" + }, + { + "astId": 5640, + "contract": "@sandbox-smart-contracts/marketplace/contracts/Exchange.sol:Exchange", + "label": "fills", + "offset": 0, + "slot": "203", + "type": "t_mapping(t_bytes32,t_uint256)" + }, + { + "astId": 6174, + "contract": "@sandbox-smart-contracts/marketplace/contracts/Exchange.sol:Exchange", + "label": "__gap", + "offset": 0, + "slot": "204", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 7295, + "contract": "@sandbox-smart-contracts/marketplace/contracts/Exchange.sol:Exchange", + "label": "protocolFeePrimary", + "offset": 0, + "slot": "253", + "type": "t_uint256" + }, + { + "astId": 7298, + "contract": "@sandbox-smart-contracts/marketplace/contracts/Exchange.sol:Exchange", + "label": "protocolFeeSecondary", + "offset": 0, + "slot": "254", + "type": "t_uint256" + }, + { + "astId": 7302, + "contract": "@sandbox-smart-contracts/marketplace/contracts/Exchange.sol:Exchange", + "label": "royaltiesRegistry", + "offset": 0, + "slot": "255", + "type": "t_contract(IRoyaltiesProvider)8352" + }, + { + "astId": 7305, + "contract": "@sandbox-smart-contracts/marketplace/contracts/Exchange.sol:Exchange", + "label": "defaultFeeReceiver", + "offset": 0, + "slot": "256", + "type": "t_address" + }, + { + "astId": 7989, + "contract": "@sandbox-smart-contracts/marketplace/contracts/Exchange.sol:Exchange", + "label": "__gap", + "offset": 0, + "slot": "257", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 5114, + "contract": "@sandbox-smart-contracts/marketplace/contracts/Exchange.sol:Exchange", + "label": "_trustedForwarder", + "offset": 0, + "slot": "307", + "type": "t_address" + }, + { + "astId": 5225, + "contract": "@sandbox-smart-contracts/marketplace/contracts/Exchange.sol:Exchange", + "label": "__gap", + "offset": 0, + "slot": "308", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 966, + "contract": "@sandbox-smart-contracts/marketplace/contracts/Exchange.sol:Exchange", + "label": "_paused", + "offset": 0, + "slot": "357", + "type": "t_bool" + }, + { + "astId": 1071, + "contract": "@sandbox-smart-contracts/marketplace/contracts/Exchange.sol:Exchange", + "label": "__gap", + "offset": 0, + "slot": "358", + "type": "t_array(t_uint256)49_storage" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(IOrderValidator)8328": { + "encoding": "inplace", + "label": "contract IOrderValidator", + "numberOfBytes": "20" + }, + "t_contract(IRoyaltiesProvider)8352": { + "encoding": "inplace", + "label": "contract IRoyaltiesProvider", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_bytes32,t_struct(AddressSet)4700_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct EnumerableSetUpgradeable.AddressSet)", + "numberOfBytes": "32", + "value": "t_struct(AddressSet)4700_storage" + }, + "t_mapping(t_bytes32,t_struct(RoleData)206_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32", + "value": "t_struct(RoleData)206_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_struct(AddressSet)4700_storage": { + "encoding": "inplace", + "label": "struct EnumerableSetUpgradeable.AddressSet", + "members": [ + { + "astId": 4699, + "contract": "@sandbox-smart-contracts/marketplace/contracts/Exchange.sol:Exchange", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)4385_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(RoleData)206_storage": { + "encoding": "inplace", + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "astId": 203, + "contract": "@sandbox-smart-contracts/marketplace/contracts/Exchange.sol:Exchange", + "label": "members", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 205, + "contract": "@sandbox-smart-contracts/marketplace/contracts/Exchange.sol:Exchange", + "label": "adminRole", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)4385_storage": { + "encoding": "inplace", + "label": "struct EnumerableSetUpgradeable.Set", + "members": [ + { + "astId": 4380, + "contract": "@sandbox-smart-contracts/marketplace/contracts/Exchange.sol:Exchange", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 4384, + "contract": "@sandbox-smart-contracts/marketplace/contracts/Exchange.sol:Exchange", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/packages/deploy/deployments/mumbai/Exchange_Proxy.json b/packages/deploy/deployments/mumbai/Exchange_Proxy.json new file mode 100644 index 0000000000..d3481cb89a --- /dev/null +++ b/packages/deploy/deployments/mumbai/Exchange_Proxy.json @@ -0,0 +1,358 @@ +{ + "address": "0x63c583F540aC452A8D35888D0988832001c09444", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "admin_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "admin_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "changeAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x4ce31e6adb238ec8d4d5ae8baff49f75aa7c60df639245fd9f51421bcfc51b27", + "receipt": { + "to": null, + "from": "0x5F890c9522dCE5670d741D4277BFCC2d9cA8Af02", + "contractAddress": "0x63c583F540aC452A8D35888D0988832001c09444", + "transactionIndex": 6, + "gasUsed": "993873", + "logsBloom": "0x00080004000000000000008000080000400000000000000000000080020000000102000002008400000000000001000000009000000000000400000000000000400000000000080000000004000002808000000000080000000100080000008000000100020000000000020200004800000002800800000080000000000000004000011840000000000200000000000000000000200080000000000000a00000200000000000000000000000000400000000000000000000001000000000004000000020800002000401000000040004000000000410000100108006000820002000000000000080000000000000000004000000000080004000020000180000", + "blockHash": "0xa91cea759465b4d2d97f414299f8f6921491e4f8ffa08aa72b51d5fc1aa6fb4f", + "transactionHash": "0x4ce31e6adb238ec8d4d5ae8baff49f75aa7c60df639245fd9f51421bcfc51b27", + "logs": [ + { + "transactionIndex": 6, + "blockNumber": 42631864, + "transactionHash": "0x4ce31e6adb238ec8d4d5ae8baff49f75aa7c60df639245fd9f51421bcfc51b27", + "address": "0x63c583F540aC452A8D35888D0988832001c09444", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000d7b0efa0ef34c25e90d914b167a159854c59a2c9" + ], + "data": "0x", + "logIndex": 28, + "blockHash": "0xa91cea759465b4d2d97f414299f8f6921491e4f8ffa08aa72b51d5fc1aa6fb4f" + }, + { + "transactionIndex": 6, + "blockNumber": 42631864, + "transactionHash": "0x4ce31e6adb238ec8d4d5ae8baff49f75aa7c60df639245fd9f51421bcfc51b27", + "address": "0x63c583F540aC452A8D35888D0988832001c09444", + "topics": [ + "0x8ca022029d8ff7ad974913f8970aeed6c5e0e7eaf494a0c5b262249f6b5759e5", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000069015912aa33720b842dcd6ac059ed623f28d9f7", + "0x0000000000000000000000005f890c9522dce5670d741d4277bfcc2d9ca8af02" + ], + "data": "0x", + "logIndex": 29, + "blockHash": "0xa91cea759465b4d2d97f414299f8f6921491e4f8ffa08aa72b51d5fc1aa6fb4f" + }, + { + "transactionIndex": 6, + "blockNumber": 42631864, + "transactionHash": "0x4ce31e6adb238ec8d4d5ae8baff49f75aa7c60df639245fd9f51421bcfc51b27", + "address": "0x63c583F540aC452A8D35888D0988832001c09444", + "topics": [ + "0xfa4067f2d0249edb7594284cabb394f2ec0e4f6168dbd1e3a63f861b67f1188f", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000000000000000000000000000000000000000000fa" + ], + "data": "0x", + "logIndex": 30, + "blockHash": "0xa91cea759465b4d2d97f414299f8f6921491e4f8ffa08aa72b51d5fc1aa6fb4f" + }, + { + "transactionIndex": 6, + "blockNumber": 42631864, + "transactionHash": "0x4ce31e6adb238ec8d4d5ae8baff49f75aa7c60df639245fd9f51421bcfc51b27", + "address": "0x63c583F540aC452A8D35888D0988832001c09444", + "topics": [ + "0x5d039c612419cd7b6696e7d5c8ccaef3362188cc98db01e07fb55bb85b33541d", + "0x000000000000000000000000c66d094ed928f7840a6b0d373c1cd825c97e3c7c" + ], + "data": "0x", + "logIndex": 31, + "blockHash": "0xa91cea759465b4d2d97f414299f8f6921491e4f8ffa08aa72b51d5fc1aa6fb4f" + }, + { + "transactionIndex": 6, + "blockNumber": 42631864, + "transactionHash": "0x4ce31e6adb238ec8d4d5ae8baff49f75aa7c60df639245fd9f51421bcfc51b27", + "address": "0x63c583F540aC452A8D35888D0988832001c09444", + "topics": [ + "0x6932f02a24181a8c1b9fa7bdc7453f15ecba05c354c9da94e97bac1abb133978", + "0x0000000000000000000000009473a3b21fe192b491cdba305a9b143e06d903a0" + ], + "data": "0x", + "logIndex": 32, + "blockHash": "0xa91cea759465b4d2d97f414299f8f6921491e4f8ffa08aa72b51d5fc1aa6fb4f" + }, + { + "transactionIndex": 6, + "blockNumber": 42631864, + "transactionHash": "0x4ce31e6adb238ec8d4d5ae8baff49f75aa7c60df639245fd9f51421bcfc51b27", + "address": "0x63c583F540aC452A8D35888D0988832001c09444", + "topics": [ + "0xf605132f819f46ab9f362495c159c83b8a080f3b8b22f8a684018837eae0bed3", + "0x00000000000000000000000056077297c98d81a90c1cc26c13d16884c4b15abf" + ], + "data": "0x", + "logIndex": 33, + "blockHash": "0xa91cea759465b4d2d97f414299f8f6921491e4f8ffa08aa72b51d5fc1aa6fb4f" + }, + { + "transactionIndex": 6, + "blockNumber": 42631864, + "transactionHash": "0x4ce31e6adb238ec8d4d5ae8baff49f75aa7c60df639245fd9f51421bcfc51b27", + "address": "0x63c583F540aC452A8D35888D0988832001c09444", + "topics": [ + "0xa461ccf4a7e6996574f5a69258032896cd5082cf3264467d1b8875a3f98538d7", + "0x0000000000000000000000000000000000000000000000000000000000000032" + ], + "data": "0x", + "logIndex": 34, + "blockHash": "0xa91cea759465b4d2d97f414299f8f6921491e4f8ffa08aa72b51d5fc1aa6fb4f" + }, + { + "transactionIndex": 6, + "blockNumber": 42631864, + "transactionHash": "0x4ce31e6adb238ec8d4d5ae8baff49f75aa7c60df639245fd9f51421bcfc51b27", + "address": "0x63c583F540aC452A8D35888D0988832001c09444", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000049c4d4c94829b9c44052c5f5cb164fc612181165", + "0x0000000000000000000000005f890c9522dce5670d741d4277bfcc2d9ca8af02" + ], + "data": "0x", + "logIndex": 35, + "blockHash": "0xa91cea759465b4d2d97f414299f8f6921491e4f8ffa08aa72b51d5fc1aa6fb4f" + }, + { + "transactionIndex": 6, + "blockNumber": 42631864, + "transactionHash": "0x4ce31e6adb238ec8d4d5ae8baff49f75aa7c60df639245fd9f51421bcfc51b27", + "address": "0x63c583F540aC452A8D35888D0988832001c09444", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 36, + "blockHash": "0xa91cea759465b4d2d97f414299f8f6921491e4f8ffa08aa72b51d5fc1aa6fb4f" + }, + { + "transactionIndex": 6, + "blockNumber": 42631864, + "transactionHash": "0x4ce31e6adb238ec8d4d5ae8baff49f75aa7c60df639245fd9f51421bcfc51b27", + "address": "0x63c583F540aC452A8D35888D0988832001c09444", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045023af7b33994a22740bc51c3ca90a7ed82e124", + "logIndex": 37, + "blockHash": "0xa91cea759465b4d2d97f414299f8f6921491e4f8ffa08aa72b51d5fc1aa6fb4f" + }, + { + "transactionIndex": 6, + "blockNumber": 42631864, + "transactionHash": "0x4ce31e6adb238ec8d4d5ae8baff49f75aa7c60df639245fd9f51421bcfc51b27", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x0000000000000000000000005f890c9522dce5670d741d4277bfcc2d9ca8af02", + "0x0000000000000000000000005082f249cdb2f2c1ee035e4f423c46ea2dab3ab1" + ], + "data": "0x00000000000000000000000000000000000000000000000000054be222acdf0000000000000000000000000000000000000000000000000f2ea9043161f033fc0000000000000000000000000000000000000000000003b78e790e073f83059800000000000000000000000000000000000000000000000f2ea3b84f3f4354fc0000000000000000000000000000000000000000000003b78e7e59e9622fe498", + "logIndex": 38, + "blockHash": "0xa91cea759465b4d2d97f414299f8f6921491e4f8ffa08aa72b51d5fc1aa6fb4f" + } + ], + "blockNumber": 42631864, + "cumulativeGasUsed": "2363571", + "status": 1, + "byzantium": true + }, + "args": [ + "0xd7b0efA0EF34C25e90D914b167A159854C59a2c9", + "0x45023af7B33994a22740Bc51C3Ca90A7Ed82e124", + "0xc36e69e900000000000000000000000049c4d4c94829b9c44052c5f5cb164fc61218116500000000000000000000000069015912aa33720b842dcd6ac059ed623f28d9f7000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fa000000000000000000000000c66d094ed928f7840a6b0d373c1cd825c97e3c7c0000000000000000000000009473a3b21fe192b491cdba305a9b143e06d903a000000000000000000000000056077297c98d81a90c1cc26c13d16884c4b15abf0000000000000000000000000000000000000000000000000000000000000032" + ], + "numDeployments": 1, + "solcInputHash": "0e89febeebc7444140de8e67c9067d2c", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"changeAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \\\"admin cannot fallback to proxy target\\\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\",\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"changeAdmin(address)\":{\"details\":\"Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\"},\"constructor\":{\"details\":\"Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/openzeppelin/proxy/transparent/TransparentUpgradeableProxy.sol\":\"TransparentUpgradeableProxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x93b4e21c931252739a1ec13ea31d3d35a5c068be3163ccab83e4d70c40355f03\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1));\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(Address.isContract(IBeacon(newBeacon).implementation()), \\\"ERC1967: beacon implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x17668652127feebed0ce8d9431ef95ccc8c4292f03e3b8cf06c6ca16af396633\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xd5d1fd16e9faff7fcb3a52e02a8d49156f42a38a03f07b5f1810c21c2149a8ab\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n assert(_ADMIN_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n _changeAdmin(admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\n */\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\n _changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n}\\n\",\"keccak256\":\"0x140055a64cf579d622e04f5a198595832bf2cb193cd0005f4f2d4d61ca906253\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\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 Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\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 require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\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\\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}\\n\",\"keccak256\":\"0x3777e696b62134e6177440dbe6e6601c0c156a443f57167194b67e75527439de\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6080604052604051620011b2380380620011b2833981016040819052620000269162000519565b82816200005560017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd620005f9565b6000805160206200116b833981519152146200007557620000756200061f565b6200008382826000620000e7565b50620000b3905060017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6104620005f9565b6000805160206200114b83398151915214620000d357620000d36200061f565b620000de8262000124565b50505062000688565b620000f2836200017f565b600082511180620001005750805b156200011f576200011d8383620001c160201b620002ff1760201c565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6200014f620001f0565b604080516001600160a01b03928316815291841660208301520160405180910390a16200017c8162000229565b50565b6200018a81620002de565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060620001e983836040518060600160405280602781526020016200118b6027913962000381565b9392505050565b60006200021a6000805160206200114b83398151915260001b6200046760201b620002731760201c565b546001600160a01b0316919050565b6001600160a01b038116620002945760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b80620002bd6000805160206200114b83398151915260001b6200046760201b620002731760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b620002f4816200046a60201b6200032b1760201c565b620003585760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016200028b565b80620002bd6000805160206200116b83398151915260001b6200046760201b620002731760201c565b60606001600160a01b0384163b620003eb5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200028b565b600080856001600160a01b03168560405162000408919062000635565b600060405180830381855af49150503d806000811462000445576040519150601f19603f3d011682016040523d82523d6000602084013e6200044a565b606091505b5090925090506200045d82828662000479565b9695505050505050565b90565b6001600160a01b03163b151590565b606083156200048a575081620001e9565b8251156200049b5782518084602001fd5b8160405162461bcd60e51b81526004016200028b919062000653565b80516001600160a01b0381168114620004cf57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101562000507578181015183820152602001620004ed565b838111156200011d5750506000910152565b6000806000606084860312156200052f57600080fd5b6200053a84620004b7565b92506200054a60208501620004b7565b60408501519092506001600160401b03808211156200056857600080fd5b818601915086601f8301126200057d57600080fd5b815181811115620005925762000592620004d4565b604051601f8201601f19908116603f01168101908382118183101715620005bd57620005bd620004d4565b81604052828152896020848701011115620005d757600080fd5b620005ea836020830160208801620004ea565b80955050505050509250925092565b6000828210156200061a57634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b6000825162000649818460208701620004ea565b9190910192915050565b602081526000825180602084015262000674816040850160208701620004ea565b601f01601f19169190910160400192915050565b610ab380620006986000396000f3fe60806040526004361061005e5760003560e01c80635c60da1b116100435780635c60da1b146100a85780638f283970146100e6578063f851a440146101065761006d565b80633659cfe6146100755780634f1ef286146100955761006d565b3661006d5761006b61011b565b005b61006b61011b565b34801561008157600080fd5b5061006b61009036600461091f565b610135565b61006b6100a336600461093a565b610196565b3480156100b457600080fd5b506100bd610221565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100f257600080fd5b5061006b61010136600461091f565b610276565b34801561011257600080fd5b506100bd6102ba565b610123610347565b61013361012e610435565b61043f565b565b61013d610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561018e5761018b816040518060200160405280600081525060006104a3565b50565b61018b61011b565b61019e610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610219576102148383838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250600192506104a3915050565b505050565b61021461011b565b600061022b610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561026b57610266610435565b905090565b61027361011b565b90565b61027e610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561018e5761018b816104ce565b60006102c4610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561026b57610266610463565b60606103248383604051806060016040528060278152602001610a576027913961052f565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b61034f610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610133576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b6000610266610657565b3660008037600080366000845af43d6000803e80801561045e573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b5473ffffffffffffffffffffffffffffffffffffffff16919050565b6104ac8361067f565b6000825111806104b95750805b15610214576104c883836102ff565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6104f7610463565b6040805173ffffffffffffffffffffffffffffffffffffffff928316815291841660208301520160405180910390a161018b816106cc565b606073ffffffffffffffffffffffffffffffffffffffff84163b6105d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e74726163740000000000000000000000000000000000000000000000000000606482015260840161042c565b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516105fd91906109e9565b600060405180830381855af49150503d8060008114610638576040519150601f19603f3d011682016040523d82523d6000602084013e61063d565b606091505b509150915061064d8282866107d8565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610487565b6106888161082b565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b73ffffffffffffffffffffffffffffffffffffffff811661076f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161042c565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9290921691909117905550565b606083156107e7575081610324565b8251156107f75782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161042c9190610a05565b73ffffffffffffffffffffffffffffffffffffffff81163b6108cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e747261637400000000000000000000000000000000000000606482015260840161042c565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610792565b803573ffffffffffffffffffffffffffffffffffffffff8116811461091a57600080fd5b919050565b60006020828403121561093157600080fd5b610324826108f6565b60008060006040848603121561094f57600080fd5b610958846108f6565b9250602084013567ffffffffffffffff8082111561097557600080fd5b818601915086601f83011261098957600080fd5b81358181111561099857600080fd5b8760208285010111156109aa57600080fd5b6020830194508093505050509250925092565b60005b838110156109d85781810151838201526020016109c0565b838111156104c85750506000910152565b600082516109fb8184602087016109bd565b9190910192915050565b6020815260008251806020840152610a248160408501602087016109bd565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220b29caa54336b3ee836679675e9732ec5e526fb3f803cca2fe336cc3555aba62264736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040526004361061005e5760003560e01c80635c60da1b116100435780635c60da1b146100a85780638f283970146100e6578063f851a440146101065761006d565b80633659cfe6146100755780634f1ef286146100955761006d565b3661006d5761006b61011b565b005b61006b61011b565b34801561008157600080fd5b5061006b61009036600461091f565b610135565b61006b6100a336600461093a565b610196565b3480156100b457600080fd5b506100bd610221565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100f257600080fd5b5061006b61010136600461091f565b610276565b34801561011257600080fd5b506100bd6102ba565b610123610347565b61013361012e610435565b61043f565b565b61013d610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561018e5761018b816040518060200160405280600081525060006104a3565b50565b61018b61011b565b61019e610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610219576102148383838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250600192506104a3915050565b505050565b61021461011b565b600061022b610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561026b57610266610435565b905090565b61027361011b565b90565b61027e610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561018e5761018b816104ce565b60006102c4610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561026b57610266610463565b60606103248383604051806060016040528060278152602001610a576027913961052f565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b61034f610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610133576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b6000610266610657565b3660008037600080366000845af43d6000803e80801561045e573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b5473ffffffffffffffffffffffffffffffffffffffff16919050565b6104ac8361067f565b6000825111806104b95750805b15610214576104c883836102ff565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6104f7610463565b6040805173ffffffffffffffffffffffffffffffffffffffff928316815291841660208301520160405180910390a161018b816106cc565b606073ffffffffffffffffffffffffffffffffffffffff84163b6105d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e74726163740000000000000000000000000000000000000000000000000000606482015260840161042c565b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516105fd91906109e9565b600060405180830381855af49150503d8060008114610638576040519150601f19603f3d011682016040523d82523d6000602084013e61063d565b606091505b509150915061064d8282866107d8565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610487565b6106888161082b565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b73ffffffffffffffffffffffffffffffffffffffff811661076f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161042c565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9290921691909117905550565b606083156107e7575081610324565b8251156107f75782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161042c9190610a05565b73ffffffffffffffffffffffffffffffffffffffff81163b6108cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e747261637400000000000000000000000000000000000000606482015260840161042c565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610792565b803573ffffffffffffffffffffffffffffffffffffffff8116811461091a57600080fd5b919050565b60006020828403121561093157600080fd5b610324826108f6565b60008060006040848603121561094f57600080fd5b610958846108f6565b9250602084013567ffffffffffffffff8082111561097557600080fd5b818601915086601f83011261098957600080fd5b81358181111561099857600080fd5b8760208285010111156109aa57600080fd5b6020830194508093505050509250925092565b60005b838110156109d85781810151838201526020016109c0565b838111156104c85750506000910152565b600082516109fb8184602087016109bd565b9190910192915050565b6020815260008251806020840152610a248160408501602087016109bd565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220b29caa54336b3ee836679675e9732ec5e526fb3f803cca2fe336cc3555aba62264736f6c634300080a0033", + "devdoc": { + "details": "This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \"admin cannot fallback to proxy target\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.", + "kind": "dev", + "methods": { + "admin()": { + "details": "Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`" + }, + "changeAdmin(address)": { + "details": "Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}." + }, + "constructor": { + "details": "Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}." + }, + "implementation()": { + "details": "Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`" + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/packages/deploy/deployments/mumbai/OrderValidator.json b/packages/deploy/deployments/mumbai/OrderValidator.json new file mode 100644 index 0000000000..3396d7afb5 --- /dev/null +++ b/packages/deploy/deployments/mumbai/OrderValidator.json @@ -0,0 +1,917 @@ +{ + "address": "0x56077297C98d81A90c1cc26c13D16884C4b15AbF", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "admin_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "changeAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "RoleDisabled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "RoleEnabled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "WhitelistsDisabled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "WhitelistsEnabled", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ERC20_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PARTNER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "TSB_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "disableRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "disableWhitelists", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "enableRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "enableWhitelists", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "getRoleMember", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleMemberCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "admin", + "type": "address" + }, + { + "internalType": "bytes32[]", + "name": "roles", + "type": "bytes32[]" + }, + { + "internalType": "bool[]", + "name": "permissions", + "type": "bool[]" + }, + { + "internalType": "bool", + "name": "whitelistsEnabled", + "type": "bool" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "isRoleEnabled", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isWhitelistsEnabled", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32[]", + "name": "roles", + "type": "bytes32[]" + }, + { + "internalType": "bool[]", + "name": "permissions", + "type": "bool[]" + } + ], + "name": "setRolesEnabled", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "maker", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "internalType": "enum LibAsset.AssetClass", + "name": "assetClass", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct LibAsset.AssetType", + "name": "assetType", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "internalType": "struct LibAsset.Asset", + "name": "makeAsset", + "type": "tuple" + }, + { + "internalType": "address", + "name": "taker", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "internalType": "enum LibAsset.AssetClass", + "name": "assetClass", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct LibAsset.AssetType", + "name": "assetType", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "internalType": "struct LibAsset.Asset", + "name": "takeAsset", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "start", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "internalType": "struct LibOrder.Order", + "name": "order", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + }, + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "validate", + "outputs": [], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "admin_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0x96ae65f6ba321916734aba4694eb41a696ed2f7737e250565fc729c3918fa426", + "receipt": { + "to": null, + "from": "0x5F890c9522dCE5670d741D4277BFCC2d9cA8Af02", + "contractAddress": "0x56077297C98d81A90c1cc26c13D16884C4b15AbF", + "transactionIndex": 0, + "gasUsed": "900173", + "logsBloom": "0x00000004000000000000000000000000400000000000000000000010000000000002000000008420000000020000000000008000000000000000000000000000000000000000000000000000000002800000000000000010000100000000000000000000020000000000020000000800000000800000000080000000000000040000000000000000000000000000000000000000000080000000000000a0000020000020000001004000000000040000000000000000000000100000000000410000002000000000000100000004000000000000040000010010800000102000000000c000000000000000000000000000000000000000000000000000100000", + "blockHash": "0x59815f6ae38681c7dbee278dca64e361128489e26b96067e4f4bc4ce2330257e", + "transactionHash": "0x96ae65f6ba321916734aba4694eb41a696ed2f7737e250565fc729c3918fa426", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 42631853, + "transactionHash": "0x96ae65f6ba321916734aba4694eb41a696ed2f7737e250565fc729c3918fa426", + "address": "0x56077297C98d81A90c1cc26c13D16884C4b15AbF", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000009a0006b87d1886e30a3eefa780d3e5ca96351938" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x59815f6ae38681c7dbee278dca64e361128489e26b96067e4f4bc4ce2330257e" + }, + { + "transactionIndex": 0, + "blockNumber": 42631853, + "transactionHash": "0x96ae65f6ba321916734aba4694eb41a696ed2f7737e250565fc729c3918fa426", + "address": "0x56077297C98d81A90c1cc26c13D16884C4b15AbF", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000049c4d4c94829b9c44052c5f5cb164fc612181165", + "0x0000000000000000000000005f890c9522dce5670d741d4277bfcc2d9ca8af02" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x59815f6ae38681c7dbee278dca64e361128489e26b96067e4f4bc4ce2330257e" + }, + { + "transactionIndex": 0, + "blockNumber": 42631853, + "transactionHash": "0x96ae65f6ba321916734aba4694eb41a696ed2f7737e250565fc729c3918fa426", + "address": "0x56077297C98d81A90c1cc26c13D16884C4b15AbF", + "topics": [ + "0xd3681855fd5e456dde1e3776a9be32bb29fab90b31bba9fb52bcf27a9bcb444f" + ], + "data": "0x", + "logIndex": 2, + "blockHash": "0x59815f6ae38681c7dbee278dca64e361128489e26b96067e4f4bc4ce2330257e" + }, + { + "transactionIndex": 0, + "blockNumber": 42631853, + "transactionHash": "0x96ae65f6ba321916734aba4694eb41a696ed2f7737e250565fc729c3918fa426", + "address": "0x56077297C98d81A90c1cc26c13D16884C4b15AbF", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 3, + "blockHash": "0x59815f6ae38681c7dbee278dca64e361128489e26b96067e4f4bc4ce2330257e" + }, + { + "transactionIndex": 0, + "blockNumber": 42631853, + "transactionHash": "0x96ae65f6ba321916734aba4694eb41a696ed2f7737e250565fc729c3918fa426", + "address": "0x56077297C98d81A90c1cc26c13D16884C4b15AbF", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045023af7b33994a22740bc51c3ca90a7ed82e124", + "logIndex": 4, + "blockHash": "0x59815f6ae38681c7dbee278dca64e361128489e26b96067e4f4bc4ce2330257e" + }, + { + "transactionIndex": 0, + "blockNumber": 42631853, + "transactionHash": "0x96ae65f6ba321916734aba4694eb41a696ed2f7737e250565fc729c3918fa426", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x0000000000000000000000005f890c9522dce5670d741d4277bfcc2d9ca8af02", + "0x000000000000000000000000f903ba9e006193c1527bfbe65fe2123704ea3f99" + ], + "data": "0x0000000000000000000000000000000000000000000000000007fec1a5c0e50000000000000000000000000000000000000000000000000f2ec8aae1646c37d7000000000000000000000000000000000000000000001212c948dbfb214ee39800000000000000000000000000000000000000000000000f2ec0ac1fbeab52d7000000000000000000000000000000000000000000001212c950dabcc70fc898", + "logIndex": 5, + "blockHash": "0x59815f6ae38681c7dbee278dca64e361128489e26b96067e4f4bc4ce2330257e" + } + ], + "blockNumber": 42631853, + "cumulativeGasUsed": "900173", + "status": 1, + "byzantium": true + }, + "args": [ + "0x9a0006b87d1886e30A3EeFA780D3E5CA96351938", + "0x45023af7B33994a22740Bc51C3Ca90A7Ed82e124", + "0x940bdcc500000000000000000000000049c4d4c94829b9c44052c5f5cb164fc612181165000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000026278160ef7ca8a5eb8e5b274bcc0427c2cc7e12eee2a53c5989a1afb360f64042f049b28665abd79bc83d9aa564dba6b787ac439dba27b48e163a83befa9b260000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + ], + "numDeployments": 1, + "solcInputHash": "0e89febeebc7444140de8e67c9067d2c", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"changeAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \\\"admin cannot fallback to proxy target\\\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\",\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"changeAdmin(address)\":{\"details\":\"Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\"},\"constructor\":{\"details\":\"Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/openzeppelin/proxy/transparent/TransparentUpgradeableProxy.sol\":\"TransparentUpgradeableProxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x93b4e21c931252739a1ec13ea31d3d35a5c068be3163ccab83e4d70c40355f03\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1));\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(Address.isContract(IBeacon(newBeacon).implementation()), \\\"ERC1967: beacon implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x17668652127feebed0ce8d9431ef95ccc8c4292f03e3b8cf06c6ca16af396633\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xd5d1fd16e9faff7fcb3a52e02a8d49156f42a38a03f07b5f1810c21c2149a8ab\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n assert(_ADMIN_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n _changeAdmin(admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\n */\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\n _changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n}\\n\",\"keccak256\":\"0x140055a64cf579d622e04f5a198595832bf2cb193cd0005f4f2d4d61ca906253\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\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 Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\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 require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\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\\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}\\n\",\"keccak256\":\"0x3777e696b62134e6177440dbe6e6601c0c156a443f57167194b67e75527439de\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6080604052604051620011b2380380620011b2833981016040819052620000269162000519565b82816200005560017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd620005f9565b6000805160206200116b833981519152146200007557620000756200061f565b6200008382826000620000e7565b50620000b3905060017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6104620005f9565b6000805160206200114b83398151915214620000d357620000d36200061f565b620000de8262000124565b50505062000688565b620000f2836200017f565b600082511180620001005750805b156200011f576200011d8383620001c160201b620002ff1760201c565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6200014f620001f0565b604080516001600160a01b03928316815291841660208301520160405180910390a16200017c8162000229565b50565b6200018a81620002de565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060620001e983836040518060600160405280602781526020016200118b6027913962000381565b9392505050565b60006200021a6000805160206200114b83398151915260001b6200046760201b620002731760201c565b546001600160a01b0316919050565b6001600160a01b038116620002945760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b80620002bd6000805160206200114b83398151915260001b6200046760201b620002731760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b620002f4816200046a60201b6200032b1760201c565b620003585760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016200028b565b80620002bd6000805160206200116b83398151915260001b6200046760201b620002731760201c565b60606001600160a01b0384163b620003eb5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200028b565b600080856001600160a01b03168560405162000408919062000635565b600060405180830381855af49150503d806000811462000445576040519150601f19603f3d011682016040523d82523d6000602084013e6200044a565b606091505b5090925090506200045d82828662000479565b9695505050505050565b90565b6001600160a01b03163b151590565b606083156200048a575081620001e9565b8251156200049b5782518084602001fd5b8160405162461bcd60e51b81526004016200028b919062000653565b80516001600160a01b0381168114620004cf57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101562000507578181015183820152602001620004ed565b838111156200011d5750506000910152565b6000806000606084860312156200052f57600080fd5b6200053a84620004b7565b92506200054a60208501620004b7565b60408501519092506001600160401b03808211156200056857600080fd5b818601915086601f8301126200057d57600080fd5b815181811115620005925762000592620004d4565b604051601f8201601f19908116603f01168101908382118183101715620005bd57620005bd620004d4565b81604052828152896020848701011115620005d757600080fd5b620005ea836020830160208801620004ea565b80955050505050509250925092565b6000828210156200061a57634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b6000825162000649818460208701620004ea565b9190910192915050565b602081526000825180602084015262000674816040850160208701620004ea565b601f01601f19169190910160400192915050565b610ab380620006986000396000f3fe60806040526004361061005e5760003560e01c80635c60da1b116100435780635c60da1b146100a85780638f283970146100e6578063f851a440146101065761006d565b80633659cfe6146100755780634f1ef286146100955761006d565b3661006d5761006b61011b565b005b61006b61011b565b34801561008157600080fd5b5061006b61009036600461091f565b610135565b61006b6100a336600461093a565b610196565b3480156100b457600080fd5b506100bd610221565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100f257600080fd5b5061006b61010136600461091f565b610276565b34801561011257600080fd5b506100bd6102ba565b610123610347565b61013361012e610435565b61043f565b565b61013d610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561018e5761018b816040518060200160405280600081525060006104a3565b50565b61018b61011b565b61019e610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610219576102148383838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250600192506104a3915050565b505050565b61021461011b565b600061022b610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561026b57610266610435565b905090565b61027361011b565b90565b61027e610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561018e5761018b816104ce565b60006102c4610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561026b57610266610463565b60606103248383604051806060016040528060278152602001610a576027913961052f565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b61034f610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610133576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b6000610266610657565b3660008037600080366000845af43d6000803e80801561045e573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b5473ffffffffffffffffffffffffffffffffffffffff16919050565b6104ac8361067f565b6000825111806104b95750805b15610214576104c883836102ff565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6104f7610463565b6040805173ffffffffffffffffffffffffffffffffffffffff928316815291841660208301520160405180910390a161018b816106cc565b606073ffffffffffffffffffffffffffffffffffffffff84163b6105d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e74726163740000000000000000000000000000000000000000000000000000606482015260840161042c565b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516105fd91906109e9565b600060405180830381855af49150503d8060008114610638576040519150601f19603f3d011682016040523d82523d6000602084013e61063d565b606091505b509150915061064d8282866107d8565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610487565b6106888161082b565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b73ffffffffffffffffffffffffffffffffffffffff811661076f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161042c565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9290921691909117905550565b606083156107e7575081610324565b8251156107f75782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161042c9190610a05565b73ffffffffffffffffffffffffffffffffffffffff81163b6108cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e747261637400000000000000000000000000000000000000606482015260840161042c565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610792565b803573ffffffffffffffffffffffffffffffffffffffff8116811461091a57600080fd5b919050565b60006020828403121561093157600080fd5b610324826108f6565b60008060006040848603121561094f57600080fd5b610958846108f6565b9250602084013567ffffffffffffffff8082111561097557600080fd5b818601915086601f83011261098957600080fd5b81358181111561099857600080fd5b8760208285010111156109aa57600080fd5b6020830194508093505050509250925092565b60005b838110156109d85781810151838201526020016109c0565b838111156104c85750506000910152565b600082516109fb8184602087016109bd565b9190910192915050565b6020815260008251806020840152610a248160408501602087016109bd565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220b29caa54336b3ee836679675e9732ec5e526fb3f803cca2fe336cc3555aba62264736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040526004361061005e5760003560e01c80635c60da1b116100435780635c60da1b146100a85780638f283970146100e6578063f851a440146101065761006d565b80633659cfe6146100755780634f1ef286146100955761006d565b3661006d5761006b61011b565b005b61006b61011b565b34801561008157600080fd5b5061006b61009036600461091f565b610135565b61006b6100a336600461093a565b610196565b3480156100b457600080fd5b506100bd610221565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100f257600080fd5b5061006b61010136600461091f565b610276565b34801561011257600080fd5b506100bd6102ba565b610123610347565b61013361012e610435565b61043f565b565b61013d610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561018e5761018b816040518060200160405280600081525060006104a3565b50565b61018b61011b565b61019e610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610219576102148383838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250600192506104a3915050565b505050565b61021461011b565b600061022b610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561026b57610266610435565b905090565b61027361011b565b90565b61027e610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561018e5761018b816104ce565b60006102c4610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561026b57610266610463565b60606103248383604051806060016040528060278152602001610a576027913961052f565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b61034f610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610133576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b6000610266610657565b3660008037600080366000845af43d6000803e80801561045e573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b5473ffffffffffffffffffffffffffffffffffffffff16919050565b6104ac8361067f565b6000825111806104b95750805b15610214576104c883836102ff565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6104f7610463565b6040805173ffffffffffffffffffffffffffffffffffffffff928316815291841660208301520160405180910390a161018b816106cc565b606073ffffffffffffffffffffffffffffffffffffffff84163b6105d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e74726163740000000000000000000000000000000000000000000000000000606482015260840161042c565b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516105fd91906109e9565b600060405180830381855af49150503d8060008114610638576040519150601f19603f3d011682016040523d82523d6000602084013e61063d565b606091505b509150915061064d8282866107d8565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610487565b6106888161082b565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b73ffffffffffffffffffffffffffffffffffffffff811661076f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161042c565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9290921691909117905550565b606083156107e7575081610324565b8251156107f75782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161042c9190610a05565b73ffffffffffffffffffffffffffffffffffffffff81163b6108cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e747261637400000000000000000000000000000000000000606482015260840161042c565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610792565b803573ffffffffffffffffffffffffffffffffffffffff8116811461091a57600080fd5b919050565b60006020828403121561093157600080fd5b610324826108f6565b60008060006040848603121561094f57600080fd5b610958846108f6565b9250602084013567ffffffffffffffff8082111561097557600080fd5b818601915086601f83011261098957600080fd5b81358181111561099857600080fd5b8760208285010111156109aa57600080fd5b6020830194508093505050509250925092565b60005b838110156109d85781810151838201526020016109c0565b838111156104c85750506000910152565b600082516109fb8184602087016109bd565b9190910192915050565b6020815260008251806020840152610a248160408501602087016109bd565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220b29caa54336b3ee836679675e9732ec5e526fb3f803cca2fe336cc3555aba62264736f6c634300080a0033", + "execute": { + "methodName": "initialize", + "args": [ + "0x49c4D4C94829B9c44052C5f5Cb164Fc612181165", + [ + "0x6278160ef7ca8a5eb8e5b274bcc0427c2cc7e12eee2a53c5989a1afb360f6404", + "0x2f049b28665abd79bc83d9aa564dba6b787ac439dba27b48e163a83befa9b260" + ], + [ + false, + false + ], + false + ] + }, + "implementation": "0x9a0006b87d1886e30A3EeFA780D3E5CA96351938", + "devdoc": { + "details": "This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \"admin cannot fallback to proxy target\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.", + "kind": "dev", + "methods": { + "admin()": { + "details": "Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`" + }, + "changeAdmin(address)": { + "details": "Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}." + }, + "constructor": { + "details": "Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}." + }, + "implementation()": { + "details": "Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`" + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/packages/deploy/deployments/mumbai/OrderValidator_Implementation.json b/packages/deploy/deployments/mumbai/OrderValidator_Implementation.json new file mode 100644 index 0000000000..e490df8c19 --- /dev/null +++ b/packages/deploy/deployments/mumbai/OrderValidator_Implementation.json @@ -0,0 +1,1126 @@ +{ + "address": "0x9a0006b87d1886e30A3EeFA780D3E5CA96351938", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "RoleDisabled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "RoleEnabled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "WhitelistsDisabled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "WhitelistsEnabled", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ERC20_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PARTNER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "TSB_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "disableRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "disableWhitelists", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "enableRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "enableWhitelists", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "getRoleMember", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleMemberCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "admin", + "type": "address" + }, + { + "internalType": "bytes32[]", + "name": "roles", + "type": "bytes32[]" + }, + { + "internalType": "bool[]", + "name": "permissions", + "type": "bool[]" + }, + { + "internalType": "bool", + "name": "whitelistsEnabled", + "type": "bool" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "isRoleEnabled", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isWhitelistsEnabled", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32[]", + "name": "roles", + "type": "bytes32[]" + }, + { + "internalType": "bool[]", + "name": "permissions", + "type": "bool[]" + } + ], + "name": "setRolesEnabled", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "maker", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "internalType": "enum LibAsset.AssetClass", + "name": "assetClass", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct LibAsset.AssetType", + "name": "assetType", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "internalType": "struct LibAsset.Asset", + "name": "makeAsset", + "type": "tuple" + }, + { + "internalType": "address", + "name": "taker", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "internalType": "enum LibAsset.AssetClass", + "name": "assetClass", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct LibAsset.AssetType", + "name": "assetType", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "internalType": "struct LibAsset.Asset", + "name": "takeAsset", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "start", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "internalType": "struct LibOrder.Order", + "name": "order", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + }, + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "validate", + "outputs": [], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x87b212617d37eaaa186440aefd2ca9f3175ad1026db27584aa086339fd942e7c", + "receipt": { + "to": null, + "from": "0x5F890c9522dCE5670d741D4277BFCC2d9cA8Af02", + "contractAddress": "0x9a0006b87d1886e30A3EeFA780D3E5CA96351938", + "transactionIndex": 2, + "gasUsed": "2291517", + "logsBloom": "0x00000000000000000000000200000000000000000000000000000010000000000002000000000020000000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000080000000000000200000200000000000000000000000000400000080000000000000000000000000004000000000000000000001000000040000000000000000000000108000001000000000000000000000000000000000000000200000000000000000000000100000", + "blockHash": "0x82e97b2dcc2d62c93c21aa1bd9f0ff755751bb9785b3f6c68fe595aabf1e297d", + "transactionHash": "0x87b212617d37eaaa186440aefd2ca9f3175ad1026db27584aa086339fd942e7c", + "logs": [ + { + "transactionIndex": 2, + "blockNumber": 42631851, + "transactionHash": "0x87b212617d37eaaa186440aefd2ca9f3175ad1026db27584aa086339fd942e7c", + "address": "0x9a0006b87d1886e30A3EeFA780D3E5CA96351938", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", + "logIndex": 12, + "blockHash": "0x82e97b2dcc2d62c93c21aa1bd9f0ff755751bb9785b3f6c68fe595aabf1e297d" + }, + { + "transactionIndex": 2, + "blockNumber": 42631851, + "transactionHash": "0x87b212617d37eaaa186440aefd2ca9f3175ad1026db27584aa086339fd942e7c", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x0000000000000000000000005f890c9522dce5670d741d4277bfcc2d9ca8af02", + "0x000000000000000000000000f903ba9e006193c1527bfbe65fe2123704ea3f99" + ], + "data": "0x00000000000000000000000000000000000000000000000000145a4e71f4550000000000000000000000000000000000000000000000000f2edd052fd86d096a000000000000000000000000000000000000000000001212c90266865c1cbd0000000000000000000000000000000000000000000000000f2ec8aae16678b46a000000000000000000000000000000000000000000001212c916c0d4ce111200", + "logIndex": 13, + "blockHash": "0x82e97b2dcc2d62c93c21aa1bd9f0ff755751bb9785b3f6c68fe595aabf1e297d" + } + ], + "blockNumber": 42631851, + "cumulativeGasUsed": "2667139", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "e65e4ae76ce109b65d6560f491fa920e", + "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"EIP712DomainChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"RoleDisabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"RoleEnabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"WhitelistsDisabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"WhitelistsEnabled\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ERC20_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PARTNER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TSB_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"disableRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"disableWhitelists\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"eip712Domain\",\"outputs\":[{\"internalType\":\"bytes1\",\"name\":\"fields\",\"type\":\"bytes1\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"verifyingContract\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"salt\",\"type\":\"bytes32\"},{\"internalType\":\"uint256[]\",\"name\":\"extensions\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"enableRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"enableWhitelists\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRoleMember\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleMemberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"bytes32[]\",\"name\":\"roles\",\"type\":\"bytes32[]\"},{\"internalType\":\"bool[]\",\"name\":\"permissions\",\"type\":\"bool[]\"},{\"internalType\":\"bool\",\"name\":\"whitelistsEnabled\",\"type\":\"bool\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"isRoleEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isWhitelistsEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"roles\",\"type\":\"bytes32[]\"},{\"internalType\":\"bool[]\",\"name\":\"permissions\",\"type\":\"bool[]\"}],\"name\":\"setRolesEnabled\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"maker\",\"type\":\"address\"},{\"components\":[{\"components\":[{\"internalType\":\"enum LibAsset.AssetClass\",\"name\":\"assetClass\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"struct LibAsset.AssetType\",\"name\":\"assetType\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"internalType\":\"struct LibAsset.Asset\",\"name\":\"makeAsset\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"taker\",\"type\":\"address\"},{\"components\":[{\"components\":[{\"internalType\":\"enum LibAsset.AssetClass\",\"name\":\"assetClass\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"struct LibAsset.AssetType\",\"name\":\"assetType\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"internalType\":\"struct LibAsset.Asset\",\"name\":\"takeAsset\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"salt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"start\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"end\",\"type\":\"uint256\"}],\"internalType\":\"struct LibOrder.Order\",\"name\":\"order\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"validate\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"The Sandbox\",\"events\":{\"EIP712DomainChanged()\":{\"details\":\"MAY be emitted to signal that the domain could have changed.\"},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._\"},\"RoleEnabled(bytes32)\":{\"params\":{\"role\":\"Roles whose permissions were enabled\"}},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\"}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\",\"details\":\"Internal mechanism to protect the implementation contract from being initialized.\"},\"disableRole(bytes32)\":{\"params\":{\"role\":\"Identifier of the role to be disabled.\"}},\"eip712Domain()\":{\"details\":\"See {EIP-5267}. _Available since v4.9._\"},\"enableRole(bytes32)\":{\"params\":{\"role\":\"Identifier of the role to be enabled.\"}},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"getRoleMember(bytes32,uint256)\":{\"details\":\"Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.\"},\"getRoleMemberCount(bytes32)\":{\"details\":\"Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"initialize(address,bytes32[],bool[],bool)\":{\"params\":{\"admin\":\"The admin address for the OrderValidator and Whitelist.\",\"permissions\":\"Array of permissions associated with each role.\",\"roles\":\"Array of role identifiers for the Whitelist contract.\",\"whitelistsEnabled\":\"Boolean to indicate if whitelist functionality is enabled.\"}},\"isRoleEnabled(bytes32)\":{\"params\":{\"role\":\"Identifier of the role.\"},\"returns\":{\"_0\":\"True if the role is enabled, false otherwise.\"}},\"isWhitelistsEnabled()\":{\"returns\":{\"_0\":\"True if whitelists are active, false otherwise.\"}},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event.\"},\"setRolesEnabled(bytes32[],bool[])\":{\"params\":{\"permissions\":\"List of booleans indicating the desired status of each role.\",\"roles\":\"List of role identifiers.\"}},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"validate((address,((uint8,bytes),uint256),address,((uint8,bytes),uint256),uint256,uint256,uint256),bytes,address)\":{\"params\":{\"order\":\"The order details to be validated.\",\"sender\":\"Address of the order sender.\",\"signature\":\"The signature associated with the order.\"}}},\"title\":\"OrderValidator\",\"version\":1},\"userdoc\":{\"events\":{\"RoleDisabled(bytes32)\":{\"notice\":\"Emitted when a specific role gets disabled.\"},\"RoleEnabled(bytes32)\":{\"notice\":\"Emitted when a specific role gets enabled.\"},\"WhitelistsDisabled()\":{\"notice\":\"Emitted when all non-ERC20 tokens are allowed in the market.\"},\"WhitelistsEnabled()\":{\"notice\":\"Emitted when only non-ERC20 tokens that are whitelisted can be allowed.\"}},\"kind\":\"user\",\"methods\":{\"ERC20_ROLE()\":{\"notice\":\"Role for ERC20 tokens, enabled all times\"},\"PARTNER_ROLE()\":{\"notice\":\"Role for partner tokens\"},\"TSB_ROLE()\":{\"notice\":\"Role for The Sandbox tokens\"},\"disableRole(bytes32)\":{\"notice\":\"Disable a given role.\"},\"disableWhitelists()\":{\"notice\":\"Deactivate whitelists for all non-ERC20 tokens.\"},\"enableRole(bytes32)\":{\"notice\":\"Enable a given role.\"},\"enableWhitelists()\":{\"notice\":\"Activate whitelists for all non-ERC20 tokens.\"},\"initialize(address,bytes32[],bool[],bool)\":{\"notice\":\"Initializes the OrderValidator contract.\"},\"isRoleEnabled(bytes32)\":{\"notice\":\"Query the status of a given role.\"},\"isWhitelistsEnabled()\":{\"notice\":\"Check the status of the whitelist functionality.\"},\"setRolesEnabled(bytes32[],bool[])\":{\"notice\":\"Enables or disables specific roles.\"},\"validate((address,((uint8,bytes),uint256),address,((uint8,bytes),uint256),uint256,uint256,uint256),bytes,address)\":{\"notice\":\"Validates the given order.\"}},\"notice\":\"Contract for order validation. It validates orders and contains a whitelist of tokens.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"@sandbox-smart-contracts/marketplace/contracts/OrderValidator.sol\":\"OrderValidator\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":2000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlEnumerableUpgradeable.sol\\\";\\nimport \\\"./AccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/structs/EnumerableSetUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\\n */\\nabstract contract AccessControlEnumerableUpgradeable is Initializable, IAccessControlEnumerableUpgradeable, AccessControlUpgradeable {\\n function __AccessControlEnumerable_init() internal onlyInitializing {\\n }\\n\\n function __AccessControlEnumerable_init_unchained() internal onlyInitializing {\\n }\\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;\\n\\n mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private _roleMembers;\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlEnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) {\\n return _roleMembers[role].at(index);\\n }\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) {\\n return _roleMembers[role].length();\\n }\\n\\n /**\\n * @dev Overload {_grantRole} to track enumerable memberships\\n */\\n function _grantRole(bytes32 role, address account) internal virtual override {\\n super._grantRole(role, account);\\n _roleMembers[role].add(account);\\n }\\n\\n /**\\n * @dev Overload {_revokeRole} to track enumerable memberships\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual override {\\n super._revokeRole(role, account);\\n _roleMembers[role].remove(account);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xc2dfd6ba9449f61b6b03b262182faf302f093a8c05dd10792aeecb4ed1663c0c\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```solidity\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```solidity\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}\\n * to enforce additional security measures for this role.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\\n function __AccessControl_init() internal onlyInitializing {\\n }\\n\\n function __AccessControl_init_unchained() internal onlyInitializing {\\n }\\n struct RoleData {\\n mapping(address => bool) members;\\n bytes32 adminRole;\\n }\\n\\n mapping(bytes32 => RoleData) private _roles;\\n\\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n /**\\n * @dev Modifier that checks that an account has a specific role. Reverts\\n * with a standardized message including the required role.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n *\\n * _Available since v4.1._\\n */\\n modifier onlyRole(bytes32 role) {\\n _checkRole(role);\\n _;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlUpgradeable).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\n return _roles[role].members[account];\\n }\\n\\n /**\\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\\n * Overriding this function changes the behavior of the {onlyRole} modifier.\\n *\\n * Format of the revert message is described in {_checkRole}.\\n *\\n * _Available since v4.6._\\n */\\n function _checkRole(bytes32 role) internal view virtual {\\n _checkRole(role, _msgSender());\\n }\\n\\n /**\\n * @dev Revert with a standard message if `account` is missing `role`.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n */\\n function _checkRole(bytes32 role, address account) internal view virtual {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n StringsUpgradeable.toHexString(account),\\n \\\" is missing role \\\",\\n StringsUpgradeable.toHexString(uint256(role), 32)\\n )\\n )\\n );\\n }\\n }\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {\\n return _roles[role].adminRole;\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been revoked `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function renounceRole(bytes32 role, address account) public virtual override {\\n require(account == _msgSender(), \\\"AccessControl: can only renounce roles for self\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event. Note that unlike {grantRole}, this function doesn't perform any\\n * checks on the calling account.\\n *\\n * May emit a {RoleGranted} event.\\n *\\n * [WARNING]\\n * ====\\n * This function should only be called from the constructor when setting\\n * up the initial roles for the system.\\n *\\n * Using this function in any other way is effectively circumventing the admin\\n * system imposed by {AccessControl}.\\n * ====\\n *\\n * NOTE: This function is deprecated in favor of {_grantRole}.\\n */\\n function _setupRole(bytes32 role, address account) internal virtual {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Sets `adminRole` as ``role``'s admin role.\\n *\\n * Emits a {RoleAdminChanged} event.\\n */\\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\\n bytes32 previousAdminRole = getRoleAdmin(role);\\n _roles[role].adminRole = adminRole;\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function _grantRole(bytes32 role, address account) internal virtual {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xfeefb24d068524440e1ba885efdf105d91f83504af3c2d745ffacc4595396831\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlEnumerableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\n\\n/**\\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\\n */\\ninterface IAccessControlEnumerableUpgradeable is IAccessControlUpgradeable {\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) external view returns (address);\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x7acbc538aad6eb4614e26612a8c5c0149bb8808db95e2638d245a8365f63e572\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControlUpgradeable {\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {AccessControl-_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) external view returns (bool);\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) external;\\n}\\n\",\"keccak256\":\"0xb8f5302f12138c5561362e88a78d061573e6298b7a1a5afe84a1e2c8d4d5aeaa\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/interfaces/IERC1271Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1271.sol)\\n\\npragma solidity ^0.8.0;\\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 IERC1271Upgradeable {\\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\",\"keccak256\":\"0x4473c09c087ee1a48c5547b23799c0474b2e08cde6fec5921c628171c4ebcdc0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/interfaces/IERC5267Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC5267.sol)\\n\\npragma solidity ^0.8.0;\\n\\ninterface IERC5267Upgradeable {\\n /**\\n * @dev MAY be emitted to signal that the domain could have changed.\\n */\\n event EIP712DomainChanged();\\n\\n /**\\n * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712\\n * signature.\\n */\\n function eip712Domain()\\n external\\n view\\n returns (\\n bytes1 fields,\\n string memory name,\\n string memory version,\\n uint256 chainId,\\n address verifyingContract,\\n bytes32 salt,\\n uint256[] memory extensions\\n );\\n}\\n\",\"keccak256\":\"0xe562dab443278837fa50faddb76743399e942181881db8dccaea3bd1712994db\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\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 Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\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 /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\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\",\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal onlyInitializing {\\n }\\n\\n function __Context_init_unchained() internal onlyInitializing {\\n }\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/MathUpgradeable.sol\\\";\\nimport \\\"./math/SignedMathUpgradeable.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\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 = MathUpgradeable.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 `int256` to its ASCII `string` decimal representation.\\n */\\n function toString(int256 value) internal pure returns (string memory) {\\n return string(abi.encodePacked(value < 0 ? \\\"-\\\" : \\\"\\\", toString(SignedMathUpgradeable.abs(value))));\\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, MathUpgradeable.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 /**\\n * @dev Returns true if the two strings are equal.\\n */\\n function equal(string memory a, string memory b) internal pure returns (bool) {\\n return keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0xb96dc79b65b7c37937919dcdb356a969ce0aa2e8338322bf4dc027a3c9c9a7eb\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../StringsUpgradeable.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 ECDSAUpgradeable {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV // Deprecated in v4.8\\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 }\\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 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 /// @solidity memory-safe-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 {\\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 \\u00f7 2 + 1, and for v in (302): v \\u2208 {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\\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 message) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore(0x00, \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\")\\n mstore(0x1c, hash)\\n message := keccak256(0x00, 0x3c)\\n }\\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\\\", StringsUpgradeable.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 data) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, \\\"\\\\x19\\\\x01\\\")\\n mstore(add(ptr, 0x02), domainSeparator)\\n mstore(add(ptr, 0x22), structHash)\\n data := keccak256(ptr, 0x42)\\n }\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Data with intended validator, created from a\\n * `validator` and `data` according to the version 0 of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x00\\\", validator, data));\\n }\\n}\\n\",\"keccak256\":\"0xa014f65d84b02827055d99993ccdbfb4b56b2c9e91eb278d82a93330659d06e4\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/EIP712.sol)\\n\\npragma solidity ^0.8.8;\\n\\nimport \\\"./ECDSAUpgradeable.sol\\\";\\nimport \\\"../../interfaces/IERC5267Upgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.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 * NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain\\n * separator of the implementation contract. This will cause the `_domainSeparatorV4` function to always rebuild the\\n * separator from the immutable values, which is cheaper than accessing a cached version in cold storage.\\n *\\n * _Available since v3.4._\\n *\\n * @custom:storage-size 52\\n */\\nabstract contract EIP712Upgradeable is Initializable, IERC5267Upgradeable {\\n bytes32 private constant _TYPE_HASH =\\n keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n\\n /// @custom:oz-renamed-from _HASHED_NAME\\n bytes32 private _hashedName;\\n /// @custom:oz-renamed-from _HASHED_VERSION\\n bytes32 private _hashedVersion;\\n\\n string private _name;\\n string private _version;\\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 function __EIP712_init(string memory name, string memory version) internal onlyInitializing {\\n __EIP712_init_unchained(name, version);\\n }\\n\\n function __EIP712_init_unchained(string memory name, string memory version) internal onlyInitializing {\\n _name = name;\\n _version = version;\\n\\n // Reset prior values in storage if upgrading\\n _hashedName = 0;\\n _hashedVersion = 0;\\n }\\n\\n /**\\n * @dev Returns the domain separator for the current chain.\\n */\\n function _domainSeparatorV4() internal view returns (bytes32) {\\n return _buildDomainSeparator();\\n }\\n\\n function _buildDomainSeparator() private view returns (bytes32) {\\n return keccak256(abi.encode(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash(), 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 ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4(), structHash);\\n }\\n\\n /**\\n * @dev See {EIP-5267}.\\n *\\n * _Available since v4.9._\\n */\\n function eip712Domain()\\n public\\n view\\n virtual\\n override\\n returns (\\n bytes1 fields,\\n string memory name,\\n string memory version,\\n uint256 chainId,\\n address verifyingContract,\\n bytes32 salt,\\n uint256[] memory extensions\\n )\\n {\\n // If the hashed name and version in storage are non-zero, the contract hasn't been properly initialized\\n // and the EIP712 domain is not reliable, as it will be missing name and version.\\n require(_hashedName == 0 && _hashedVersion == 0, \\\"EIP712: Uninitialized\\\");\\n\\n return (\\n hex\\\"0f\\\", // 01111\\n _EIP712Name(),\\n _EIP712Version(),\\n block.chainid,\\n address(this),\\n bytes32(0),\\n new uint256[](0)\\n );\\n }\\n\\n /**\\n * @dev The name parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712Name() internal virtual view returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev The version parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712Version() internal virtual view returns (string memory) {\\n return _version;\\n }\\n\\n /**\\n * @dev The hash of the name parameter for the EIP712 domain.\\n *\\n * NOTE: In previous versions this function was virtual. In this version you should override `_EIP712Name` instead.\\n */\\n function _EIP712NameHash() internal view returns (bytes32) {\\n string memory name = _EIP712Name();\\n if (bytes(name).length > 0) {\\n return keccak256(bytes(name));\\n } else {\\n // If the name is empty, the contract may have been upgraded without initializing the new storage.\\n // We return the name hash in storage if non-zero, otherwise we assume the name is empty by design.\\n bytes32 hashedName = _hashedName;\\n if (hashedName != 0) {\\n return hashedName;\\n } else {\\n return keccak256(\\\"\\\");\\n }\\n }\\n }\\n\\n /**\\n * @dev The hash of the version parameter for the EIP712 domain.\\n *\\n * NOTE: In previous versions this function was virtual. In this version you should override `_EIP712Version` instead.\\n */\\n function _EIP712VersionHash() internal view returns (bytes32) {\\n string memory version = _EIP712Version();\\n if (bytes(version).length > 0) {\\n return keccak256(bytes(version));\\n } else {\\n // If the version is empty, the contract may have been upgraded without initializing the new storage.\\n // We return the version hash in storage if non-zero, otherwise we assume the version is empty by design.\\n bytes32 hashedVersion = _hashedVersion;\\n if (hashedVersion != 0) {\\n return hashedVersion;\\n } else {\\n return keccak256(\\\"\\\");\\n }\\n }\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[48] private __gap;\\n}\\n\",\"keccak256\":\"0xeb8d6be406a373771724922eb41b5d593bc8e2dc705daa22cd1145cfc8f5a3a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/SignatureCheckerUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/SignatureChecker.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ECDSAUpgradeable.sol\\\";\\nimport \\\"../../interfaces/IERC1271Upgradeable.sol\\\";\\n\\n/**\\n * @dev Signature verification helper that can be used instead of `ECDSA.recover` to seamlessly support both ECDSA\\n * signatures from externally owned accounts (EOAs) as well as ERC1271 signatures from smart contract wallets like\\n * Argent and Gnosis Safe.\\n *\\n * _Available since v4.1._\\n */\\nlibrary SignatureCheckerUpgradeable {\\n /**\\n * @dev Checks if a signature is valid for a given signer and data hash. If the signer is a smart contract, the\\n * signature is validated against that smart contract using ERC1271, otherwise it's validated using `ECDSA.recover`.\\n *\\n * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus\\n * change through time. It could return true at block N and false at block N+1 (or the opposite).\\n */\\n function isValidSignatureNow(address signer, bytes32 hash, bytes memory signature) internal view returns (bool) {\\n (address recovered, ECDSAUpgradeable.RecoverError error) = ECDSAUpgradeable.tryRecover(hash, signature);\\n return\\n (error == ECDSAUpgradeable.RecoverError.NoError && recovered == signer) ||\\n isValidERC1271SignatureNow(signer, hash, signature);\\n }\\n\\n /**\\n * @dev Checks if a signature is valid for a given signer and data hash. The signature is validated\\n * against the signer smart contract using ERC1271.\\n *\\n * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus\\n * change through time. It could return true at block N and false at block N+1 (or the opposite).\\n */\\n function isValidERC1271SignatureNow(\\n address signer,\\n bytes32 hash,\\n bytes memory signature\\n ) internal view returns (bool) {\\n (bool success, bytes memory result) = signer.staticcall(\\n abi.encodeWithSelector(IERC1271Upgradeable.isValidSignature.selector, hash, signature)\\n );\\n return (success &&\\n result.length >= 32 &&\\n abi.decode(result, (bytes32)) == bytes32(IERC1271Upgradeable.isValidSignature.selector));\\n }\\n}\\n\",\"keccak256\":\"0x7c3cbce7cec023937ebbae16ca73e569979b4d63bbcd471f0db6b17d5fc6d1df\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/draft-EIP712.sol)\\n\\npragma solidity ^0.8.0;\\n\\n// EIP-712 is Final as of 2022-08-11. This file is deprecated.\\n\\nimport \\\"./EIP712Upgradeable.sol\\\";\\n\",\"keccak256\":\"0x31a2e227f5653e4b31e0f680857b8842073d083b33df11b3f3b3bb5ddc10526e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165Upgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable {\\n function __ERC165_init() internal onlyInitializing {\\n }\\n\\n function __ERC165_init_unchained() internal onlyInitializing {\\n }\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165Upgradeable).interfaceId;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x9a3b990bd56d139df3e454a9edf1c64668530b5a77fc32eb063bc206f958274a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165Upgradeable {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xc6cef87559d0aeffdf0a99803de655938a7779ec0a3cd5d4383483ad85565a09\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary MathUpgradeable {\\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 // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\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 // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `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 256, 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 << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2bc0007987c229ae7624eb29be6a9b84f6a6a5872f76248b15208b131ea41c4e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/SignedMathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMathUpgradeable {\\n /**\\n * @dev Returns the largest of two signed numbers.\\n */\\n function max(int256 a, int256 b) internal pure returns (int256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two signed numbers.\\n */\\n function min(int256 a, int256 b) internal pure returns (int256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two signed numbers without overflow.\\n * The result is rounded towards zero.\\n */\\n function average(int256 a, int256 b) internal pure returns (int256) {\\n // Formula from the book \\\"Hacker's Delight\\\"\\n int256 x = (a & b) + ((a ^ b) >> 1);\\n return x + (int256(uint256(x) >> 255) & (a ^ b));\\n }\\n\\n /**\\n * @dev Returns the absolute unsigned value of a signed value.\\n */\\n function abs(int256 n) internal pure returns (uint256) {\\n unchecked {\\n // must be unchecked in order to support `n = type(int256).min`\\n return uint256(n >= 0 ? n : -n);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x88f6b7bba3ee33eeb741f9a0f5bc98b6e6e352d0fe4905377bb328590f84095a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSetUpgradeable {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x1c65595a26548a1b2263315b08a56334a2d7087319814437559c3c96025e939f\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/marketplace/contracts/OrderValidator.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.19;\\n\\nimport {LibOrder} from \\\"./libraries/LibOrder.sol\\\";\\nimport {LibAsset} from \\\"./libraries/LibAsset.sol\\\";\\nimport {SignatureCheckerUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/utils/cryptography/SignatureCheckerUpgradeable.sol\\\";\\nimport {EIP712Upgradeable, Initializable} from \\\"@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol\\\";\\nimport {IOrderValidator} from \\\"./interfaces/IOrderValidator.sol\\\";\\nimport {Whitelist} from \\\"./Whitelist.sol\\\";\\n\\n/// @author The Sandbox\\n/// @title OrderValidator\\n/// @notice Contract for order validation. It validates orders and contains a whitelist of tokens.\\ncontract OrderValidator is IOrderValidator, Initializable, EIP712Upgradeable, Whitelist {\\n using SignatureCheckerUpgradeable for address;\\n\\n /// @dev Internal mechanism to protect the implementation contract from being initialized.\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @notice Initializes the OrderValidator contract.\\n /// @param admin The admin address for the OrderValidator and Whitelist.\\n /// @param roles Array of role identifiers for the Whitelist contract.\\n /// @param permissions Array of permissions associated with each role.\\n /// @param whitelistsEnabled Boolean to indicate if whitelist functionality is enabled.\\n function initialize(\\n address admin,\\n bytes32[] calldata roles,\\n bool[] calldata permissions,\\n bool whitelistsEnabled\\n ) external initializer {\\n __EIP712_init_unchained(\\\"The Sandbox Marketplace\\\", \\\"1.0.0\\\");\\n __Whitelist_init(admin, roles, permissions, whitelistsEnabled);\\n }\\n\\n /// @notice Validates the given order.\\n /// @param order The order details to be validated.\\n /// @param signature The signature associated with the order.\\n /// @param sender Address of the order sender.\\n function validate(LibOrder.Order calldata order, bytes memory signature, address sender) external view {\\n require(order.maker != address(0), \\\"no maker\\\");\\n\\n LibOrder.validateOrderTime(order);\\n _verifyWhitelists(order.makeAsset);\\n\\n if (order.salt == 0) {\\n require(sender == order.maker, \\\"maker is not tx sender\\\");\\n // No partial fill, the order is reusable forever\\n return;\\n }\\n\\n if (sender == order.maker) {\\n return;\\n }\\n\\n bytes32 hash = LibOrder.hash(order);\\n\\n require(order.maker.isValidSignatureNow(_hashTypedDataV4(hash), signature), \\\"signature verification error\\\");\\n }\\n\\n /// @notice Verifies if the asset exchange is affected by the whitelist.\\n /// @param asset Details of the asset to be verified.\\n /// @dev If the asset type is ERC20, the ERC20_ROLE is checked.\\n /// @dev if ERC20_ROLE is enabled only tokens that have the role are accepted\\n /// @dev If whitelists are enabled, checks TSB_ROLE and PARTNER_ROLE.\\n function _verifyWhitelists(LibAsset.Asset calldata asset) internal view {\\n address makeToken = LibAsset.decodeAddress(asset.assetType);\\n if (asset.assetType.assetClass == LibAsset.AssetClass.ERC20) {\\n if (!hasRole(ERC20_ROLE, makeToken)) {\\n revert(\\\"payment token not allowed\\\");\\n }\\n } else {\\n if (!isWhitelistsEnabled()) {\\n return;\\n } else if (\\n (isRoleEnabled(TSB_ROLE) && hasRole(TSB_ROLE, makeToken)) ||\\n (isRoleEnabled(PARTNER_ROLE) && hasRole(PARTNER_ROLE, makeToken))\\n ) {\\n return;\\n } else {\\n revert(\\\"not allowed\\\");\\n }\\n }\\n }\\n\\n // slither-disable-next-line unused-state\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x3a9bba13c68fb5539d6fb1d12ae53c1093f917ee3bbf39fde34d16a41cae3d7f\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/marketplace/contracts/Whitelist.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\n\\nimport {Initializable} from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport {AccessControlEnumerableUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol\\\";\\nimport {IWhitelist} from \\\"./interfaces/IWhitelist.sol\\\";\\n\\n/// @author The Sandbox\\n/// @title Whitelist contract\\n/// @dev A contract to control which tokens are accepted in the marketplace.\\ncontract Whitelist is IWhitelist, Initializable, AccessControlEnumerableUpgradeable {\\n /// @notice Role for The Sandbox tokens\\n /// @return Hash for TSB_ROLE\\n bytes32 public constant TSB_ROLE = keccak256(\\\"TSB_ROLE\\\");\\n /// @notice Role for partner tokens\\n /// @return Hash for PARTNER_ROLE\\n bytes32 public constant PARTNER_ROLE = keccak256(\\\"PARTNER_ROLE\\\");\\n /// @notice Role for ERC20 tokens, enabled all times\\n /// @return Hash for ERC20_ROLE\\n bytes32 public constant ERC20_ROLE = keccak256(\\\"ERC20_ROLE\\\");\\n\\n /// @dev Internal mapping to keep track of the enablement status of each role.\\n mapping(bytes32 role => bool isEnabled) private _rolesEnabled;\\n\\n /// @dev Boolean that indicates if non-ERC20 whitelists are enabled or not\\n bool private _whitelistsEnabled;\\n\\n /// @notice Emitted when a specific role gets enabled.\\n /// @param role Roles whose permissions were enabled\\n event RoleEnabled(bytes32 indexed role);\\n\\n /// @notice Emitted when a specific role gets disabled.\\n event RoleDisabled(bytes32 indexed role);\\n\\n /// @notice Emitted when only non-ERC20 tokens that are whitelisted can be allowed.\\n event WhitelistsEnabled();\\n\\n /// @notice Emitted when all non-ERC20 tokens are allowed in the market.\\n event WhitelistsDisabled();\\n\\n /// @dev This protects the implementation contract from being initialized.\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @notice Enables or disables specific roles.\\n /// @param roles List of role identifiers.\\n /// @param permissions List of booleans indicating the desired status of each role.\\n function setRolesEnabled(\\n bytes32[] calldata roles,\\n bool[] calldata permissions\\n ) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n _setRolesEnabled(roles, permissions);\\n }\\n\\n /// @notice Enable a given role.\\n /// @param role Identifier of the role to be enabled.\\n function enableRole(bytes32 role) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n _enableRole(role);\\n }\\n\\n /// @notice Disable a given role.\\n /// @param role Identifier of the role to be disabled.\\n function disableRole(bytes32 role) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n _disableRole(role);\\n }\\n\\n /// @notice Activate whitelists for all non-ERC20 tokens.\\n function enableWhitelists() external onlyRole(DEFAULT_ADMIN_ROLE) {\\n _enableWhitelists();\\n }\\n\\n /// @notice Deactivate whitelists for all non-ERC20 tokens.\\n function disableWhitelists() external onlyRole(DEFAULT_ADMIN_ROLE) {\\n _disableWhitelists();\\n }\\n\\n /// @notice Query the status of a given role.\\n /// @param role Identifier of the role.\\n /// @return True if the role is enabled, false otherwise.\\n function isRoleEnabled(bytes32 role) public view returns (bool) {\\n return _rolesEnabled[role];\\n }\\n\\n /// @notice Check the status of the whitelist functionality.\\n /// @return True if whitelists are active, false otherwise.\\n function isWhitelistsEnabled() public view returns (bool) {\\n return _whitelistsEnabled;\\n }\\n\\n /// @notice Initializer function for the Whitelist contract.\\n /// @param admin Address to be granted the admin role.\\n /// @param roles List of role identifiers.\\n /// @param permissions List of booleans for the initial status of each role.\\n /// @param whitelistsEnabled Initial status of the whitelist functionality.\\n // solhint-disable-next-line func-name-mixedcase\\n function __Whitelist_init(\\n address admin,\\n bytes32[] calldata roles,\\n bool[] calldata permissions,\\n bool whitelistsEnabled\\n ) internal onlyInitializing {\\n __AccessControlEnumerable_init_unchained();\\n _grantRole(DEFAULT_ADMIN_ROLE, admin);\\n _setRolesEnabled(roles, permissions);\\n if (whitelistsEnabled) {\\n _enableWhitelists();\\n } else {\\n _disableWhitelists();\\n }\\n }\\n\\n /// @dev Internal function to set the status of multiple roles.\\n /// @param roles List of role identifiers.\\n /// @param permissions List of desired status for each role.\\n function _setRolesEnabled(bytes32[] memory roles, bool[] memory permissions) internal {\\n require(roles.length == permissions.length, \\\"Mismatched input lengths\\\");\\n for (uint256 i = 0; i < roles.length; ++i) {\\n if (isRoleEnabled(roles[i]) != permissions[i]) {\\n if (permissions[i]) {\\n _enableRole(roles[i]);\\n } else {\\n _disableRole(roles[i]);\\n }\\n }\\n }\\n }\\n\\n /// @dev Internal function to activate a role.\\n /// @param role Identifier of the role to be enabled.\\n function _enableRole(bytes32 role) internal {\\n _rolesEnabled[role] = true;\\n emit RoleEnabled(role);\\n }\\n\\n /// @dev Internal function to deactivate a role.\\n /// @param role Identifier of the role to be disabled.\\n function _disableRole(bytes32 role) internal {\\n _rolesEnabled[role] = false;\\n emit RoleDisabled(role);\\n }\\n\\n /// @dev Internal function to activate the whitelist functionality.\\n function _enableWhitelists() internal {\\n _whitelistsEnabled = true;\\n emit WhitelistsEnabled();\\n }\\n\\n /// @dev Internal function to deactivate the whitelist functionality.\\n function _disableWhitelists() internal {\\n _whitelistsEnabled = false;\\n emit WhitelistsDisabled();\\n }\\n\\n // slither-disable-next-line unused-state\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x54d9a559492e531c2d56c11b15910b4fff3773d93d4b21704818b711bc42f7a5\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/marketplace/contracts/interfaces/IOrderValidator.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.19;\\n\\nimport {LibOrder} from \\\"../libraries/LibOrder.sol\\\";\\n\\n/// @author The Sandbox\\n/// @title OrderValidator contract interface\\n/// @notice Contains the signature for validate, isPurchaseValid and verifyERC20Whitelist functions\\ninterface IOrderValidator {\\n /// @notice Verifies order\\n /// @param order Order to be validated\\n /// @param signature Signature of order\\n /// @param sender Order sender\\n function validate(LibOrder.Order memory order, bytes memory signature, address sender) external view;\\n}\\n\",\"keccak256\":\"0x0b88d05e24a53fe183b4d56c689f0a65199dc7530a0d2548fab8fcfa24efd647\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/marketplace/contracts/interfaces/IWhitelist.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\n\\n/// @author The Sandbox\\n/// @title Interface for the Whitelist contract\\n/// @notice Contains the function signatures for the contract.\\ninterface IWhitelist {\\n /// @notice Check if a specific role is enabled or disabled.\\n /// @param role The role identifier.\\n /// @return True if the role is enabled, false if disabled.\\n function isRoleEnabled(bytes32 role) external view returns (bool);\\n\\n /// @notice Check if whitelists are enabled.\\n /// @return True if whitelists are enabled, false if disabled.\\n function isWhitelistsEnabled() external view returns (bool);\\n\\n /// @notice Setting permissions for tokens.\\n /// @param roles Roles we want to enable or disable.\\n /// @param permissions Boolean.\\n function setRolesEnabled(bytes32[] calldata roles, bool[] calldata permissions) external;\\n\\n /// @notice Enable role.\\n /// @param role Role we want to enable.\\n function enableRole(bytes32 role) external;\\n\\n /// @notice Disable role.\\n /// @param role Role we want to disable.\\n function disableRole(bytes32 role) external;\\n\\n /// @notice Enable whitelists, allowing orders with any token except for ERC20 tokens.\\n function enableWhitelists() external;\\n\\n /// @notice Disable whitelists, requiring orders to refer to the specified whitelists.\\n function disableWhitelists() external;\\n}\\n\",\"keccak256\":\"0x4084c1ad60973c581f6fc796f5e320f032668008196c8792b2b1b43fef0c370a\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/marketplace/contracts/libraries/LibAsset.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.19;\\n\\n/// @author The Sandbox\\n/// @title LibAsset: A library for handling different types of Ethereum assets.\\n/// @notice This library contains structs, enums, and utility functions for managing and processing Ethereum assets.\\nlibrary LibAsset {\\n /// @dev Represents different types of assets on the Ethereum network.\\n enum AssetClass {\\n INVALID, // Represents an invalid asset type.\\n ERC20, // Represents an ERC20 token.\\n ERC721, // Represents a single ERC721 token.\\n ERC1155 // Represents an ERC1155 token.\\n }\\n\\n /// @dev Represents the side of the trade from which a fee should be taken, if any.\\n enum FeeSide {\\n NONE, // No fees are taken.\\n LEFT, // Fees are taken from the left side of the trade.\\n RIGHT // Fees are taken from the right side of the trade.\\n }\\n\\n /// @dev Represents the type of a specific asset.\\n /// AssetType can represent a specific ERC-721 token (defined by the token contract address and tokenId) or\\n /// a specific ERC-20 token (like DAI).\\n struct AssetType {\\n AssetClass assetClass; // The class of the asset (ERC20, ERC721, etc.).\\n bytes data; // Contains the token's contract address and possibly its tokenId.\\n }\\n\\n /// @dev Represents any asset on the Ethereum blockchain with its type and value.\\n struct Asset {\\n AssetType assetType; // The type of the asset.\\n uint256 value; // The amount or value of the asset.\\n }\\n\\n bytes32 internal constant ASSET_TYPE_TYPEHASH = keccak256(\\\"AssetType(uint256 assetClass,bytes data)\\\");\\n\\n bytes32 internal constant ASSET_TYPEHASH =\\n keccak256(\\\"Asset(AssetType assetType,uint256 value)AssetType(uint256 assetClass,bytes data)\\\");\\n\\n /// @notice Determine which side of a trade should bear the fee, based on the asset types.\\n /// @param leftClass The asset class type of the left side of the trade.\\n /// @param rightClass The asset class type of the right side of the trade.\\n /// @return FeeSide representing which side should bear the fee, if any.\\n function getFeeSide(AssetClass leftClass, AssetClass rightClass) internal pure returns (FeeSide) {\\n if (leftClass == AssetClass.ERC20 && rightClass != AssetClass.ERC20) {\\n return FeeSide.LEFT;\\n }\\n if (rightClass == AssetClass.ERC20 && leftClass != AssetClass.ERC20) {\\n return FeeSide.RIGHT;\\n }\\n return FeeSide.NONE;\\n }\\n\\n /// @notice Check if two asset types match.\\n /// @param leftType Asset type on the left side of a trade.\\n /// @param rightType Asset type on the right side of a trade.\\n /// @return AssetType representing the matched asset type.\\n function matchAssets(\\n AssetType calldata leftType,\\n AssetType calldata rightType\\n ) internal pure returns (AssetType memory) {\\n AssetClass classLeft = leftType.assetClass;\\n AssetClass classRight = rightType.assetClass;\\n\\n require(classLeft != AssetClass.INVALID, \\\"invalid left asset class\\\");\\n require(classRight != AssetClass.INVALID, \\\"invalid right asset class\\\");\\n require(classLeft == classRight, \\\"assets don't match\\\");\\n\\n bytes32 leftHash = keccak256(leftType.data);\\n bytes32 rightHash = keccak256(rightType.data);\\n require(leftHash == rightHash, \\\"assets don't match\\\");\\n\\n return leftType;\\n }\\n\\n /// @notice Compute the hash of an asset type.\\n /// @param assetType The asset type to hash.\\n /// @return The hash of the asset type.\\n function hash(AssetType memory assetType) internal pure returns (bytes32) {\\n return keccak256(abi.encode(ASSET_TYPE_TYPEHASH, assetType.assetClass, keccak256(assetType.data)));\\n }\\n\\n /// @notice Compute the hash of an asset.\\n /// @param asset The asset to hash.\\n /// @return The hash of the asset.\\n function hash(Asset memory asset) internal pure returns (bytes32) {\\n return keccak256(abi.encode(ASSET_TYPEHASH, hash(asset.assetType), asset.value));\\n }\\n\\n /// @notice Decode the token details (address and tokenId) from an AssetType.\\n /// @param assetType The asset type to decode.\\n /// @return Address of the token\\n /// @return Id of the token\\n function decodeToken(AssetType memory assetType) internal pure returns (address, uint256) {\\n return abi.decode(assetType.data, (address, uint256));\\n }\\n\\n /// @notice Decode the token address from an AssetType.\\n /// @param assetType The asset type to decode.\\n /// @return The address of the token.\\n function decodeAddress(AssetType memory assetType) internal pure returns (address) {\\n return abi.decode(assetType.data, (address));\\n }\\n}\\n\",\"keccak256\":\"0xe23da99d5ce9a8129f0413a5f650e6a7c8d7a6a46b59fce546b8f19676d81fa2\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/marketplace/contracts/libraries/LibMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.19;\\n\\n/// @author The Sandbox\\n/// @title LibMath: A library for handling specific math operations.\\nlibrary LibMath {\\n uint256 internal constant ACCEPTABLE_RELATIVE_ERROR = 1000;\\n\\n /// @dev Calculates partial value given a numerator and denominator rounded down.\\n /// Reverts if rounding error is >= 0.1%\\n /// @param numerator Numerator.\\n /// @param denominator Denominator.\\n /// @param target Value to calculate partial of.\\n /// @return partialAmount value of target rounded down.\\n function safeGetPartialAmountFloor(\\n uint256 numerator,\\n uint256 denominator,\\n uint256 target\\n ) internal pure returns (uint256 partialAmount) {\\n if (isRoundingErrorFloor(numerator, denominator, target)) {\\n revert(\\\"rounding error\\\");\\n }\\n partialAmount = (numerator * target) / (denominator);\\n }\\n\\n /// @dev Checks if rounding error >= 0.1% when rounding down.\\n /// @param numerator Numerator.\\n /// @param denominator Denominator.\\n /// @param target Value to multiply with numerator/denominator.\\n /// @return isError Rounding error is present.\\n function isRoundingErrorFloor(\\n uint256 numerator,\\n uint256 denominator,\\n uint256 target\\n ) internal pure returns (bool isError) {\\n if (denominator == 0) {\\n revert(\\\"division by zero\\\");\\n }\\n\\n // The absolute rounding error is the difference between the rounded\\n // value and the ideal value. The relative rounding error is the\\n // absolute rounding error divided by the absolute value of the\\n // ideal value. This is undefined when the ideal value is zero.\\n //\\n // The ideal value is `numerator * target / denominator`.\\n // Let's call `numerator * target % denominator` the remainder.\\n // The absolute error is `remainder / denominator`.\\n //\\n // When the ideal value is zero, we require the absolute error to\\n // be zero. Fortunately, this is always the case. The ideal value is\\n // zero iff `numerator == 0` and/or `target == 0`. In this case the\\n // remainder and absolute error are also zero.\\n if (target == 0 || numerator == 0) {\\n return false;\\n }\\n\\n // Otherwise, we want the relative rounding error to be strictly\\n // less than 0.1%.\\n // The relative error is `remainder / (numerator * target)`.\\n // We want the relative error less than 1 / 1000:\\n // remainder / (numerator * target) < 1 / 1000\\n // or equivalently:\\n // 1000 * remainder < numerator * target\\n // so we have a rounding error iff:\\n // 1000 * remainder >= numerator * target\\n uint256 remainder = mulmod(target, numerator, denominator);\\n isError = remainder * ACCEPTABLE_RELATIVE_ERROR >= numerator * target;\\n }\\n}\\n\",\"keccak256\":\"0xa5daa3df082d3f8ff705f9d21f6e7f9fa1caffdc53bd53001e6285c35c58f33a\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/marketplace/contracts/libraries/LibOrder.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.19;\\n\\nimport {LibAsset} from \\\"./LibAsset.sol\\\";\\nimport {LibMath} from \\\"./LibMath.sol\\\";\\n\\n/// @author The Sandbox\\n/// @title Order Handling Library\\n/// @notice Provides tools for constructing, hashing, and validating orders.\\nlibrary LibOrder {\\n bytes32 internal constant ORDER_TYPEHASH =\\n keccak256(\\n \\\"Order(address maker,Asset makeAsset,address taker,Asset takeAsset,uint256 salt,uint256 start,uint256 end)Asset(AssetType assetType,uint256 value)AssetType(uint256 assetClass,bytes data)\\\"\\n );\\n\\n /// @dev Represents the structure of an order.\\n struct Order {\\n address maker; // Address of the maker.\\n LibAsset.Asset makeAsset; // Asset the maker is providing.\\n address taker; // Address of the taker.\\n LibAsset.Asset takeAsset; // Asset the taker is providing.\\n uint256 salt; // Random number to ensure unique order hash.\\n uint256 start; // Timestamp when the order becomes valid.\\n uint256 end; // Timestamp when the order expires.\\n }\\n\\n /// @dev Represents the result of filling two orders.\\n struct FillResult {\\n uint256 leftValue; // Amount filled from the left order.\\n uint256 rightValue; // Amount filled from the right order.\\n }\\n\\n /// @notice Computes the unique hash of an order.\\n /// @param order The order data.\\n /// @return The unique hash of the order.\\n function hashKey(Order calldata order) internal pure returns (bytes32) {\\n return\\n keccak256(\\n abi.encode(\\n order.maker,\\n LibAsset.hash(order.makeAsset.assetType),\\n LibAsset.hash(order.takeAsset.assetType),\\n order.salt\\n )\\n );\\n }\\n\\n /// @notice Computes the complete hash of an order, including domain-specific data.\\n /// @param order The order data.\\n /// @return The complete hash of the order.\\n function hash(Order calldata order) internal pure returns (bytes32) {\\n return\\n keccak256(\\n // solhint-disable-next-line func-named-parameters\\n abi.encode(\\n ORDER_TYPEHASH,\\n order.maker,\\n LibAsset.hash(order.makeAsset),\\n order.taker,\\n LibAsset.hash(order.takeAsset),\\n order.salt,\\n order.start,\\n order.end\\n )\\n );\\n }\\n\\n /// @notice Validates order time\\n /// @param order Whose time we want to validate\\n // solhint-disable not-rely-on-time\\n // slither-disable-start timestamp\\n function validateOrderTime(Order memory order) internal view {\\n require(order.start == 0 || order.start < block.timestamp, \\\"Order start validation failed\\\");\\n require(order.end == 0 || order.end > block.timestamp, \\\"Order end validation failed\\\");\\n }\\n\\n // slither-disable-end timestamp\\n // solhint-enable not-rely-on-time\\n\\n /// @notice Should return filled values\\n /// @param leftOrder Left order\\n /// @param rightOrder Right order\\n /// @param leftOrderFill Current fill of the left order (0 if order is unfilled)\\n /// @param rightOrderFill Current fill of the right order (0 if order is unfilled)\\n /// @dev We have 3 cases, 1st: left order should be fully filled\\n /// @dev 2nd: right order should be fully filled or 3d: both should be fully filled if required values are the same\\n /// @return The fill result of both orders\\n function fillOrder(\\n LibOrder.Order calldata leftOrder,\\n LibOrder.Order calldata rightOrder,\\n uint256 leftOrderFill,\\n uint256 rightOrderFill\\n ) internal pure returns (FillResult memory) {\\n (uint256 leftMakeValue, uint256 leftTakeValue) = calculateRemaining(leftOrder, leftOrderFill);\\n (uint256 rightMakeValue, uint256 rightTakeValue) = calculateRemaining(rightOrder, rightOrderFill);\\n\\n if (rightTakeValue > leftMakeValue) {\\n return _fillLeft(leftMakeValue, leftTakeValue, rightOrder.makeAsset.value, rightOrder.takeAsset.value);\\n }\\n return _fillRight(leftOrder.makeAsset.value, leftOrder.takeAsset.value, rightMakeValue, rightTakeValue);\\n }\\n\\n /// @notice Computes the remaining fillable amount of an order.\\n /// @param order The order to compute from.\\n /// @param fill The amount of the order already filled.\\n /// @return makeValue The remaining fillable amount from the maker's side.\\n /// @return takeValue The remaining fillable amount from the taker's side.\\n function calculateRemaining(\\n LibOrder.Order calldata order,\\n uint256 fill\\n ) internal pure returns (uint256 makeValue, uint256 takeValue) {\\n require(order.takeAsset.value >= fill, \\\"filling more than order permits\\\");\\n takeValue = order.takeAsset.value - fill;\\n makeValue = LibMath.safeGetPartialAmountFloor(order.makeAsset.value, order.takeAsset.value, takeValue);\\n }\\n\\n /// @notice Computes the fill values for a situation where the right order is expected to fill the left order.\\n /// @param leftMakeValue The amount the left order maker wants to trade.\\n /// @param leftTakeValue The amount the left order taker wants in return.\\n /// @param rightMakeValue The amount the right order maker wants to trade.\\n /// @param rightTakeValue The amount the right order taker wants in return.\\n /// @return The filled amounts for both the left and right orders.\\n function _fillRight(\\n uint256 leftMakeValue,\\n uint256 leftTakeValue,\\n uint256 rightMakeValue,\\n uint256 rightTakeValue\\n ) internal pure returns (FillResult memory) {\\n uint256 makerValue = LibMath.safeGetPartialAmountFloor(rightTakeValue, leftMakeValue, leftTakeValue);\\n require(makerValue <= rightMakeValue, \\\"fillRight: unable to fill\\\");\\n return FillResult(rightTakeValue, makerValue);\\n }\\n\\n /// @notice Computes the fill values for a situation where the left order is expected to fill the right order.\\n /// @param leftMakeValue The amount the left order maker wants to trade.\\n /// @param leftTakeValue The amount the left order taker wants in return.\\n /// @param rightMakeValue The amount the right order maker wants to trade.\\n /// @param rightTakeValue The amount the right order taker wants in return.\\n /// @return The filled amounts for both the left and right orders.\\n function _fillLeft(\\n uint256 leftMakeValue,\\n uint256 leftTakeValue,\\n uint256 rightMakeValue,\\n uint256 rightTakeValue\\n ) internal pure returns (FillResult memory) {\\n uint256 rightTake = LibMath.safeGetPartialAmountFloor(leftTakeValue, rightMakeValue, rightTakeValue);\\n require(rightTake <= leftMakeValue, \\\"fillLeft: unable to fill\\\");\\n return FillResult(leftMakeValue, leftTakeValue);\\n }\\n}\\n\",\"keccak256\":\"0x988f3a3a2acacf4b28e7854fffae94684b2ac2ee8fb35b0c2118222ab3eb87b2\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b506200001c6200002c565b620000266200002c565b620000ed565b600054610100900460ff1615620000995760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff90811614620000eb576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b61282280620000fd6000396000f3fe608060405234801561001057600080fd5b50600436106101825760003560e01c80639010d07c116100d8578063ca15c8731161008c578063e3c83e6511610066578063e3c83e6514610385578063eb7f494d146103ac578063f6224fa2146103bf57600080fd5b8063ca15c87314610357578063d547741f1461036a578063e1f1845f1461037d57600080fd5b8063940bdcc5116100bd578063940bdcc514610329578063a217fddf1461033c578063b45230ec1461034457600080fd5b80639010d07c146102c557806391d14854146102f057600080fd5b806332a1c22f1161013a5780637c4a13b1116101145780637c4a13b11461028c5780637d2111001461029f57806384b0196e146102aa57600080fd5b806332a1c22f1461023f57806336568abe1461025257806362972e231461026557600080fd5b80632513e2b91161016b5780632513e2b9146101e05780632f032edd146102075780632f2ff15d1461022a57600080fd5b806301ffc9a714610187578063248a9ca3146101af575b600080fd5b61019a610195366004611e2d565b6103c7565b60405190151581526020015b60405180910390f35b6101d26101bd366004611e6f565b60009081526099602052604090206001015490565b6040519081526020016101a6565b6101d27f2f049b28665abd79bc83d9aa564dba6b787ac439dba27b48e163a83befa9b26081565b61019a610215366004611e6f565b600090815260fd602052604090205460ff1690565b61023d610238366004611ead565b610423565b005b61023d61024d366004611f22565b61044d565b61023d610260366004611ead565b6104cc565b6101d27f839f6f26c78a3e8185d8004defa846bd7b66fef8def9b9f16459a6ebf250216281565b61023d61029a366004611e6f565b61055d565b60fe5460ff1661019a565b6102b2610571565b6040516101a69796959493929190611fde565b6102d86102d3366004612090565b610633565b6040516001600160a01b0390911681526020016101a6565b61019a6102fe366004611ead565b60009182526099602090815260408084206001600160a01b0393909316845291905290205460ff1690565b61023d6103373660046120b2565b610652565b6101d2600081565b61023d61035236600461223b565b6107f2565b6101d2610365366004611e6f565b6109a9565b61023d610378366004611ead565b6109c0565b61023d6109e5565b6101d27f6278160ef7ca8a5eb8e5b274bcc0427c2cc7e12eee2a53c5989a1afb360f640481565b61023d6103ba366004611e6f565b6109fb565b61023d610a0f565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f5a05180f00000000000000000000000000000000000000000000000000000000148061041d575061041d82610a22565b92915050565b60008281526099602052604090206001015461043e81610ab9565b6104488383610ac3565b505050565b600061045881610ab9565b6104c585858080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808902828101820190935288825290935088925087918291850190849080828437600092019190915250610ae592505050565b5050505050565b6001600160a01b038116331461054f5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b6105598282610c0f565b5050565b600061056881610ab9565b61055982610c31565b6000606080600080600060606001546000801b1480156105915750600254155b6105dd5760405162461bcd60e51b815260206004820152601560248201527f4549503731323a20556e696e697469616c697a656400000000000000000000006044820152606401610546565b6105e5610c71565b6105ed610d03565b604080516000808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009b939a50919850469750309650945092509050565b600082815260cb6020526040812061064b9083610d12565b9392505050565b600054610100900460ff16158080156106725750600054600160ff909116105b8061068c5750303b15801561068c575060005460ff166001145b6106fe5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610546565b6000805460ff191660011790558015610721576000805461ff0019166101001790555b6107956040518060400160405280601781526020017f5468652053616e64626f78204d61726b6574706c6163650000000000000000008152506040518060400160405280600581526020017f312e302e30000000000000000000000000000000000000000000000000000000815250610d1e565b6107a3878787878787610dc3565b80156107e9576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b600061080160208501856122bb565b6001600160a01b0316036108575760405162461bcd60e51b815260206004820152600860248201527f6e6f206d616b65720000000000000000000000000000000000000000000000006044820152606401610546565b61086861086384612392565b610ee3565b61087d6108786020850185612442565b610fa3565b82608001356000036108f65761089660208401846122bb565b6001600160a01b0316816001600160a01b0316146104485760405162461bcd60e51b815260206004820152601660248201527f6d616b6572206973206e6f742074782073656e646572000000000000000000006044820152606401610546565b61090360208401846122bb565b6001600160a01b0316816001600160a01b03160361092057505050565b600061092b84611200565b9050610957610939826112e6565b8461094760208801886122bb565b6001600160a01b0316919061132e565b6109a35760405162461bcd60e51b815260206004820152601c60248201527f7369676e617475726520766572696669636174696f6e206572726f72000000006044820152606401610546565b50505050565b600081815260cb6020526040812061041d9061138f565b6000828152609960205260409020600101546109db81610ab9565b6104488383610c0f565b60006109f081610ab9565b6109f8611399565b50565b6000610a0681610ab9565b610559826113d1565b6000610a1a81610ab9565b6109f8611414565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061041d57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000083161461041d565b6109f88133611449565b610acd82826114be565b600082815260cb602052604090206104489082611560565b8051825114610b365760405162461bcd60e51b815260206004820152601860248201527f4d69736d61746368656420696e707574206c656e6774687300000000000000006044820152606401610546565b60005b825181101561044857818181518110610b5457610b54612480565b60200260200101511515610b90848381518110610b7357610b73612480565b6020026020010151600090815260fd602052604090205460ff1690565b151514610bff57818181518110610ba957610ba9612480565b602002602001015115610bdd57610bd8838281518110610bcb57610bcb612480565b60200260200101516113d1565b610bff565b610bff838281518110610bf257610bf2612480565b6020026020010151610c31565b610c08816124ac565b9050610b39565b610c198282611575565b600082815260cb6020526040902061044890826115f8565b600081815260fd6020526040808220805460ff191690555182917f0826d4320d30163213509a51eb5dd049b754ecd74ff5b4168697471e488d397791a250565b606060038054610c80906124c6565b80601f0160208091040260200160405190810160405280929190818152602001828054610cac906124c6565b8015610cf95780601f10610cce57610100808354040283529160200191610cf9565b820191906000526020600020905b815481529060010190602001808311610cdc57829003601f168201915b5050505050905090565b606060048054610c80906124c6565b600061064b838361160d565b600054610100900460ff16610d9b5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610546565b6003610da78382612546565b506004610db48282612546565b50506000600181905560025550565b600054610100900460ff16610e405760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610546565b610e48611637565b610e53600087610ac3565b610ec085858080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808902828101820190935288825290935088925087918291850190849080828437600092019190915250610ae592505050565b8015610ed357610ece611399565b610edb565b610edb611414565b505050505050565b60a08101511580610ef75750428160a00151105b610f435760405162461bcd60e51b815260206004820152601d60248201527f4f726465722073746172742076616c69646174696f6e206661696c65640000006044820152606401610546565b60c08101511580610f575750428160c00151115b6109f85760405162461bcd60e51b815260206004820152601b60248201527f4f7264657220656e642076616c69646174696f6e206661696c656400000000006044820152606401610546565b6000610fc0610fb28380612442565b610fbb90612606565b6116b6565b90506001610fce8380612442565b610fdc906020810190612628565b6003811115610fed57610fed612612565b03611079576001600160a01b03811660009081527f5e9f46c6f3a37aed912e47cb012973583ff2f5b7e4db3839efae4d86e269a9ef602052604090205460ff166105595760405162461bcd60e51b815260206004820152601960248201527f7061796d656e7420746f6b656e206e6f7420616c6c6f776564000000000000006044820152606401610546565b60fe5460ff16611087575050565b7f6278160ef7ca8a5eb8e5b274bcc0427c2cc7e12eee2a53c5989a1afb360f640460005260fd6020527f6d4c51cb41eaeee2e980dbf36cf3178286ec811e2aa785091791a39e03bc997d5460ff16801561111857506001600160a01b03811660009081527f27a059ae9669021ef10a697fd7d5e365594d7c130d5e544605b6f0726c800eec602052604090205460ff165b806111af57507f2f049b28665abd79bc83d9aa564dba6b787ac439dba27b48e163a83befa9b26060005260fd6020527f51101be588ad657566d25c6263ea6c4d7bdd08268898b096b27029c5fe9606525460ff1680156111af57506001600160a01b03811660009081527f51385dcb82e028c1f1d2026bfd3c761e37e44b58a46fec9151abc8352b81cac3602052604090205460ff165b156111b8575050565b60405162461bcd60e51b815260206004820152600b60248201527f6e6f7420616c6c6f7765640000000000000000000000000000000000000000006044820152606401610546565b60007fb45f699a9d66ae9f6815d4c26a3eec190eb66c90f1300a6acc292fcc127c3a6c61123060208401846122bb565b61124e6112406020860186612442565b61124990612643565b6116d0565b61125e60608601604087016122bb565b61126e6112406060880188612442565b6040805160208101969096526001600160a01b0394851690860152606085019290925290911660808084019190915260a08084019290925284013560c0808401919091529084013560e0830152830135610100820152610120015b604051602081830303815290604052805190602001209050919050565b600061041d6112f3611726565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b600080600061133d8585611735565b9092509050600081600481111561135657611356612612565b1480156113745750856001600160a01b0316826001600160a01b0316145b80611385575061138586868661177a565b9695505050505050565b600061041d825490565b60fe805460ff191660011790556040517fb8f079825ac54aa2427b0dd7633c0a9555187c371bc772fb3be9fb87cc876b0790600090a1565b600081815260fd6020526040808220805460ff191660011790555182917fc3bedfde6bf09c48a8f395ea5988cda5b69f381a42e3c9be93a136c51b32dc6b91a250565b60fe805460ff191690556040517fd3681855fd5e456dde1e3776a9be32bb29fab90b31bba9fb52bcf27a9bcb444f90600090a1565b60008281526099602090815260408083206001600160a01b038516845290915290205460ff166105595761147c816118ac565b6114878360206118be565b60405160200161149892919061264f565b60408051601f198184030181529082905262461bcd60e51b8252610546916004016126d0565b60008281526099602090815260408083206001600160a01b038516845290915290205460ff166105595760008281526099602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561151c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061064b836001600160a01b038416611ae7565b60008281526099602090815260408083206001600160a01b038516845290915290205460ff16156105595760008281526099602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061064b836001600160a01b038416611b36565b600082600001828154811061162457611624612480565b9060005260206000200154905092915050565b600054610100900460ff166116b45760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610546565b565b6000816020015180602001905181019061041d91906126e3565b60007fb3dadb929e65125a0302b36e16e3b077edea8c07de20fe04795776ed6bd3bb596117008360000151611c29565b6020808501516040516112c9949392019283526020830191909152604082015260600190565b6000611730611c6b565b905090565b600080825160410361176b5760208301516040840151606085015160001a61175f87828585611cdf565b94509450505050611773565b506000905060025b9250929050565b6000806000856001600160a01b0316631626ba7e60e01b86866040516024016117a4929190612700565b60408051601f198184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090941693909317909252905161180f9190612721565b600060405180830381855afa9150503d806000811461184a576040519150601f19603f3d011682016040523d82523d6000602084013e61184f565b606091505b509150915081801561186357506020815110155b8015611385575080517f1626ba7e00000000000000000000000000000000000000000000000000000000906118a19083016020908101908401612733565b149695505050505050565b606061041d6001600160a01b03831660145b606060006118cd83600261274c565b6118d8906002612763565b67ffffffffffffffff8111156118f0576118f061214c565b6040519080825280601f01601f19166020018201604052801561191a576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061195157611951612480565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106119b4576119b4612480565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060006119f084600261274c565b6119fb906001612763565b90505b6001811115611a98577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110611a3c57611a3c612480565b1a60f81b828281518110611a5257611a52612480565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c93611a9181612776565b90506119fe565b50831561064b5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610546565b6000818152600183016020526040812054611b2e5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561041d565b50600061041d565b60008181526001830160205260408120548015611c1f576000611b5a60018361278d565b8554909150600090611b6e9060019061278d565b9050818114611bd3576000866000018281548110611b8e57611b8e612480565b9060005260206000200154905080876000018481548110611bb157611bb1612480565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611be457611be46127a0565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061041d565b600091505061041d565b80516020808301518051908201206040516000936112c9937f75aacb2727a36600741802d07994792d9d768ee841822bca87180d320cea9912939192016127b6565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f611c96611da3565b611c9e611dfc565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611d165750600090506003611d9a565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611d6a573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611d9357600060019250925050611d9a565b9150600090505b94509492505050565b600080611dae610c71565b805190915015611dc5578051602090910120919050565b6001548015611dd45792915050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4709250505090565b600080611e07610d03565b805190915015611e1e578051602090910120919050565b6002548015611dd45792915050565b600060208284031215611e3f57600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461064b57600080fd5b600060208284031215611e8157600080fd5b5035919050565b6001600160a01b03811681146109f857600080fd5b8035611ea881611e88565b919050565b60008060408385031215611ec057600080fd5b823591506020830135611ed281611e88565b809150509250929050565b60008083601f840112611eef57600080fd5b50813567ffffffffffffffff811115611f0757600080fd5b6020830191508360208260051b850101111561177357600080fd5b60008060008060408587031215611f3857600080fd5b843567ffffffffffffffff80821115611f5057600080fd5b611f5c88838901611edd565b90965094506020870135915080821115611f7557600080fd5b50611f8287828801611edd565b95989497509550505050565b60005b83811015611fa9578181015183820152602001611f91565b50506000910152565b60008151808452611fca816020860160208601611f8e565b601f01601f19169290920160200192915050565b7fff00000000000000000000000000000000000000000000000000000000000000881681526000602060e08184015261201a60e084018a611fb2565b838103604085015261202c818a611fb2565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825283870192509083019060005b8181101561207e57835183529284019291840191600101612062565b50909c9b505050505050505050505050565b600080604083850312156120a357600080fd5b50508035926020909101359150565b600080600080600080608087890312156120cb57600080fd5b86356120d681611e88565b9550602087013567ffffffffffffffff808211156120f357600080fd5b6120ff8a838b01611edd565b9097509550604089013591508082111561211857600080fd5b5061212589828a01611edd565b9094509250506060870135801515811461213e57600080fd5b809150509295509295509295565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff811182821017156121855761218561214c565b60405290565b60405160e0810167ffffffffffffffff811182821017156121855761218561214c565b600082601f8301126121bf57600080fd5b813567ffffffffffffffff808211156121da576121da61214c565b604051601f8301601f19908116603f011681019082821181831017156122025761220261214c565b8160405283815286602085880101111561221b57600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060006060848603121561225057600080fd5b833567ffffffffffffffff8082111561226857600080fd5b9085019060e0828803121561227c57600080fd5b9093506020850135908082111561229257600080fd5b5061229f868287016121ae565b92505060408401356122b081611e88565b809150509250925092565b6000602082840312156122cd57600080fd5b813561064b81611e88565b803560048110611ea857600080fd5b6000604082840312156122f957600080fd5b612301612162565b905061230c826122d8565b8152602082013567ffffffffffffffff81111561232857600080fd5b612334848285016121ae565b60208301525092915050565b60006040828403121561235257600080fd5b61235a612162565b9050813567ffffffffffffffff81111561237357600080fd5b61237f848285016122e7565b8252506020820135602082015292915050565b600060e082360312156123a457600080fd5b6123ac61218b565b6123b583611e9d565b8152602083013567ffffffffffffffff808211156123d257600080fd5b6123de36838701612340565b60208401526123ef60408601611e9d565b6040840152606085013591508082111561240857600080fd5b5061241536828601612340565b6060830152506080830135608082015260a083013560a082015260c083013560c082015280915050919050565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc183360301811261247657600080fd5b9190910192915050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060001982036124bf576124bf612496565b5060010190565b600181811c908216806124da57607f821691505b6020821081036124fa57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561044857600081815260208120601f850160051c810160208610156125275750805b601f850160051c820191505b81811015610edb57828155600101612533565b815167ffffffffffffffff8111156125605761256061214c565b6125748161256e84546124c6565b84612500565b602080601f8311600181146125a957600084156125915750858301515b600019600386901b1c1916600185901b178555610edb565b600085815260208120601f198616915b828110156125d8578886015182559484019460019091019084016125b9565b50858210156125f65787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600061041d36836122e7565b634e487b7160e01b600052602160045260246000fd5b60006020828403121561263a57600080fd5b61064b826122d8565b600061041d3683612340565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612687816017850160208801611f8e565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516126c4816028840160208801611f8e565b01602801949350505050565b60208152600061064b6020830184611fb2565b6000602082840312156126f557600080fd5b815161064b81611e88565b8281526040602082015260006127196040830184611fb2565b949350505050565b60008251612476818460208701611f8e565b60006020828403121561274557600080fd5b5051919050565b808202811582820484141761041d5761041d612496565b8082018082111561041d5761041d612496565b60008161278557612785612496565b506000190190565b8181038181111561041d5761041d612496565b634e487b7160e01b600052603160045260246000fd5b83815260608101600484106127db57634e487b7160e01b600052602160045260246000fd5b60208201939093526040015291905056fea2646970667358221220c8255c8f3d8671ff4e32569915694a99f02468b8c5321423cc0021dd137c311764736f6c63430008130033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101825760003560e01c80639010d07c116100d8578063ca15c8731161008c578063e3c83e6511610066578063e3c83e6514610385578063eb7f494d146103ac578063f6224fa2146103bf57600080fd5b8063ca15c87314610357578063d547741f1461036a578063e1f1845f1461037d57600080fd5b8063940bdcc5116100bd578063940bdcc514610329578063a217fddf1461033c578063b45230ec1461034457600080fd5b80639010d07c146102c557806391d14854146102f057600080fd5b806332a1c22f1161013a5780637c4a13b1116101145780637c4a13b11461028c5780637d2111001461029f57806384b0196e146102aa57600080fd5b806332a1c22f1461023f57806336568abe1461025257806362972e231461026557600080fd5b80632513e2b91161016b5780632513e2b9146101e05780632f032edd146102075780632f2ff15d1461022a57600080fd5b806301ffc9a714610187578063248a9ca3146101af575b600080fd5b61019a610195366004611e2d565b6103c7565b60405190151581526020015b60405180910390f35b6101d26101bd366004611e6f565b60009081526099602052604090206001015490565b6040519081526020016101a6565b6101d27f2f049b28665abd79bc83d9aa564dba6b787ac439dba27b48e163a83befa9b26081565b61019a610215366004611e6f565b600090815260fd602052604090205460ff1690565b61023d610238366004611ead565b610423565b005b61023d61024d366004611f22565b61044d565b61023d610260366004611ead565b6104cc565b6101d27f839f6f26c78a3e8185d8004defa846bd7b66fef8def9b9f16459a6ebf250216281565b61023d61029a366004611e6f565b61055d565b60fe5460ff1661019a565b6102b2610571565b6040516101a69796959493929190611fde565b6102d86102d3366004612090565b610633565b6040516001600160a01b0390911681526020016101a6565b61019a6102fe366004611ead565b60009182526099602090815260408084206001600160a01b0393909316845291905290205460ff1690565b61023d6103373660046120b2565b610652565b6101d2600081565b61023d61035236600461223b565b6107f2565b6101d2610365366004611e6f565b6109a9565b61023d610378366004611ead565b6109c0565b61023d6109e5565b6101d27f6278160ef7ca8a5eb8e5b274bcc0427c2cc7e12eee2a53c5989a1afb360f640481565b61023d6103ba366004611e6f565b6109fb565b61023d610a0f565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f5a05180f00000000000000000000000000000000000000000000000000000000148061041d575061041d82610a22565b92915050565b60008281526099602052604090206001015461043e81610ab9565b6104488383610ac3565b505050565b600061045881610ab9565b6104c585858080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808902828101820190935288825290935088925087918291850190849080828437600092019190915250610ae592505050565b5050505050565b6001600160a01b038116331461054f5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b6105598282610c0f565b5050565b600061056881610ab9565b61055982610c31565b6000606080600080600060606001546000801b1480156105915750600254155b6105dd5760405162461bcd60e51b815260206004820152601560248201527f4549503731323a20556e696e697469616c697a656400000000000000000000006044820152606401610546565b6105e5610c71565b6105ed610d03565b604080516000808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009b939a50919850469750309650945092509050565b600082815260cb6020526040812061064b9083610d12565b9392505050565b600054610100900460ff16158080156106725750600054600160ff909116105b8061068c5750303b15801561068c575060005460ff166001145b6106fe5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610546565b6000805460ff191660011790558015610721576000805461ff0019166101001790555b6107956040518060400160405280601781526020017f5468652053616e64626f78204d61726b6574706c6163650000000000000000008152506040518060400160405280600581526020017f312e302e30000000000000000000000000000000000000000000000000000000815250610d1e565b6107a3878787878787610dc3565b80156107e9576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b600061080160208501856122bb565b6001600160a01b0316036108575760405162461bcd60e51b815260206004820152600860248201527f6e6f206d616b65720000000000000000000000000000000000000000000000006044820152606401610546565b61086861086384612392565b610ee3565b61087d6108786020850185612442565b610fa3565b82608001356000036108f65761089660208401846122bb565b6001600160a01b0316816001600160a01b0316146104485760405162461bcd60e51b815260206004820152601660248201527f6d616b6572206973206e6f742074782073656e646572000000000000000000006044820152606401610546565b61090360208401846122bb565b6001600160a01b0316816001600160a01b03160361092057505050565b600061092b84611200565b9050610957610939826112e6565b8461094760208801886122bb565b6001600160a01b0316919061132e565b6109a35760405162461bcd60e51b815260206004820152601c60248201527f7369676e617475726520766572696669636174696f6e206572726f72000000006044820152606401610546565b50505050565b600081815260cb6020526040812061041d9061138f565b6000828152609960205260409020600101546109db81610ab9565b6104488383610c0f565b60006109f081610ab9565b6109f8611399565b50565b6000610a0681610ab9565b610559826113d1565b6000610a1a81610ab9565b6109f8611414565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061041d57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000083161461041d565b6109f88133611449565b610acd82826114be565b600082815260cb602052604090206104489082611560565b8051825114610b365760405162461bcd60e51b815260206004820152601860248201527f4d69736d61746368656420696e707574206c656e6774687300000000000000006044820152606401610546565b60005b825181101561044857818181518110610b5457610b54612480565b60200260200101511515610b90848381518110610b7357610b73612480565b6020026020010151600090815260fd602052604090205460ff1690565b151514610bff57818181518110610ba957610ba9612480565b602002602001015115610bdd57610bd8838281518110610bcb57610bcb612480565b60200260200101516113d1565b610bff565b610bff838281518110610bf257610bf2612480565b6020026020010151610c31565b610c08816124ac565b9050610b39565b610c198282611575565b600082815260cb6020526040902061044890826115f8565b600081815260fd6020526040808220805460ff191690555182917f0826d4320d30163213509a51eb5dd049b754ecd74ff5b4168697471e488d397791a250565b606060038054610c80906124c6565b80601f0160208091040260200160405190810160405280929190818152602001828054610cac906124c6565b8015610cf95780601f10610cce57610100808354040283529160200191610cf9565b820191906000526020600020905b815481529060010190602001808311610cdc57829003601f168201915b5050505050905090565b606060048054610c80906124c6565b600061064b838361160d565b600054610100900460ff16610d9b5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610546565b6003610da78382612546565b506004610db48282612546565b50506000600181905560025550565b600054610100900460ff16610e405760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610546565b610e48611637565b610e53600087610ac3565b610ec085858080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808902828101820190935288825290935088925087918291850190849080828437600092019190915250610ae592505050565b8015610ed357610ece611399565b610edb565b610edb611414565b505050505050565b60a08101511580610ef75750428160a00151105b610f435760405162461bcd60e51b815260206004820152601d60248201527f4f726465722073746172742076616c69646174696f6e206661696c65640000006044820152606401610546565b60c08101511580610f575750428160c00151115b6109f85760405162461bcd60e51b815260206004820152601b60248201527f4f7264657220656e642076616c69646174696f6e206661696c656400000000006044820152606401610546565b6000610fc0610fb28380612442565b610fbb90612606565b6116b6565b90506001610fce8380612442565b610fdc906020810190612628565b6003811115610fed57610fed612612565b03611079576001600160a01b03811660009081527f5e9f46c6f3a37aed912e47cb012973583ff2f5b7e4db3839efae4d86e269a9ef602052604090205460ff166105595760405162461bcd60e51b815260206004820152601960248201527f7061796d656e7420746f6b656e206e6f7420616c6c6f776564000000000000006044820152606401610546565b60fe5460ff16611087575050565b7f6278160ef7ca8a5eb8e5b274bcc0427c2cc7e12eee2a53c5989a1afb360f640460005260fd6020527f6d4c51cb41eaeee2e980dbf36cf3178286ec811e2aa785091791a39e03bc997d5460ff16801561111857506001600160a01b03811660009081527f27a059ae9669021ef10a697fd7d5e365594d7c130d5e544605b6f0726c800eec602052604090205460ff165b806111af57507f2f049b28665abd79bc83d9aa564dba6b787ac439dba27b48e163a83befa9b26060005260fd6020527f51101be588ad657566d25c6263ea6c4d7bdd08268898b096b27029c5fe9606525460ff1680156111af57506001600160a01b03811660009081527f51385dcb82e028c1f1d2026bfd3c761e37e44b58a46fec9151abc8352b81cac3602052604090205460ff165b156111b8575050565b60405162461bcd60e51b815260206004820152600b60248201527f6e6f7420616c6c6f7765640000000000000000000000000000000000000000006044820152606401610546565b60007fb45f699a9d66ae9f6815d4c26a3eec190eb66c90f1300a6acc292fcc127c3a6c61123060208401846122bb565b61124e6112406020860186612442565b61124990612643565b6116d0565b61125e60608601604087016122bb565b61126e6112406060880188612442565b6040805160208101969096526001600160a01b0394851690860152606085019290925290911660808084019190915260a08084019290925284013560c0808401919091529084013560e0830152830135610100820152610120015b604051602081830303815290604052805190602001209050919050565b600061041d6112f3611726565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b600080600061133d8585611735565b9092509050600081600481111561135657611356612612565b1480156113745750856001600160a01b0316826001600160a01b0316145b80611385575061138586868661177a565b9695505050505050565b600061041d825490565b60fe805460ff191660011790556040517fb8f079825ac54aa2427b0dd7633c0a9555187c371bc772fb3be9fb87cc876b0790600090a1565b600081815260fd6020526040808220805460ff191660011790555182917fc3bedfde6bf09c48a8f395ea5988cda5b69f381a42e3c9be93a136c51b32dc6b91a250565b60fe805460ff191690556040517fd3681855fd5e456dde1e3776a9be32bb29fab90b31bba9fb52bcf27a9bcb444f90600090a1565b60008281526099602090815260408083206001600160a01b038516845290915290205460ff166105595761147c816118ac565b6114878360206118be565b60405160200161149892919061264f565b60408051601f198184030181529082905262461bcd60e51b8252610546916004016126d0565b60008281526099602090815260408083206001600160a01b038516845290915290205460ff166105595760008281526099602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561151c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061064b836001600160a01b038416611ae7565b60008281526099602090815260408083206001600160a01b038516845290915290205460ff16156105595760008281526099602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061064b836001600160a01b038416611b36565b600082600001828154811061162457611624612480565b9060005260206000200154905092915050565b600054610100900460ff166116b45760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610546565b565b6000816020015180602001905181019061041d91906126e3565b60007fb3dadb929e65125a0302b36e16e3b077edea8c07de20fe04795776ed6bd3bb596117008360000151611c29565b6020808501516040516112c9949392019283526020830191909152604082015260600190565b6000611730611c6b565b905090565b600080825160410361176b5760208301516040840151606085015160001a61175f87828585611cdf565b94509450505050611773565b506000905060025b9250929050565b6000806000856001600160a01b0316631626ba7e60e01b86866040516024016117a4929190612700565b60408051601f198184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090941693909317909252905161180f9190612721565b600060405180830381855afa9150503d806000811461184a576040519150601f19603f3d011682016040523d82523d6000602084013e61184f565b606091505b509150915081801561186357506020815110155b8015611385575080517f1626ba7e00000000000000000000000000000000000000000000000000000000906118a19083016020908101908401612733565b149695505050505050565b606061041d6001600160a01b03831660145b606060006118cd83600261274c565b6118d8906002612763565b67ffffffffffffffff8111156118f0576118f061214c565b6040519080825280601f01601f19166020018201604052801561191a576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061195157611951612480565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106119b4576119b4612480565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060006119f084600261274c565b6119fb906001612763565b90505b6001811115611a98577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110611a3c57611a3c612480565b1a60f81b828281518110611a5257611a52612480565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c93611a9181612776565b90506119fe565b50831561064b5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610546565b6000818152600183016020526040812054611b2e5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561041d565b50600061041d565b60008181526001830160205260408120548015611c1f576000611b5a60018361278d565b8554909150600090611b6e9060019061278d565b9050818114611bd3576000866000018281548110611b8e57611b8e612480565b9060005260206000200154905080876000018481548110611bb157611bb1612480565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611be457611be46127a0565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061041d565b600091505061041d565b80516020808301518051908201206040516000936112c9937f75aacb2727a36600741802d07994792d9d768ee841822bca87180d320cea9912939192016127b6565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f611c96611da3565b611c9e611dfc565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611d165750600090506003611d9a565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611d6a573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611d9357600060019250925050611d9a565b9150600090505b94509492505050565b600080611dae610c71565b805190915015611dc5578051602090910120919050565b6001548015611dd45792915050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4709250505090565b600080611e07610d03565b805190915015611e1e578051602090910120919050565b6002548015611dd45792915050565b600060208284031215611e3f57600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461064b57600080fd5b600060208284031215611e8157600080fd5b5035919050565b6001600160a01b03811681146109f857600080fd5b8035611ea881611e88565b919050565b60008060408385031215611ec057600080fd5b823591506020830135611ed281611e88565b809150509250929050565b60008083601f840112611eef57600080fd5b50813567ffffffffffffffff811115611f0757600080fd5b6020830191508360208260051b850101111561177357600080fd5b60008060008060408587031215611f3857600080fd5b843567ffffffffffffffff80821115611f5057600080fd5b611f5c88838901611edd565b90965094506020870135915080821115611f7557600080fd5b50611f8287828801611edd565b95989497509550505050565b60005b83811015611fa9578181015183820152602001611f91565b50506000910152565b60008151808452611fca816020860160208601611f8e565b601f01601f19169290920160200192915050565b7fff00000000000000000000000000000000000000000000000000000000000000881681526000602060e08184015261201a60e084018a611fb2565b838103604085015261202c818a611fb2565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825283870192509083019060005b8181101561207e57835183529284019291840191600101612062565b50909c9b505050505050505050505050565b600080604083850312156120a357600080fd5b50508035926020909101359150565b600080600080600080608087890312156120cb57600080fd5b86356120d681611e88565b9550602087013567ffffffffffffffff808211156120f357600080fd5b6120ff8a838b01611edd565b9097509550604089013591508082111561211857600080fd5b5061212589828a01611edd565b9094509250506060870135801515811461213e57600080fd5b809150509295509295509295565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff811182821017156121855761218561214c565b60405290565b60405160e0810167ffffffffffffffff811182821017156121855761218561214c565b600082601f8301126121bf57600080fd5b813567ffffffffffffffff808211156121da576121da61214c565b604051601f8301601f19908116603f011681019082821181831017156122025761220261214c565b8160405283815286602085880101111561221b57600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060006060848603121561225057600080fd5b833567ffffffffffffffff8082111561226857600080fd5b9085019060e0828803121561227c57600080fd5b9093506020850135908082111561229257600080fd5b5061229f868287016121ae565b92505060408401356122b081611e88565b809150509250925092565b6000602082840312156122cd57600080fd5b813561064b81611e88565b803560048110611ea857600080fd5b6000604082840312156122f957600080fd5b612301612162565b905061230c826122d8565b8152602082013567ffffffffffffffff81111561232857600080fd5b612334848285016121ae565b60208301525092915050565b60006040828403121561235257600080fd5b61235a612162565b9050813567ffffffffffffffff81111561237357600080fd5b61237f848285016122e7565b8252506020820135602082015292915050565b600060e082360312156123a457600080fd5b6123ac61218b565b6123b583611e9d565b8152602083013567ffffffffffffffff808211156123d257600080fd5b6123de36838701612340565b60208401526123ef60408601611e9d565b6040840152606085013591508082111561240857600080fd5b5061241536828601612340565b6060830152506080830135608082015260a083013560a082015260c083013560c082015280915050919050565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc183360301811261247657600080fd5b9190910192915050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060001982036124bf576124bf612496565b5060010190565b600181811c908216806124da57607f821691505b6020821081036124fa57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561044857600081815260208120601f850160051c810160208610156125275750805b601f850160051c820191505b81811015610edb57828155600101612533565b815167ffffffffffffffff8111156125605761256061214c565b6125748161256e84546124c6565b84612500565b602080601f8311600181146125a957600084156125915750858301515b600019600386901b1c1916600185901b178555610edb565b600085815260208120601f198616915b828110156125d8578886015182559484019460019091019084016125b9565b50858210156125f65787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600061041d36836122e7565b634e487b7160e01b600052602160045260246000fd5b60006020828403121561263a57600080fd5b61064b826122d8565b600061041d3683612340565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612687816017850160208801611f8e565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516126c4816028840160208801611f8e565b01602801949350505050565b60208152600061064b6020830184611fb2565b6000602082840312156126f557600080fd5b815161064b81611e88565b8281526040602082015260006127196040830184611fb2565b949350505050565b60008251612476818460208701611f8e565b60006020828403121561274557600080fd5b5051919050565b808202811582820484141761041d5761041d612496565b8082018082111561041d5761041d612496565b60008161278557612785612496565b506000190190565b8181038181111561041d5761041d612496565b634e487b7160e01b600052603160045260246000fd5b83815260608101600484106127db57634e487b7160e01b600052602160045260246000fd5b60208201939093526040015291905056fea2646970667358221220c8255c8f3d8671ff4e32569915694a99f02468b8c5321423cc0021dd137c311764736f6c63430008130033", + "devdoc": { + "author": "The Sandbox", + "events": { + "EIP712DomainChanged()": { + "details": "MAY be emitted to signal that the domain could have changed." + }, + "Initialized(uint8)": { + "details": "Triggered when the contract has been initialized or reinitialized." + }, + "RoleAdminChanged(bytes32,bytes32,bytes32)": { + "details": "Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._" + }, + "RoleEnabled(bytes32)": { + "params": { + "role": "Roles whose permissions were enabled" + } + }, + "RoleGranted(bytes32,address,address)": { + "details": "Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}." + }, + "RoleRevoked(bytes32,address,address)": { + "details": "Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)" + } + }, + "kind": "dev", + "methods": { + "constructor": { + "custom:oz-upgrades-unsafe-allow": "constructor", + "details": "Internal mechanism to protect the implementation contract from being initialized." + }, + "disableRole(bytes32)": { + "params": { + "role": "Identifier of the role to be disabled." + } + }, + "eip712Domain()": { + "details": "See {EIP-5267}. _Available since v4.9._" + }, + "enableRole(bytes32)": { + "params": { + "role": "Identifier of the role to be enabled." + } + }, + "getRoleAdmin(bytes32)": { + "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." + }, + "getRoleMember(bytes32,uint256)": { + "details": "Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information." + }, + "getRoleMemberCount(bytes32)": { + "details": "Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role." + }, + "grantRole(bytes32,address)": { + "details": "Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event." + }, + "hasRole(bytes32,address)": { + "details": "Returns `true` if `account` has been granted `role`." + }, + "initialize(address,bytes32[],bool[],bool)": { + "params": { + "admin": "The admin address for the OrderValidator and Whitelist.", + "permissions": "Array of permissions associated with each role.", + "roles": "Array of role identifiers for the Whitelist contract.", + "whitelistsEnabled": "Boolean to indicate if whitelist functionality is enabled." + } + }, + "isRoleEnabled(bytes32)": { + "params": { + "role": "Identifier of the role." + }, + "returns": { + "_0": "True if the role is enabled, false otherwise." + } + }, + "isWhitelistsEnabled()": { + "returns": { + "_0": "True if whitelists are active, false otherwise." + } + }, + "renounceRole(bytes32,address)": { + "details": "Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event." + }, + "revokeRole(bytes32,address)": { + "details": "Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event." + }, + "setRolesEnabled(bytes32[],bool[])": { + "params": { + "permissions": "List of booleans indicating the desired status of each role.", + "roles": "List of role identifiers." + } + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}." + }, + "validate((address,((uint8,bytes),uint256),address,((uint8,bytes),uint256),uint256,uint256,uint256),bytes,address)": { + "params": { + "order": "The order details to be validated.", + "sender": "Address of the order sender.", + "signature": "The signature associated with the order." + } + } + }, + "title": "OrderValidator", + "version": 1 + }, + "userdoc": { + "events": { + "RoleDisabled(bytes32)": { + "notice": "Emitted when a specific role gets disabled." + }, + "RoleEnabled(bytes32)": { + "notice": "Emitted when a specific role gets enabled." + }, + "WhitelistsDisabled()": { + "notice": "Emitted when all non-ERC20 tokens are allowed in the market." + }, + "WhitelistsEnabled()": { + "notice": "Emitted when only non-ERC20 tokens that are whitelisted can be allowed." + } + }, + "kind": "user", + "methods": { + "ERC20_ROLE()": { + "notice": "Role for ERC20 tokens, enabled all times" + }, + "PARTNER_ROLE()": { + "notice": "Role for partner tokens" + }, + "TSB_ROLE()": { + "notice": "Role for The Sandbox tokens" + }, + "disableRole(bytes32)": { + "notice": "Disable a given role." + }, + "disableWhitelists()": { + "notice": "Deactivate whitelists for all non-ERC20 tokens." + }, + "enableRole(bytes32)": { + "notice": "Enable a given role." + }, + "enableWhitelists()": { + "notice": "Activate whitelists for all non-ERC20 tokens." + }, + "initialize(address,bytes32[],bool[],bool)": { + "notice": "Initializes the OrderValidator contract." + }, + "isRoleEnabled(bytes32)": { + "notice": "Query the status of a given role." + }, + "isWhitelistsEnabled()": { + "notice": "Check the status of the whitelist functionality." + }, + "setRolesEnabled(bytes32[],bool[])": { + "notice": "Enables or disables specific roles." + }, + "validate((address,((uint8,bytes),uint256),address,((uint8,bytes),uint256),uint256,uint256,uint256),bytes,address)": { + "notice": "Validates the given order." + } + }, + "notice": "Contract for order validation. It validates orders and contains a whitelist of tokens.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 783, + "contract": "@sandbox-smart-contracts/marketplace/contracts/OrderValidator.sol:OrderValidator", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 786, + "contract": "@sandbox-smart-contracts/marketplace/contracts/OrderValidator.sol:OrderValidator", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 2785, + "contract": "@sandbox-smart-contracts/marketplace/contracts/OrderValidator.sol:OrderValidator", + "label": "_hashedName", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + }, + { + "astId": 2788, + "contract": "@sandbox-smart-contracts/marketplace/contracts/OrderValidator.sol:OrderValidator", + "label": "_hashedVersion", + "offset": 0, + "slot": "2", + "type": "t_bytes32" + }, + { + "astId": 2790, + "contract": "@sandbox-smart-contracts/marketplace/contracts/OrderValidator.sol:OrderValidator", + "label": "_name", + "offset": 0, + "slot": "3", + "type": "t_string_storage" + }, + { + "astId": 2792, + "contract": "@sandbox-smart-contracts/marketplace/contracts/OrderValidator.sol:OrderValidator", + "label": "_version", + "offset": 0, + "slot": "4", + "type": "t_string_storage" + }, + { + "astId": 3050, + "contract": "@sandbox-smart-contracts/marketplace/contracts/OrderValidator.sol:OrderValidator", + "label": "__gap", + "offset": 0, + "slot": "5", + "type": "t_array(t_uint256)48_storage" + }, + { + "astId": 2171, + "contract": "@sandbox-smart-contracts/marketplace/contracts/OrderValidator.sol:OrderValidator", + "label": "__gap", + "offset": 0, + "slot": "53", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 3390, + "contract": "@sandbox-smart-contracts/marketplace/contracts/OrderValidator.sol:OrderValidator", + "label": "__gap", + "offset": 0, + "slot": "103", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 211, + "contract": "@sandbox-smart-contracts/marketplace/contracts/OrderValidator.sol:OrderValidator", + "label": "_roles", + "offset": 0, + "slot": "153", + "type": "t_mapping(t_bytes32,t_struct(RoleData)206_storage)" + }, + { + "astId": 506, + "contract": "@sandbox-smart-contracts/marketplace/contracts/OrderValidator.sol:OrderValidator", + "label": "__gap", + "offset": 0, + "slot": "154", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 60, + "contract": "@sandbox-smart-contracts/marketplace/contracts/OrderValidator.sol:OrderValidator", + "label": "_roleMembers", + "offset": 0, + "slot": "203", + "type": "t_mapping(t_bytes32,t_struct(AddressSet)4700_storage)" + }, + { + "astId": 170, + "contract": "@sandbox-smart-contracts/marketplace/contracts/OrderValidator.sol:OrderValidator", + "label": "__gap", + "offset": 0, + "slot": "204", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 8028, + "contract": "@sandbox-smart-contracts/marketplace/contracts/OrderValidator.sol:OrderValidator", + "label": "_rolesEnabled", + "offset": 0, + "slot": "253", + "type": "t_mapping(t_bytes32,t_bool)" + }, + { + "astId": 8031, + "contract": "@sandbox-smart-contracts/marketplace/contracts/OrderValidator.sol:OrderValidator", + "label": "_whitelistsEnabled", + "offset": 0, + "slot": "254", + "type": "t_bool" + }, + { + "astId": 8310, + "contract": "@sandbox-smart-contracts/marketplace/contracts/OrderValidator.sol:OrderValidator", + "label": "__gap", + "offset": 0, + "slot": "255", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 6388, + "contract": "@sandbox-smart-contracts/marketplace/contracts/OrderValidator.sol:OrderValidator", + "label": "__gap", + "offset": 0, + "slot": "305", + "type": "t_array(t_uint256)50_storage" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)48_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[48]", + "numberOfBytes": "1536" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_bytes32,t_bool)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_bytes32,t_struct(AddressSet)4700_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct EnumerableSetUpgradeable.AddressSet)", + "numberOfBytes": "32", + "value": "t_struct(AddressSet)4700_storage" + }, + "t_mapping(t_bytes32,t_struct(RoleData)206_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32", + "value": "t_struct(RoleData)206_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(AddressSet)4700_storage": { + "encoding": "inplace", + "label": "struct EnumerableSetUpgradeable.AddressSet", + "members": [ + { + "astId": 4699, + "contract": "@sandbox-smart-contracts/marketplace/contracts/OrderValidator.sol:OrderValidator", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)4385_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(RoleData)206_storage": { + "encoding": "inplace", + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "astId": 203, + "contract": "@sandbox-smart-contracts/marketplace/contracts/OrderValidator.sol:OrderValidator", + "label": "members", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 205, + "contract": "@sandbox-smart-contracts/marketplace/contracts/OrderValidator.sol:OrderValidator", + "label": "adminRole", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)4385_storage": { + "encoding": "inplace", + "label": "struct EnumerableSetUpgradeable.Set", + "members": [ + { + "astId": 4380, + "contract": "@sandbox-smart-contracts/marketplace/contracts/OrderValidator.sol:OrderValidator", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 4384, + "contract": "@sandbox-smart-contracts/marketplace/contracts/OrderValidator.sol:OrderValidator", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/packages/deploy/deployments/mumbai/OrderValidator_Proxy.json b/packages/deploy/deployments/mumbai/OrderValidator_Proxy.json new file mode 100644 index 0000000000..123b292c95 --- /dev/null +++ b/packages/deploy/deployments/mumbai/OrderValidator_Proxy.json @@ -0,0 +1,289 @@ +{ + "address": "0x56077297C98d81A90c1cc26c13D16884C4b15AbF", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "admin_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "admin_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "changeAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x96ae65f6ba321916734aba4694eb41a696ed2f7737e250565fc729c3918fa426", + "receipt": { + "to": null, + "from": "0x5F890c9522dCE5670d741D4277BFCC2d9cA8Af02", + "contractAddress": "0x56077297C98d81A90c1cc26c13D16884C4b15AbF", + "transactionIndex": 0, + "gasUsed": "900173", + "logsBloom": "0x00000004000000000000000000000000400000000000000000000010000000000002000000008420000000020000000000008000000000000000000000000000000000000000000000000000000002800000000000000010000100000000000000000000020000000000020000000800000000800000000080000000000000040000000000000000000000000000000000000000000080000000000000a0000020000020000001004000000000040000000000000000000000100000000000410000002000000000000100000004000000000000040000010010800000102000000000c000000000000000000000000000000000000000000000000000100000", + "blockHash": "0x59815f6ae38681c7dbee278dca64e361128489e26b96067e4f4bc4ce2330257e", + "transactionHash": "0x96ae65f6ba321916734aba4694eb41a696ed2f7737e250565fc729c3918fa426", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 42631853, + "transactionHash": "0x96ae65f6ba321916734aba4694eb41a696ed2f7737e250565fc729c3918fa426", + "address": "0x56077297C98d81A90c1cc26c13D16884C4b15AbF", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000009a0006b87d1886e30a3eefa780d3e5ca96351938" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x59815f6ae38681c7dbee278dca64e361128489e26b96067e4f4bc4ce2330257e" + }, + { + "transactionIndex": 0, + "blockNumber": 42631853, + "transactionHash": "0x96ae65f6ba321916734aba4694eb41a696ed2f7737e250565fc729c3918fa426", + "address": "0x56077297C98d81A90c1cc26c13D16884C4b15AbF", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000049c4d4c94829b9c44052c5f5cb164fc612181165", + "0x0000000000000000000000005f890c9522dce5670d741d4277bfcc2d9ca8af02" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x59815f6ae38681c7dbee278dca64e361128489e26b96067e4f4bc4ce2330257e" + }, + { + "transactionIndex": 0, + "blockNumber": 42631853, + "transactionHash": "0x96ae65f6ba321916734aba4694eb41a696ed2f7737e250565fc729c3918fa426", + "address": "0x56077297C98d81A90c1cc26c13D16884C4b15AbF", + "topics": [ + "0xd3681855fd5e456dde1e3776a9be32bb29fab90b31bba9fb52bcf27a9bcb444f" + ], + "data": "0x", + "logIndex": 2, + "blockHash": "0x59815f6ae38681c7dbee278dca64e361128489e26b96067e4f4bc4ce2330257e" + }, + { + "transactionIndex": 0, + "blockNumber": 42631853, + "transactionHash": "0x96ae65f6ba321916734aba4694eb41a696ed2f7737e250565fc729c3918fa426", + "address": "0x56077297C98d81A90c1cc26c13D16884C4b15AbF", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 3, + "blockHash": "0x59815f6ae38681c7dbee278dca64e361128489e26b96067e4f4bc4ce2330257e" + }, + { + "transactionIndex": 0, + "blockNumber": 42631853, + "transactionHash": "0x96ae65f6ba321916734aba4694eb41a696ed2f7737e250565fc729c3918fa426", + "address": "0x56077297C98d81A90c1cc26c13D16884C4b15AbF", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045023af7b33994a22740bc51c3ca90a7ed82e124", + "logIndex": 4, + "blockHash": "0x59815f6ae38681c7dbee278dca64e361128489e26b96067e4f4bc4ce2330257e" + }, + { + "transactionIndex": 0, + "blockNumber": 42631853, + "transactionHash": "0x96ae65f6ba321916734aba4694eb41a696ed2f7737e250565fc729c3918fa426", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x0000000000000000000000005f890c9522dce5670d741d4277bfcc2d9ca8af02", + "0x000000000000000000000000f903ba9e006193c1527bfbe65fe2123704ea3f99" + ], + "data": "0x0000000000000000000000000000000000000000000000000007fec1a5c0e50000000000000000000000000000000000000000000000000f2ec8aae1646c37d7000000000000000000000000000000000000000000001212c948dbfb214ee39800000000000000000000000000000000000000000000000f2ec0ac1fbeab52d7000000000000000000000000000000000000000000001212c950dabcc70fc898", + "logIndex": 5, + "blockHash": "0x59815f6ae38681c7dbee278dca64e361128489e26b96067e4f4bc4ce2330257e" + } + ], + "blockNumber": 42631853, + "cumulativeGasUsed": "900173", + "status": 1, + "byzantium": true + }, + "args": [ + "0x9a0006b87d1886e30A3EeFA780D3E5CA96351938", + "0x45023af7B33994a22740Bc51C3Ca90A7Ed82e124", + "0x940bdcc500000000000000000000000049c4d4c94829b9c44052c5f5cb164fc612181165000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000026278160ef7ca8a5eb8e5b274bcc0427c2cc7e12eee2a53c5989a1afb360f64042f049b28665abd79bc83d9aa564dba6b787ac439dba27b48e163a83befa9b260000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + ], + "numDeployments": 1, + "solcInputHash": "0e89febeebc7444140de8e67c9067d2c", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"changeAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \\\"admin cannot fallback to proxy target\\\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\",\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"changeAdmin(address)\":{\"details\":\"Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\"},\"constructor\":{\"details\":\"Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/openzeppelin/proxy/transparent/TransparentUpgradeableProxy.sol\":\"TransparentUpgradeableProxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x93b4e21c931252739a1ec13ea31d3d35a5c068be3163ccab83e4d70c40355f03\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1));\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(Address.isContract(IBeacon(newBeacon).implementation()), \\\"ERC1967: beacon implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x17668652127feebed0ce8d9431ef95ccc8c4292f03e3b8cf06c6ca16af396633\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xd5d1fd16e9faff7fcb3a52e02a8d49156f42a38a03f07b5f1810c21c2149a8ab\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n assert(_ADMIN_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n _changeAdmin(admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\n */\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\n _changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n}\\n\",\"keccak256\":\"0x140055a64cf579d622e04f5a198595832bf2cb193cd0005f4f2d4d61ca906253\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\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 Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\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 require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\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\\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}\\n\",\"keccak256\":\"0x3777e696b62134e6177440dbe6e6601c0c156a443f57167194b67e75527439de\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6080604052604051620011b2380380620011b2833981016040819052620000269162000519565b82816200005560017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd620005f9565b6000805160206200116b833981519152146200007557620000756200061f565b6200008382826000620000e7565b50620000b3905060017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6104620005f9565b6000805160206200114b83398151915214620000d357620000d36200061f565b620000de8262000124565b50505062000688565b620000f2836200017f565b600082511180620001005750805b156200011f576200011d8383620001c160201b620002ff1760201c565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6200014f620001f0565b604080516001600160a01b03928316815291841660208301520160405180910390a16200017c8162000229565b50565b6200018a81620002de565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060620001e983836040518060600160405280602781526020016200118b6027913962000381565b9392505050565b60006200021a6000805160206200114b83398151915260001b6200046760201b620002731760201c565b546001600160a01b0316919050565b6001600160a01b038116620002945760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b80620002bd6000805160206200114b83398151915260001b6200046760201b620002731760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b620002f4816200046a60201b6200032b1760201c565b620003585760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016200028b565b80620002bd6000805160206200116b83398151915260001b6200046760201b620002731760201c565b60606001600160a01b0384163b620003eb5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200028b565b600080856001600160a01b03168560405162000408919062000635565b600060405180830381855af49150503d806000811462000445576040519150601f19603f3d011682016040523d82523d6000602084013e6200044a565b606091505b5090925090506200045d82828662000479565b9695505050505050565b90565b6001600160a01b03163b151590565b606083156200048a575081620001e9565b8251156200049b5782518084602001fd5b8160405162461bcd60e51b81526004016200028b919062000653565b80516001600160a01b0381168114620004cf57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101562000507578181015183820152602001620004ed565b838111156200011d5750506000910152565b6000806000606084860312156200052f57600080fd5b6200053a84620004b7565b92506200054a60208501620004b7565b60408501519092506001600160401b03808211156200056857600080fd5b818601915086601f8301126200057d57600080fd5b815181811115620005925762000592620004d4565b604051601f8201601f19908116603f01168101908382118183101715620005bd57620005bd620004d4565b81604052828152896020848701011115620005d757600080fd5b620005ea836020830160208801620004ea565b80955050505050509250925092565b6000828210156200061a57634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b6000825162000649818460208701620004ea565b9190910192915050565b602081526000825180602084015262000674816040850160208701620004ea565b601f01601f19169190910160400192915050565b610ab380620006986000396000f3fe60806040526004361061005e5760003560e01c80635c60da1b116100435780635c60da1b146100a85780638f283970146100e6578063f851a440146101065761006d565b80633659cfe6146100755780634f1ef286146100955761006d565b3661006d5761006b61011b565b005b61006b61011b565b34801561008157600080fd5b5061006b61009036600461091f565b610135565b61006b6100a336600461093a565b610196565b3480156100b457600080fd5b506100bd610221565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100f257600080fd5b5061006b61010136600461091f565b610276565b34801561011257600080fd5b506100bd6102ba565b610123610347565b61013361012e610435565b61043f565b565b61013d610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561018e5761018b816040518060200160405280600081525060006104a3565b50565b61018b61011b565b61019e610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610219576102148383838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250600192506104a3915050565b505050565b61021461011b565b600061022b610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561026b57610266610435565b905090565b61027361011b565b90565b61027e610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561018e5761018b816104ce565b60006102c4610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561026b57610266610463565b60606103248383604051806060016040528060278152602001610a576027913961052f565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b61034f610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610133576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b6000610266610657565b3660008037600080366000845af43d6000803e80801561045e573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b5473ffffffffffffffffffffffffffffffffffffffff16919050565b6104ac8361067f565b6000825111806104b95750805b15610214576104c883836102ff565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6104f7610463565b6040805173ffffffffffffffffffffffffffffffffffffffff928316815291841660208301520160405180910390a161018b816106cc565b606073ffffffffffffffffffffffffffffffffffffffff84163b6105d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e74726163740000000000000000000000000000000000000000000000000000606482015260840161042c565b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516105fd91906109e9565b600060405180830381855af49150503d8060008114610638576040519150601f19603f3d011682016040523d82523d6000602084013e61063d565b606091505b509150915061064d8282866107d8565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610487565b6106888161082b565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b73ffffffffffffffffffffffffffffffffffffffff811661076f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161042c565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9290921691909117905550565b606083156107e7575081610324565b8251156107f75782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161042c9190610a05565b73ffffffffffffffffffffffffffffffffffffffff81163b6108cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e747261637400000000000000000000000000000000000000606482015260840161042c565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610792565b803573ffffffffffffffffffffffffffffffffffffffff8116811461091a57600080fd5b919050565b60006020828403121561093157600080fd5b610324826108f6565b60008060006040848603121561094f57600080fd5b610958846108f6565b9250602084013567ffffffffffffffff8082111561097557600080fd5b818601915086601f83011261098957600080fd5b81358181111561099857600080fd5b8760208285010111156109aa57600080fd5b6020830194508093505050509250925092565b60005b838110156109d85781810151838201526020016109c0565b838111156104c85750506000910152565b600082516109fb8184602087016109bd565b9190910192915050565b6020815260008251806020840152610a248160408501602087016109bd565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220b29caa54336b3ee836679675e9732ec5e526fb3f803cca2fe336cc3555aba62264736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040526004361061005e5760003560e01c80635c60da1b116100435780635c60da1b146100a85780638f283970146100e6578063f851a440146101065761006d565b80633659cfe6146100755780634f1ef286146100955761006d565b3661006d5761006b61011b565b005b61006b61011b565b34801561008157600080fd5b5061006b61009036600461091f565b610135565b61006b6100a336600461093a565b610196565b3480156100b457600080fd5b506100bd610221565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100f257600080fd5b5061006b61010136600461091f565b610276565b34801561011257600080fd5b506100bd6102ba565b610123610347565b61013361012e610435565b61043f565b565b61013d610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561018e5761018b816040518060200160405280600081525060006104a3565b50565b61018b61011b565b61019e610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610219576102148383838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250600192506104a3915050565b505050565b61021461011b565b600061022b610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561026b57610266610435565b905090565b61027361011b565b90565b61027e610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561018e5761018b816104ce565b60006102c4610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561026b57610266610463565b60606103248383604051806060016040528060278152602001610a576027913961052f565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b61034f610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610133576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b6000610266610657565b3660008037600080366000845af43d6000803e80801561045e573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b5473ffffffffffffffffffffffffffffffffffffffff16919050565b6104ac8361067f565b6000825111806104b95750805b15610214576104c883836102ff565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6104f7610463565b6040805173ffffffffffffffffffffffffffffffffffffffff928316815291841660208301520160405180910390a161018b816106cc565b606073ffffffffffffffffffffffffffffffffffffffff84163b6105d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e74726163740000000000000000000000000000000000000000000000000000606482015260840161042c565b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516105fd91906109e9565b600060405180830381855af49150503d8060008114610638576040519150601f19603f3d011682016040523d82523d6000602084013e61063d565b606091505b509150915061064d8282866107d8565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610487565b6106888161082b565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b73ffffffffffffffffffffffffffffffffffffffff811661076f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161042c565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9290921691909117905550565b606083156107e7575081610324565b8251156107f75782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161042c9190610a05565b73ffffffffffffffffffffffffffffffffffffffff81163b6108cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e747261637400000000000000000000000000000000000000606482015260840161042c565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610792565b803573ffffffffffffffffffffffffffffffffffffffff8116811461091a57600080fd5b919050565b60006020828403121561093157600080fd5b610324826108f6565b60008060006040848603121561094f57600080fd5b610958846108f6565b9250602084013567ffffffffffffffff8082111561097557600080fd5b818601915086601f83011261098957600080fd5b81358181111561099857600080fd5b8760208285010111156109aa57600080fd5b6020830194508093505050509250925092565b60005b838110156109d85781810151838201526020016109c0565b838111156104c85750506000910152565b600082516109fb8184602087016109bd565b9190910192915050565b6020815260008251806020840152610a248160408501602087016109bd565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220b29caa54336b3ee836679675e9732ec5e526fb3f803cca2fe336cc3555aba62264736f6c634300080a0033", + "devdoc": { + "details": "This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \"admin cannot fallback to proxy target\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.", + "kind": "dev", + "methods": { + "admin()": { + "details": "Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`" + }, + "changeAdmin(address)": { + "details": "Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}." + }, + "constructor": { + "details": "Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}." + }, + "implementation()": { + "details": "Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`" + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/packages/deploy/deployments/mumbai/RoyaltiesRegistry.json b/packages/deploy/deployments/mumbai/RoyaltiesRegistry.json new file mode 100644 index 0000000000..adcd69f60a --- /dev/null +++ b/packages/deploy/deployments/mumbai/RoyaltiesRegistry.json @@ -0,0 +1,613 @@ +{ + "address": "0x9473A3B21fe192b491CDbA305a9b143e06D903a0", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "admin_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "changeAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "components": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "basisPoints", + "type": "uint256" + } + ], + "indexed": false, + "internalType": "struct IRoyaltiesProvider.Part[]", + "name": "royalties", + "type": "tuple[]" + } + ], + "name": "RoyaltiesSetForContract", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": true, + "internalType": "enum RoyaltiesRegistry.RoyaltiesType", + "name": "royaltiesType", + "type": "uint8" + }, + { + "indexed": true, + "internalType": "address", + "name": "royaltiesProvider", + "type": "address" + } + ], + "name": "RoyaltiesTypeSet", + "type": "event" + }, + { + "inputs": [], + "name": "WEIGHT_VALUE", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "clearRoyaltiesType", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "enum RoyaltiesRegistry.RoyaltiesType", + "name": "royaltiesType", + "type": "uint8" + } + ], + "name": "forceSetRoyaltiesType", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "getProvider", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getRoyalties", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "basisPoints", + "type": "uint256" + } + ], + "internalType": "struct IRoyaltiesProvider.Part[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "getRoyaltiesType", + "outputs": [ + { + "internalType": "enum RoyaltiesRegistry.RoyaltiesType", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "royaltiesByToken", + "outputs": [ + { + "internalType": "bool", + "name": "initialized", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "royaltiesProviders", + "outputs": [ + { + "internalType": "uint256", + "name": "provider", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "provider", + "type": "address" + } + ], + "name": "setProviderByToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "components": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "basisPoints", + "type": "uint256" + } + ], + "internalType": "struct IRoyaltiesProvider.Part[]", + "name": "royalties", + "type": "tuple[]" + } + ], + "name": "setRoyaltiesByToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "admin_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0xfb7995b83603874a68a30ac6337eddcb3483b7ce0c254fbfc97db25216ec6b82", + "receipt": { + "to": null, + "from": "0x5F890c9522dCE5670d741D4277BFCC2d9cA8Af02", + "contractAddress": "0x9473A3B21fe192b491CDbA305a9b143e06D903a0", + "transactionIndex": 1, + "gasUsed": "770002", + "logsBloom": "0x00000000000000000000000000000000400000000000000010800010000000000002000400000020000000000000000000008000000000000000000000000000000000000000000000000000000002800001000000000000000100000000000000000000020000000000000000000800020000800000000080000000000000400000800000000000000000000000000000000000000080000000000000a00000200000000000000000000000000400000000000000000000000000000200004000000020000000000001000000240000000000000400000000108000001020000000000000000000000000000000000000000000000000000000000000100000", + "blockHash": "0x2469f057d33441afa9181567267c8d57a8e1e268a13e9057525bf251d4ddb46e", + "transactionHash": "0xfb7995b83603874a68a30ac6337eddcb3483b7ce0c254fbfc97db25216ec6b82", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 42631844, + "transactionHash": "0xfb7995b83603874a68a30ac6337eddcb3483b7ce0c254fbfc97db25216ec6b82", + "address": "0x9473A3B21fe192b491CDbA305a9b143e06D903a0", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000e5c08f87c949315d69707ee71babb496af70506b" + ], + "data": "0x", + "logIndex": 2, + "blockHash": "0x2469f057d33441afa9181567267c8d57a8e1e268a13e9057525bf251d4ddb46e" + }, + { + "transactionIndex": 1, + "blockNumber": 42631844, + "transactionHash": "0xfb7995b83603874a68a30ac6337eddcb3483b7ce0c254fbfc97db25216ec6b82", + "address": "0x9473A3B21fe192b491CDbA305a9b143e06D903a0", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000005f890c9522dce5670d741d4277bfcc2d9ca8af02" + ], + "data": "0x", + "logIndex": 3, + "blockHash": "0x2469f057d33441afa9181567267c8d57a8e1e268a13e9057525bf251d4ddb46e" + }, + { + "transactionIndex": 1, + "blockNumber": 42631844, + "transactionHash": "0xfb7995b83603874a68a30ac6337eddcb3483b7ce0c254fbfc97db25216ec6b82", + "address": "0x9473A3B21fe192b491CDbA305a9b143e06D903a0", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 4, + "blockHash": "0x2469f057d33441afa9181567267c8d57a8e1e268a13e9057525bf251d4ddb46e" + }, + { + "transactionIndex": 1, + "blockNumber": 42631844, + "transactionHash": "0xfb7995b83603874a68a30ac6337eddcb3483b7ce0c254fbfc97db25216ec6b82", + "address": "0x9473A3B21fe192b491CDbA305a9b143e06D903a0", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045023af7b33994a22740bc51c3ca90a7ed82e124", + "logIndex": 5, + "blockHash": "0x2469f057d33441afa9181567267c8d57a8e1e268a13e9057525bf251d4ddb46e" + }, + { + "transactionIndex": 1, + "blockNumber": 42631844, + "transactionHash": "0xfb7995b83603874a68a30ac6337eddcb3483b7ce0c254fbfc97db25216ec6b82", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x0000000000000000000000005f890c9522dce5670d741d4277bfcc2d9ca8af02", + "0x000000000000000000000000f903ba9e006193c1527bfbe65fe2123704ea3f99" + ], + "data": "0x000000000000000000000000000000000000000000000000000b1d713e487b7400000000000000000000000000000000000000000000000f2ee853861121f62c000000000000000000000000000000000000000000001212c837fe06ffa657c500000000000000000000000000000000000000000000000f2edd3614d2d97ab8000000000000000000000000000000000000000000001212c8431b783deed339", + "logIndex": 6, + "blockHash": "0x2469f057d33441afa9181567267c8d57a8e1e268a13e9057525bf251d4ddb46e" + } + ], + "blockNumber": 42631844, + "cumulativeGasUsed": "791962", + "status": 1, + "byzantium": true + }, + "args": [ + "0xe5c08f87c949315d69707ee71babb496af70506b", + "0x45023af7B33994a22740Bc51C3Ca90A7Ed82e124", + "0x8129fc1c" + ], + "numDeployments": 1, + "solcInputHash": "0e89febeebc7444140de8e67c9067d2c", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"changeAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \\\"admin cannot fallback to proxy target\\\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\",\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"changeAdmin(address)\":{\"details\":\"Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\"},\"constructor\":{\"details\":\"Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/openzeppelin/proxy/transparent/TransparentUpgradeableProxy.sol\":\"TransparentUpgradeableProxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x93b4e21c931252739a1ec13ea31d3d35a5c068be3163ccab83e4d70c40355f03\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1));\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(Address.isContract(IBeacon(newBeacon).implementation()), \\\"ERC1967: beacon implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x17668652127feebed0ce8d9431ef95ccc8c4292f03e3b8cf06c6ca16af396633\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xd5d1fd16e9faff7fcb3a52e02a8d49156f42a38a03f07b5f1810c21c2149a8ab\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n assert(_ADMIN_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n _changeAdmin(admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\n */\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\n _changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n}\\n\",\"keccak256\":\"0x140055a64cf579d622e04f5a198595832bf2cb193cd0005f4f2d4d61ca906253\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\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 Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\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 require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\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\\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}\\n\",\"keccak256\":\"0x3777e696b62134e6177440dbe6e6601c0c156a443f57167194b67e75527439de\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6080604052604051620011b2380380620011b2833981016040819052620000269162000519565b82816200005560017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd620005f9565b6000805160206200116b833981519152146200007557620000756200061f565b6200008382826000620000e7565b50620000b3905060017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6104620005f9565b6000805160206200114b83398151915214620000d357620000d36200061f565b620000de8262000124565b50505062000688565b620000f2836200017f565b600082511180620001005750805b156200011f576200011d8383620001c160201b620002ff1760201c565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6200014f620001f0565b604080516001600160a01b03928316815291841660208301520160405180910390a16200017c8162000229565b50565b6200018a81620002de565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060620001e983836040518060600160405280602781526020016200118b6027913962000381565b9392505050565b60006200021a6000805160206200114b83398151915260001b6200046760201b620002731760201c565b546001600160a01b0316919050565b6001600160a01b038116620002945760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b80620002bd6000805160206200114b83398151915260001b6200046760201b620002731760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b620002f4816200046a60201b6200032b1760201c565b620003585760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016200028b565b80620002bd6000805160206200116b83398151915260001b6200046760201b620002731760201c565b60606001600160a01b0384163b620003eb5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200028b565b600080856001600160a01b03168560405162000408919062000635565b600060405180830381855af49150503d806000811462000445576040519150601f19603f3d011682016040523d82523d6000602084013e6200044a565b606091505b5090925090506200045d82828662000479565b9695505050505050565b90565b6001600160a01b03163b151590565b606083156200048a575081620001e9565b8251156200049b5782518084602001fd5b8160405162461bcd60e51b81526004016200028b919062000653565b80516001600160a01b0381168114620004cf57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101562000507578181015183820152602001620004ed565b838111156200011d5750506000910152565b6000806000606084860312156200052f57600080fd5b6200053a84620004b7565b92506200054a60208501620004b7565b60408501519092506001600160401b03808211156200056857600080fd5b818601915086601f8301126200057d57600080fd5b815181811115620005925762000592620004d4565b604051601f8201601f19908116603f01168101908382118183101715620005bd57620005bd620004d4565b81604052828152896020848701011115620005d757600080fd5b620005ea836020830160208801620004ea565b80955050505050509250925092565b6000828210156200061a57634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b6000825162000649818460208701620004ea565b9190910192915050565b602081526000825180602084015262000674816040850160208701620004ea565b601f01601f19169190910160400192915050565b610ab380620006986000396000f3fe60806040526004361061005e5760003560e01c80635c60da1b116100435780635c60da1b146100a85780638f283970146100e6578063f851a440146101065761006d565b80633659cfe6146100755780634f1ef286146100955761006d565b3661006d5761006b61011b565b005b61006b61011b565b34801561008157600080fd5b5061006b61009036600461091f565b610135565b61006b6100a336600461093a565b610196565b3480156100b457600080fd5b506100bd610221565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100f257600080fd5b5061006b61010136600461091f565b610276565b34801561011257600080fd5b506100bd6102ba565b610123610347565b61013361012e610435565b61043f565b565b61013d610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561018e5761018b816040518060200160405280600081525060006104a3565b50565b61018b61011b565b61019e610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610219576102148383838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250600192506104a3915050565b505050565b61021461011b565b600061022b610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561026b57610266610435565b905090565b61027361011b565b90565b61027e610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561018e5761018b816104ce565b60006102c4610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561026b57610266610463565b60606103248383604051806060016040528060278152602001610a576027913961052f565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b61034f610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610133576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b6000610266610657565b3660008037600080366000845af43d6000803e80801561045e573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b5473ffffffffffffffffffffffffffffffffffffffff16919050565b6104ac8361067f565b6000825111806104b95750805b15610214576104c883836102ff565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6104f7610463565b6040805173ffffffffffffffffffffffffffffffffffffffff928316815291841660208301520160405180910390a161018b816106cc565b606073ffffffffffffffffffffffffffffffffffffffff84163b6105d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e74726163740000000000000000000000000000000000000000000000000000606482015260840161042c565b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516105fd91906109e9565b600060405180830381855af49150503d8060008114610638576040519150601f19603f3d011682016040523d82523d6000602084013e61063d565b606091505b509150915061064d8282866107d8565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610487565b6106888161082b565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b73ffffffffffffffffffffffffffffffffffffffff811661076f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161042c565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9290921691909117905550565b606083156107e7575081610324565b8251156107f75782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161042c9190610a05565b73ffffffffffffffffffffffffffffffffffffffff81163b6108cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e747261637400000000000000000000000000000000000000606482015260840161042c565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610792565b803573ffffffffffffffffffffffffffffffffffffffff8116811461091a57600080fd5b919050565b60006020828403121561093157600080fd5b610324826108f6565b60008060006040848603121561094f57600080fd5b610958846108f6565b9250602084013567ffffffffffffffff8082111561097557600080fd5b818601915086601f83011261098957600080fd5b81358181111561099857600080fd5b8760208285010111156109aa57600080fd5b6020830194508093505050509250925092565b60005b838110156109d85781810151838201526020016109c0565b838111156104c85750506000910152565b600082516109fb8184602087016109bd565b9190910192915050565b6020815260008251806020840152610a248160408501602087016109bd565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220b29caa54336b3ee836679675e9732ec5e526fb3f803cca2fe336cc3555aba62264736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040526004361061005e5760003560e01c80635c60da1b116100435780635c60da1b146100a85780638f283970146100e6578063f851a440146101065761006d565b80633659cfe6146100755780634f1ef286146100955761006d565b3661006d5761006b61011b565b005b61006b61011b565b34801561008157600080fd5b5061006b61009036600461091f565b610135565b61006b6100a336600461093a565b610196565b3480156100b457600080fd5b506100bd610221565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100f257600080fd5b5061006b61010136600461091f565b610276565b34801561011257600080fd5b506100bd6102ba565b610123610347565b61013361012e610435565b61043f565b565b61013d610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561018e5761018b816040518060200160405280600081525060006104a3565b50565b61018b61011b565b61019e610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610219576102148383838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250600192506104a3915050565b505050565b61021461011b565b600061022b610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561026b57610266610435565b905090565b61027361011b565b90565b61027e610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561018e5761018b816104ce565b60006102c4610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561026b57610266610463565b60606103248383604051806060016040528060278152602001610a576027913961052f565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b61034f610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610133576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b6000610266610657565b3660008037600080366000845af43d6000803e80801561045e573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b5473ffffffffffffffffffffffffffffffffffffffff16919050565b6104ac8361067f565b6000825111806104b95750805b15610214576104c883836102ff565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6104f7610463565b6040805173ffffffffffffffffffffffffffffffffffffffff928316815291841660208301520160405180910390a161018b816106cc565b606073ffffffffffffffffffffffffffffffffffffffff84163b6105d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e74726163740000000000000000000000000000000000000000000000000000606482015260840161042c565b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516105fd91906109e9565b600060405180830381855af49150503d8060008114610638576040519150601f19603f3d011682016040523d82523d6000602084013e61063d565b606091505b509150915061064d8282866107d8565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610487565b6106888161082b565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b73ffffffffffffffffffffffffffffffffffffffff811661076f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161042c565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9290921691909117905550565b606083156107e7575081610324565b8251156107f75782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161042c9190610a05565b73ffffffffffffffffffffffffffffffffffffffff81163b6108cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e747261637400000000000000000000000000000000000000606482015260840161042c565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610792565b803573ffffffffffffffffffffffffffffffffffffffff8116811461091a57600080fd5b919050565b60006020828403121561093157600080fd5b610324826108f6565b60008060006040848603121561094f57600080fd5b610958846108f6565b9250602084013567ffffffffffffffff8082111561097557600080fd5b818601915086601f83011261098957600080fd5b81358181111561099857600080fd5b8760208285010111156109aa57600080fd5b6020830194508093505050509250925092565b60005b838110156109d85781810151838201526020016109c0565b838111156104c85750506000910152565b600082516109fb8184602087016109bd565b9190910192915050565b6020815260008251806020840152610a248160408501602087016109bd565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220b29caa54336b3ee836679675e9732ec5e526fb3f803cca2fe336cc3555aba62264736f6c634300080a0033", + "execute": { + "methodName": "initialize", + "args": [] + }, + "implementation": "0xe5c08f87c949315d69707ee71babb496af70506b", + "devdoc": { + "details": "This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \"admin cannot fallback to proxy target\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.", + "kind": "dev", + "methods": { + "admin()": { + "details": "Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`" + }, + "changeAdmin(address)": { + "details": "Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}." + }, + "constructor": { + "details": "Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}." + }, + "implementation()": { + "details": "Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`" + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/packages/deploy/deployments/mumbai/RoyaltiesRegistry_Implementation.json b/packages/deploy/deployments/mumbai/RoyaltiesRegistry_Implementation.json new file mode 100644 index 0000000000..127a65d7f7 --- /dev/null +++ b/packages/deploy/deployments/mumbai/RoyaltiesRegistry_Implementation.json @@ -0,0 +1,698 @@ +{ + "address": "0xe5c08f87c949315d69707ee71babb496af70506b", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "components": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "basisPoints", + "type": "uint256" + } + ], + "indexed": false, + "internalType": "struct IRoyaltiesProvider.Part[]", + "name": "royalties", + "type": "tuple[]" + } + ], + "name": "RoyaltiesSetForContract", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": true, + "internalType": "enum RoyaltiesRegistry.RoyaltiesType", + "name": "royaltiesType", + "type": "uint8" + }, + { + "indexed": true, + "internalType": "address", + "name": "royaltiesProvider", + "type": "address" + } + ], + "name": "RoyaltiesTypeSet", + "type": "event" + }, + { + "inputs": [], + "name": "WEIGHT_VALUE", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "clearRoyaltiesType", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "enum RoyaltiesRegistry.RoyaltiesType", + "name": "royaltiesType", + "type": "uint8" + } + ], + "name": "forceSetRoyaltiesType", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "getProvider", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getRoyalties", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "basisPoints", + "type": "uint256" + } + ], + "internalType": "struct IRoyaltiesProvider.Part[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "getRoyaltiesType", + "outputs": [ + { + "internalType": "enum RoyaltiesRegistry.RoyaltiesType", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "royaltiesByToken", + "outputs": [ + { + "internalType": "bool", + "name": "initialized", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "royaltiesProviders", + "outputs": [ + { + "internalType": "uint256", + "name": "provider", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "provider", + "type": "address" + } + ], + "name": "setProviderByToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "components": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "basisPoints", + "type": "uint256" + } + ], + "internalType": "struct IRoyaltiesProvider.Part[]", + "name": "royalties", + "type": "tuple[]" + } + ], + "name": "setRoyaltiesByToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x4f3f93766a59bbef2082ec1db2a1f9ff68a4c4e876477e9185a061862ee95070", + "receipt": { + "to": null, + "from": "0x5f890c9522dce5670d741d4277bfcc2d9ca8af02", + "contractAddress": "0xe5c08f87c949315d69707ee71babb496af70506b", + "transactionIndex": "0x4", + "gasUsed": "0x180643", + "logsBloom": "0x00000000000000004000000000000000000000000000000000000010000000000002000000000020000000000000000000008000000000000000010000000000000000000000000000000000000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000080000000000000200000200000000000000000000000000400000000000000000000000000000000004000000000000000000001000000040000000000000000000000108000001000000000000000000000000000000000000000000000000000000000000000100000", + "blockHash": "0x001f8bf0de40605357995688499f152565d66dab19a316aeb47dcbc511751127", + "transactionHash": "0x4f3f93766a59bbef2082ec1db2a1f9ff68a4c4e876477e9185a061862ee95070", + "logs": [ + { + "address": "0xe5c08f87c949315d69707ee71babb496af70506b", + "blockHash": "0x001f8bf0de40605357995688499f152565d66dab19a316aeb47dcbc511751127", + "blockNumber": "0x28a8287", + "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", + "logIndex": "0x12", + "removed": false, + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "transactionHash": "0x4f3f93766a59bbef2082ec1db2a1f9ff68a4c4e876477e9185a061862ee95070", + "transactionIndex": "0x4" + }, + { + "address": "0x0000000000000000000000000000000000001010", + "blockHash": "0x001f8bf0de40605357995688499f152565d66dab19a316aeb47dcbc511751127", + "blockNumber": "0x28a8287", + "data": "0x000000000000000000000000000000000000000000000000000a118b7f8608c900000000000000000000000000000000000000000000000f2ef2651192105ce2000000000000000000000000000000000000000000001212c547172b8bf67d7800000000000000000000000000000000000000000000000f2ee85386128a5419000000000000000000000000000000000000000000001212c55128b70b7c8641", + "logIndex": "0x13", + "removed": false, + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x0000000000000000000000005f890c9522dce5670d741d4277bfcc2d9ca8af02", + "0x000000000000000000000000f903ba9e006193c1527bfbe65fe2123704ea3f99" + ], + "transactionHash": "0x4f3f93766a59bbef2082ec1db2a1f9ff68a4c4e876477e9185a061862ee95070", + "transactionIndex": "0x4" + } + ], + "blockNumber": "0x28a8287", + "cumulativeGasUsed": "0x202f9a", + "status": "0x1" + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "e65e4ae76ce109b65d6560f491fa920e", + "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"basisPoints\",\"type\":\"uint256\"}],\"indexed\":false,\"internalType\":\"struct IRoyaltiesProvider.Part[]\",\"name\":\"royalties\",\"type\":\"tuple[]\"}],\"name\":\"RoyaltiesSetForContract\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"enum RoyaltiesRegistry.RoyaltiesType\",\"name\":\"royaltiesType\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"royaltiesProvider\",\"type\":\"address\"}],\"name\":\"RoyaltiesTypeSet\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"WEIGHT_VALUE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"clearRoyaltiesType\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"enum RoyaltiesRegistry.RoyaltiesType\",\"name\":\"royaltiesType\",\"type\":\"uint8\"}],\"name\":\"forceSetRoyaltiesType\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getProvider\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getRoyalties\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"basisPoints\",\"type\":\"uint256\"}],\"internalType\":\"struct IRoyaltiesProvider.Part[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getRoyaltiesType\",\"outputs\":[{\"internalType\":\"enum RoyaltiesRegistry.RoyaltiesType\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"royaltiesByToken\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"initialized\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"royaltiesProviders\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"provider\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"provider\",\"type\":\"address\"}],\"name\":\"setProviderByToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"basisPoints\",\"type\":\"uint256\"}],\"internalType\":\"struct IRoyaltiesProvider.Part[]\",\"name\":\"royalties\",\"type\":\"tuple[]\"}],\"name\":\"setRoyaltiesByToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"The Sandbox\",\"details\":\"Contract managing the registry of royalties.\",\"events\":{\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"RoyaltiesSetForContract(address,(address,uint256)[])\":{\"params\":{\"royalties\":\"An array of royalties set for the token.\",\"token\":\"The token address for which royalties are set.\"}},\"RoyaltiesTypeSet(address,uint8,address)\":{\"params\":{\"royaltiesProvider\":\"The address of the royalties provider.\",\"royaltiesType\":\"The type of royalties set.\",\"token\":\"The token address.\"}}},\"kind\":\"dev\",\"methods\":{\"clearRoyaltiesType(address)\":{\"params\":{\"token\":\"Address of the token.\"}},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\",\"details\":\"This protects the implementation contract from being initialized.\"},\"forceSetRoyaltiesType(address,uint8)\":{\"params\":{\"royaltiesType\":\"The new royalty type to be set.\",\"token\":\"Address of the token.\"}},\"getProvider(address)\":{\"params\":{\"token\":\"token address\"},\"returns\":{\"_0\":\"address of provider\"}},\"getRoyalties(address,uint256)\":{\"params\":{\"token\":\"Address of the token.\",\"tokenId\":\"ID of the token.\"},\"returns\":{\"_0\":\"An array containing royalty parts.\"}},\"getRoyaltiesType(address)\":{\"params\":{\"token\":\"Address of the token.\"},\"returns\":{\"_0\":\"The type of royalty associated with the token.\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"setProviderByToken(address,address)\":{\"params\":{\"provider\":\"Address of the external royalties provider.\",\"token\":\"Address of the token.\"}},\"setRoyaltiesByToken(address,(address,uint256)[])\":{\"params\":{\"royalties\":\"Array of royalty parts to be set for the token.\",\"token\":\"Address of the token.\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"stateVariables\":{\"WEIGHT_VALUE\":{\"details\":\"Used to call EIP2981 royaltyInfo to calculate the royalties percentage\"}},\"title\":\"RoyaltiesRegistry\",\"version\":1},\"userdoc\":{\"events\":{\"RoyaltiesSetForContract(address,(address,uint256)[])\":{\"notice\":\"Emitted when royalties are set for a token.\"},\"RoyaltiesTypeSet(address,uint8,address)\":{\"notice\":\"Emitted when the royalties type and provider are defined for a token.\"}},\"kind\":\"user\",\"methods\":{\"clearRoyaltiesType(address)\":{\"notice\":\"Resets the royalty type for a token to 'UNSET'.\"},\"forceSetRoyaltiesType(address,uint8)\":{\"notice\":\"Overwrites the royalty type for a given token.\"},\"getProvider(address)\":{\"notice\":\"Returns provider address for token contract from royaltiesProviders mapping\"},\"getRoyalties(address,uint256)\":{\"notice\":\"Fetches royalties for a given token and token ID.\"},\"getRoyaltiesType(address)\":{\"notice\":\"Fetches the royalty type for a given token.\"},\"initialize()\":{\"notice\":\"Royalties registry initializer\"},\"royaltiesByToken(address)\":{\"notice\":\"Stores royalties for token contract, set in setRoyaltiesByToken() method\"},\"royaltiesProviders(address)\":{\"notice\":\"Stores external provider and royalties type for token contract\"},\"setProviderByToken(address,address)\":{\"notice\":\"Assigns an external provider for a token's royalties and sets the royalty type as 'EXTERNAL_PROVIDER' (2).\"},\"setRoyaltiesByToken(address,(address,uint256)[])\":{\"notice\":\"Defines royalties for a token and sets the royalty type as 'BY_TOKEN'.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@sandbox-smart-contracts/marketplace/contracts/RoyaltiesRegistry.sol\":\"RoyaltiesRegistry\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":2000},\"remappings\":[]},\"sources\":{\"@manifoldxyz/royalty-registry-solidity/contracts/overrides/IRoyaltySplitter.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/// @author: manifold.xyz\\n\\nimport \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\n\\nstruct Recipient {\\n address payable recipient;\\n uint16 bps;\\n}\\n\\ninterface IRoyaltySplitter is IERC165 {\\n /**\\n * @dev Set the splitter recipients. Total bps must total 10000.\\n */\\n function setRecipients(Recipient[] calldata recipients) external;\\n\\n /**\\n * @dev Get the splitter recipients;\\n */\\n function getRecipients() external view returns (Recipient[] memory);\\n}\\n\",\"keccak256\":\"0xc507963f66c4238d25e69d2d05ac5995c549aa89789e89e7a556403221547c6d\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n function __Ownable_init() internal onlyInitializing {\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable_init_unchained() internal onlyInitializing {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x4075622496acc77fd6d4de4cc30a8577a744d5c75afad33fdeacf1704d6eda98\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\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 Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\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 /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\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\",\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal onlyInitializing {\\n }\\n\\n function __Context_init_unchained() internal onlyInitializing {\\n }\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165CheckerUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/introspection/ERC165Checker.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165Upgradeable.sol\\\";\\n\\n/**\\n * @dev Library used to query support of an interface declared via {IERC165}.\\n *\\n * Note that these functions return the actual result of the query: they do not\\n * `revert` if an interface is not supported. It is up to the caller to decide\\n * what to do in these cases.\\n */\\nlibrary ERC165CheckerUpgradeable {\\n // As per the EIP-165 spec, no interface should ever match 0xffffffff\\n bytes4 private constant _INTERFACE_ID_INVALID = 0xffffffff;\\n\\n /**\\n * @dev Returns true if `account` supports the {IERC165} interface.\\n */\\n function supportsERC165(address account) internal view returns (bool) {\\n // Any contract that implements ERC165 must explicitly indicate support of\\n // InterfaceId_ERC165 and explicitly indicate non-support of InterfaceId_Invalid\\n return\\n supportsERC165InterfaceUnchecked(account, type(IERC165Upgradeable).interfaceId) &&\\n !supportsERC165InterfaceUnchecked(account, _INTERFACE_ID_INVALID);\\n }\\n\\n /**\\n * @dev Returns true if `account` supports the interface defined by\\n * `interfaceId`. Support for {IERC165} itself is queried automatically.\\n *\\n * See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(address account, bytes4 interfaceId) internal view returns (bool) {\\n // query support of both ERC165 as per the spec and support of _interfaceId\\n return supportsERC165(account) && supportsERC165InterfaceUnchecked(account, interfaceId);\\n }\\n\\n /**\\n * @dev Returns a boolean array where each value corresponds to the\\n * interfaces passed in and whether they're supported or not. This allows\\n * you to batch check interfaces for a contract where your expectation\\n * is that some interfaces may not be supported.\\n *\\n * See {IERC165-supportsInterface}.\\n *\\n * _Available since v3.4._\\n */\\n function getSupportedInterfaces(\\n address account,\\n bytes4[] memory interfaceIds\\n ) internal view returns (bool[] memory) {\\n // an array of booleans corresponding to interfaceIds and whether they're supported or not\\n bool[] memory interfaceIdsSupported = new bool[](interfaceIds.length);\\n\\n // query support of ERC165 itself\\n if (supportsERC165(account)) {\\n // query support of each interface in interfaceIds\\n for (uint256 i = 0; i < interfaceIds.length; i++) {\\n interfaceIdsSupported[i] = supportsERC165InterfaceUnchecked(account, interfaceIds[i]);\\n }\\n }\\n\\n return interfaceIdsSupported;\\n }\\n\\n /**\\n * @dev Returns true if `account` supports all the interfaces defined in\\n * `interfaceIds`. Support for {IERC165} itself is queried automatically.\\n *\\n * Batch-querying can lead to gas savings by skipping repeated checks for\\n * {IERC165} support.\\n *\\n * See {IERC165-supportsInterface}.\\n */\\n function supportsAllInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool) {\\n // query support of ERC165 itself\\n if (!supportsERC165(account)) {\\n return false;\\n }\\n\\n // query support of each interface in interfaceIds\\n for (uint256 i = 0; i < interfaceIds.length; i++) {\\n if (!supportsERC165InterfaceUnchecked(account, interfaceIds[i])) {\\n return false;\\n }\\n }\\n\\n // all interfaces supported\\n return true;\\n }\\n\\n /**\\n * @notice Query if a contract implements an interface, does not check ERC165 support\\n * @param account The address of the contract to query for support of an interface\\n * @param interfaceId The interface identifier, as specified in ERC-165\\n * @return true if the contract at account indicates support of the interface with\\n * identifier interfaceId, false otherwise\\n * @dev Assumes that account contains a contract that supports ERC165, otherwise\\n * the behavior of this method is undefined. This precondition can be checked\\n * with {supportsERC165}.\\n *\\n * Some precompiled contracts will falsely indicate support for a given interface, so caution\\n * should be exercised when using this function.\\n *\\n * Interface identification is specified in ERC-165.\\n */\\n function supportsERC165InterfaceUnchecked(address account, bytes4 interfaceId) internal view returns (bool) {\\n // prepare call\\n bytes memory encodedParams = abi.encodeWithSelector(IERC165Upgradeable.supportsInterface.selector, interfaceId);\\n\\n // perform static call\\n bool success;\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly {\\n success := staticcall(30000, account, add(encodedParams, 0x20), mload(encodedParams), 0x00, 0x20)\\n returnSize := returndatasize()\\n returnValue := mload(0x00)\\n }\\n\\n return success && returnSize >= 0x20 && returnValue > 0;\\n }\\n}\\n\",\"keccak256\":\"0x94edef8687cf1335a114f7e7267fa92cb0d9e61afde8d62589aceede6c245caf\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165Upgradeable {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xc6cef87559d0aeffdf0a99803de655938a7779ec0a3cd5d4383483ad85565a09\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC2981.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC2981.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Interface for the NFT Royalty Standard.\\n *\\n * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal\\n * support for royalty payments across all NFT marketplaces and ecosystem participants.\\n *\\n * _Available since v4.5._\\n */\\ninterface IERC2981 is IERC165 {\\n /**\\n * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of\\n * exchange. The royalty amount is denominated and should be paid in that same unit of exchange.\\n */\\n function royaltyInfo(\\n uint256 tokenId,\\n uint256 salePrice\\n ) external view returns (address receiver, uint256 royaltyAmount);\\n}\\n\",\"keccak256\":\"0x3976825a61df20457730b79ad0ac9c8908e3c7978ed9bf090c67137c91256b5c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/dependency-royalty-management/contracts/interfaces/IMultiRoyaltyRecipients.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport {IERC165} from \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport {Recipient} from \\\"@manifoldxyz/royalty-registry-solidity/contracts/overrides/IRoyaltySplitter.sol\\\";\\n\\n/// Multi-receiver EIP2981 implementation\\ninterface IMultiRoyaltyRecipients is IERC165 {\\n /// @dev Helper function to get all recipients\\n function getRecipients(uint256 tokenId) external view returns (Recipient[] memory);\\n}\\n\",\"keccak256\":\"0x2c6e5455253182472f0c7ef21c46279581e281d542b511b96cb693baa0863f33\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/marketplace/contracts/RoyaltiesRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.19;\\n\\nimport {IMultiRoyaltyRecipients} from \\\"@sandbox-smart-contracts/dependency-royalty-management/contracts/interfaces/IMultiRoyaltyRecipients.sol\\\";\\nimport {IERC2981} from \\\"@openzeppelin/contracts/interfaces/IERC2981.sol\\\";\\nimport {ERC165CheckerUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165CheckerUpgradeable.sol\\\";\\nimport {OwnableUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\nimport {Recipient} from \\\"@manifoldxyz/royalty-registry-solidity/contracts/overrides/IRoyaltySplitter.sol\\\";\\nimport {IRoyaltiesProvider, TOTAL_BASIS_POINTS} from \\\"./interfaces/IRoyaltiesProvider.sol\\\";\\n\\n/// @author The Sandbox\\n/// @title RoyaltiesRegistry\\n/// @dev Contract managing the registry of royalties.\\ncontract RoyaltiesRegistry is OwnableUpgradeable, IRoyaltiesProvider {\\n using ERC165CheckerUpgradeable for address;\\n /// @notice Emitted when royalties are set for a token.\\n /// @param token The token address for which royalties are set.\\n /// @param royalties An array of royalties set for the token.\\n event RoyaltiesSetForContract(address indexed token, Part[] royalties);\\n\\n /// @notice Emitted when the royalties type and provider are defined for a token.\\n /// @param token The token address.\\n /// @param royaltiesType The type of royalties set.\\n /// @param royaltiesProvider The address of the royalties provider.\\n event RoyaltiesTypeSet(\\n address indexed token,\\n RoyaltiesType indexed royaltiesType,\\n address indexed royaltiesProvider\\n );\\n\\n /// @dev Stores royalty information for tokens.\\n struct RoyaltiesSet {\\n bool initialized;\\n Part[] royalties;\\n }\\n\\n /// @dev Represents a type of royalties.\\n enum RoyaltiesType {\\n UNSET,\\n BY_TOKEN,\\n EXTERNAL_PROVIDER,\\n EIP2981,\\n UNSUPPORTED_NONEXISTENT\\n }\\n\\n /// @dev Used to call EIP2981 royaltyInfo to calculate the royalties percentage\\n uint256 public constant WEIGHT_VALUE = 1e6;\\n\\n /// @notice Stores royalties for token contract, set in setRoyaltiesByToken() method\\n mapping(address token => RoyaltiesSet royalties) public royaltiesByToken;\\n\\n /// @notice Stores external provider and royalties type for token contract\\n mapping(address token => uint256 provider) public royaltiesProviders;\\n\\n /// @dev This protects the implementation contract from being initialized.\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @notice Royalties registry initializer\\n function initialize() external initializer {\\n __Ownable_init();\\n }\\n\\n /// @notice Assigns an external provider for a token's royalties and sets the royalty type as 'EXTERNAL_PROVIDER' (2).\\n /// @param token Address of the token.\\n /// @param provider Address of the external royalties provider.\\n function setProviderByToken(address token, address provider) external {\\n _checkOwner(token);\\n _setRoyaltiesType(token, RoyaltiesType.EXTERNAL_PROVIDER, provider);\\n }\\n\\n /// @notice Fetches the royalty type for a given token.\\n /// @param token Address of the token.\\n /// @return The type of royalty associated with the token.\\n function getRoyaltiesType(address token) external view returns (RoyaltiesType) {\\n return _getRoyaltiesType(royaltiesProviders[token]);\\n }\\n\\n /// @notice Overwrites the royalty type for a given token.\\n /// @param token Address of the token.\\n /// @param royaltiesType The new royalty type to be set.\\n function forceSetRoyaltiesType(address token, RoyaltiesType royaltiesType) external {\\n _checkOwner(token);\\n _setRoyaltiesType(token, royaltiesType, getProvider(token));\\n }\\n\\n /// @notice Resets the royalty type for a token to 'UNSET'.\\n /// @param token Address of the token.\\n function clearRoyaltiesType(address token) external {\\n _checkOwner(token);\\n royaltiesProviders[token] = uint256(uint160(getProvider(token)));\\n\\n emit RoyaltiesTypeSet(token, RoyaltiesType.UNSET, getProvider(token));\\n }\\n\\n /// @notice Defines royalties for a token and sets the royalty type as 'BY_TOKEN'.\\n /// @param token Address of the token.\\n /// @param royalties Array of royalty parts to be set for the token.\\n function setRoyaltiesByToken(address token, Part[] memory royalties) external {\\n _checkOwner(token);\\n //clearing royaltiesProviders value for the token\\n delete royaltiesProviders[token];\\n // setting royaltiesType = 1 for the token\\n _setRoyaltiesType(token, RoyaltiesType.BY_TOKEN, address(0));\\n uint256 sumRoyalties = 0;\\n delete royaltiesByToken[token];\\n for (uint256 i = 0; i < royalties.length; ++i) {\\n require(royalties[i].account != address(0x0), \\\"recipient should be present\\\");\\n require(royalties[i].basisPoints != 0, \\\"basisPoints should be > 0\\\");\\n royaltiesByToken[token].royalties.push(royalties[i]);\\n sumRoyalties += royalties[i].basisPoints;\\n }\\n require(sumRoyalties < TOTAL_BASIS_POINTS, \\\"royalties sum is more than 100%\\\");\\n royaltiesByToken[token].initialized = true;\\n emit RoyaltiesSetForContract(token, royalties);\\n }\\n\\n /// @notice Fetches royalties for a given token and token ID.\\n /// @param token Address of the token.\\n /// @param tokenId ID of the token.\\n /// @return An array containing royalty parts.\\n function getRoyalties(address token, uint256 tokenId) external returns (Part[] memory) {\\n uint256 royaltiesProviderData = royaltiesProviders[token];\\n\\n address royaltiesProvider = address(uint160(royaltiesProviderData));\\n RoyaltiesType royaltiesType = _getRoyaltiesType(royaltiesProviderData);\\n\\n // case when royaltiesType is not set\\n if (royaltiesType == RoyaltiesType.UNSET) {\\n // calculating royalties type for token\\n royaltiesType = _calculateRoyaltiesType(token, royaltiesProvider);\\n\\n //saving royalties type\\n _setRoyaltiesType(token, royaltiesType, royaltiesProvider);\\n }\\n\\n //case royaltiesType = 1, royalties are set in royaltiesByToken\\n if (royaltiesType == RoyaltiesType.BY_TOKEN) {\\n return royaltiesByToken[token].royalties;\\n }\\n\\n //case royaltiesType = 2, royalties from external provider\\n if (royaltiesType == RoyaltiesType.EXTERNAL_PROVIDER) {\\n return _providerExtractor(token, tokenId, royaltiesProvider);\\n }\\n\\n //case royaltiesType = 3, royalties EIP-2981\\n if (royaltiesType == RoyaltiesType.EIP2981) {\\n return _getRoyaltiesEIP2981(token, tokenId);\\n }\\n\\n // case royaltiesType = 4, unknown/empty royalties\\n return new Part[](0);\\n }\\n\\n /// @notice Returns provider address for token contract from royaltiesProviders mapping\\n /// @param token token address\\n /// @return address of provider\\n function getProvider(address token) public view returns (address) {\\n return address(uint160(royaltiesProviders[token]));\\n }\\n\\n /// @notice Returns the royalties type for a given raw data value.\\n /// @param data The raw data (uint256).\\n /// @return The derived royalties type.\\n function _getRoyaltiesType(uint256 data) internal pure returns (RoyaltiesType) {\\n for (uint256 i = 1; i <= uint256(type(RoyaltiesType).max); ++i) {\\n if (data / 2 ** (256 - i) == 1) {\\n return RoyaltiesType(i);\\n }\\n }\\n return RoyaltiesType.UNSET;\\n }\\n\\n /// @notice Sets the royalties type and provider for a given token contract.\\n /// @param token The address of the token.\\n /// @param royaltiesType The type of royalties to be set.\\n /// @param royaltiesProvider The address of the royalties provider.\\n function _setRoyaltiesType(address token, RoyaltiesType royaltiesType, address royaltiesProvider) internal {\\n require(royaltiesType != RoyaltiesType.UNSET, \\\"wrong royaltiesType\\\");\\n royaltiesProviders[token] = uint256(uint160(royaltiesProvider)) + 2 ** (256 - uint256(royaltiesType));\\n emit RoyaltiesTypeSet(token, royaltiesType, royaltiesProvider);\\n }\\n\\n /// @notice Validates if the message sender is the owner of the contract or the given token.\\n /// @param token Address of the token to check against.\\n function _checkOwner(address token) internal view {\\n if ((owner() != _msgSender()) && (OwnableUpgradeable(token).owner() != _msgSender())) {\\n revert(\\\"token owner not detected\\\");\\n }\\n }\\n\\n /// @notice Determines the royalties type for a given token.\\n /// @param token Address of the token.\\n /// @param royaltiesProvider Address of the royalties provider.\\n /// @return The determined royalties type.\\n function _calculateRoyaltiesType(address token, address royaltiesProvider) internal view returns (RoyaltiesType) {\\n if (token.supportsInterface(type(IERC2981).interfaceId)) {\\n return RoyaltiesType.EIP2981;\\n }\\n\\n if (royaltiesProvider != address(0)) {\\n return RoyaltiesType.EXTERNAL_PROVIDER;\\n }\\n\\n return RoyaltiesType.UNSUPPORTED_NONEXISTENT;\\n }\\n\\n /// @notice Fetches EIP-2981 royalties for a given token ID.\\n /// @param token Address of the token.\\n /// @param tokenId ID of the token for which royalties are to be fetched.\\n /// @return An array of parts representing the royalties.\\n function _getRoyaltiesEIP2981(address token, uint256 tokenId) internal view returns (Part[] memory) {\\n try IERC2981(token).royaltyInfo(tokenId, WEIGHT_VALUE) returns (address receiver, uint256 royaltyAmount) {\\n if (token.supportsInterface(type(IMultiRoyaltyRecipients).interfaceId)) {\\n return _getRecipients(token, tokenId, receiver, royaltyAmount);\\n } else {\\n return _calculateRoyalties(receiver, royaltyAmount);\\n }\\n } catch {\\n return new Part[](0);\\n }\\n }\\n\\n /// @notice Fetches the recipients and calculates the royalties.\\n /// @param token Address of the token.\\n /// @param tokenId ID of the token.\\n /// @param receiver Address of the royalty receiver.\\n /// @param royaltyAmount The total royalty amount.\\n /// @return An array of parts representing the royalties.\\n function _getRecipients(\\n address token,\\n uint256 tokenId,\\n address receiver,\\n uint256 royaltyAmount\\n ) internal view returns (Part[] memory) {\\n try IMultiRoyaltyRecipients(token).getRecipients(tokenId) returns (Recipient[] memory multiRecipients) {\\n uint256 multiRecipientsLength = multiRecipients.length;\\n Part[] memory royalties = new Part[](multiRecipientsLength);\\n uint256 sum = 0;\\n for (uint256 i; i < multiRecipientsLength; i++) {\\n Recipient memory splitRecipient = multiRecipients[i];\\n royalties[i].account = splitRecipient.recipient;\\n uint256 splitAmount = (splitRecipient.bps * royaltyAmount) / WEIGHT_VALUE;\\n royalties[i].basisPoints = splitAmount;\\n sum += splitAmount;\\n }\\n // sum can be less than amount, otherwise small-value listings can break\\n require(sum <= royaltyAmount, \\\"RoyaltiesRegistry: Invalid split\\\");\\n return royalties;\\n // solhint-disable-next-line no-empty-blocks\\n } catch {}\\n\\n return _calculateRoyalties(receiver, royaltyAmount);\\n }\\n\\n /// @notice Fetches royalties for a given token ID from an external provider.\\n /// @param token Address of the token.\\n /// @param tokenId ID of the token for which royalties are to be fetched.\\n /// @param providerAddress Address of the external provider.\\n /// @return An array of parts representing the royalties.\\n function _providerExtractor(\\n address token,\\n uint256 tokenId,\\n address providerAddress\\n ) internal returns (Part[] memory) {\\n try IRoyaltiesProvider(providerAddress).getRoyalties(token, tokenId) returns (Part[] memory result) {\\n return result;\\n } catch {\\n return new Part[](0);\\n }\\n }\\n\\n /// @notice Converts a given amount to its percentage representation and forms a royalty part.\\n /// @param to Address of the royalty recipient.\\n /// @param amount Amount of the royalty.\\n /// @return An array containing the formed royalty part.\\n function _calculateRoyalties(address to, uint256 amount) internal pure returns (Part[] memory) {\\n Part[] memory result;\\n if (amount == 0) {\\n return result;\\n }\\n uint256 percent = (amount * TOTAL_BASIS_POINTS) / WEIGHT_VALUE;\\n require(percent < TOTAL_BASIS_POINTS, \\\"royalties 2981 exceeds 100%\\\");\\n result = new Part[](1);\\n result[0].account = to;\\n result[0].basisPoints = percent;\\n return result;\\n }\\n\\n // slither-disable-next-line unused-state\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xaffd2883d02c94de5f738012e63743392d5045da22a64166bc5c0c503ea8a67e\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/marketplace/contracts/interfaces/IRoyaltiesProvider.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.19;\\n\\n// The IRoyaltiesProvider.Part.basisPoints represents percentages in base points: 2.5 % == 0.025 * 10000 == 250.\\n// We expect external contracts to return the values with this precision.\\nuint256 constant TOTAL_BASIS_POINTS = 10000;\\n\\n/// @author The Sandbox\\n/// @title RoyaltiesProvider contract interface\\n/// @notice Contains the signature for the getRoyalties function\\ninterface IRoyaltiesProvider {\\n struct Part {\\n address account;\\n uint256 basisPoints;\\n }\\n\\n /// @notice Calculates all royalties in token for tokenId\\n /// @param token Address of token\\n /// @param tokenId of the token we want to calculate royalties\\n /// @return A part with all royalties for token\\n function getRoyalties(address token, uint256 tokenId) external returns (Part[] memory);\\n}\\n\",\"keccak256\":\"0xdb67e9a7128c33290b9cb64ade84bfac064e0936933b7385a4c1238df098aa41\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5061001961001e565b6100dd565b600054610100900460ff161561008a5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff908116146100db576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b611b1b806100ec6000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80639ca7dc7a1161008c578063d836f01311610066578063d836f01314610209578063f2fde38b1461021c578063f39cc7061461022f578063fc73be001461024f57600080fd5b80639ca7dc7a146101be578063c3c52f18146101de578063c730dde2146101f157600080fd5b80638129fc1c116100c85780638129fc1c1461017257806382b19f121461017a5780638da5cb5b1461019a57806390f2b936146101ab57600080fd5b806305df952f146100ef57806355f21eb714610127578063715018a614610168575b600080fd5b6101126100fd3660046114d5565b60656020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b6101506101353660046114d5565b6001600160a01b031660009081526066602052604090205490565b6040516001600160a01b03909116815260200161011e565b610170610262565b005b610170610276565b61018d6101883660046114d5565b61039b565b60405161011e9190611508565b6033546001600160a01b0316610150565b6101706101b93660046115c4565b6103c3565b6101d16101cc36600461169c565b61069c565b60405161011e91906116c8565b6101706101ec366004611720565b610833565b6101fb620f424081565b60405190815260200161011e565b61017061021736600461175d565b610869565b61017061022a3660046114d5565b61087e565b6101fb61023d3660046114d5565b60666020526000908152604090205481565b61017061025d3660046114d5565b61090b565b61026a610963565b61027460006109bd565b565b600054610100900460ff16158080156102965750600054600160ff909116105b806102b05750303b1580156102b0575060005460ff166001145b6103275760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b6000805460ff19166001179055801561034a576000805461ff0019166101001790555b610352610a1c565b8015610398576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b6001600160a01b0381166000908152606660205260408120546103bd90610aa1565b92915050565b6103cc82610b08565b6001600160a01b03821660009081526066602052604081208190556103f5908390600190610be3565b6001600160a01b0382166000908152606560205260408120805460ff1916815581610423600183018261146d565b505060005b82518110156105ea5760006001600160a01b031683828151811061044e5761044e61178b565b6020026020010151600001516001600160a01b0316036104b05760405162461bcd60e51b815260206004820152601b60248201527f726563697069656e742073686f756c642062652070726573656e740000000000604482015260640161031e565b8281815181106104c2576104c261178b565b60200260200101516020015160000361051d5760405162461bcd60e51b815260206004820152601960248201527f6261736973506f696e74732073686f756c64206265203e203000000000000000604482015260640161031e565b60656000856001600160a01b03166001600160a01b031681526020019081526020016000206001018382815181106105575761055761178b565b6020908102919091018101518254600180820185556000948552938390208251600290920201805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0390921691909117815591015191015582518390829081106105c1576105c161178b565b602002602001015160200151826105d891906117b7565b91506105e3816117ca565b9050610428565b50612710811061063c5760405162461bcd60e51b815260206004820152601f60248201527f726f79616c746965732073756d206973206d6f7265207468616e203130302500604482015260640161031e565b6001600160a01b03831660008181526065602052604090819020805460ff19166001179055517fa3d16188597005d2eca1790984d22f379505b31a88766996ca6a3f7b5817d32c9061068f9085906116c8565b60405180910390a2505050565b6001600160a01b03821660009081526066602052604081205460609181906106c382610aa1565b905060008160048111156106d9576106d96114f2565b036106f5576106e88683610cea565b90506106f5868284610be3565b6001816004811115610709576107096114f2565b0361079a576001600160a01b038616600090815260656020908152604080832060010180548251818502810185019093528083529193909284015b8282101561078c576000848152602090819020604080518082019091526002850290910180546001600160a01b03168252600190810154828401529083529092019101610744565b5050505093505050506103bd565b60028160048111156107ae576107ae6114f2565b036107c8576107be868684610d4c565b93505050506103bd565b60038160048111156107dc576107dc6114f2565b036107eb576107be8686610e2a565b6040805160008082526020820190925290610828565b60408051808201909152600080825260208201528152602001906001900390816108015790505b509695505050505050565b61083c82610b08565b6108658282610860856001600160a01b031660009081526066602052604090205490565b610be3565b5050565b61087282610b08565b61086582600283610be3565b610886610963565b6001600160a01b0381166109025760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161031e565b610398816109bd565b61091481610b08565b6001600160a01b03818116600081815260666020526040808220805490941693849055519091907fade6cdab0cf92bd1976a7a2324ee3c1eac398f98a9500a0c8ee8d58e79b39d2f908390a450565b6033546001600160a01b031633146102745760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161031e565b603380546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16610a995760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161031e565b610274610f4f565b600060015b60048111610aff57610aba816101006117e4565b610ac59060026118db565b610acf90846118e7565b600103610aef57806004811115610ae857610ae86114f2565b9392505050565b610af8816117ca565b9050610aa6565b50600092915050565b6033546001600160a01b03163314801590610b965750336001600160a01b0316816001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b8a9190611909565b6001600160a01b031614155b156103985760405162461bcd60e51b815260206004820152601860248201527f746f6b656e206f776e6572206e6f742064657465637465640000000000000000604482015260640161031e565b6000826004811115610bf757610bf76114f2565b03610c445760405162461bcd60e51b815260206004820152601360248201527f77726f6e6720726f79616c746965735479706500000000000000000000000000604482015260640161031e565b816004811115610c5657610c566114f2565b610c62906101006117e4565b610c6d9060026118db565b610c80906001600160a01b0383166117b7565b6001600160a01b038085166000908152606660205260409020919091558116826004811115610cb157610cb16114f2565b6040516001600160a01b038616907fade6cdab0cf92bd1976a7a2324ee3c1eac398f98a9500a0c8ee8d58e79b39d2f90600090a4505050565b6000610d1f6001600160a01b0384167f2a55205a00000000000000000000000000000000000000000000000000000000610fd5565b15610d2c575060036103bd565b6001600160a01b03821615610d43575060026103bd565b50600492915050565b6040517f9ca7dc7a0000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301526024820184905260609190831690639ca7dc7a906044016000604051808303816000875af1925050508015610dd957506040513d6000823e601f3d908101601f19168201604052610dd69190810190611926565b60015b610e22576040805160008082526020820190925290610e1a565b6040805180820190915260008082526020820152815260200190600190039081610df35790505b509050610ae8565b949350505050565b6040517f2a55205a00000000000000000000000000000000000000000000000000000000815260048101829052620f424060248201526060906001600160a01b03841690632a55205a906044016040805180830381865afa925050508015610eaf575060408051601f3d908101601f19168201909252610eac918101906119da565b60015b610ef8576040805160008082526020820190925290610ef0565b6040805180820190915260008082526020820152815260200190600190039081610ec95790505b5090506103bd565b610f2b6001600160a01b0386167ffd90e89700000000000000000000000000000000000000000000000000000000610fd5565b15610f4557610f3c85858484610ff1565b925050506103bd565b610f3c8282611219565b600054610100900460ff16610fcc5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161031e565b610274336109bd565b6000610fe08361133a565b8015610ae85750610ae8838361139e565b6040517ffd90e897000000000000000000000000000000000000000000000000000000008152600481018490526060906001600160a01b0386169063fd90e89790602401600060405180830381865afa92505050801561107357506040513d6000823e601f3d908101601f191682016040526110709190810190611a08565b60015b1561120657805160008167ffffffffffffffff81111561109557611095611530565b6040519080825280602002602001820160405280156110da57816020015b60408051808201909152600080825260208201528152602001906001900390816110b35790505b5090506000805b838110156111aa5760008582815181106110fd576110fd61178b565b60200260200101519050806000015184838151811061111e5761111e61178b565b6020026020010151600001906001600160a01b031690816001600160a01b0316815250506000620f424089836020015161ffff1661115c9190611ace565b61116691906118e7565b90508085848151811061117b5761117b61178b565b602090810291909101810151015261119381856117b7565b9350505080806111a2906117ca565b9150506110e1565b50858111156111fb5760405162461bcd60e51b815260206004820181905260248201527f526f79616c7469657352656769737472793a20496e76616c69642073706c6974604482015260640161031e565b509250610e22915050565b6112108383611219565b95945050505050565b6060808260000361122b5790506103bd565b6000620f424061123d61271086611ace565b61124791906118e7565b9050612710811061129a5760405162461bcd60e51b815260206004820152601b60248201527f726f79616c746965732032393831206578636565647320313030250000000000604482015260640161031e565b60408051600180825281830190925290816020015b60408051808201909152600080825260208201528152602001906001900390816112af57905050915084826000815181106112ec576112ec61178b565b6020026020010151600001906001600160a01b031690816001600160a01b03168152505080826000815181106113245761132461178b565b6020908102919091018101510152509392505050565b6000611366827f01ffc9a70000000000000000000000000000000000000000000000000000000061139e565b80156103bd5750611397827fffffffff0000000000000000000000000000000000000000000000000000000061139e565b1592915050565b604080517fffffffff000000000000000000000000000000000000000000000000000000008316602480830191909152825180830390910181526044909101909152602080820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f01ffc9a700000000000000000000000000000000000000000000000000000000178152825160009392849283928392918391908a617530fa92503d91506000519050828015611456575060208210155b80156114625750600081115b979650505050505050565b508054600082556002029060005260206000209081019061039891905b808211156114bc57805473ffffffffffffffffffffffffffffffffffffffff191681556000600182015560020161148a565b5090565b6001600160a01b038116811461039857600080fd5b6000602082840312156114e757600080fd5b8135610ae8816114c0565b634e487b7160e01b600052602160045260246000fd5b602081016005831061152a57634e487b7160e01b600052602160045260246000fd5b91905290565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff8111828210171561156957611569611530565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561159857611598611530565b604052919050565b600067ffffffffffffffff8211156115ba576115ba611530565b5060051b60200190565b60008060408084860312156115d857600080fd5b83356115e3816114c0565b925060208481013567ffffffffffffffff81111561160057600080fd5b8501601f8101871361161157600080fd5b803561162461161f826115a0565b61156f565b81815260069190911b8201830190838101908983111561164357600080fd5b928401925b8284101561168c5785848b0312156116605760008081fd5b611668611546565b8435611673816114c0565b8152848601358682015282529285019290840190611648565b8096505050505050509250929050565b600080604083850312156116af57600080fd5b82356116ba816114c0565b946020939093013593505050565b602080825282518282018190526000919060409081850190868401855b8281101561171357815180516001600160a01b031685528601518685015292840192908501906001016116e5565b5091979650505050505050565b6000806040838503121561173357600080fd5b823561173e816114c0565b915060208301356005811061175257600080fd5b809150509250929050565b6000806040838503121561177057600080fd5b823561177b816114c0565b91506020830135611752816114c0565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808201808211156103bd576103bd6117a1565b600060001982036117dd576117dd6117a1565b5060010190565b818103818111156103bd576103bd6117a1565b600181815b80851115611832578160001904821115611818576118186117a1565b8085161561182557918102915b93841c93908002906117fc565b509250929050565b600082611849575060016103bd565b81611856575060006103bd565b816001811461186c576002811461187657611892565b60019150506103bd565b60ff841115611887576118876117a1565b50506001821b6103bd565b5060208310610133831016604e8410600b84101617156118b5575081810a6103bd565b6118bf83836117f7565b80600019048211156118d3576118d36117a1565b029392505050565b6000610ae8838361183a565b60008261190457634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561191b57600080fd5b8151610ae8816114c0565b6000602080838503121561193957600080fd5b825167ffffffffffffffff81111561195057600080fd5b8301601f8101851361196157600080fd5b805161196f61161f826115a0565b81815260069190911b8201830190838101908783111561198e57600080fd5b928401925b8284101561146257604084890312156119ac5760008081fd5b6119b4611546565b84516119bf816114c0565b81528486015186820152825260409093019290840190611993565b600080604083850312156119ed57600080fd5b82516119f8816114c0565b6020939093015192949293505050565b60006020808385031215611a1b57600080fd5b825167ffffffffffffffff811115611a3257600080fd5b8301601f81018513611a4357600080fd5b8051611a5161161f826115a0565b81815260069190911b82018301908381019087831115611a7057600080fd5b928401925b828410156114625760408489031215611a8e5760008081fd5b611a96611546565b8451611aa1816114c0565b81528486015161ffff81168114611ab85760008081fd5b8187015282526040939093019290840190611a75565b80820281158282048414176103bd576103bd6117a156fea264697066735822122013957718e3a70dfd123ebbbfde73b84981ebeff6848f93b1b3ee2f25bfa97c5c64736f6c63430008130033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c80639ca7dc7a1161008c578063d836f01311610066578063d836f01314610209578063f2fde38b1461021c578063f39cc7061461022f578063fc73be001461024f57600080fd5b80639ca7dc7a146101be578063c3c52f18146101de578063c730dde2146101f157600080fd5b80638129fc1c116100c85780638129fc1c1461017257806382b19f121461017a5780638da5cb5b1461019a57806390f2b936146101ab57600080fd5b806305df952f146100ef57806355f21eb714610127578063715018a614610168575b600080fd5b6101126100fd3660046114d5565b60656020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b6101506101353660046114d5565b6001600160a01b031660009081526066602052604090205490565b6040516001600160a01b03909116815260200161011e565b610170610262565b005b610170610276565b61018d6101883660046114d5565b61039b565b60405161011e9190611508565b6033546001600160a01b0316610150565b6101706101b93660046115c4565b6103c3565b6101d16101cc36600461169c565b61069c565b60405161011e91906116c8565b6101706101ec366004611720565b610833565b6101fb620f424081565b60405190815260200161011e565b61017061021736600461175d565b610869565b61017061022a3660046114d5565b61087e565b6101fb61023d3660046114d5565b60666020526000908152604090205481565b61017061025d3660046114d5565b61090b565b61026a610963565b61027460006109bd565b565b600054610100900460ff16158080156102965750600054600160ff909116105b806102b05750303b1580156102b0575060005460ff166001145b6103275760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b6000805460ff19166001179055801561034a576000805461ff0019166101001790555b610352610a1c565b8015610398576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b6001600160a01b0381166000908152606660205260408120546103bd90610aa1565b92915050565b6103cc82610b08565b6001600160a01b03821660009081526066602052604081208190556103f5908390600190610be3565b6001600160a01b0382166000908152606560205260408120805460ff1916815581610423600183018261146d565b505060005b82518110156105ea5760006001600160a01b031683828151811061044e5761044e61178b565b6020026020010151600001516001600160a01b0316036104b05760405162461bcd60e51b815260206004820152601b60248201527f726563697069656e742073686f756c642062652070726573656e740000000000604482015260640161031e565b8281815181106104c2576104c261178b565b60200260200101516020015160000361051d5760405162461bcd60e51b815260206004820152601960248201527f6261736973506f696e74732073686f756c64206265203e203000000000000000604482015260640161031e565b60656000856001600160a01b03166001600160a01b031681526020019081526020016000206001018382815181106105575761055761178b565b6020908102919091018101518254600180820185556000948552938390208251600290920201805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0390921691909117815591015191015582518390829081106105c1576105c161178b565b602002602001015160200151826105d891906117b7565b91506105e3816117ca565b9050610428565b50612710811061063c5760405162461bcd60e51b815260206004820152601f60248201527f726f79616c746965732073756d206973206d6f7265207468616e203130302500604482015260640161031e565b6001600160a01b03831660008181526065602052604090819020805460ff19166001179055517fa3d16188597005d2eca1790984d22f379505b31a88766996ca6a3f7b5817d32c9061068f9085906116c8565b60405180910390a2505050565b6001600160a01b03821660009081526066602052604081205460609181906106c382610aa1565b905060008160048111156106d9576106d96114f2565b036106f5576106e88683610cea565b90506106f5868284610be3565b6001816004811115610709576107096114f2565b0361079a576001600160a01b038616600090815260656020908152604080832060010180548251818502810185019093528083529193909284015b8282101561078c576000848152602090819020604080518082019091526002850290910180546001600160a01b03168252600190810154828401529083529092019101610744565b5050505093505050506103bd565b60028160048111156107ae576107ae6114f2565b036107c8576107be868684610d4c565b93505050506103bd565b60038160048111156107dc576107dc6114f2565b036107eb576107be8686610e2a565b6040805160008082526020820190925290610828565b60408051808201909152600080825260208201528152602001906001900390816108015790505b509695505050505050565b61083c82610b08565b6108658282610860856001600160a01b031660009081526066602052604090205490565b610be3565b5050565b61087282610b08565b61086582600283610be3565b610886610963565b6001600160a01b0381166109025760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161031e565b610398816109bd565b61091481610b08565b6001600160a01b03818116600081815260666020526040808220805490941693849055519091907fade6cdab0cf92bd1976a7a2324ee3c1eac398f98a9500a0c8ee8d58e79b39d2f908390a450565b6033546001600160a01b031633146102745760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161031e565b603380546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16610a995760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161031e565b610274610f4f565b600060015b60048111610aff57610aba816101006117e4565b610ac59060026118db565b610acf90846118e7565b600103610aef57806004811115610ae857610ae86114f2565b9392505050565b610af8816117ca565b9050610aa6565b50600092915050565b6033546001600160a01b03163314801590610b965750336001600160a01b0316816001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b8a9190611909565b6001600160a01b031614155b156103985760405162461bcd60e51b815260206004820152601860248201527f746f6b656e206f776e6572206e6f742064657465637465640000000000000000604482015260640161031e565b6000826004811115610bf757610bf76114f2565b03610c445760405162461bcd60e51b815260206004820152601360248201527f77726f6e6720726f79616c746965735479706500000000000000000000000000604482015260640161031e565b816004811115610c5657610c566114f2565b610c62906101006117e4565b610c6d9060026118db565b610c80906001600160a01b0383166117b7565b6001600160a01b038085166000908152606660205260409020919091558116826004811115610cb157610cb16114f2565b6040516001600160a01b038616907fade6cdab0cf92bd1976a7a2324ee3c1eac398f98a9500a0c8ee8d58e79b39d2f90600090a4505050565b6000610d1f6001600160a01b0384167f2a55205a00000000000000000000000000000000000000000000000000000000610fd5565b15610d2c575060036103bd565b6001600160a01b03821615610d43575060026103bd565b50600492915050565b6040517f9ca7dc7a0000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301526024820184905260609190831690639ca7dc7a906044016000604051808303816000875af1925050508015610dd957506040513d6000823e601f3d908101601f19168201604052610dd69190810190611926565b60015b610e22576040805160008082526020820190925290610e1a565b6040805180820190915260008082526020820152815260200190600190039081610df35790505b509050610ae8565b949350505050565b6040517f2a55205a00000000000000000000000000000000000000000000000000000000815260048101829052620f424060248201526060906001600160a01b03841690632a55205a906044016040805180830381865afa925050508015610eaf575060408051601f3d908101601f19168201909252610eac918101906119da565b60015b610ef8576040805160008082526020820190925290610ef0565b6040805180820190915260008082526020820152815260200190600190039081610ec95790505b5090506103bd565b610f2b6001600160a01b0386167ffd90e89700000000000000000000000000000000000000000000000000000000610fd5565b15610f4557610f3c85858484610ff1565b925050506103bd565b610f3c8282611219565b600054610100900460ff16610fcc5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161031e565b610274336109bd565b6000610fe08361133a565b8015610ae85750610ae8838361139e565b6040517ffd90e897000000000000000000000000000000000000000000000000000000008152600481018490526060906001600160a01b0386169063fd90e89790602401600060405180830381865afa92505050801561107357506040513d6000823e601f3d908101601f191682016040526110709190810190611a08565b60015b1561120657805160008167ffffffffffffffff81111561109557611095611530565b6040519080825280602002602001820160405280156110da57816020015b60408051808201909152600080825260208201528152602001906001900390816110b35790505b5090506000805b838110156111aa5760008582815181106110fd576110fd61178b565b60200260200101519050806000015184838151811061111e5761111e61178b565b6020026020010151600001906001600160a01b031690816001600160a01b0316815250506000620f424089836020015161ffff1661115c9190611ace565b61116691906118e7565b90508085848151811061117b5761117b61178b565b602090810291909101810151015261119381856117b7565b9350505080806111a2906117ca565b9150506110e1565b50858111156111fb5760405162461bcd60e51b815260206004820181905260248201527f526f79616c7469657352656769737472793a20496e76616c69642073706c6974604482015260640161031e565b509250610e22915050565b6112108383611219565b95945050505050565b6060808260000361122b5790506103bd565b6000620f424061123d61271086611ace565b61124791906118e7565b9050612710811061129a5760405162461bcd60e51b815260206004820152601b60248201527f726f79616c746965732032393831206578636565647320313030250000000000604482015260640161031e565b60408051600180825281830190925290816020015b60408051808201909152600080825260208201528152602001906001900390816112af57905050915084826000815181106112ec576112ec61178b565b6020026020010151600001906001600160a01b031690816001600160a01b03168152505080826000815181106113245761132461178b565b6020908102919091018101510152509392505050565b6000611366827f01ffc9a70000000000000000000000000000000000000000000000000000000061139e565b80156103bd5750611397827fffffffff0000000000000000000000000000000000000000000000000000000061139e565b1592915050565b604080517fffffffff000000000000000000000000000000000000000000000000000000008316602480830191909152825180830390910181526044909101909152602080820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f01ffc9a700000000000000000000000000000000000000000000000000000000178152825160009392849283928392918391908a617530fa92503d91506000519050828015611456575060208210155b80156114625750600081115b979650505050505050565b508054600082556002029060005260206000209081019061039891905b808211156114bc57805473ffffffffffffffffffffffffffffffffffffffff191681556000600182015560020161148a565b5090565b6001600160a01b038116811461039857600080fd5b6000602082840312156114e757600080fd5b8135610ae8816114c0565b634e487b7160e01b600052602160045260246000fd5b602081016005831061152a57634e487b7160e01b600052602160045260246000fd5b91905290565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff8111828210171561156957611569611530565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561159857611598611530565b604052919050565b600067ffffffffffffffff8211156115ba576115ba611530565b5060051b60200190565b60008060408084860312156115d857600080fd5b83356115e3816114c0565b925060208481013567ffffffffffffffff81111561160057600080fd5b8501601f8101871361161157600080fd5b803561162461161f826115a0565b61156f565b81815260069190911b8201830190838101908983111561164357600080fd5b928401925b8284101561168c5785848b0312156116605760008081fd5b611668611546565b8435611673816114c0565b8152848601358682015282529285019290840190611648565b8096505050505050509250929050565b600080604083850312156116af57600080fd5b82356116ba816114c0565b946020939093013593505050565b602080825282518282018190526000919060409081850190868401855b8281101561171357815180516001600160a01b031685528601518685015292840192908501906001016116e5565b5091979650505050505050565b6000806040838503121561173357600080fd5b823561173e816114c0565b915060208301356005811061175257600080fd5b809150509250929050565b6000806040838503121561177057600080fd5b823561177b816114c0565b91506020830135611752816114c0565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808201808211156103bd576103bd6117a1565b600060001982036117dd576117dd6117a1565b5060010190565b818103818111156103bd576103bd6117a1565b600181815b80851115611832578160001904821115611818576118186117a1565b8085161561182557918102915b93841c93908002906117fc565b509250929050565b600082611849575060016103bd565b81611856575060006103bd565b816001811461186c576002811461187657611892565b60019150506103bd565b60ff841115611887576118876117a1565b50506001821b6103bd565b5060208310610133831016604e8410600b84101617156118b5575081810a6103bd565b6118bf83836117f7565b80600019048211156118d3576118d36117a1565b029392505050565b6000610ae8838361183a565b60008261190457634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561191b57600080fd5b8151610ae8816114c0565b6000602080838503121561193957600080fd5b825167ffffffffffffffff81111561195057600080fd5b8301601f8101851361196157600080fd5b805161196f61161f826115a0565b81815260069190911b8201830190838101908783111561198e57600080fd5b928401925b8284101561146257604084890312156119ac5760008081fd5b6119b4611546565b84516119bf816114c0565b81528486015186820152825260409093019290840190611993565b600080604083850312156119ed57600080fd5b82516119f8816114c0565b6020939093015192949293505050565b60006020808385031215611a1b57600080fd5b825167ffffffffffffffff811115611a3257600080fd5b8301601f81018513611a4357600080fd5b8051611a5161161f826115a0565b81815260069190911b82018301908381019087831115611a7057600080fd5b928401925b828410156114625760408489031215611a8e5760008081fd5b611a96611546565b8451611aa1816114c0565b81528486015161ffff81168114611ab85760008081fd5b8187015282526040939093019290840190611a75565b80820281158282048414176103bd576103bd6117a156fea264697066735822122013957718e3a70dfd123ebbbfde73b84981ebeff6848f93b1b3ee2f25bfa97c5c64736f6c63430008130033", + "devdoc": { + "author": "The Sandbox", + "details": "Contract managing the registry of royalties.", + "events": { + "Initialized(uint8)": { + "details": "Triggered when the contract has been initialized or reinitialized." + }, + "RoyaltiesSetForContract(address,(address,uint256)[])": { + "params": { + "royalties": "An array of royalties set for the token.", + "token": "The token address for which royalties are set." + } + }, + "RoyaltiesTypeSet(address,uint8,address)": { + "params": { + "royaltiesProvider": "The address of the royalties provider.", + "royaltiesType": "The type of royalties set.", + "token": "The token address." + } + } + }, + "kind": "dev", + "methods": { + "clearRoyaltiesType(address)": { + "params": { + "token": "Address of the token." + } + }, + "constructor": { + "custom:oz-upgrades-unsafe-allow": "constructor", + "details": "This protects the implementation contract from being initialized." + }, + "forceSetRoyaltiesType(address,uint8)": { + "params": { + "royaltiesType": "The new royalty type to be set.", + "token": "Address of the token." + } + }, + "getProvider(address)": { + "params": { + "token": "token address" + }, + "returns": { + "_0": "address of provider" + } + }, + "getRoyalties(address,uint256)": { + "params": { + "token": "Address of the token.", + "tokenId": "ID of the token." + }, + "returns": { + "_0": "An array containing royalty parts." + } + }, + "getRoyaltiesType(address)": { + "params": { + "token": "Address of the token." + }, + "returns": { + "_0": "The type of royalty associated with the token." + } + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner." + }, + "setProviderByToken(address,address)": { + "params": { + "provider": "Address of the external royalties provider.", + "token": "Address of the token." + } + }, + "setRoyaltiesByToken(address,(address,uint256)[])": { + "params": { + "royalties": "Array of royalty parts to be set for the token.", + "token": "Address of the token." + } + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + } + }, + "stateVariables": { + "WEIGHT_VALUE": { + "details": "Used to call EIP2981 royaltyInfo to calculate the royalties percentage" + } + }, + "title": "RoyaltiesRegistry", + "version": 1 + }, + "userdoc": { + "events": { + "RoyaltiesSetForContract(address,(address,uint256)[])": { + "notice": "Emitted when royalties are set for a token." + }, + "RoyaltiesTypeSet(address,uint8,address)": { + "notice": "Emitted when the royalties type and provider are defined for a token." + } + }, + "kind": "user", + "methods": { + "clearRoyaltiesType(address)": { + "notice": "Resets the royalty type for a token to 'UNSET'." + }, + "forceSetRoyaltiesType(address,uint8)": { + "notice": "Overwrites the royalty type for a given token." + }, + "getProvider(address)": { + "notice": "Returns provider address for token contract from royaltiesProviders mapping" + }, + "getRoyalties(address,uint256)": { + "notice": "Fetches royalties for a given token and token ID." + }, + "getRoyaltiesType(address)": { + "notice": "Fetches the royalty type for a given token." + }, + "initialize()": { + "notice": "Royalties registry initializer" + }, + "royaltiesByToken(address)": { + "notice": "Stores royalties for token contract, set in setRoyaltiesByToken() method" + }, + "royaltiesProviders(address)": { + "notice": "Stores external provider and royalties type for token contract" + }, + "setProviderByToken(address,address)": { + "notice": "Assigns an external provider for a token's royalties and sets the royalty type as 'EXTERNAL_PROVIDER' (2)." + }, + "setRoyaltiesByToken(address,(address,uint256)[])": { + "notice": "Defines royalties for a token and sets the royalty type as 'BY_TOKEN'." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 783, + "contract": "@sandbox-smart-contracts/marketplace/contracts/RoyaltiesRegistry.sol:RoyaltiesRegistry", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 786, + "contract": "@sandbox-smart-contracts/marketplace/contracts/RoyaltiesRegistry.sol:RoyaltiesRegistry", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 2171, + "contract": "@sandbox-smart-contracts/marketplace/contracts/RoyaltiesRegistry.sol:RoyaltiesRegistry", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 616, + "contract": "@sandbox-smart-contracts/marketplace/contracts/RoyaltiesRegistry.sol:RoyaltiesRegistry", + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address" + }, + { + "astId": 736, + "contract": "@sandbox-smart-contracts/marketplace/contracts/RoyaltiesRegistry.sol:RoyaltiesRegistry", + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 6454, + "contract": "@sandbox-smart-contracts/marketplace/contracts/RoyaltiesRegistry.sol:RoyaltiesRegistry", + "label": "royaltiesByToken", + "offset": 0, + "slot": "101", + "type": "t_mapping(t_address,t_struct(RoyaltiesSet)6438_storage)" + }, + { + "astId": 6459, + "contract": "@sandbox-smart-contracts/marketplace/contracts/RoyaltiesRegistry.sol:RoyaltiesRegistry", + "label": "royaltiesProviders", + "offset": 0, + "slot": "102", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 7243, + "contract": "@sandbox-smart-contracts/marketplace/contracts/RoyaltiesRegistry.sol:RoyaltiesRegistry", + "label": "__gap", + "offset": 0, + "slot": "103", + "type": "t_array(t_uint256)50_storage" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_struct(Part)8339_storage)dyn_storage": { + "base": "t_struct(Part)8339_storage", + "encoding": "dynamic_array", + "label": "struct IRoyaltiesProvider.Part[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(RoyaltiesSet)6438_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct RoyaltiesRegistry.RoyaltiesSet)", + "numberOfBytes": "32", + "value": "t_struct(RoyaltiesSet)6438_storage" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_struct(Part)8339_storage": { + "encoding": "inplace", + "label": "struct IRoyaltiesProvider.Part", + "members": [ + { + "astId": 8336, + "contract": "@sandbox-smart-contracts/marketplace/contracts/RoyaltiesRegistry.sol:RoyaltiesRegistry", + "label": "account", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 8338, + "contract": "@sandbox-smart-contracts/marketplace/contracts/RoyaltiesRegistry.sol:RoyaltiesRegistry", + "label": "basisPoints", + "offset": 0, + "slot": "1", + "type": "t_uint256" + } + ], + "numberOfBytes": "64" + }, + "t_struct(RoyaltiesSet)6438_storage": { + "encoding": "inplace", + "label": "struct RoyaltiesRegistry.RoyaltiesSet", + "members": [ + { + "astId": 6433, + "contract": "@sandbox-smart-contracts/marketplace/contracts/RoyaltiesRegistry.sol:RoyaltiesRegistry", + "label": "initialized", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 6437, + "contract": "@sandbox-smart-contracts/marketplace/contracts/RoyaltiesRegistry.sol:RoyaltiesRegistry", + "label": "royalties", + "offset": 0, + "slot": "1", + "type": "t_array(t_struct(Part)8339_storage)dyn_storage" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/packages/deploy/deployments/mumbai/RoyaltiesRegistry_Proxy.json b/packages/deploy/deployments/mumbai/RoyaltiesRegistry_Proxy.json new file mode 100644 index 0000000000..92b4df219d --- /dev/null +++ b/packages/deploy/deployments/mumbai/RoyaltiesRegistry_Proxy.json @@ -0,0 +1,276 @@ +{ + "address": "0x9473A3B21fe192b491CDbA305a9b143e06D903a0", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "admin_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "admin_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "changeAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0xfb7995b83603874a68a30ac6337eddcb3483b7ce0c254fbfc97db25216ec6b82", + "receipt": { + "to": null, + "from": "0x5F890c9522dCE5670d741D4277BFCC2d9cA8Af02", + "contractAddress": "0x9473A3B21fe192b491CDbA305a9b143e06D903a0", + "transactionIndex": 1, + "gasUsed": "770002", + "logsBloom": "0x00000000000000000000000000000000400000000000000010800010000000000002000400000020000000000000000000008000000000000000000000000000000000000000000000000000000002800001000000000000000100000000000000000000020000000000000000000800020000800000000080000000000000400000800000000000000000000000000000000000000080000000000000a00000200000000000000000000000000400000000000000000000000000000200004000000020000000000001000000240000000000000400000000108000001020000000000000000000000000000000000000000000000000000000000000100000", + "blockHash": "0x2469f057d33441afa9181567267c8d57a8e1e268a13e9057525bf251d4ddb46e", + "transactionHash": "0xfb7995b83603874a68a30ac6337eddcb3483b7ce0c254fbfc97db25216ec6b82", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 42631844, + "transactionHash": "0xfb7995b83603874a68a30ac6337eddcb3483b7ce0c254fbfc97db25216ec6b82", + "address": "0x9473A3B21fe192b491CDbA305a9b143e06D903a0", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000e5c08f87c949315d69707ee71babb496af70506b" + ], + "data": "0x", + "logIndex": 2, + "blockHash": "0x2469f057d33441afa9181567267c8d57a8e1e268a13e9057525bf251d4ddb46e" + }, + { + "transactionIndex": 1, + "blockNumber": 42631844, + "transactionHash": "0xfb7995b83603874a68a30ac6337eddcb3483b7ce0c254fbfc97db25216ec6b82", + "address": "0x9473A3B21fe192b491CDbA305a9b143e06D903a0", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000005f890c9522dce5670d741d4277bfcc2d9ca8af02" + ], + "data": "0x", + "logIndex": 3, + "blockHash": "0x2469f057d33441afa9181567267c8d57a8e1e268a13e9057525bf251d4ddb46e" + }, + { + "transactionIndex": 1, + "blockNumber": 42631844, + "transactionHash": "0xfb7995b83603874a68a30ac6337eddcb3483b7ce0c254fbfc97db25216ec6b82", + "address": "0x9473A3B21fe192b491CDbA305a9b143e06D903a0", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 4, + "blockHash": "0x2469f057d33441afa9181567267c8d57a8e1e268a13e9057525bf251d4ddb46e" + }, + { + "transactionIndex": 1, + "blockNumber": 42631844, + "transactionHash": "0xfb7995b83603874a68a30ac6337eddcb3483b7ce0c254fbfc97db25216ec6b82", + "address": "0x9473A3B21fe192b491CDbA305a9b143e06D903a0", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045023af7b33994a22740bc51c3ca90a7ed82e124", + "logIndex": 5, + "blockHash": "0x2469f057d33441afa9181567267c8d57a8e1e268a13e9057525bf251d4ddb46e" + }, + { + "transactionIndex": 1, + "blockNumber": 42631844, + "transactionHash": "0xfb7995b83603874a68a30ac6337eddcb3483b7ce0c254fbfc97db25216ec6b82", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x0000000000000000000000005f890c9522dce5670d741d4277bfcc2d9ca8af02", + "0x000000000000000000000000f903ba9e006193c1527bfbe65fe2123704ea3f99" + ], + "data": "0x000000000000000000000000000000000000000000000000000b1d713e487b7400000000000000000000000000000000000000000000000f2ee853861121f62c000000000000000000000000000000000000000000001212c837fe06ffa657c500000000000000000000000000000000000000000000000f2edd3614d2d97ab8000000000000000000000000000000000000000000001212c8431b783deed339", + "logIndex": 6, + "blockHash": "0x2469f057d33441afa9181567267c8d57a8e1e268a13e9057525bf251d4ddb46e" + } + ], + "blockNumber": 42631844, + "cumulativeGasUsed": "791962", + "status": 1, + "byzantium": true + }, + "args": [ + "0xe5c08f87c949315d69707ee71babb496af70506b", + "0x45023af7B33994a22740Bc51C3Ca90A7Ed82e124", + "0x8129fc1c" + ], + "numDeployments": 1, + "solcInputHash": "0e89febeebc7444140de8e67c9067d2c", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"changeAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \\\"admin cannot fallback to proxy target\\\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\",\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"changeAdmin(address)\":{\"details\":\"Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\"},\"constructor\":{\"details\":\"Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/openzeppelin/proxy/transparent/TransparentUpgradeableProxy.sol\":\"TransparentUpgradeableProxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x93b4e21c931252739a1ec13ea31d3d35a5c068be3163ccab83e4d70c40355f03\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1));\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view virtual returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(Address.isContract(IBeacon(newBeacon).implementation()), \\\"ERC1967: beacon implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x17668652127feebed0ce8d9431ef95ccc8c4292f03e3b8cf06c6ca16af396633\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xd5d1fd16e9faff7fcb3a52e02a8d49156f42a38a03f07b5f1810c21c2149a8ab\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/proxy/transparent/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1967/ERC1967Proxy.sol\\\";\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n assert(_ADMIN_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.admin\\\")) - 1));\\n _changeAdmin(admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\n */\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\n _changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(\\\"\\\"), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(msg.sender != _getAdmin(), \\\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\\\");\\n super._beforeFallback();\\n }\\n}\\n\",\"keccak256\":\"0x140055a64cf579d622e04f5a198595832bf2cb193cd0005f4f2d4d61ca906253\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\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 Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\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 require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\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\\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}\\n\",\"keccak256\":\"0x3777e696b62134e6177440dbe6e6601c0c156a443f57167194b67e75527439de\",\"license\":\"MIT\"},\"solc_0.8/openzeppelin/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6080604052604051620011b2380380620011b2833981016040819052620000269162000519565b82816200005560017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd620005f9565b6000805160206200116b833981519152146200007557620000756200061f565b6200008382826000620000e7565b50620000b3905060017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6104620005f9565b6000805160206200114b83398151915214620000d357620000d36200061f565b620000de8262000124565b50505062000688565b620000f2836200017f565b600082511180620001005750805b156200011f576200011d8383620001c160201b620002ff1760201c565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6200014f620001f0565b604080516001600160a01b03928316815291841660208301520160405180910390a16200017c8162000229565b50565b6200018a81620002de565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060620001e983836040518060600160405280602781526020016200118b6027913962000381565b9392505050565b60006200021a6000805160206200114b83398151915260001b6200046760201b620002731760201c565b546001600160a01b0316919050565b6001600160a01b038116620002945760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b80620002bd6000805160206200114b83398151915260001b6200046760201b620002731760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b620002f4816200046a60201b6200032b1760201c565b620003585760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016200028b565b80620002bd6000805160206200116b83398151915260001b6200046760201b620002731760201c565b60606001600160a01b0384163b620003eb5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200028b565b600080856001600160a01b03168560405162000408919062000635565b600060405180830381855af49150503d806000811462000445576040519150601f19603f3d011682016040523d82523d6000602084013e6200044a565b606091505b5090925090506200045d82828662000479565b9695505050505050565b90565b6001600160a01b03163b151590565b606083156200048a575081620001e9565b8251156200049b5782518084602001fd5b8160405162461bcd60e51b81526004016200028b919062000653565b80516001600160a01b0381168114620004cf57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101562000507578181015183820152602001620004ed565b838111156200011d5750506000910152565b6000806000606084860312156200052f57600080fd5b6200053a84620004b7565b92506200054a60208501620004b7565b60408501519092506001600160401b03808211156200056857600080fd5b818601915086601f8301126200057d57600080fd5b815181811115620005925762000592620004d4565b604051601f8201601f19908116603f01168101908382118183101715620005bd57620005bd620004d4565b81604052828152896020848701011115620005d757600080fd5b620005ea836020830160208801620004ea565b80955050505050509250925092565b6000828210156200061a57634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b6000825162000649818460208701620004ea565b9190910192915050565b602081526000825180602084015262000674816040850160208701620004ea565b601f01601f19169190910160400192915050565b610ab380620006986000396000f3fe60806040526004361061005e5760003560e01c80635c60da1b116100435780635c60da1b146100a85780638f283970146100e6578063f851a440146101065761006d565b80633659cfe6146100755780634f1ef286146100955761006d565b3661006d5761006b61011b565b005b61006b61011b565b34801561008157600080fd5b5061006b61009036600461091f565b610135565b61006b6100a336600461093a565b610196565b3480156100b457600080fd5b506100bd610221565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100f257600080fd5b5061006b61010136600461091f565b610276565b34801561011257600080fd5b506100bd6102ba565b610123610347565b61013361012e610435565b61043f565b565b61013d610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561018e5761018b816040518060200160405280600081525060006104a3565b50565b61018b61011b565b61019e610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610219576102148383838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250600192506104a3915050565b505050565b61021461011b565b600061022b610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561026b57610266610435565b905090565b61027361011b565b90565b61027e610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561018e5761018b816104ce565b60006102c4610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561026b57610266610463565b60606103248383604051806060016040528060278152602001610a576027913961052f565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b61034f610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610133576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b6000610266610657565b3660008037600080366000845af43d6000803e80801561045e573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b5473ffffffffffffffffffffffffffffffffffffffff16919050565b6104ac8361067f565b6000825111806104b95750805b15610214576104c883836102ff565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6104f7610463565b6040805173ffffffffffffffffffffffffffffffffffffffff928316815291841660208301520160405180910390a161018b816106cc565b606073ffffffffffffffffffffffffffffffffffffffff84163b6105d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e74726163740000000000000000000000000000000000000000000000000000606482015260840161042c565b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516105fd91906109e9565b600060405180830381855af49150503d8060008114610638576040519150601f19603f3d011682016040523d82523d6000602084013e61063d565b606091505b509150915061064d8282866107d8565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610487565b6106888161082b565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b73ffffffffffffffffffffffffffffffffffffffff811661076f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161042c565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9290921691909117905550565b606083156107e7575081610324565b8251156107f75782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161042c9190610a05565b73ffffffffffffffffffffffffffffffffffffffff81163b6108cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e747261637400000000000000000000000000000000000000606482015260840161042c565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610792565b803573ffffffffffffffffffffffffffffffffffffffff8116811461091a57600080fd5b919050565b60006020828403121561093157600080fd5b610324826108f6565b60008060006040848603121561094f57600080fd5b610958846108f6565b9250602084013567ffffffffffffffff8082111561097557600080fd5b818601915086601f83011261098957600080fd5b81358181111561099857600080fd5b8760208285010111156109aa57600080fd5b6020830194508093505050509250925092565b60005b838110156109d85781810151838201526020016109c0565b838111156104c85750506000910152565b600082516109fb8184602087016109bd565b9190910192915050565b6020815260008251806020840152610a248160408501602087016109bd565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220b29caa54336b3ee836679675e9732ec5e526fb3f803cca2fe336cc3555aba62264736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040526004361061005e5760003560e01c80635c60da1b116100435780635c60da1b146100a85780638f283970146100e6578063f851a440146101065761006d565b80633659cfe6146100755780634f1ef286146100955761006d565b3661006d5761006b61011b565b005b61006b61011b565b34801561008157600080fd5b5061006b61009036600461091f565b610135565b61006b6100a336600461093a565b610196565b3480156100b457600080fd5b506100bd610221565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b3480156100f257600080fd5b5061006b61010136600461091f565b610276565b34801561011257600080fd5b506100bd6102ba565b610123610347565b61013361012e610435565b61043f565b565b61013d610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561018e5761018b816040518060200160405280600081525060006104a3565b50565b61018b61011b565b61019e610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610219576102148383838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250600192506104a3915050565b505050565b61021461011b565b600061022b610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561026b57610266610435565b905090565b61027361011b565b90565b61027e610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561018e5761018b816104ce565b60006102c4610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561026b57610266610463565b60606103248383604051806060016040528060278152602001610a576027913961052f565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b61034f610463565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610133576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b6000610266610657565b3660008037600080366000845af43d6000803e80801561045e573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b5473ffffffffffffffffffffffffffffffffffffffff16919050565b6104ac8361067f565b6000825111806104b95750805b15610214576104c883836102ff565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6104f7610463565b6040805173ffffffffffffffffffffffffffffffffffffffff928316815291841660208301520160405180910390a161018b816106cc565b606073ffffffffffffffffffffffffffffffffffffffff84163b6105d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e74726163740000000000000000000000000000000000000000000000000000606482015260840161042c565b6000808573ffffffffffffffffffffffffffffffffffffffff16856040516105fd91906109e9565b600060405180830381855af49150503d8060008114610638576040519150601f19603f3d011682016040523d82523d6000602084013e61063d565b606091505b509150915061064d8282866107d8565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610487565b6106888161082b565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b73ffffffffffffffffffffffffffffffffffffffff811661076f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161042c565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9290921691909117905550565b606083156107e7575081610324565b8251156107f75782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161042c9190610a05565b73ffffffffffffffffffffffffffffffffffffffff81163b6108cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e747261637400000000000000000000000000000000000000606482015260840161042c565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610792565b803573ffffffffffffffffffffffffffffffffffffffff8116811461091a57600080fd5b919050565b60006020828403121561093157600080fd5b610324826108f6565b60008060006040848603121561094f57600080fd5b610958846108f6565b9250602084013567ffffffffffffffff8082111561097557600080fd5b818601915086601f83011261098957600080fd5b81358181111561099857600080fd5b8760208285010111156109aa57600080fd5b6020830194508093505050509250925092565b60005b838110156109d85781810151838201526020016109c0565b838111156104c85750506000910152565b600082516109fb8184602087016109bd565b9190910192915050565b6020815260008251806020840152610a248160408501602087016109bd565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220b29caa54336b3ee836679675e9732ec5e526fb3f803cca2fe336cc3555aba62264736f6c634300080a0033", + "devdoc": { + "details": "This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \"admin cannot fallback to proxy target\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.", + "kind": "dev", + "methods": { + "admin()": { + "details": "Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`" + }, + "changeAdmin(address)": { + "details": "Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}." + }, + "constructor": { + "details": "Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}." + }, + "implementation()": { + "details": "Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`" + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/packages/deploy/deployments/mumbai/solcInputs/e65e4ae76ce109b65d6560f491fa920e.json b/packages/deploy/deployments/mumbai/solcInputs/e65e4ae76ce109b65d6560f491fa920e.json new file mode 100644 index 0000000000..c10ad6334c --- /dev/null +++ b/packages/deploy/deployments/mumbai/solcInputs/e65e4ae76ce109b65d6560f491fa920e.json @@ -0,0 +1,173 @@ +{ + "language": "Solidity", + "sources": { + "@manifoldxyz/royalty-registry-solidity/contracts/overrides/IRoyaltySplitter.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/// @author: manifold.xyz\n\nimport \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\n\nstruct Recipient {\n address payable recipient;\n uint16 bps;\n}\n\ninterface IRoyaltySplitter is IERC165 {\n /**\n * @dev Set the splitter recipients. Total bps must total 10000.\n */\n function setRecipients(Recipient[] calldata recipients) external;\n\n /**\n * @dev Get the splitter recipients;\n */\n function getRecipients() external view returns (Recipient[] memory);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControlEnumerableUpgradeable.sol\";\nimport \"./AccessControlUpgradeable.sol\";\nimport \"../utils/structs/EnumerableSetUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\n */\nabstract contract AccessControlEnumerableUpgradeable is Initializable, IAccessControlEnumerableUpgradeable, AccessControlUpgradeable {\n function __AccessControlEnumerable_init() internal onlyInitializing {\n }\n\n function __AccessControlEnumerable_init_unchained() internal onlyInitializing {\n }\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;\n\n mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private _roleMembers;\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IAccessControlEnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev Returns one of the accounts that have `role`. `index` must be a\n * value between 0 and {getRoleMemberCount}, non-inclusive.\n *\n * Role bearers are not sorted in any particular way, and their ordering may\n * change at any point.\n *\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\n * you perform all queries on the same block. See the following\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\n * for more information.\n */\n function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) {\n return _roleMembers[role].at(index);\n }\n\n /**\n * @dev Returns the number of accounts that have `role`. Can be used\n * together with {getRoleMember} to enumerate all bearers of a role.\n */\n function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) {\n return _roleMembers[role].length();\n }\n\n /**\n * @dev Overload {_grantRole} to track enumerable memberships\n */\n function _grantRole(bytes32 role, address account) internal virtual override {\n super._grantRole(role, account);\n _roleMembers[role].add(account);\n }\n\n /**\n * @dev Overload {_revokeRole} to track enumerable memberships\n */\n function _revokeRole(bytes32 role, address account) internal virtual override {\n super._revokeRole(role, account);\n _roleMembers[role].remove(account);\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControl.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControlUpgradeable.sol\";\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../utils/StringsUpgradeable.sol\";\nimport \"../utils/introspection/ERC165Upgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module that allows children to implement role-based access\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\n * members except through off-chain means by accessing the contract event logs. Some\n * applications may benefit from on-chain enumerability, for those cases see\n * {AccessControlEnumerable}.\n *\n * Roles are referred to by their `bytes32` identifier. These should be exposed\n * in the external API and be unique. The best way to achieve this is by\n * using `public constant` hash digests:\n *\n * ```solidity\n * bytes32 public constant MY_ROLE = keccak256(\"MY_ROLE\");\n * ```\n *\n * Roles can be used to represent a set of permissions. To restrict access to a\n * function call, use {hasRole}:\n *\n * ```solidity\n * function foo() public {\n * require(hasRole(MY_ROLE, msg.sender));\n * ...\n * }\n * ```\n *\n * Roles can be granted and revoked dynamically via the {grantRole} and\n * {revokeRole} functions. Each role has an associated admin role, and only\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\n *\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\n * that only accounts with this role will be able to grant or revoke other\n * roles. More complex role relationships can be created by using\n * {_setRoleAdmin}.\n *\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\n * grant and revoke this role. Extra precautions should be taken to secure\n * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}\n * to enforce additional security measures for this role.\n */\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\n function __AccessControl_init() internal onlyInitializing {\n }\n\n function __AccessControl_init_unchained() internal onlyInitializing {\n }\n struct RoleData {\n mapping(address => bool) members;\n bytes32 adminRole;\n }\n\n mapping(bytes32 => RoleData) private _roles;\n\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\n\n /**\n * @dev Modifier that checks that an account has a specific role. Reverts\n * with a standardized message including the required role.\n *\n * The format of the revert reason is given by the following regular expression:\n *\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n *\n * _Available since v4.1._\n */\n modifier onlyRole(bytes32 role) {\n _checkRole(role);\n _;\n }\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IAccessControlUpgradeable).interfaceId || super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev Returns `true` if `account` has been granted `role`.\n */\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\n return _roles[role].members[account];\n }\n\n /**\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\n * Overriding this function changes the behavior of the {onlyRole} modifier.\n *\n * Format of the revert message is described in {_checkRole}.\n *\n * _Available since v4.6._\n */\n function _checkRole(bytes32 role) internal view virtual {\n _checkRole(role, _msgSender());\n }\n\n /**\n * @dev Revert with a standard message if `account` is missing `role`.\n *\n * The format of the revert reason is given by the following regular expression:\n *\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n */\n function _checkRole(bytes32 role, address account) internal view virtual {\n if (!hasRole(role, account)) {\n revert(\n string(\n abi.encodePacked(\n \"AccessControl: account \",\n StringsUpgradeable.toHexString(account),\n \" is missing role \",\n StringsUpgradeable.toHexString(uint256(role), 32)\n )\n )\n );\n }\n }\n\n /**\n * @dev Returns the admin role that controls `role`. See {grantRole} and\n * {revokeRole}.\n *\n * To change a role's admin, use {_setRoleAdmin}.\n */\n function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {\n return _roles[role].adminRole;\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n *\n * May emit a {RoleGranted} event.\n */\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\n _grantRole(role, account);\n }\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n *\n * May emit a {RoleRevoked} event.\n */\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\n _revokeRole(role, account);\n }\n\n /**\n * @dev Revokes `role` from the calling account.\n *\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\n * purpose is to provide a mechanism for accounts to lose their privileges\n * if they are compromised (such as when a trusted device is misplaced).\n *\n * If the calling account had been revoked `role`, emits a {RoleRevoked}\n * event.\n *\n * Requirements:\n *\n * - the caller must be `account`.\n *\n * May emit a {RoleRevoked} event.\n */\n function renounceRole(bytes32 role, address account) public virtual override {\n require(account == _msgSender(), \"AccessControl: can only renounce roles for self\");\n\n _revokeRole(role, account);\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event. Note that unlike {grantRole}, this function doesn't perform any\n * checks on the calling account.\n *\n * May emit a {RoleGranted} event.\n *\n * [WARNING]\n * ====\n * This function should only be called from the constructor when setting\n * up the initial roles for the system.\n *\n * Using this function in any other way is effectively circumventing the admin\n * system imposed by {AccessControl}.\n * ====\n *\n * NOTE: This function is deprecated in favor of {_grantRole}.\n */\n function _setupRole(bytes32 role, address account) internal virtual {\n _grantRole(role, account);\n }\n\n /**\n * @dev Sets `adminRole` as ``role``'s admin role.\n *\n * Emits a {RoleAdminChanged} event.\n */\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\n bytes32 previousAdminRole = getRoleAdmin(role);\n _roles[role].adminRole = adminRole;\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * Internal function without access restriction.\n *\n * May emit a {RoleGranted} event.\n */\n function _grantRole(bytes32 role, address account) internal virtual {\n if (!hasRole(role, account)) {\n _roles[role].members[account] = true;\n emit RoleGranted(role, account, _msgSender());\n }\n }\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * Internal function without access restriction.\n *\n * May emit a {RoleRevoked} event.\n */\n function _revokeRole(bytes32 role, address account) internal virtual {\n if (hasRole(role, account)) {\n _roles[role].members[account] = false;\n emit RoleRevoked(role, account, _msgSender());\n }\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/access/IAccessControlEnumerableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControlUpgradeable.sol\";\n\n/**\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\n */\ninterface IAccessControlEnumerableUpgradeable is IAccessControlUpgradeable {\n /**\n * @dev Returns one of the accounts that have `role`. `index` must be a\n * value between 0 and {getRoleMemberCount}, non-inclusive.\n *\n * Role bearers are not sorted in any particular way, and their ordering may\n * change at any point.\n *\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\n * you perform all queries on the same block. See the following\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\n * for more information.\n */\n function getRoleMember(bytes32 role, uint256 index) external view returns (address);\n\n /**\n * @dev Returns the number of accounts that have `role`. Can be used\n * together with {getRoleMember} to enumerate all bearers of a role.\n */\n function getRoleMemberCount(bytes32 role) external view returns (uint256);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev External interface of AccessControl declared to support ERC165 detection.\n */\ninterface IAccessControlUpgradeable {\n /**\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\n *\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\n * {RoleAdminChanged} not being emitted signaling this.\n *\n * _Available since v3.1._\n */\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\n\n /**\n * @dev Emitted when `account` is granted `role`.\n *\n * `sender` is the account that originated the contract call, an admin role\n * bearer except when using {AccessControl-_setupRole}.\n */\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\n\n /**\n * @dev Emitted when `account` is revoked `role`.\n *\n * `sender` is the account that originated the contract call:\n * - if using `revokeRole`, it is the admin role bearer\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\n */\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\n\n /**\n * @dev Returns `true` if `account` has been granted `role`.\n */\n function hasRole(bytes32 role, address account) external view returns (bool);\n\n /**\n * @dev Returns the admin role that controls `role`. See {grantRole} and\n * {revokeRole}.\n *\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\n */\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n */\n function grantRole(bytes32 role, address account) external;\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n */\n function revokeRole(bytes32 role, address account) external;\n\n /**\n * @dev Revokes `role` from the calling account.\n *\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\n * purpose is to provide a mechanism for accounts to lose their privileges\n * if they are compromised (such as when a trusted device is misplaced).\n *\n * If the calling account had been granted `role`, emits a {RoleRevoked}\n * event.\n *\n * Requirements:\n *\n * - the caller must be `account`.\n */\n function renounceRole(bytes32 role, address account) external;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n function __Ownable_init() internal onlyInitializing {\n __Ownable_init_unchained();\n }\n\n function __Ownable_init_unchained() internal onlyInitializing {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/interfaces/IERC1271Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1271.sol)\n\npragma solidity ^0.8.0;\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 IERC1271Upgradeable {\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" + }, + "@openzeppelin/contracts-upgradeable/interfaces/IERC5267Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC5267.sol)\n\npragma solidity ^0.8.0;\n\ninterface IERC5267Upgradeable {\n /**\n * @dev MAY be emitted to signal that the domain could have changed.\n */\n event EIP712DomainChanged();\n\n /**\n * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712\n * signature.\n */\n function eip712Domain()\n external\n view\n returns (\n bytes1 fields,\n string memory name,\n string memory version,\n uint256 chainId,\n address verifyingContract,\n bytes32 salt,\n uint256[] memory extensions\n );\n}\n" + }, + "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../../utils/AddressUpgradeable.sol\";\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```solidity\n * contract MyToken is ERC20Upgradeable {\n * function initialize() initializer public {\n * __ERC20_init(\"MyToken\", \"MTK\");\n * }\n * }\n *\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n * function initializeV2() reinitializer(2) public {\n * __ERC20Permit_init(\"MyToken\");\n * }\n * }\n * ```\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n * _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n * @custom:oz-retyped-from bool\n */\n uint8 private _initialized;\n\n /**\n * @dev Indicates that the contract is in the process of being initialized.\n */\n bool private _initializing;\n\n /**\n * @dev Triggered when the contract has been initialized or reinitialized.\n */\n event Initialized(uint8 version);\n\n /**\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n * `onlyInitializing` functions can be used to initialize parent contracts.\n *\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\n * constructor.\n *\n * Emits an {Initialized} event.\n */\n modifier initializer() {\n bool isTopLevelCall = !_initializing;\n require(\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\n \"Initializable: contract is already initialized\"\n );\n _initialized = 1;\n if (isTopLevelCall) {\n _initializing = true;\n }\n _;\n if (isTopLevelCall) {\n _initializing = false;\n emit Initialized(1);\n }\n }\n\n /**\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n * used to initialize parent contracts.\n *\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n * are added through upgrades and that require initialization.\n *\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n * cannot be nested. If one is invoked in the context of another, execution will revert.\n *\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n * a contract, executing them in the right order is up to the developer or operator.\n *\n * WARNING: setting the version to 255 will prevent any future reinitialization.\n *\n * Emits an {Initialized} event.\n */\n modifier reinitializer(uint8 version) {\n require(!_initializing && _initialized < version, \"Initializable: contract is already initialized\");\n _initialized = version;\n _initializing = true;\n _;\n _initializing = false;\n emit Initialized(version);\n }\n\n /**\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\n */\n modifier onlyInitializing() {\n require(_initializing, \"Initializable: contract is not initializing\");\n _;\n }\n\n /**\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n * through proxies.\n *\n * Emits an {Initialized} event the first time it is successfully executed.\n */\n function _disableInitializers() internal virtual {\n require(!_initializing, \"Initializable: contract is initializing\");\n if (_initialized != type(uint8).max) {\n _initialized = type(uint8).max;\n emit Initialized(type(uint8).max);\n }\n }\n\n /**\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\n */\n function _getInitializedVersion() internal view returns (uint8) {\n return _initialized;\n }\n\n /**\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\n */\n function _isInitializing() internal view returns (bool) {\n return _initializing;\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which allows children to implement an emergency stop\n * mechanism that can be triggered by an authorized account.\n *\n * This module is used through inheritance. It will make available the\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\n * the functions of your contract. Note that they will not be pausable by\n * simply including this module, only once the modifiers are put in place.\n */\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\n /**\n * @dev Emitted when the pause is triggered by `account`.\n */\n event Paused(address account);\n\n /**\n * @dev Emitted when the pause is lifted by `account`.\n */\n event Unpaused(address account);\n\n bool private _paused;\n\n /**\n * @dev Initializes the contract in unpaused state.\n */\n function __Pausable_init() internal onlyInitializing {\n __Pausable_init_unchained();\n }\n\n function __Pausable_init_unchained() internal onlyInitializing {\n _paused = false;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is not paused.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n modifier whenNotPaused() {\n _requireNotPaused();\n _;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is paused.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n modifier whenPaused() {\n _requirePaused();\n _;\n }\n\n /**\n * @dev Returns true if the contract is paused, and false otherwise.\n */\n function paused() public view virtual returns (bool) {\n return _paused;\n }\n\n /**\n * @dev Throws if the contract is paused.\n */\n function _requireNotPaused() internal view virtual {\n require(!paused(), \"Pausable: paused\");\n }\n\n /**\n * @dev Throws if the contract is not paused.\n */\n function _requirePaused() internal view virtual {\n require(paused(), \"Pausable: not paused\");\n }\n\n /**\n * @dev Triggers stopped state.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n function _pause() internal virtual whenNotPaused {\n _paused = true;\n emit Paused(_msgSender());\n }\n\n /**\n * @dev Returns to normal state.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n function _unpause() internal virtual whenPaused {\n _paused = false;\n emit Unpaused(_msgSender());\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/IERC1155.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165Upgradeable.sol\";\n\n/**\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\n *\n * _Available since v3.1._\n */\ninterface IERC1155Upgradeable is IERC165Upgradeable {\n /**\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\n */\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\n\n /**\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\n * transfers.\n */\n event TransferBatch(\n address indexed operator,\n address indexed from,\n address indexed to,\n uint256[] ids,\n uint256[] values\n );\n\n /**\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\n * `approved`.\n */\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\n\n /**\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\n *\n * If an {URI} event was emitted for `id`, the standard\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\n * returned by {IERC1155MetadataURI-uri}.\n */\n event URI(string value, uint256 indexed id);\n\n /**\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function balanceOf(address account, uint256 id) external view returns (uint256);\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\n *\n * Requirements:\n *\n * - `accounts` and `ids` must have the same length.\n */\n function balanceOfBatch(\n address[] calldata accounts,\n uint256[] calldata ids\n ) external view returns (uint256[] memory);\n\n /**\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\n *\n * Emits an {ApprovalForAll} event.\n *\n * Requirements:\n *\n * - `operator` cannot be the caller.\n */\n function setApprovalForAll(address operator, bool approved) external;\n\n /**\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\n *\n * See {setApprovalForAll}.\n */\n function isApprovedForAll(address account, address operator) external view returns (bool);\n\n /**\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\n *\n * Emits a {TransferSingle} event.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\n * acceptance magic value.\n */\n function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\n *\n * Emits a {TransferBatch} event.\n *\n * Requirements:\n *\n * - `ids` and `amounts` must have the same length.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\n * acceptance magic value.\n */\n function safeBatchTransferFrom(\n address from,\n address to,\n uint256[] calldata ids,\n uint256[] calldata amounts,\n bytes calldata data\n ) external;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20PermitUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol)\n\npragma solidity ^0.8.0;\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 IERC20PermitUpgradeable {\n /**\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\n * given ``owner``'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 `owner`\n * over the EIP712-formatted function arguments.\n * - the signature must use ``owner``'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 owner,\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 `owner`. This value must be\n * included whenever a signature is generated for {permit}.\n *\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\n * prevents a signature from being used multiple times.\n */\n function nonces(address owner) 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" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20Upgradeable {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20Upgradeable.sol\";\nimport \"../extensions/IERC20PermitUpgradeable.sol\";\nimport \"../../../utils/AddressUpgradeable.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20Upgradeable {\n using AddressUpgradeable for address;\n\n /**\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeTransfer(IERC20Upgradeable token, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n /**\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\n */\n function safeTransferFrom(IERC20Upgradeable token, address from, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n /**\n * @dev Deprecated. This function has issues similar to the ones found in\n * {IERC20-approve}, and its usage is discouraged.\n *\n * Whenever possible, use {safeIncreaseAllowance} and\n * {safeDecreaseAllowance} instead.\n */\n function safeApprove(IERC20Upgradeable token, address spender, uint256 value) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n require(\n (value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n /**\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeIncreaseAllowance(IERC20Upgradeable token, address spender, uint256 value) internal {\n uint256 oldAllowance = token.allowance(address(this), spender);\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\n }\n\n /**\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeDecreaseAllowance(IERC20Upgradeable token, address spender, uint256 value) internal {\n unchecked {\n uint256 oldAllowance = token.allowance(address(this), spender);\n require(oldAllowance >= value, \"SafeERC20: decreased allowance below zero\");\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\n }\n }\n\n /**\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\n * to be set to zero before setting it to a non-zero value, such as USDT.\n */\n function forceApprove(IERC20Upgradeable token, address spender, uint256 value) internal {\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\n\n if (!_callOptionalReturnBool(token, approvalCall)) {\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\n _callOptionalReturn(token, approvalCall);\n }\n }\n\n /**\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\n * Revert on invalid signature.\n */\n function safePermit(\n IERC20PermitUpgradeable token,\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal {\n uint256 nonceBefore = token.nonces(owner);\n token.permit(owner, spender, value, deadline, v, r, s);\n uint256 nonceAfter = token.nonces(owner);\n require(nonceAfter == nonceBefore + 1, \"SafeERC20: permit did not succeed\");\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function _callOptionalReturn(IERC20Upgradeable token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\n // the target address contains contract code and also asserts for success in the low-level call.\n\n bytes memory returndata = address(token).functionCall(data, \"SafeERC20: low-level call failed\");\n require(returndata.length == 0 || abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n *\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\n */\n function _callOptionalReturnBool(IERC20Upgradeable token, bytes memory data) private returns (bool) {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\n // and not revert is the subcall reverts.\n\n (bool success, bytes memory returndata) = address(token).call(data);\n return\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && AddressUpgradeable.isContract(address(token));\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165Upgradeable.sol\";\n\n/**\n * @dev Required interface of an ERC721 compliant contract.\n */\ninterface IERC721Upgradeable is IERC165Upgradeable {\n /**\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\n */\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\n */\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\n */\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\n\n /**\n * @dev Returns the number of tokens in ``owner``'s account.\n */\n function balanceOf(address owner) external view returns (uint256 balance);\n\n /**\n * @dev Returns the owner of the `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function ownerOf(uint256 tokenId) external view returns (address owner);\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\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 *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(address from, address to, uint256 tokenId) external;\n\n /**\n * @dev Transfers `tokenId` token from `from` to `to`.\n *\n * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721\n * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\n * understand this adds an external call which potentially creates a reentrancy vulnerability.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address from, address to, uint256 tokenId) external;\n\n /**\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\n * The approval is cleared when the token is transferred.\n *\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\n *\n * Requirements:\n *\n * - The caller must own the token or be an approved operator.\n * - `tokenId` must exist.\n *\n * Emits an {Approval} event.\n */\n function approve(address to, uint256 tokenId) external;\n\n /**\n * @dev Approve or remove `operator` as an operator for the caller.\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\n *\n * Requirements:\n *\n * - The `operator` cannot be the caller.\n *\n * Emits an {ApprovalForAll} event.\n */\n function setApprovalForAll(address operator, bool approved) external;\n\n /**\n * @dev Returns the account approved for `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function getApproved(uint256 tokenId) external view returns (address operator);\n\n /**\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\n *\n * See {setApprovalForAll}\n */\n function isApprovedForAll(address owner, address operator) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary AddressUpgradeable {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n *\n * Furthermore, `isContract` will also return true if the target contract within\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n * which only has an effect at the end of a transaction.\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\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 Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\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 /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\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" + }, + "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract ContextUpgradeable is Initializable {\n function __Context_init() internal onlyInitializing {\n }\n\n function __Context_init_unchained() internal onlyInitializing {\n }\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/draft-EIP712.sol)\n\npragma solidity ^0.8.0;\n\n// EIP-712 is Final as of 2022-08-11. This file is deprecated.\n\nimport \"./EIP712Upgradeable.sol\";\n" + }, + "@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../StringsUpgradeable.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 ECDSAUpgradeable {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS,\n InvalidSignatureV // Deprecated in v4.8\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 }\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 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 /// @solidity memory-safe-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 {\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\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 message) {\n // 32 is the length in bytes of hash,\n // enforced by the type signature above\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x00, \"\\x19Ethereum Signed Message:\\n32\")\n mstore(0x1c, hash)\n message := keccak256(0x00, 0x3c)\n }\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\", StringsUpgradeable.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 data) {\n /// @solidity memory-safe-assembly\n assembly {\n let ptr := mload(0x40)\n mstore(ptr, \"\\x19\\x01\")\n mstore(add(ptr, 0x02), domainSeparator)\n mstore(add(ptr, 0x22), structHash)\n data := keccak256(ptr, 0x42)\n }\n }\n\n /**\n * @dev Returns an Ethereum Signed Data with intended validator, created from a\n * `validator` and `data` according to the version 0 of EIP-191.\n *\n * See {recover}.\n */\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19\\x00\", validator, data));\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/EIP712.sol)\n\npragma solidity ^0.8.8;\n\nimport \"./ECDSAUpgradeable.sol\";\nimport \"../../interfaces/IERC5267Upgradeable.sol\";\nimport \"../../proxy/utils/Initializable.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 * NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain\n * separator of the implementation contract. This will cause the `_domainSeparatorV4` function to always rebuild the\n * separator from the immutable values, which is cheaper than accessing a cached version in cold storage.\n *\n * _Available since v3.4._\n *\n * @custom:storage-size 52\n */\nabstract contract EIP712Upgradeable is Initializable, IERC5267Upgradeable {\n bytes32 private constant _TYPE_HASH =\n keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\");\n\n /// @custom:oz-renamed-from _HASHED_NAME\n bytes32 private _hashedName;\n /// @custom:oz-renamed-from _HASHED_VERSION\n bytes32 private _hashedVersion;\n\n string private _name;\n string private _version;\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 function __EIP712_init(string memory name, string memory version) internal onlyInitializing {\n __EIP712_init_unchained(name, version);\n }\n\n function __EIP712_init_unchained(string memory name, string memory version) internal onlyInitializing {\n _name = name;\n _version = version;\n\n // Reset prior values in storage if upgrading\n _hashedName = 0;\n _hashedVersion = 0;\n }\n\n /**\n * @dev Returns the domain separator for the current chain.\n */\n function _domainSeparatorV4() internal view returns (bytes32) {\n return _buildDomainSeparator();\n }\n\n function _buildDomainSeparator() private view returns (bytes32) {\n return keccak256(abi.encode(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash(), 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 ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4(), structHash);\n }\n\n /**\n * @dev See {EIP-5267}.\n *\n * _Available since v4.9._\n */\n function eip712Domain()\n public\n view\n virtual\n override\n returns (\n bytes1 fields,\n string memory name,\n string memory version,\n uint256 chainId,\n address verifyingContract,\n bytes32 salt,\n uint256[] memory extensions\n )\n {\n // If the hashed name and version in storage are non-zero, the contract hasn't been properly initialized\n // and the EIP712 domain is not reliable, as it will be missing name and version.\n require(_hashedName == 0 && _hashedVersion == 0, \"EIP712: Uninitialized\");\n\n return (\n hex\"0f\", // 01111\n _EIP712Name(),\n _EIP712Version(),\n block.chainid,\n address(this),\n bytes32(0),\n new uint256[](0)\n );\n }\n\n /**\n * @dev The name parameter for the EIP712 domain.\n *\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n * are a concern.\n */\n function _EIP712Name() internal virtual view returns (string memory) {\n return _name;\n }\n\n /**\n * @dev The version parameter for the EIP712 domain.\n *\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n * are a concern.\n */\n function _EIP712Version() internal virtual view returns (string memory) {\n return _version;\n }\n\n /**\n * @dev The hash of the name parameter for the EIP712 domain.\n *\n * NOTE: In previous versions this function was virtual. In this version you should override `_EIP712Name` instead.\n */\n function _EIP712NameHash() internal view returns (bytes32) {\n string memory name = _EIP712Name();\n if (bytes(name).length > 0) {\n return keccak256(bytes(name));\n } else {\n // If the name is empty, the contract may have been upgraded without initializing the new storage.\n // We return the name hash in storage if non-zero, otherwise we assume the name is empty by design.\n bytes32 hashedName = _hashedName;\n if (hashedName != 0) {\n return hashedName;\n } else {\n return keccak256(\"\");\n }\n }\n }\n\n /**\n * @dev The hash of the version parameter for the EIP712 domain.\n *\n * NOTE: In previous versions this function was virtual. In this version you should override `_EIP712Version` instead.\n */\n function _EIP712VersionHash() internal view returns (bytes32) {\n string memory version = _EIP712Version();\n if (bytes(version).length > 0) {\n return keccak256(bytes(version));\n } else {\n // If the version is empty, the contract may have been upgraded without initializing the new storage.\n // We return the version hash in storage if non-zero, otherwise we assume the version is empty by design.\n bytes32 hashedVersion = _hashedVersion;\n if (hashedVersion != 0) {\n return hashedVersion;\n } else {\n return keccak256(\"\");\n }\n }\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[48] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/cryptography/SignatureCheckerUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/SignatureChecker.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./ECDSAUpgradeable.sol\";\nimport \"../../interfaces/IERC1271Upgradeable.sol\";\n\n/**\n * @dev Signature verification helper that can be used instead of `ECDSA.recover` to seamlessly support both ECDSA\n * signatures from externally owned accounts (EOAs) as well as ERC1271 signatures from smart contract wallets like\n * Argent and Gnosis Safe.\n *\n * _Available since v4.1._\n */\nlibrary SignatureCheckerUpgradeable {\n /**\n * @dev Checks if a signature is valid for a given signer and data hash. If the signer is a smart contract, the\n * signature is validated against that smart contract using ERC1271, otherwise it's validated using `ECDSA.recover`.\n *\n * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus\n * change through time. It could return true at block N and false at block N+1 (or the opposite).\n */\n function isValidSignatureNow(address signer, bytes32 hash, bytes memory signature) internal view returns (bool) {\n (address recovered, ECDSAUpgradeable.RecoverError error) = ECDSAUpgradeable.tryRecover(hash, signature);\n return\n (error == ECDSAUpgradeable.RecoverError.NoError && recovered == signer) ||\n isValidERC1271SignatureNow(signer, hash, signature);\n }\n\n /**\n * @dev Checks if a signature is valid for a given signer and data hash. The signature is validated\n * against the signer smart contract using ERC1271.\n *\n * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus\n * change through time. It could return true at block N and false at block N+1 (or the opposite).\n */\n function isValidERC1271SignatureNow(\n address signer,\n bytes32 hash,\n bytes memory signature\n ) internal view returns (bool) {\n (bool success, bytes memory result) = signer.staticcall(\n abi.encodeWithSelector(IERC1271Upgradeable.isValidSignature.selector, hash, signature)\n );\n return (success &&\n result.length >= 32 &&\n abi.decode(result, (bytes32)) == bytes32(IERC1271Upgradeable.isValidSignature.selector));\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165CheckerUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/introspection/ERC165Checker.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165Upgradeable.sol\";\n\n/**\n * @dev Library used to query support of an interface declared via {IERC165}.\n *\n * Note that these functions return the actual result of the query: they do not\n * `revert` if an interface is not supported. It is up to the caller to decide\n * what to do in these cases.\n */\nlibrary ERC165CheckerUpgradeable {\n // As per the EIP-165 spec, no interface should ever match 0xffffffff\n bytes4 private constant _INTERFACE_ID_INVALID = 0xffffffff;\n\n /**\n * @dev Returns true if `account` supports the {IERC165} interface.\n */\n function supportsERC165(address account) internal view returns (bool) {\n // Any contract that implements ERC165 must explicitly indicate support of\n // InterfaceId_ERC165 and explicitly indicate non-support of InterfaceId_Invalid\n return\n supportsERC165InterfaceUnchecked(account, type(IERC165Upgradeable).interfaceId) &&\n !supportsERC165InterfaceUnchecked(account, _INTERFACE_ID_INVALID);\n }\n\n /**\n * @dev Returns true if `account` supports the interface defined by\n * `interfaceId`. Support for {IERC165} itself is queried automatically.\n *\n * See {IERC165-supportsInterface}.\n */\n function supportsInterface(address account, bytes4 interfaceId) internal view returns (bool) {\n // query support of both ERC165 as per the spec and support of _interfaceId\n return supportsERC165(account) && supportsERC165InterfaceUnchecked(account, interfaceId);\n }\n\n /**\n * @dev Returns a boolean array where each value corresponds to the\n * interfaces passed in and whether they're supported or not. This allows\n * you to batch check interfaces for a contract where your expectation\n * is that some interfaces may not be supported.\n *\n * See {IERC165-supportsInterface}.\n *\n * _Available since v3.4._\n */\n function getSupportedInterfaces(\n address account,\n bytes4[] memory interfaceIds\n ) internal view returns (bool[] memory) {\n // an array of booleans corresponding to interfaceIds and whether they're supported or not\n bool[] memory interfaceIdsSupported = new bool[](interfaceIds.length);\n\n // query support of ERC165 itself\n if (supportsERC165(account)) {\n // query support of each interface in interfaceIds\n for (uint256 i = 0; i < interfaceIds.length; i++) {\n interfaceIdsSupported[i] = supportsERC165InterfaceUnchecked(account, interfaceIds[i]);\n }\n }\n\n return interfaceIdsSupported;\n }\n\n /**\n * @dev Returns true if `account` supports all the interfaces defined in\n * `interfaceIds`. Support for {IERC165} itself is queried automatically.\n *\n * Batch-querying can lead to gas savings by skipping repeated checks for\n * {IERC165} support.\n *\n * See {IERC165-supportsInterface}.\n */\n function supportsAllInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool) {\n // query support of ERC165 itself\n if (!supportsERC165(account)) {\n return false;\n }\n\n // query support of each interface in interfaceIds\n for (uint256 i = 0; i < interfaceIds.length; i++) {\n if (!supportsERC165InterfaceUnchecked(account, interfaceIds[i])) {\n return false;\n }\n }\n\n // all interfaces supported\n return true;\n }\n\n /**\n * @notice Query if a contract implements an interface, does not check ERC165 support\n * @param account The address of the contract to query for support of an interface\n * @param interfaceId The interface identifier, as specified in ERC-165\n * @return true if the contract at account indicates support of the interface with\n * identifier interfaceId, false otherwise\n * @dev Assumes that account contains a contract that supports ERC165, otherwise\n * the behavior of this method is undefined. This precondition can be checked\n * with {supportsERC165}.\n *\n * Some precompiled contracts will falsely indicate support for a given interface, so caution\n * should be exercised when using this function.\n *\n * Interface identification is specified in ERC-165.\n */\n function supportsERC165InterfaceUnchecked(address account, bytes4 interfaceId) internal view returns (bool) {\n // prepare call\n bytes memory encodedParams = abi.encodeWithSelector(IERC165Upgradeable.supportsInterface.selector, interfaceId);\n\n // perform static call\n bool success;\n uint256 returnSize;\n uint256 returnValue;\n assembly {\n success := staticcall(30000, account, add(encodedParams, 0x20), mload(encodedParams), 0x00, 0x20)\n returnSize := returndatasize()\n returnValue := mload(0x00)\n }\n\n return success && returnSize >= 0x20 && returnValue > 0;\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165Upgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n *\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\n */\nabstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable {\n function __ERC165_init() internal onlyInitializing {\n }\n\n function __ERC165_init_unchained() internal onlyInitializing {\n }\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IERC165Upgradeable).interfaceId;\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165Upgradeable {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary MathUpgradeable {\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 // Solidity will revert if denominator == 0, unlike the div opcode on its own.\n // The surrounding unchecked block does not change this fact.\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\n return prod0 / denominator;\n }\n\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\n require(denominator > prod1, \"Math: mulDiv overflow\");\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 256, 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 << 3) < value ? 1 : 0);\n }\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/math/SignedMathUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMathUpgradeable {\n /**\n * @dev Returns the largest of two signed numbers.\n */\n function max(int256 a, int256 b) internal pure returns (int256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two signed numbers.\n */\n function min(int256 a, int256 b) internal pure returns (int256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two signed numbers without overflow.\n * The result is rounded towards zero.\n */\n function average(int256 a, int256 b) internal pure returns (int256) {\n // Formula from the book \"Hacker's Delight\"\n int256 x = (a & b) + ((a ^ b) >> 1);\n return x + (int256(uint256(x) >> 255) & (a ^ b));\n }\n\n /**\n * @dev Returns the absolute unsigned value of a signed value.\n */\n function abs(int256 n) internal pure returns (uint256) {\n unchecked {\n // must be unchecked in order to support `n = type(int256).min`\n return uint256(n >= 0 ? n : -n);\n }\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./math/MathUpgradeable.sol\";\nimport \"./math/SignedMathUpgradeable.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary StringsUpgradeable {\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 = MathUpgradeable.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 `int256` to its ASCII `string` decimal representation.\n */\n function toString(int256 value) internal pure returns (string memory) {\n return string(abi.encodePacked(value < 0 ? \"-\" : \"\", toString(SignedMathUpgradeable.abs(value))));\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, MathUpgradeable.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 /**\n * @dev Returns true if the two strings are equal.\n */\n function equal(string memory a, string memory b) internal pure returns (bool) {\n return keccak256(bytes(a)) == keccak256(bytes(b));\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for managing\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\n * types.\n *\n * Sets have the following properties:\n *\n * - Elements are added, removed, and checked for existence in constant time\n * (O(1)).\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\n *\n * ```solidity\n * contract Example {\n * // Add the library methods\n * using EnumerableSet for EnumerableSet.AddressSet;\n *\n * // Declare a set state variable\n * EnumerableSet.AddressSet private mySet;\n * }\n * ```\n *\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\n * and `uint256` (`UintSet`) are supported.\n *\n * [WARNING]\n * ====\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\n * unusable.\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\n *\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\n * array of EnumerableSet.\n * ====\n */\nlibrary EnumerableSetUpgradeable {\n // To implement this library for multiple types with as little code\n // repetition as possible, we write it in terms of a generic Set type with\n // bytes32 values.\n // The Set implementation uses private functions, and user-facing\n // implementations (such as AddressSet) are just wrappers around the\n // underlying Set.\n // This means that we can only create new EnumerableSets for types that fit\n // in bytes32.\n\n struct Set {\n // Storage of set values\n bytes32[] _values;\n // Position of the value in the `values` array, plus 1 because index 0\n // means a value is not in the set.\n mapping(bytes32 => uint256) _indexes;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function _add(Set storage set, bytes32 value) private returns (bool) {\n if (!_contains(set, value)) {\n set._values.push(value);\n // The value is stored at length-1, but we add 1 to all indexes\n // and use 0 as a sentinel value\n set._indexes[value] = set._values.length;\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function _remove(Set storage set, bytes32 value) private returns (bool) {\n // We read and store the value's index to prevent multiple reads from the same storage slot\n uint256 valueIndex = set._indexes[value];\n\n if (valueIndex != 0) {\n // Equivalent to contains(set, value)\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\n // the array, and then remove the last element (sometimes called as 'swap and pop').\n // This modifies the order of the array, as noted in {at}.\n\n uint256 toDeleteIndex = valueIndex - 1;\n uint256 lastIndex = set._values.length - 1;\n\n if (lastIndex != toDeleteIndex) {\n bytes32 lastValue = set._values[lastIndex];\n\n // Move the last value to the index where the value to delete is\n set._values[toDeleteIndex] = lastValue;\n // Update the index for the moved value\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\n }\n\n // Delete the slot where the moved value was stored\n set._values.pop();\n\n // Delete the index for the deleted slot\n delete set._indexes[value];\n\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\n return set._indexes[value] != 0;\n }\n\n /**\n * @dev Returns the number of values on the set. O(1).\n */\n function _length(Set storage set) private view returns (uint256) {\n return set._values.length;\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\n return set._values[index];\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function _values(Set storage set) private view returns (bytes32[] memory) {\n return set._values;\n }\n\n // Bytes32Set\n\n struct Bytes32Set {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n return _add(set._inner, value);\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n return _remove(set._inner, value);\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\n return _contains(set._inner, value);\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(Bytes32Set storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\n return _at(set._inner, index);\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\n bytes32[] memory store = _values(set._inner);\n bytes32[] memory result;\n\n /// @solidity memory-safe-assembly\n assembly {\n result := store\n }\n\n return result;\n }\n\n // AddressSet\n\n struct AddressSet {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(AddressSet storage set, address value) internal returns (bool) {\n return _add(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(AddressSet storage set, address value) internal returns (bool) {\n return _remove(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(AddressSet storage set, address value) internal view returns (bool) {\n return _contains(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(AddressSet storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\n return address(uint160(uint256(_at(set._inner, index))));\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(AddressSet storage set) internal view returns (address[] memory) {\n bytes32[] memory store = _values(set._inner);\n address[] memory result;\n\n /// @solidity memory-safe-assembly\n assembly {\n result := store\n }\n\n return result;\n }\n\n // UintSet\n\n struct UintSet {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(UintSet storage set, uint256 value) internal returns (bool) {\n return _add(set._inner, bytes32(value));\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\n return _remove(set._inner, bytes32(value));\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\n return _contains(set._inner, bytes32(value));\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(UintSet storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\n return uint256(_at(set._inner, index));\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(UintSet storage set) internal view returns (uint256[] memory) {\n bytes32[] memory store = _values(set._inner);\n uint256[] memory result;\n\n /// @solidity memory-safe-assembly\n assembly {\n result := store\n }\n\n return result;\n }\n}\n" + }, + "@openzeppelin/contracts/interfaces/IERC2981.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC2981.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/introspection/IERC165.sol\";\n\n/**\n * @dev Interface for the NFT Royalty Standard.\n *\n * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal\n * support for royalty payments across all NFT marketplaces and ecosystem participants.\n *\n * _Available since v4.5._\n */\ninterface IERC2981 is IERC165 {\n /**\n * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of\n * exchange. The royalty amount is denominated and should be paid in that same unit of exchange.\n */\n function royaltyInfo(\n uint256 tokenId,\n uint256 salePrice\n ) external view returns (address receiver, uint256 royaltyAmount);\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "@sandbox-smart-contracts/dependency-metatx/contracts/ERC2771HandlerAbstract.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/// @dev minimal ERC2771 handler to keep bytecode-size down\n/// based on: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/metatx/ERC2771Context.sol\nabstract contract ERC2771HandlerAbstract {\n /// @notice return true if the forwarder is the trusted forwarder\n /// @param forwarder trusted forwarder address to check\n /// @return true if the address is the same as the trusted forwarder\n function isTrustedForwarder(address forwarder) external view returns (bool) {\n return _isTrustedForwarder(forwarder);\n }\n\n /// @notice if the call is from the trusted forwarder the sender is extracted from calldata, msg.sender otherwise\n /// @return sender the calculated address of the sender\n function _msgSender() internal view virtual returns (address sender) {\n if (_isTrustedForwarder(msg.sender) && msg.data.length >= 20) {\n // The assembly code is more direct than the Solidity version using `abi.decode`.\n // solhint-disable-next-line no-inline-assembly\n assembly {\n sender := shr(96, calldataload(sub(calldatasize(), 20)))\n }\n } else {\n sender = msg.sender;\n }\n }\n\n /// @notice if the call is from the trusted forwarder the sender is removed from calldata\n /// @return the calldata without the sender\n function _msgData() internal view virtual returns (bytes calldata) {\n if (_isTrustedForwarder(msg.sender) && msg.data.length >= 20) {\n return msg.data[:msg.data.length - 20];\n } else {\n return msg.data;\n }\n }\n\n /// @notice return true if the forwarder is the trusted forwarder\n /// @param forwarder trusted forwarder address to check\n /// @return true if the address is the same as the trusted forwarder\n /// @dev this function must be IMPLEMENTED\n function _isTrustedForwarder(address forwarder) internal view virtual returns (bool);\n}\n" + }, + "@sandbox-smart-contracts/dependency-metatx/contracts/ERC2771HandlerUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {Initializable} from \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport {ERC2771HandlerAbstract} from \"./ERC2771HandlerAbstract.sol\";\n\n/// @dev minimal ERC2771 handler to keep bytecode-size down\n/// based on: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/metatx/ERC2771Context.sol\ncontract ERC2771HandlerUpgradeable is Initializable, ERC2771HandlerAbstract {\n address private _trustedForwarder;\n\n /// @notice Emitted when a `newTrustedForwarder` is set, replacing the `oldTrustedForwarder`\n /// @param oldTrustedForwarder old trusted forwarder\n /// @param newTrustedForwarder new trusted forwarder\n /// @param operator the sender of the transaction\n event TrustedForwarderSet(\n address indexed oldTrustedForwarder,\n address indexed newTrustedForwarder,\n address indexed operator\n );\n\n /// @notice initialize the trusted forwarder address\n /// @param forwarder trusted forwarder address or zero to disable it\n // solhint-disable-next-line func-name-mixedcase\n function __ERC2771Handler_init(address forwarder) internal onlyInitializing {\n __ERC2771Handler_init_unchained(forwarder);\n }\n\n /// @notice initialize the trusted forwarder address\n /// @param forwarder trusted forwarder address or zero to disable it\n // solhint-disable-next-line func-name-mixedcase\n function __ERC2771Handler_init_unchained(address forwarder) internal onlyInitializing {\n _setTrustedForwarder(forwarder);\n }\n\n /// @notice return the address of the trusted forwarder\n /// @return return the address of the trusted forwarder\n function getTrustedForwarder() external view returns (address) {\n return _trustedForwarder;\n }\n\n /// @notice set the address of the trusted forwarder\n /// @param newForwarder the address of the new forwarder.\n function _setTrustedForwarder(address newForwarder) internal virtual {\n require(newForwarder != _trustedForwarder, \"ERC2771HandlerUpgradeable: forwarder already set\");\n emit TrustedForwarderSet(_trustedForwarder, newForwarder, _msgSender());\n _trustedForwarder = newForwarder;\n }\n\n /// @notice return true if the forwarder is the trusted forwarder\n /// @param forwarder trusted forwarder address to check\n /// @return true if the address is the same as the trusted forwarder\n function _isTrustedForwarder(address forwarder) internal view virtual override returns (bool) {\n return forwarder == _trustedForwarder;\n }\n\n /// @notice if the call is from the trusted forwarder the sender is extracted from calldata, msg.sender otherwise\n /// @return sender the calculated address of the sender\n function _msgSender() internal view virtual override returns (address sender) {\n return super._msgSender();\n }\n\n /// @notice if the call is from the trusted forwarder the sender is removed from calldata\n /// @return the calldata without the sender\n function _msgData() internal view virtual override returns (bytes calldata) {\n return super._msgData();\n }\n\n uint256[49] private __gap;\n}\n" + }, + "@sandbox-smart-contracts/dependency-royalty-management/contracts/interfaces/IMultiRoyaltyRecipients.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IERC165} from \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport {Recipient} from \"@manifoldxyz/royalty-registry-solidity/contracts/overrides/IRoyaltySplitter.sol\";\n\n/// Multi-receiver EIP2981 implementation\ninterface IMultiRoyaltyRecipients is IERC165 {\n /// @dev Helper function to get all recipients\n function getRecipients(uint256 tokenId) external view returns (Recipient[] memory);\n}\n" + }, + "@sandbox-smart-contracts/dependency-royalty-management/contracts/interfaces/IRoyaltyUGC.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/// @title IRoyaltyUGC\n/// @notice interface define function for managing creator of UGC (User-Generated Content)\ninterface IRoyaltyUGC {\n ///@notice Gets the address of the creator associated with a specific token.\n ///@param tokenId the Id of token to retrieve the creator address for\n ///@return creator the address of creator\n function getCreatorAddress(uint256 tokenId) external pure returns (address creator);\n}\n" + }, + "@sandbox-smart-contracts/marketplace/contracts/Exchange.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.19;\n\nimport {PausableUpgradeable} from \"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\";\nimport {Initializable} from \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport {AccessControlEnumerableUpgradeable} from \"@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol\";\nimport {ContextUpgradeable} from \"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\";\nimport {ERC2771HandlerUpgradeable} from \"@sandbox-smart-contracts/dependency-metatx/contracts/ERC2771HandlerUpgradeable.sol\";\nimport {IOrderValidator} from \"./interfaces/IOrderValidator.sol\";\nimport {TransferManager, IRoyaltiesProvider} from \"./TransferManager.sol\";\nimport {LibOrder} from \"./libraries/LibOrder.sol\";\nimport {ExchangeCore} from \"./ExchangeCore.sol\";\n\n/// @author The Sandbox\n/// @title Exchange contract with meta transactions\n/// @notice Used to exchange assets, that is, tokens.\n/// @dev Main functions are in ExchangeCore\n/// @dev TransferManager is used to execute token transfers\ncontract Exchange is\n Initializable,\n AccessControlEnumerableUpgradeable,\n ExchangeCore,\n TransferManager,\n ERC2771HandlerUpgradeable,\n PausableUpgradeable\n{\n /// @notice Role for ERC1776 trusted meta transaction contracts (like SAND).\n /// @return Hash for ERC1776_OPERATOR_ROLE.\n bytes32 public constant ERC1776_OPERATOR_ROLE = keccak256(\"ERC1776_OPERATOR_ROLE\");\n\n /// @notice Role for business addresses that can change values like fees and royalties.\n /// @return Hash for EXCHANGE_ADMIN_ROLE.\n bytes32 public constant EXCHANGE_ADMIN_ROLE = keccak256(\"EXCHANGE_ADMIN_ROLE\");\n\n /// @notice Role for business addresses that can react to emergencies and pause.\n /// @return Hash for PAUSER_ROLE.\n bytes32 public constant PAUSER_ROLE = keccak256(\"PAUSER_ROLE\");\n\n /// @dev This protects the implementation contract from being initialized.\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor() {\n _disableInitializers();\n }\n\n /// @notice Exchange contract initializer.\n /// @param admin The admin user that can grant/revoke roles, etc.\n /// @param newTrustedForwarder Address for the trusted forwarder that will execute meta transactions.\n /// @param newProtocolFeePrimary Protocol fee applied to primary markets.\n /// @param newProtocolFeeSecondary Protocol fee applied to secondary markets.\n /// @param newDefaultFeeReceiver Market fee receiver.\n /// @param newRoyaltiesProvider Registry for the different types of royalties.\n /// @param orderValidatorAddress New OrderValidator contract address.\n function initialize(\n address admin,\n address newTrustedForwarder,\n uint256 newProtocolFeePrimary,\n uint256 newProtocolFeeSecondary,\n address newDefaultFeeReceiver,\n IRoyaltiesProvider newRoyaltiesProvider,\n IOrderValidator orderValidatorAddress,\n uint256 newMatchOrdersLimit\n ) external initializer {\n __ERC2771Handler_init_unchained(newTrustedForwarder);\n __AccessControlEnumerable_init_unchained();\n __Pausable_init_unchained();\n __TransferManager_init_unchained(\n newProtocolFeePrimary,\n newProtocolFeeSecondary,\n newDefaultFeeReceiver,\n newRoyaltiesProvider\n );\n __ExchangeCoreInitialize(orderValidatorAddress, newMatchOrdersLimit);\n _grantRole(DEFAULT_ADMIN_ROLE, admin);\n }\n\n /// @notice Match orders and transact.\n /// @param matchedOrders A list of left/right orders that match each other.\n function matchOrders(ExchangeMatch[] calldata matchedOrders) external whenNotPaused {\n _matchOrders(_msgSender(), matchedOrders);\n }\n\n /// @notice Match orders and transact.\n /// @param sender The original sender of the transaction.\n /// @param matchedOrders A list of left/right orders that match each other.\n /// @dev This method supports ERC1776 native meta transactions.\n function matchOrdersFrom(\n address sender,\n ExchangeMatch[] calldata matchedOrders\n ) external onlyRole(ERC1776_OPERATOR_ROLE) whenNotPaused {\n require(sender != address(0), \"invalid sender\");\n _matchOrders(sender, matchedOrders);\n }\n\n /// @notice Cancel an order.\n /// @param order The order to be canceled.\n /// @param orderKeyHash Used as a checksum to avoid mistakes in the order values.\n function cancel(LibOrder.Order calldata order, bytes32 orderKeyHash) external {\n require(_msgSender() == order.maker, \"not maker\");\n _cancel(order, orderKeyHash);\n }\n\n /// @notice Set the royalty registry.\n /// @param newRoyaltiesRegistry Address of the new royalties registry.\n function setRoyaltiesRegistry(IRoyaltiesProvider newRoyaltiesRegistry) external onlyRole(DEFAULT_ADMIN_ROLE) {\n _setRoyaltiesRegistry(newRoyaltiesRegistry);\n }\n\n /// @notice Set the OrderValidator address.\n /// @param contractAddress New OrderValidator contract address.\n function setOrderValidatorContract(IOrderValidator contractAddress) external onlyRole(DEFAULT_ADMIN_ROLE) {\n _setOrderValidatorContract(contractAddress);\n }\n\n /// @notice Set the limit for matching orders.\n /// @param newMatchOrdersLimit New value for max orders that can be matched.\n function setMatchOrdersLimit(uint256 newMatchOrdersLimit) external onlyRole(EXCHANGE_ADMIN_ROLE) {\n _setMatchOrdersLimit(newMatchOrdersLimit);\n }\n\n /// @notice Change the address of the trusted forwarder for meta-transactions.\n /// @param newTrustedForwarder The new trusted forwarder address.\n function setTrustedForwarder(address newTrustedForwarder) external onlyRole(DEFAULT_ADMIN_ROLE) {\n _setTrustedForwarder(newTrustedForwarder);\n }\n\n /// @notice Set the protocol fees.\n /// @param newProtocolFeePrimary Fee for the primary market.\n /// @param newProtocolFeeSecondary Fee for the secondary market.\n function setProtocolFee(\n uint256 newProtocolFeePrimary,\n uint256 newProtocolFeeSecondary\n ) external onlyRole(EXCHANGE_ADMIN_ROLE) {\n _setProtocolFee(newProtocolFeePrimary, newProtocolFeeSecondary);\n }\n\n /// @notice Set the default fee receiver.\n /// @param newDefaultFeeReceiver Address to receive the fees.\n function setDefaultFeeReceiver(address newDefaultFeeReceiver) external onlyRole(EXCHANGE_ADMIN_ROLE) {\n _setDefaultFeeReceiver(newDefaultFeeReceiver);\n }\n\n /// @notice Pause the contract operations.\n function pause() external onlyRole(PAUSER_ROLE) {\n _pause();\n }\n\n /// @notice Resume the contract operations.\n function unpause() external onlyRole(EXCHANGE_ADMIN_ROLE) {\n _unpause();\n }\n\n /// @dev Check if fees & royalties should be skipped for users with the EXCHANGE_ADMIN_ROLE.\n /// @param from Address to check.\n /// @return True if fees should be skipped, false otherwise.\n function _mustSkipFees(address from) internal view override returns (bool) {\n return hasRole(EXCHANGE_ADMIN_ROLE, from);\n }\n\n function _msgSender()\n internal\n view\n virtual\n override(ContextUpgradeable, ERC2771HandlerUpgradeable)\n returns (address)\n {\n return ERC2771HandlerUpgradeable._msgSender();\n }\n\n // slither-disable-next-line dead-code needed because of inheritance\n function _msgData() internal view override(ContextUpgradeable, ERC2771HandlerUpgradeable) returns (bytes calldata) {\n return ERC2771HandlerUpgradeable._msgData();\n }\n}\n" + }, + "@sandbox-smart-contracts/marketplace/contracts/ExchangeCore.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.19;\n\nimport {Initializable} from \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport {AddressUpgradeable} from \"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\";\nimport {LibAsset} from \"./libraries/LibAsset.sol\";\nimport {LibOrder} from \"./libraries/LibOrder.sol\";\nimport {ITransferManager} from \"./interfaces/ITransferManager.sol\";\nimport {IOrderValidator} from \"./interfaces/IOrderValidator.sol\";\n\n/// @author The Sandbox\n/// @title ExchangeCore Contract\n/// @notice Contains the main functions for the marketplace.\n/// @dev This is an abstract contract that requires implementation.\nabstract contract ExchangeCore is Initializable, ITransferManager {\n using AddressUpgradeable for address;\n /// @dev Stores left and right orders that match each other.\n /// Left and right are symmetrical except for fees that are taken from the left side first.\n struct ExchangeMatch {\n LibOrder.Order orderLeft; // Left order details\n bytes signatureLeft; // Signature of the left order\n LibOrder.Order orderRight; // Right order details\n bytes signatureRight; // Signature of the right order\n }\n\n /// @dev Address of the OrderValidator contract.\n IOrderValidator public orderValidator;\n\n /// @dev Limit for the number of orders that can be matched in a single transaction.\n uint256 private matchOrdersLimit;\n\n /// @dev Mapping to store the fill amount for each order, identified by its hash.\n mapping(bytes32 orderKeyHash => uint256 orderFillValue) public fills;\n\n /// @notice Event emitted when an order is canceled.\n /// @param orderKeyHash The hash of the order being canceled.\n /// @param order The details of the order being canceled.\n event Cancel(bytes32 indexed orderKeyHash, LibOrder.Order order);\n\n /// @notice Event emitted when two orders are matched.\n /// @param from Address that initiated the match.\n /// @param orderKeyHashLeft Hash of the left order.\n /// @param orderKeyHashRight Hash of the right order.\n /// @param orderLeft Details of the left order.\n /// @param orderRight Details of the right order.\n /// @param newFill Fill details resulting from the order match.\n /// @param totalFillLeft Total fill amount for the left order.\n /// @param totalFillRight Total fill amount for the right order.\n event Match(\n address indexed from,\n bytes32 indexed orderKeyHashLeft,\n bytes32 indexed orderKeyHashRight,\n LibOrder.Order orderLeft,\n LibOrder.Order orderRight,\n LibOrder.FillResult newFill,\n uint256 totalFillLeft,\n uint256 totalFillRight\n );\n\n /// @notice Event emitted when a new OrderValidator contract is set.\n /// @param contractAddress Address of the new OrderValidator contract.\n event OrderValidatorSet(IOrderValidator indexed contractAddress);\n\n /// @notice Event emitted when the match orders limit is updated.\n /// @param newMatchOrdersLimit The new limit for matching orders in one transaction.\n event MatchOrdersLimitSet(uint256 indexed newMatchOrdersLimit);\n\n /// @dev Constructor to disable initializers for this contract.\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor() {\n _disableInitializers();\n }\n\n /// @notice Initializes the ExchangeCore contract.\n /// @param newOrderValidatorAddress Address of the new OrderValidator contract.\n /// @param newMatchOrdersLimit The limit for matching orders in one transaction.\n // solhint-disable-next-line func-name-mixedcase\n function __ExchangeCoreInitialize(\n IOrderValidator newOrderValidatorAddress,\n uint256 newMatchOrdersLimit\n ) internal onlyInitializing {\n _setOrderValidatorContract(newOrderValidatorAddress);\n _setMatchOrdersLimit(newMatchOrdersLimit);\n }\n\n /// @notice Updates the OrderValidator contract address.\n /// @param contractAddress Address of the new OrderValidator contract.\n function _setOrderValidatorContract(IOrderValidator contractAddress) internal {\n require(address(contractAddress).isContract(), \"invalid order validator\");\n orderValidator = contractAddress;\n emit OrderValidatorSet(contractAddress);\n }\n\n /// @notice Updates the limit for the number of orders that can be matched in a single transaction.\n /// @param newMatchOrdersLimit The new limit for matching orders.\n function _setMatchOrdersLimit(uint256 newMatchOrdersLimit) internal {\n require(newMatchOrdersLimit > 0, \"invalid quantity\");\n matchOrdersLimit = newMatchOrdersLimit;\n emit MatchOrdersLimitSet(matchOrdersLimit);\n }\n\n /// @notice Cancels a specified order.\n /// @param order Details of the order to be canceled.\n /// @param orderKeyHash The hash of the order, used for verification.\n function _cancel(LibOrder.Order calldata order, bytes32 orderKeyHash) internal {\n require(order.salt != 0, \"0 salt can't be used\");\n bytes32 _orderKeyHash = LibOrder.hashKey(order);\n require(_orderKeyHash == orderKeyHash, \"invalid orderHash\");\n fills[orderKeyHash] = type(uint256).max;\n emit Cancel(orderKeyHash, order);\n }\n\n /// @notice Matches provided orders and performs the transaction.\n /// @param sender The original sender of the transaction.\n /// @param matchedOrders Array of orders that are matched with each other.\n function _matchOrders(address sender, ExchangeMatch[] calldata matchedOrders) internal {\n uint256 len = matchedOrders.length;\n require(len > 0, \"ExchangeMatch cannot be empty\");\n require(len <= matchOrdersLimit, \"too many ExchangeMatch\");\n for (uint256 i; i < len; i++) {\n ExchangeMatch calldata m = matchedOrders[i];\n _validateOrders(sender, m.orderLeft, m.signatureLeft, m.orderRight, m.signatureRight);\n _matchAndTransfer(sender, m.orderLeft, m.orderRight);\n }\n }\n\n /// @dev Validates the provided orders.\n /// @param sender Address of the sender.\n /// @param orderLeft Details of the left order.\n /// @param signatureLeft Signature of the left order.\n /// @param orderRight Details of the right order.\n /// @param signatureRight Signature of the right order.\n function _validateOrders(\n address sender,\n LibOrder.Order memory orderLeft,\n bytes memory signatureLeft,\n LibOrder.Order memory orderRight,\n bytes memory signatureRight\n ) internal view {\n // validate must force order.maker != address(0)\n orderValidator.validate(orderLeft, signatureLeft, sender);\n orderValidator.validate(orderRight, signatureRight, sender);\n if (orderLeft.taker != address(0)) {\n require(orderRight.maker == orderLeft.taker, \"leftOrder.taker failed\");\n }\n if (orderRight.taker != address(0)) {\n require(orderRight.taker == orderLeft.maker, \"rightOrder.taker failed\");\n }\n }\n\n /// @notice Matches valid orders and transfers the associated assets.\n /// @param sender Address initiating the match.\n /// @param orderLeft The left order.\n /// @param orderRight The right order.\n function _matchAndTransfer(\n address sender,\n LibOrder.Order calldata orderLeft,\n LibOrder.Order calldata orderRight\n ) internal {\n LibAsset.AssetType memory makeMatch = LibAsset.matchAssets(\n orderLeft.makeAsset.assetType,\n orderRight.takeAsset.assetType\n );\n LibAsset.AssetType memory takeMatch = LibAsset.matchAssets(\n orderLeft.takeAsset.assetType,\n orderRight.makeAsset.assetType\n );\n\n LibOrder.FillResult memory newFill = _parseOrdersSetFillEmitMatch(sender, orderLeft, orderRight);\n\n doTransfers(\n ITransferManager.DealSide(LibAsset.Asset(makeMatch, newFill.leftValue), orderLeft.maker),\n ITransferManager.DealSide(LibAsset.Asset(takeMatch, newFill.rightValue), orderRight.maker),\n LibAsset.getFeeSide(makeMatch.assetClass, takeMatch.assetClass)\n );\n }\n\n /// @notice Parse orders to get the order data, then create a new fill with setFillEmitMatch()\n /// @param sender The message sender\n /// @param orderLeft Left order\n /// @param orderRight Right order\n /// @return newFill Fill result\n function _parseOrdersSetFillEmitMatch(\n address sender,\n LibOrder.Order calldata orderLeft,\n LibOrder.Order calldata orderRight\n ) internal returns (LibOrder.FillResult memory newFill) {\n bytes32 orderKeyHashLeft = LibOrder.hashKey(orderLeft);\n bytes32 orderKeyHashRight = LibOrder.hashKey(orderRight);\n\n uint256 leftOrderFill = _getOrderFill(orderLeft.salt, orderKeyHashLeft);\n uint256 rightOrderFill = _getOrderFill(orderRight.salt, orderKeyHashRight);\n newFill = LibOrder.fillOrder(orderLeft, orderRight, leftOrderFill, rightOrderFill);\n\n require(newFill.rightValue > 0 && newFill.leftValue > 0, \"nothing to fill\");\n\n if (orderLeft.salt != 0) {\n fills[orderKeyHashLeft] = leftOrderFill + newFill.rightValue;\n }\n\n if (orderRight.salt != 0) {\n fills[orderKeyHashRight] = rightOrderFill + newFill.leftValue;\n }\n\n emit Match({\n from: sender,\n orderKeyHashLeft: orderKeyHashLeft,\n orderKeyHashRight: orderKeyHashRight,\n orderLeft: orderLeft,\n orderRight: orderRight,\n newFill: newFill,\n totalFillLeft: fills[orderKeyHashLeft],\n totalFillRight: fills[orderKeyHashRight]\n });\n return newFill;\n }\n\n /// @notice Return fill corresponding to order hash\n /// @param salt If salt 0, fill = 0\n /// @param hash Order hash\n function _getOrderFill(uint256 salt, bytes32 hash) internal view returns (uint256 fill) {\n if (salt == 0) {\n fill = 0;\n } else {\n fill = fills[hash];\n }\n }\n\n // slither-disable-next-line unused-state\n uint256[49] private __gap;\n}\n" + }, + "@sandbox-smart-contracts/marketplace/contracts/interfaces/IOrderValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.19;\n\nimport {LibOrder} from \"../libraries/LibOrder.sol\";\n\n/// @author The Sandbox\n/// @title OrderValidator contract interface\n/// @notice Contains the signature for validate, isPurchaseValid and verifyERC20Whitelist functions\ninterface IOrderValidator {\n /// @notice Verifies order\n /// @param order Order to be validated\n /// @param signature Signature of order\n /// @param sender Order sender\n function validate(LibOrder.Order memory order, bytes memory signature, address sender) external view;\n}\n" + }, + "@sandbox-smart-contracts/marketplace/contracts/interfaces/IRoyaltiesProvider.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.19;\n\n// The IRoyaltiesProvider.Part.basisPoints represents percentages in base points: 2.5 % == 0.025 * 10000 == 250.\n// We expect external contracts to return the values with this precision.\nuint256 constant TOTAL_BASIS_POINTS = 10000;\n\n/// @author The Sandbox\n/// @title RoyaltiesProvider contract interface\n/// @notice Contains the signature for the getRoyalties function\ninterface IRoyaltiesProvider {\n struct Part {\n address account;\n uint256 basisPoints;\n }\n\n /// @notice Calculates all royalties in token for tokenId\n /// @param token Address of token\n /// @param tokenId of the token we want to calculate royalties\n /// @return A part with all royalties for token\n function getRoyalties(address token, uint256 tokenId) external returns (Part[] memory);\n}\n" + }, + "@sandbox-smart-contracts/marketplace/contracts/interfaces/ITransferManager.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.19;\n\nimport {LibAsset} from \"../libraries/LibAsset.sol\";\n\n/// @author The Sandbox\n/// @title ITransferManager Interface\n/// @notice Provides an interface for managing transfers of assets between matched orders.\nabstract contract ITransferManager {\n /// @dev Represents a side (either maker or taker) of a deal.\n /// Each side has an associated asset and an account address.\n struct DealSide {\n LibAsset.Asset asset; // The asset associated with this side of the deal.\n address account; // The account address associated with this side of the deal.\n }\n\n /// @notice Executes the asset transfers associated with two matched orders.\n /// @param left The DealSide representing the left order's side.\n /// @param right The DealSide representing the right order's side.\n /// @param feeSide Indicates which side of the deal will bear the fee.\n /// @dev This function serves as the primary entry point for asset transfers.\n /// If used in a separate contract, the visibility of this method might change to external.\n function doTransfers(DealSide memory left, DealSide memory right, LibAsset.FeeSide feeSide) internal virtual;\n}\n" + }, + "@sandbox-smart-contracts/marketplace/contracts/interfaces/IWhitelist.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.19;\n\n/// @author The Sandbox\n/// @title Interface for the Whitelist contract\n/// @notice Contains the function signatures for the contract.\ninterface IWhitelist {\n /// @notice Check if a specific role is enabled or disabled.\n /// @param role The role identifier.\n /// @return True if the role is enabled, false if disabled.\n function isRoleEnabled(bytes32 role) external view returns (bool);\n\n /// @notice Check if whitelists are enabled.\n /// @return True if whitelists are enabled, false if disabled.\n function isWhitelistsEnabled() external view returns (bool);\n\n /// @notice Setting permissions for tokens.\n /// @param roles Roles we want to enable or disable.\n /// @param permissions Boolean.\n function setRolesEnabled(bytes32[] calldata roles, bool[] calldata permissions) external;\n\n /// @notice Enable role.\n /// @param role Role we want to enable.\n function enableRole(bytes32 role) external;\n\n /// @notice Disable role.\n /// @param role Role we want to disable.\n function disableRole(bytes32 role) external;\n\n /// @notice Enable whitelists, allowing orders with any token except for ERC20 tokens.\n function enableWhitelists() external;\n\n /// @notice Disable whitelists, requiring orders to refer to the specified whitelists.\n function disableWhitelists() external;\n}\n" + }, + "@sandbox-smart-contracts/marketplace/contracts/libraries/LibAsset.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.19;\n\n/// @author The Sandbox\n/// @title LibAsset: A library for handling different types of Ethereum assets.\n/// @notice This library contains structs, enums, and utility functions for managing and processing Ethereum assets.\nlibrary LibAsset {\n /// @dev Represents different types of assets on the Ethereum network.\n enum AssetClass {\n INVALID, // Represents an invalid asset type.\n ERC20, // Represents an ERC20 token.\n ERC721, // Represents a single ERC721 token.\n ERC1155 // Represents an ERC1155 token.\n }\n\n /// @dev Represents the side of the trade from which a fee should be taken, if any.\n enum FeeSide {\n NONE, // No fees are taken.\n LEFT, // Fees are taken from the left side of the trade.\n RIGHT // Fees are taken from the right side of the trade.\n }\n\n /// @dev Represents the type of a specific asset.\n /// AssetType can represent a specific ERC-721 token (defined by the token contract address and tokenId) or\n /// a specific ERC-20 token (like DAI).\n struct AssetType {\n AssetClass assetClass; // The class of the asset (ERC20, ERC721, etc.).\n bytes data; // Contains the token's contract address and possibly its tokenId.\n }\n\n /// @dev Represents any asset on the Ethereum blockchain with its type and value.\n struct Asset {\n AssetType assetType; // The type of the asset.\n uint256 value; // The amount or value of the asset.\n }\n\n bytes32 internal constant ASSET_TYPE_TYPEHASH = keccak256(\"AssetType(uint256 assetClass,bytes data)\");\n\n bytes32 internal constant ASSET_TYPEHASH =\n keccak256(\"Asset(AssetType assetType,uint256 value)AssetType(uint256 assetClass,bytes data)\");\n\n /// @notice Determine which side of a trade should bear the fee, based on the asset types.\n /// @param leftClass The asset class type of the left side of the trade.\n /// @param rightClass The asset class type of the right side of the trade.\n /// @return FeeSide representing which side should bear the fee, if any.\n function getFeeSide(AssetClass leftClass, AssetClass rightClass) internal pure returns (FeeSide) {\n if (leftClass == AssetClass.ERC20 && rightClass != AssetClass.ERC20) {\n return FeeSide.LEFT;\n }\n if (rightClass == AssetClass.ERC20 && leftClass != AssetClass.ERC20) {\n return FeeSide.RIGHT;\n }\n return FeeSide.NONE;\n }\n\n /// @notice Check if two asset types match.\n /// @param leftType Asset type on the left side of a trade.\n /// @param rightType Asset type on the right side of a trade.\n /// @return AssetType representing the matched asset type.\n function matchAssets(\n AssetType calldata leftType,\n AssetType calldata rightType\n ) internal pure returns (AssetType memory) {\n AssetClass classLeft = leftType.assetClass;\n AssetClass classRight = rightType.assetClass;\n\n require(classLeft != AssetClass.INVALID, \"invalid left asset class\");\n require(classRight != AssetClass.INVALID, \"invalid right asset class\");\n require(classLeft == classRight, \"assets don't match\");\n\n bytes32 leftHash = keccak256(leftType.data);\n bytes32 rightHash = keccak256(rightType.data);\n require(leftHash == rightHash, \"assets don't match\");\n\n return leftType;\n }\n\n /// @notice Compute the hash of an asset type.\n /// @param assetType The asset type to hash.\n /// @return The hash of the asset type.\n function hash(AssetType memory assetType) internal pure returns (bytes32) {\n return keccak256(abi.encode(ASSET_TYPE_TYPEHASH, assetType.assetClass, keccak256(assetType.data)));\n }\n\n /// @notice Compute the hash of an asset.\n /// @param asset The asset to hash.\n /// @return The hash of the asset.\n function hash(Asset memory asset) internal pure returns (bytes32) {\n return keccak256(abi.encode(ASSET_TYPEHASH, hash(asset.assetType), asset.value));\n }\n\n /// @notice Decode the token details (address and tokenId) from an AssetType.\n /// @param assetType The asset type to decode.\n /// @return Address of the token\n /// @return Id of the token\n function decodeToken(AssetType memory assetType) internal pure returns (address, uint256) {\n return abi.decode(assetType.data, (address, uint256));\n }\n\n /// @notice Decode the token address from an AssetType.\n /// @param assetType The asset type to decode.\n /// @return The address of the token.\n function decodeAddress(AssetType memory assetType) internal pure returns (address) {\n return abi.decode(assetType.data, (address));\n }\n}\n" + }, + "@sandbox-smart-contracts/marketplace/contracts/libraries/LibMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.19;\n\n/// @author The Sandbox\n/// @title LibMath: A library for handling specific math operations.\nlibrary LibMath {\n uint256 internal constant ACCEPTABLE_RELATIVE_ERROR = 1000;\n\n /// @dev Calculates partial value given a numerator and denominator rounded down.\n /// Reverts if rounding error is >= 0.1%\n /// @param numerator Numerator.\n /// @param denominator Denominator.\n /// @param target Value to calculate partial of.\n /// @return partialAmount value of target rounded down.\n function safeGetPartialAmountFloor(\n uint256 numerator,\n uint256 denominator,\n uint256 target\n ) internal pure returns (uint256 partialAmount) {\n if (isRoundingErrorFloor(numerator, denominator, target)) {\n revert(\"rounding error\");\n }\n partialAmount = (numerator * target) / (denominator);\n }\n\n /// @dev Checks if rounding error >= 0.1% when rounding down.\n /// @param numerator Numerator.\n /// @param denominator Denominator.\n /// @param target Value to multiply with numerator/denominator.\n /// @return isError Rounding error is present.\n function isRoundingErrorFloor(\n uint256 numerator,\n uint256 denominator,\n uint256 target\n ) internal pure returns (bool isError) {\n if (denominator == 0) {\n revert(\"division by zero\");\n }\n\n // The absolute rounding error is the difference between the rounded\n // value and the ideal value. The relative rounding error is the\n // absolute rounding error divided by the absolute value of the\n // ideal value. This is undefined when the ideal value is zero.\n //\n // The ideal value is `numerator * target / denominator`.\n // Let's call `numerator * target % denominator` the remainder.\n // The absolute error is `remainder / denominator`.\n //\n // When the ideal value is zero, we require the absolute error to\n // be zero. Fortunately, this is always the case. The ideal value is\n // zero iff `numerator == 0` and/or `target == 0`. In this case the\n // remainder and absolute error are also zero.\n if (target == 0 || numerator == 0) {\n return false;\n }\n\n // Otherwise, we want the relative rounding error to be strictly\n // less than 0.1%.\n // The relative error is `remainder / (numerator * target)`.\n // We want the relative error less than 1 / 1000:\n // remainder / (numerator * target) < 1 / 1000\n // or equivalently:\n // 1000 * remainder < numerator * target\n // so we have a rounding error iff:\n // 1000 * remainder >= numerator * target\n uint256 remainder = mulmod(target, numerator, denominator);\n isError = remainder * ACCEPTABLE_RELATIVE_ERROR >= numerator * target;\n }\n}\n" + }, + "@sandbox-smart-contracts/marketplace/contracts/libraries/LibOrder.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.19;\n\nimport {LibAsset} from \"./LibAsset.sol\";\nimport {LibMath} from \"./LibMath.sol\";\n\n/// @author The Sandbox\n/// @title Order Handling Library\n/// @notice Provides tools for constructing, hashing, and validating orders.\nlibrary LibOrder {\n bytes32 internal constant ORDER_TYPEHASH =\n keccak256(\n \"Order(address maker,Asset makeAsset,address taker,Asset takeAsset,uint256 salt,uint256 start,uint256 end)Asset(AssetType assetType,uint256 value)AssetType(uint256 assetClass,bytes data)\"\n );\n\n /// @dev Represents the structure of an order.\n struct Order {\n address maker; // Address of the maker.\n LibAsset.Asset makeAsset; // Asset the maker is providing.\n address taker; // Address of the taker.\n LibAsset.Asset takeAsset; // Asset the taker is providing.\n uint256 salt; // Random number to ensure unique order hash.\n uint256 start; // Timestamp when the order becomes valid.\n uint256 end; // Timestamp when the order expires.\n }\n\n /// @dev Represents the result of filling two orders.\n struct FillResult {\n uint256 leftValue; // Amount filled from the left order.\n uint256 rightValue; // Amount filled from the right order.\n }\n\n /// @notice Computes the unique hash of an order.\n /// @param order The order data.\n /// @return The unique hash of the order.\n function hashKey(Order calldata order) internal pure returns (bytes32) {\n return\n keccak256(\n abi.encode(\n order.maker,\n LibAsset.hash(order.makeAsset.assetType),\n LibAsset.hash(order.takeAsset.assetType),\n order.salt\n )\n );\n }\n\n /// @notice Computes the complete hash of an order, including domain-specific data.\n /// @param order The order data.\n /// @return The complete hash of the order.\n function hash(Order calldata order) internal pure returns (bytes32) {\n return\n keccak256(\n // solhint-disable-next-line func-named-parameters\n abi.encode(\n ORDER_TYPEHASH,\n order.maker,\n LibAsset.hash(order.makeAsset),\n order.taker,\n LibAsset.hash(order.takeAsset),\n order.salt,\n order.start,\n order.end\n )\n );\n }\n\n /// @notice Validates order time\n /// @param order Whose time we want to validate\n // solhint-disable not-rely-on-time\n // slither-disable-start timestamp\n function validateOrderTime(Order memory order) internal view {\n require(order.start == 0 || order.start < block.timestamp, \"Order start validation failed\");\n require(order.end == 0 || order.end > block.timestamp, \"Order end validation failed\");\n }\n\n // slither-disable-end timestamp\n // solhint-enable not-rely-on-time\n\n /// @notice Should return filled values\n /// @param leftOrder Left order\n /// @param rightOrder Right order\n /// @param leftOrderFill Current fill of the left order (0 if order is unfilled)\n /// @param rightOrderFill Current fill of the right order (0 if order is unfilled)\n /// @dev We have 3 cases, 1st: left order should be fully filled\n /// @dev 2nd: right order should be fully filled or 3d: both should be fully filled if required values are the same\n /// @return The fill result of both orders\n function fillOrder(\n LibOrder.Order calldata leftOrder,\n LibOrder.Order calldata rightOrder,\n uint256 leftOrderFill,\n uint256 rightOrderFill\n ) internal pure returns (FillResult memory) {\n (uint256 leftMakeValue, uint256 leftTakeValue) = calculateRemaining(leftOrder, leftOrderFill);\n (uint256 rightMakeValue, uint256 rightTakeValue) = calculateRemaining(rightOrder, rightOrderFill);\n\n if (rightTakeValue > leftMakeValue) {\n return _fillLeft(leftMakeValue, leftTakeValue, rightOrder.makeAsset.value, rightOrder.takeAsset.value);\n }\n return _fillRight(leftOrder.makeAsset.value, leftOrder.takeAsset.value, rightMakeValue, rightTakeValue);\n }\n\n /// @notice Computes the remaining fillable amount of an order.\n /// @param order The order to compute from.\n /// @param fill The amount of the order already filled.\n /// @return makeValue The remaining fillable amount from the maker's side.\n /// @return takeValue The remaining fillable amount from the taker's side.\n function calculateRemaining(\n LibOrder.Order calldata order,\n uint256 fill\n ) internal pure returns (uint256 makeValue, uint256 takeValue) {\n require(order.takeAsset.value >= fill, \"filling more than order permits\");\n takeValue = order.takeAsset.value - fill;\n makeValue = LibMath.safeGetPartialAmountFloor(order.makeAsset.value, order.takeAsset.value, takeValue);\n }\n\n /// @notice Computes the fill values for a situation where the right order is expected to fill the left order.\n /// @param leftMakeValue The amount the left order maker wants to trade.\n /// @param leftTakeValue The amount the left order taker wants in return.\n /// @param rightMakeValue The amount the right order maker wants to trade.\n /// @param rightTakeValue The amount the right order taker wants in return.\n /// @return The filled amounts for both the left and right orders.\n function _fillRight(\n uint256 leftMakeValue,\n uint256 leftTakeValue,\n uint256 rightMakeValue,\n uint256 rightTakeValue\n ) internal pure returns (FillResult memory) {\n uint256 makerValue = LibMath.safeGetPartialAmountFloor(rightTakeValue, leftMakeValue, leftTakeValue);\n require(makerValue <= rightMakeValue, \"fillRight: unable to fill\");\n return FillResult(rightTakeValue, makerValue);\n }\n\n /// @notice Computes the fill values for a situation where the left order is expected to fill the right order.\n /// @param leftMakeValue The amount the left order maker wants to trade.\n /// @param leftTakeValue The amount the left order taker wants in return.\n /// @param rightMakeValue The amount the right order maker wants to trade.\n /// @param rightTakeValue The amount the right order taker wants in return.\n /// @return The filled amounts for both the left and right orders.\n function _fillLeft(\n uint256 leftMakeValue,\n uint256 leftTakeValue,\n uint256 rightMakeValue,\n uint256 rightTakeValue\n ) internal pure returns (FillResult memory) {\n uint256 rightTake = LibMath.safeGetPartialAmountFloor(leftTakeValue, rightMakeValue, rightTakeValue);\n require(rightTake <= leftMakeValue, \"fillLeft: unable to fill\");\n return FillResult(leftMakeValue, leftTakeValue);\n }\n}\n" + }, + "@sandbox-smart-contracts/marketplace/contracts/OrderValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.19;\n\nimport {LibOrder} from \"./libraries/LibOrder.sol\";\nimport {LibAsset} from \"./libraries/LibAsset.sol\";\nimport {SignatureCheckerUpgradeable} from \"@openzeppelin/contracts-upgradeable/utils/cryptography/SignatureCheckerUpgradeable.sol\";\nimport {EIP712Upgradeable, Initializable} from \"@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol\";\nimport {IOrderValidator} from \"./interfaces/IOrderValidator.sol\";\nimport {Whitelist} from \"./Whitelist.sol\";\n\n/// @author The Sandbox\n/// @title OrderValidator\n/// @notice Contract for order validation. It validates orders and contains a whitelist of tokens.\ncontract OrderValidator is IOrderValidator, Initializable, EIP712Upgradeable, Whitelist {\n using SignatureCheckerUpgradeable for address;\n\n /// @dev Internal mechanism to protect the implementation contract from being initialized.\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor() {\n _disableInitializers();\n }\n\n /// @notice Initializes the OrderValidator contract.\n /// @param admin The admin address for the OrderValidator and Whitelist.\n /// @param roles Array of role identifiers for the Whitelist contract.\n /// @param permissions Array of permissions associated with each role.\n /// @param whitelistsEnabled Boolean to indicate if whitelist functionality is enabled.\n function initialize(\n address admin,\n bytes32[] calldata roles,\n bool[] calldata permissions,\n bool whitelistsEnabled\n ) external initializer {\n __EIP712_init_unchained(\"The Sandbox Marketplace\", \"1.0.0\");\n __Whitelist_init(admin, roles, permissions, whitelistsEnabled);\n }\n\n /// @notice Validates the given order.\n /// @param order The order details to be validated.\n /// @param signature The signature associated with the order.\n /// @param sender Address of the order sender.\n function validate(LibOrder.Order calldata order, bytes memory signature, address sender) external view {\n require(order.maker != address(0), \"no maker\");\n\n LibOrder.validateOrderTime(order);\n _verifyWhitelists(order.makeAsset);\n\n if (order.salt == 0) {\n require(sender == order.maker, \"maker is not tx sender\");\n // No partial fill, the order is reusable forever\n return;\n }\n\n if (sender == order.maker) {\n return;\n }\n\n bytes32 hash = LibOrder.hash(order);\n\n require(order.maker.isValidSignatureNow(_hashTypedDataV4(hash), signature), \"signature verification error\");\n }\n\n /// @notice Verifies if the asset exchange is affected by the whitelist.\n /// @param asset Details of the asset to be verified.\n /// @dev If the asset type is ERC20, the ERC20_ROLE is checked.\n /// @dev if ERC20_ROLE is enabled only tokens that have the role are accepted\n /// @dev If whitelists are enabled, checks TSB_ROLE and PARTNER_ROLE.\n function _verifyWhitelists(LibAsset.Asset calldata asset) internal view {\n address makeToken = LibAsset.decodeAddress(asset.assetType);\n if (asset.assetType.assetClass == LibAsset.AssetClass.ERC20) {\n if (!hasRole(ERC20_ROLE, makeToken)) {\n revert(\"payment token not allowed\");\n }\n } else {\n if (!isWhitelistsEnabled()) {\n return;\n } else if (\n (isRoleEnabled(TSB_ROLE) && hasRole(TSB_ROLE, makeToken)) ||\n (isRoleEnabled(PARTNER_ROLE) && hasRole(PARTNER_ROLE, makeToken))\n ) {\n return;\n } else {\n revert(\"not allowed\");\n }\n }\n }\n\n // slither-disable-next-line unused-state\n uint256[50] private __gap;\n}\n" + }, + "@sandbox-smart-contracts/marketplace/contracts/RoyaltiesRegistry.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.19;\n\nimport {IMultiRoyaltyRecipients} from \"@sandbox-smart-contracts/dependency-royalty-management/contracts/interfaces/IMultiRoyaltyRecipients.sol\";\nimport {IERC2981} from \"@openzeppelin/contracts/interfaces/IERC2981.sol\";\nimport {ERC165CheckerUpgradeable} from \"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165CheckerUpgradeable.sol\";\nimport {OwnableUpgradeable} from \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\nimport {Recipient} from \"@manifoldxyz/royalty-registry-solidity/contracts/overrides/IRoyaltySplitter.sol\";\nimport {IRoyaltiesProvider, TOTAL_BASIS_POINTS} from \"./interfaces/IRoyaltiesProvider.sol\";\n\n/// @author The Sandbox\n/// @title RoyaltiesRegistry\n/// @dev Contract managing the registry of royalties.\ncontract RoyaltiesRegistry is OwnableUpgradeable, IRoyaltiesProvider {\n using ERC165CheckerUpgradeable for address;\n /// @notice Emitted when royalties are set for a token.\n /// @param token The token address for which royalties are set.\n /// @param royalties An array of royalties set for the token.\n event RoyaltiesSetForContract(address indexed token, Part[] royalties);\n\n /// @notice Emitted when the royalties type and provider are defined for a token.\n /// @param token The token address.\n /// @param royaltiesType The type of royalties set.\n /// @param royaltiesProvider The address of the royalties provider.\n event RoyaltiesTypeSet(\n address indexed token,\n RoyaltiesType indexed royaltiesType,\n address indexed royaltiesProvider\n );\n\n /// @dev Stores royalty information for tokens.\n struct RoyaltiesSet {\n bool initialized;\n Part[] royalties;\n }\n\n /// @dev Represents a type of royalties.\n enum RoyaltiesType {\n UNSET,\n BY_TOKEN,\n EXTERNAL_PROVIDER,\n EIP2981,\n UNSUPPORTED_NONEXISTENT\n }\n\n /// @dev Used to call EIP2981 royaltyInfo to calculate the royalties percentage\n uint256 public constant WEIGHT_VALUE = 1e6;\n\n /// @notice Stores royalties for token contract, set in setRoyaltiesByToken() method\n mapping(address token => RoyaltiesSet royalties) public royaltiesByToken;\n\n /// @notice Stores external provider and royalties type for token contract\n mapping(address token => uint256 provider) public royaltiesProviders;\n\n /// @dev This protects the implementation contract from being initialized.\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor() {\n _disableInitializers();\n }\n\n /// @notice Royalties registry initializer\n function initialize() external initializer {\n __Ownable_init();\n }\n\n /// @notice Assigns an external provider for a token's royalties and sets the royalty type as 'EXTERNAL_PROVIDER' (2).\n /// @param token Address of the token.\n /// @param provider Address of the external royalties provider.\n function setProviderByToken(address token, address provider) external {\n _checkOwner(token);\n _setRoyaltiesType(token, RoyaltiesType.EXTERNAL_PROVIDER, provider);\n }\n\n /// @notice Fetches the royalty type for a given token.\n /// @param token Address of the token.\n /// @return The type of royalty associated with the token.\n function getRoyaltiesType(address token) external view returns (RoyaltiesType) {\n return _getRoyaltiesType(royaltiesProviders[token]);\n }\n\n /// @notice Overwrites the royalty type for a given token.\n /// @param token Address of the token.\n /// @param royaltiesType The new royalty type to be set.\n function forceSetRoyaltiesType(address token, RoyaltiesType royaltiesType) external {\n _checkOwner(token);\n _setRoyaltiesType(token, royaltiesType, getProvider(token));\n }\n\n /// @notice Resets the royalty type for a token to 'UNSET'.\n /// @param token Address of the token.\n function clearRoyaltiesType(address token) external {\n _checkOwner(token);\n royaltiesProviders[token] = uint256(uint160(getProvider(token)));\n\n emit RoyaltiesTypeSet(token, RoyaltiesType.UNSET, getProvider(token));\n }\n\n /// @notice Defines royalties for a token and sets the royalty type as 'BY_TOKEN'.\n /// @param token Address of the token.\n /// @param royalties Array of royalty parts to be set for the token.\n function setRoyaltiesByToken(address token, Part[] memory royalties) external {\n _checkOwner(token);\n //clearing royaltiesProviders value for the token\n delete royaltiesProviders[token];\n // setting royaltiesType = 1 for the token\n _setRoyaltiesType(token, RoyaltiesType.BY_TOKEN, address(0));\n uint256 sumRoyalties = 0;\n delete royaltiesByToken[token];\n for (uint256 i = 0; i < royalties.length; ++i) {\n require(royalties[i].account != address(0x0), \"recipient should be present\");\n require(royalties[i].basisPoints != 0, \"basisPoints should be > 0\");\n royaltiesByToken[token].royalties.push(royalties[i]);\n sumRoyalties += royalties[i].basisPoints;\n }\n require(sumRoyalties < TOTAL_BASIS_POINTS, \"royalties sum is more than 100%\");\n royaltiesByToken[token].initialized = true;\n emit RoyaltiesSetForContract(token, royalties);\n }\n\n /// @notice Fetches royalties for a given token and token ID.\n /// @param token Address of the token.\n /// @param tokenId ID of the token.\n /// @return An array containing royalty parts.\n function getRoyalties(address token, uint256 tokenId) external returns (Part[] memory) {\n uint256 royaltiesProviderData = royaltiesProviders[token];\n\n address royaltiesProvider = address(uint160(royaltiesProviderData));\n RoyaltiesType royaltiesType = _getRoyaltiesType(royaltiesProviderData);\n\n // case when royaltiesType is not set\n if (royaltiesType == RoyaltiesType.UNSET) {\n // calculating royalties type for token\n royaltiesType = _calculateRoyaltiesType(token, royaltiesProvider);\n\n //saving royalties type\n _setRoyaltiesType(token, royaltiesType, royaltiesProvider);\n }\n\n //case royaltiesType = 1, royalties are set in royaltiesByToken\n if (royaltiesType == RoyaltiesType.BY_TOKEN) {\n return royaltiesByToken[token].royalties;\n }\n\n //case royaltiesType = 2, royalties from external provider\n if (royaltiesType == RoyaltiesType.EXTERNAL_PROVIDER) {\n return _providerExtractor(token, tokenId, royaltiesProvider);\n }\n\n //case royaltiesType = 3, royalties EIP-2981\n if (royaltiesType == RoyaltiesType.EIP2981) {\n return _getRoyaltiesEIP2981(token, tokenId);\n }\n\n // case royaltiesType = 4, unknown/empty royalties\n return new Part[](0);\n }\n\n /// @notice Returns provider address for token contract from royaltiesProviders mapping\n /// @param token token address\n /// @return address of provider\n function getProvider(address token) public view returns (address) {\n return address(uint160(royaltiesProviders[token]));\n }\n\n /// @notice Returns the royalties type for a given raw data value.\n /// @param data The raw data (uint256).\n /// @return The derived royalties type.\n function _getRoyaltiesType(uint256 data) internal pure returns (RoyaltiesType) {\n for (uint256 i = 1; i <= uint256(type(RoyaltiesType).max); ++i) {\n if (data / 2 ** (256 - i) == 1) {\n return RoyaltiesType(i);\n }\n }\n return RoyaltiesType.UNSET;\n }\n\n /// @notice Sets the royalties type and provider for a given token contract.\n /// @param token The address of the token.\n /// @param royaltiesType The type of royalties to be set.\n /// @param royaltiesProvider The address of the royalties provider.\n function _setRoyaltiesType(address token, RoyaltiesType royaltiesType, address royaltiesProvider) internal {\n require(royaltiesType != RoyaltiesType.UNSET, \"wrong royaltiesType\");\n royaltiesProviders[token] = uint256(uint160(royaltiesProvider)) + 2 ** (256 - uint256(royaltiesType));\n emit RoyaltiesTypeSet(token, royaltiesType, royaltiesProvider);\n }\n\n /// @notice Validates if the message sender is the owner of the contract or the given token.\n /// @param token Address of the token to check against.\n function _checkOwner(address token) internal view {\n if ((owner() != _msgSender()) && (OwnableUpgradeable(token).owner() != _msgSender())) {\n revert(\"token owner not detected\");\n }\n }\n\n /// @notice Determines the royalties type for a given token.\n /// @param token Address of the token.\n /// @param royaltiesProvider Address of the royalties provider.\n /// @return The determined royalties type.\n function _calculateRoyaltiesType(address token, address royaltiesProvider) internal view returns (RoyaltiesType) {\n if (token.supportsInterface(type(IERC2981).interfaceId)) {\n return RoyaltiesType.EIP2981;\n }\n\n if (royaltiesProvider != address(0)) {\n return RoyaltiesType.EXTERNAL_PROVIDER;\n }\n\n return RoyaltiesType.UNSUPPORTED_NONEXISTENT;\n }\n\n /// @notice Fetches EIP-2981 royalties for a given token ID.\n /// @param token Address of the token.\n /// @param tokenId ID of the token for which royalties are to be fetched.\n /// @return An array of parts representing the royalties.\n function _getRoyaltiesEIP2981(address token, uint256 tokenId) internal view returns (Part[] memory) {\n try IERC2981(token).royaltyInfo(tokenId, WEIGHT_VALUE) returns (address receiver, uint256 royaltyAmount) {\n if (token.supportsInterface(type(IMultiRoyaltyRecipients).interfaceId)) {\n return _getRecipients(token, tokenId, receiver, royaltyAmount);\n } else {\n return _calculateRoyalties(receiver, royaltyAmount);\n }\n } catch {\n return new Part[](0);\n }\n }\n\n /// @notice Fetches the recipients and calculates the royalties.\n /// @param token Address of the token.\n /// @param tokenId ID of the token.\n /// @param receiver Address of the royalty receiver.\n /// @param royaltyAmount The total royalty amount.\n /// @return An array of parts representing the royalties.\n function _getRecipients(\n address token,\n uint256 tokenId,\n address receiver,\n uint256 royaltyAmount\n ) internal view returns (Part[] memory) {\n try IMultiRoyaltyRecipients(token).getRecipients(tokenId) returns (Recipient[] memory multiRecipients) {\n uint256 multiRecipientsLength = multiRecipients.length;\n Part[] memory royalties = new Part[](multiRecipientsLength);\n uint256 sum = 0;\n for (uint256 i; i < multiRecipientsLength; i++) {\n Recipient memory splitRecipient = multiRecipients[i];\n royalties[i].account = splitRecipient.recipient;\n uint256 splitAmount = (splitRecipient.bps * royaltyAmount) / WEIGHT_VALUE;\n royalties[i].basisPoints = splitAmount;\n sum += splitAmount;\n }\n // sum can be less than amount, otherwise small-value listings can break\n require(sum <= royaltyAmount, \"RoyaltiesRegistry: Invalid split\");\n return royalties;\n // solhint-disable-next-line no-empty-blocks\n } catch {}\n\n return _calculateRoyalties(receiver, royaltyAmount);\n }\n\n /// @notice Fetches royalties for a given token ID from an external provider.\n /// @param token Address of the token.\n /// @param tokenId ID of the token for which royalties are to be fetched.\n /// @param providerAddress Address of the external provider.\n /// @return An array of parts representing the royalties.\n function _providerExtractor(\n address token,\n uint256 tokenId,\n address providerAddress\n ) internal returns (Part[] memory) {\n try IRoyaltiesProvider(providerAddress).getRoyalties(token, tokenId) returns (Part[] memory result) {\n return result;\n } catch {\n return new Part[](0);\n }\n }\n\n /// @notice Converts a given amount to its percentage representation and forms a royalty part.\n /// @param to Address of the royalty recipient.\n /// @param amount Amount of the royalty.\n /// @return An array containing the formed royalty part.\n function _calculateRoyalties(address to, uint256 amount) internal pure returns (Part[] memory) {\n Part[] memory result;\n if (amount == 0) {\n return result;\n }\n uint256 percent = (amount * TOTAL_BASIS_POINTS) / WEIGHT_VALUE;\n require(percent < TOTAL_BASIS_POINTS, \"royalties 2981 exceeds 100%\");\n result = new Part[](1);\n result[0].account = to;\n result[0].basisPoints = percent;\n return result;\n }\n\n // slither-disable-next-line unused-state\n uint256[50] private __gap;\n}\n" + }, + "@sandbox-smart-contracts/marketplace/contracts/TransferManager.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.19;\n\nimport {ERC165CheckerUpgradeable} from \"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165CheckerUpgradeable.sol\";\nimport {IERC1155Upgradeable} from \"@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol\";\nimport {IERC721Upgradeable} from \"@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol\";\nimport {IERC20Upgradeable} from \"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\";\nimport {AddressUpgradeable} from \"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\";\nimport {IRoyaltyUGC} from \"@sandbox-smart-contracts/dependency-royalty-management/contracts/interfaces/IRoyaltyUGC.sol\";\nimport {SafeERC20Upgradeable} from \"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\";\nimport {IRoyaltiesProvider, TOTAL_BASIS_POINTS} from \"./interfaces/IRoyaltiesProvider.sol\";\nimport {ITransferManager} from \"./interfaces/ITransferManager.sol\";\nimport {LibAsset} from \"./libraries/LibAsset.sol\";\nimport {Initializable} from \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\n\n/// @author The Sandbox\n/// @title TransferManager\n/// @notice Manages the transfer of assets with support for different fee structures and beneficiaries.\n/// @dev This contract can handle various assets like ERC20, ERC721, and ERC1155 tokens.\nabstract contract TransferManager is Initializable, ITransferManager {\n using AddressUpgradeable for address;\n using ERC165CheckerUpgradeable for address;\n\n /// @notice Defines the base for representing fees to avoid rounding: 50% == 0.5 * 10000 == 5000.\n uint256 internal constant PROTOCOL_FEE_MULTIPLIER = 10000;\n\n /// @notice The maximum allowable fee which cannot exceed 50%.\n uint256 internal constant PROTOCOL_FEE_SHARE_LIMIT = 5000;\n\n /// @notice Royalties are represented in IRoyaltiesProvider.BASE_POINT, they\n /// @notice cannot exceed 50% == 0.5 * BASE_POINTS == 5000\n uint256 internal constant ROYALTY_SHARE_LIMIT = 5000;\n\n /// @notice Fee applied to primary sales.\n /// @return uint256 of primary sale fee in PROTOCOL_FEE_MULTIPLIER units\n uint256 public protocolFeePrimary;\n\n /// @notice Fee applied to secondary sales.\n /// @return uint256 of secondary sale fee in PROTOCOL_FEE_MULTIPLIER units\n uint256 public protocolFeeSecondary;\n\n /// @notice Registry for the different royalties\n /// @return address of royaltiesRegistry\n IRoyaltiesProvider public royaltiesRegistry;\n\n /// @notice Default receiver of protocol fees\n /// @return address of defaultFeeReceiver\n address public defaultFeeReceiver;\n\n /// @notice Emitted when protocol fees are updated.\n /// @param newProtocolFeePrimary fee for primary market\n /// @param newProtocolFeeSecondary fee for secondary market\n event ProtocolFeeSet(uint256 indexed newProtocolFeePrimary, uint256 indexed newProtocolFeeSecondary);\n\n //// @notice Emitted when the royalties registry is updated.\n /// @param newRoyaltiesRegistry address of new royalties registry\n event RoyaltiesRegistrySet(IRoyaltiesProvider indexed newRoyaltiesRegistry);\n\n /// @notice Emitted when the default fee receiver is updated.\n /// @param newDefaultFeeReceiver address that gets the fees\n event DefaultFeeReceiverSet(address indexed newDefaultFeeReceiver);\n\n /// @dev This protects the implementation contract from being initialized.\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor() {\n _disableInitializers();\n }\n\n /// @notice Initializer for TransferExecutor\n /// @param newProtocolFeePrimary Fee for the primary market\n /// @param newProtocolFeeSecondary Fee for the secondary market\n /// @param newDefaultFeeReceiver Address for account receiving fees\n /// @param newRoyaltiesProvider Address of royalties registry\n // solhint-disable-next-line func-name-mixedcase\n function __TransferManager_init_unchained(\n uint256 newProtocolFeePrimary,\n uint256 newProtocolFeeSecondary,\n address newDefaultFeeReceiver,\n IRoyaltiesProvider newRoyaltiesProvider\n ) internal onlyInitializing {\n _setProtocolFee(newProtocolFeePrimary, newProtocolFeeSecondary);\n _setDefaultFeeReceiver(newDefaultFeeReceiver);\n _setRoyaltiesRegistry(newRoyaltiesProvider);\n }\n\n /// @notice Executes transfers for 2 matched orders\n /// @param left DealSide from the left order\n /// @param right DealSide from the right order\n /// @dev This is the main entry point, when used as a separated contract this method will be external\n function doTransfers(DealSide memory left, DealSide memory right, LibAsset.FeeSide feeSide) internal override {\n DealSide memory paymentSide;\n DealSide memory nftSide;\n if (feeSide == LibAsset.FeeSide.LEFT) {\n paymentSide = left;\n nftSide = right;\n } else {\n paymentSide = right;\n nftSide = left;\n }\n // Transfer NFT or left side if FeeSide.NONE\n _transfer(nftSide.asset, nftSide.account, paymentSide.account);\n // Transfer ERC20 or right side if FeeSide.NONE\n if (feeSide == LibAsset.FeeSide.NONE || _mustSkipFees(paymentSide.account)) {\n _transfer(paymentSide.asset, paymentSide.account, nftSide.account);\n } else {\n _doTransfersWithFeesAndRoyalties(paymentSide, nftSide);\n }\n }\n\n /// @notice Sets the royalties registry.\n /// @param newRoyaltiesRegistry Address of new royalties registry\n function _setRoyaltiesRegistry(IRoyaltiesProvider newRoyaltiesRegistry) internal {\n require(address(newRoyaltiesRegistry).isContract(), \"invalid Royalties Registry\");\n royaltiesRegistry = newRoyaltiesRegistry;\n\n emit RoyaltiesRegistrySet(newRoyaltiesRegistry);\n }\n\n /// @notice Sets the protocol fees.\n /// @param newProtocolFeePrimary Fee for the primary market\n /// @param newProtocolFeeSecondary Fee for the secondary market\n function _setProtocolFee(uint256 newProtocolFeePrimary, uint256 newProtocolFeeSecondary) internal {\n require(newProtocolFeePrimary < PROTOCOL_FEE_SHARE_LIMIT, \"invalid primary fee\");\n require(newProtocolFeeSecondary < PROTOCOL_FEE_SHARE_LIMIT, \"invalid secondary fee\");\n protocolFeePrimary = newProtocolFeePrimary;\n protocolFeeSecondary = newProtocolFeeSecondary;\n\n emit ProtocolFeeSet(newProtocolFeePrimary, newProtocolFeeSecondary);\n }\n\n /// @notice Sets the default fee receiver.\n /// @param newDefaultFeeReceiver Address that gets the fees\n function _setDefaultFeeReceiver(address newDefaultFeeReceiver) internal {\n require(newDefaultFeeReceiver != address(0), \"invalid default fee receiver\");\n defaultFeeReceiver = newDefaultFeeReceiver;\n\n emit DefaultFeeReceiverSet(newDefaultFeeReceiver);\n }\n\n /// @notice Transfer protocol fees and royalties.\n /// @param paymentSide DealSide of the fee-side order\n /// @param nftSide DealSide of the nft-side order\n function _doTransfersWithFeesAndRoyalties(DealSide memory paymentSide, DealSide memory nftSide) internal {\n uint256 fees;\n uint256 remainder = paymentSide.asset.value;\n if (_isPrimaryMarket(nftSide)) {\n fees = protocolFeePrimary;\n // No royalties\n } else {\n fees = protocolFeeSecondary;\n remainder = _transferRoyalties(remainder, paymentSide, nftSide);\n }\n if (fees > 0 && remainder > 0) {\n remainder = _transferPercentage(remainder, paymentSide, defaultFeeReceiver, fees, PROTOCOL_FEE_MULTIPLIER);\n }\n if (remainder > 0) {\n _transfer(LibAsset.Asset(paymentSide.asset.assetType, remainder), paymentSide.account, nftSide.account);\n }\n }\n\n /// @notice Return if this tx is on primary market\n /// @param nftSide DealSide of the nft-side order\n /// @return creator Address or zero if is not able to retrieve it\n function _isPrimaryMarket(DealSide memory nftSide) internal view returns (bool) {\n address creator = _getCreator(nftSide.asset.assetType);\n return creator != address(0) && nftSide.account == creator;\n }\n\n /// @notice Transfer royalties.\n /// @param remainder How much of the amount left after previous transfers\n /// @param paymentSide DealSide of the fee-side order\n /// @param nftSide DealSide of the nft-side order\n /// @return How much left after paying royalties\n function _transferRoyalties(\n uint256 remainder,\n DealSide memory paymentSide,\n DealSide memory nftSide\n ) internal returns (uint256) {\n (address token, uint256 tokenId) = LibAsset.decodeToken(nftSide.asset.assetType);\n IRoyaltiesProvider.Part[] memory royalties = royaltiesRegistry.getRoyalties(token, tokenId);\n uint256 totalRoyalties;\n uint256 len = royalties.length;\n for (uint256 i; i < len; i++) {\n IRoyaltiesProvider.Part memory r = royalties[i];\n totalRoyalties = totalRoyalties + r.basisPoints;\n if (r.account == nftSide.account) {\n // We just skip the transfer because the nftSide will get the full payment anyway.\n continue;\n }\n remainder = _transferPercentage(remainder, paymentSide, r.account, r.basisPoints, TOTAL_BASIS_POINTS);\n }\n require(totalRoyalties <= ROYALTY_SHARE_LIMIT, \"royalties are too high (>50%)\");\n return remainder;\n }\n\n /// @notice Do a transfer based on a percentage (in basis points)\n /// @param remainder How much of the amount left after previous transfers\n /// @param paymentSide DealSide of the fee-side order\n /// @param to Account that will receive the asset\n /// @param percentage Percentage to be transferred multiplied by the multiplier\n /// @param multiplier Percentage is multiplied by this number to avoid rounding (2.5% == 0.025) * multiplier\n /// @return How much left after current transfer\n function _transferPercentage(\n uint256 remainder,\n DealSide memory paymentSide,\n address to,\n uint256 percentage,\n uint256 multiplier\n ) internal returns (uint256) {\n LibAsset.Asset memory payment = LibAsset.Asset(paymentSide.asset.assetType, 0);\n uint256 fee = (paymentSide.asset.value * percentage) / multiplier;\n if (remainder > fee) {\n remainder = remainder - fee;\n payment.value = fee;\n } else {\n payment.value = remainder;\n remainder = 0;\n }\n if (payment.value > 0) {\n _transfer(payment, paymentSide.account, to);\n }\n return remainder;\n }\n\n /// @notice Return the creator of the token if the token supports IRoyaltyUGC\n /// @param assetType Asset type\n /// @return creator Address or zero if is not able to retrieve it\n function _getCreator(LibAsset.AssetType memory assetType) internal view returns (address creator) {\n (address token, uint256 tokenId) = LibAsset.decodeToken(assetType);\n if (token.supportsInterface(type(IRoyaltyUGC).interfaceId)) {\n creator = IRoyaltyUGC(token).getCreatorAddress(tokenId);\n }\n }\n\n /// @notice Function should be able to transfer any supported Asset\n /// @param asset Asset to be transferred\n /// @param from Account holding the asset\n /// @param to Account that will receive the asset\n /// @dev This is the main entry point, when used as a separated contract this method will be external\n function _transfer(LibAsset.Asset memory asset, address from, address to) internal {\n if (asset.assetType.assetClass == LibAsset.AssetClass.ERC20) {\n address token = LibAsset.decodeAddress(asset.assetType);\n // slither-disable-next-line arbitrary-send-erc20\n SafeERC20Upgradeable.safeTransferFrom(IERC20Upgradeable(token), from, to, asset.value);\n } else if (asset.assetType.assetClass == LibAsset.AssetClass.ERC721) {\n (address token, uint256 tokenId) = LibAsset.decodeToken(asset.assetType);\n require(asset.value == 1, \"erc721 value error\");\n IERC721Upgradeable(token).safeTransferFrom(from, to, tokenId);\n } else if (asset.assetType.assetClass == LibAsset.AssetClass.ERC1155) {\n (address token, uint256 tokenId) = LibAsset.decodeToken(asset.assetType);\n IERC1155Upgradeable(token).safeTransferFrom(from, to, tokenId, asset.value, \"\");\n } else {\n revert(\"invalid asset class\");\n }\n }\n\n /// @notice Function deciding if the fees are applied or not, to be override\n /// @param from Address to check\n function _mustSkipFees(address from) internal virtual returns (bool);\n\n // slither-disable-next-line unused-state\n uint256[50] private __gap;\n}\n" + }, + "@sandbox-smart-contracts/marketplace/contracts/Whitelist.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.19;\n\nimport {Initializable} from \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport {AccessControlEnumerableUpgradeable} from \"@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol\";\nimport {IWhitelist} from \"./interfaces/IWhitelist.sol\";\n\n/// @author The Sandbox\n/// @title Whitelist contract\n/// @dev A contract to control which tokens are accepted in the marketplace.\ncontract Whitelist is IWhitelist, Initializable, AccessControlEnumerableUpgradeable {\n /// @notice Role for The Sandbox tokens\n /// @return Hash for TSB_ROLE\n bytes32 public constant TSB_ROLE = keccak256(\"TSB_ROLE\");\n /// @notice Role for partner tokens\n /// @return Hash for PARTNER_ROLE\n bytes32 public constant PARTNER_ROLE = keccak256(\"PARTNER_ROLE\");\n /// @notice Role for ERC20 tokens, enabled all times\n /// @return Hash for ERC20_ROLE\n bytes32 public constant ERC20_ROLE = keccak256(\"ERC20_ROLE\");\n\n /// @dev Internal mapping to keep track of the enablement status of each role.\n mapping(bytes32 role => bool isEnabled) private _rolesEnabled;\n\n /// @dev Boolean that indicates if non-ERC20 whitelists are enabled or not\n bool private _whitelistsEnabled;\n\n /// @notice Emitted when a specific role gets enabled.\n /// @param role Roles whose permissions were enabled\n event RoleEnabled(bytes32 indexed role);\n\n /// @notice Emitted when a specific role gets disabled.\n event RoleDisabled(bytes32 indexed role);\n\n /// @notice Emitted when only non-ERC20 tokens that are whitelisted can be allowed.\n event WhitelistsEnabled();\n\n /// @notice Emitted when all non-ERC20 tokens are allowed in the market.\n event WhitelistsDisabled();\n\n /// @dev This protects the implementation contract from being initialized.\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor() {\n _disableInitializers();\n }\n\n /// @notice Enables or disables specific roles.\n /// @param roles List of role identifiers.\n /// @param permissions List of booleans indicating the desired status of each role.\n function setRolesEnabled(\n bytes32[] calldata roles,\n bool[] calldata permissions\n ) external onlyRole(DEFAULT_ADMIN_ROLE) {\n _setRolesEnabled(roles, permissions);\n }\n\n /// @notice Enable a given role.\n /// @param role Identifier of the role to be enabled.\n function enableRole(bytes32 role) external onlyRole(DEFAULT_ADMIN_ROLE) {\n _enableRole(role);\n }\n\n /// @notice Disable a given role.\n /// @param role Identifier of the role to be disabled.\n function disableRole(bytes32 role) external onlyRole(DEFAULT_ADMIN_ROLE) {\n _disableRole(role);\n }\n\n /// @notice Activate whitelists for all non-ERC20 tokens.\n function enableWhitelists() external onlyRole(DEFAULT_ADMIN_ROLE) {\n _enableWhitelists();\n }\n\n /// @notice Deactivate whitelists for all non-ERC20 tokens.\n function disableWhitelists() external onlyRole(DEFAULT_ADMIN_ROLE) {\n _disableWhitelists();\n }\n\n /// @notice Query the status of a given role.\n /// @param role Identifier of the role.\n /// @return True if the role is enabled, false otherwise.\n function isRoleEnabled(bytes32 role) public view returns (bool) {\n return _rolesEnabled[role];\n }\n\n /// @notice Check the status of the whitelist functionality.\n /// @return True if whitelists are active, false otherwise.\n function isWhitelistsEnabled() public view returns (bool) {\n return _whitelistsEnabled;\n }\n\n /// @notice Initializer function for the Whitelist contract.\n /// @param admin Address to be granted the admin role.\n /// @param roles List of role identifiers.\n /// @param permissions List of booleans for the initial status of each role.\n /// @param whitelistsEnabled Initial status of the whitelist functionality.\n // solhint-disable-next-line func-name-mixedcase\n function __Whitelist_init(\n address admin,\n bytes32[] calldata roles,\n bool[] calldata permissions,\n bool whitelistsEnabled\n ) internal onlyInitializing {\n __AccessControlEnumerable_init_unchained();\n _grantRole(DEFAULT_ADMIN_ROLE, admin);\n _setRolesEnabled(roles, permissions);\n if (whitelistsEnabled) {\n _enableWhitelists();\n } else {\n _disableWhitelists();\n }\n }\n\n /// @dev Internal function to set the status of multiple roles.\n /// @param roles List of role identifiers.\n /// @param permissions List of desired status for each role.\n function _setRolesEnabled(bytes32[] memory roles, bool[] memory permissions) internal {\n require(roles.length == permissions.length, \"Mismatched input lengths\");\n for (uint256 i = 0; i < roles.length; ++i) {\n if (isRoleEnabled(roles[i]) != permissions[i]) {\n if (permissions[i]) {\n _enableRole(roles[i]);\n } else {\n _disableRole(roles[i]);\n }\n }\n }\n }\n\n /// @dev Internal function to activate a role.\n /// @param role Identifier of the role to be enabled.\n function _enableRole(bytes32 role) internal {\n _rolesEnabled[role] = true;\n emit RoleEnabled(role);\n }\n\n /// @dev Internal function to deactivate a role.\n /// @param role Identifier of the role to be disabled.\n function _disableRole(bytes32 role) internal {\n _rolesEnabled[role] = false;\n emit RoleDisabled(role);\n }\n\n /// @dev Internal function to activate the whitelist functionality.\n function _enableWhitelists() internal {\n _whitelistsEnabled = true;\n emit WhitelistsEnabled();\n }\n\n /// @dev Internal function to deactivate the whitelist functionality.\n function _disableWhitelists() internal {\n _whitelistsEnabled = false;\n emit WhitelistsDisabled();\n }\n\n // slither-disable-next-line unused-state\n uint256[50] private __gap;\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 2000 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file