diff --git a/packages/deploy/deploy/marketplace/10_deploy_exchange.ts b/packages/deploy/deploy/marketplace/10_deploy_exchange.ts index 0cf865cca9..15735980b9 100644 --- a/packages/deploy/deploy/marketplace/10_deploy_exchange.ts +++ b/packages/deploy/deploy/marketplace/10_deploy_exchange.ts @@ -7,14 +7,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const {deployer, sandAdmin, upgradeAdmin, exchangeFeeRecipient} = await getNamedAccounts(); - let TRUSTED_FORWARDER = await deployments.getOrNull('TRUSTED_FORWARDER'); - if (!TRUSTED_FORWARDER) { - TRUSTED_FORWARDER = await deploy('TRUSTED_FORWARDER', { - from: deployer, - contract: 'TrustedForwarderMock', - log: true, - }); - } + const TRUSTED_FORWARDER = await deployments.getOrNull('TRUSTED_FORWARDER_V2'); const orderValidator = await deployments.get('OrderValidator'); const royaltiesRegistry = await deployments.get('RoyaltiesRegistry'); diff --git a/packages/deploy/deployments/mumbai/Exchange.json b/packages/deploy/deployments/mumbai/Exchange.json new file mode 100644 index 0000000000..79af4c7890 --- /dev/null +++ b/packages/deploy/deployments/mumbai/Exchange.json @@ -0,0 +1,1664 @@ +{ + "address": "0xC3538BB4771c88ee03EB5d837559327aAaC6f851", + "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": "hash", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "address", + "name": "maker", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "internalType": "enum LibAsset.AssetClassType", + "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.AssetClassType", + "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": false, + "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": false, + "internalType": "bytes32", + "name": "leftHash", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "rightHash", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "leftValue", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rightValue", + "type": "uint256" + } + ], + "indexed": false, + "internalType": "struct LibFill.FillResult", + "name": "newFill", + "type": "tuple" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalFillLeft", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalFillRight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "valueLeft", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "valueRight", + "type": "uint256" + } + ], + "name": "Match", + "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": false, + "internalType": "uint256", + "name": "newProtocolFeePrimary", + "type": "uint256" + }, + { + "indexed": false, + "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": false, + "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": [ + { + "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" + } + ], + "name": "__Exchange_init", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "maker", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "internalType": "enum LibAsset.AssetClassType", + "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.AssetClassType", + "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": "", + "type": "bytes32" + } + ], + "name": "fills", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "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": [], + "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": "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.AssetClassType", + "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.AssetClassType", + "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.AssetClassType", + "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.AssetClassType", + "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.AssetClassType", + "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.AssetClassType", + "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.AssetClassType", + "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.AssetClassType", + "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": "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": "0xdee56fc7107c4ed4f6677581667c2a991a4af5d28ba3a1fe51d5e52b41b959d8", + "receipt": { + "to": null, + "from": "0x5F890c9522dCE5670d741D4277BFCC2d9cA8Af02", + "contractAddress": "0xC3538BB4771c88ee03EB5d837559327aAaC6f851", + "transactionIndex": 7, + "gasUsed": "897699", + "logsBloom": "0x00000004000000000000000000000000400000000000000000000080020000000102000002008400000000000001000000008000000000000400000000000000000000000000080000000000000102808000000000000000000100000000000000000000020000000000020000000800000002800800008080000000000000000400010040000000000000000000000000000000200080000400000000a00000200000000000000000000000000400000000000000000000001000000000004000000020000002000401000000040000000000000430000108108004000020002008000200000080000000000000100004000000000000000000020000100000", + "blockHash": "0xbb5a619307f98145c365178da44db7075478e0d91aa678b6b69c70aeb0f3a109", + "transactionHash": "0xdee56fc7107c4ed4f6677581667c2a991a4af5d28ba3a1fe51d5e52b41b959d8", + "logs": [ + { + "transactionIndex": 7, + "blockNumber": 40870213, + "transactionHash": "0xdee56fc7107c4ed4f6677581667c2a991a4af5d28ba3a1fe51d5e52b41b959d8", + "address": "0xC3538BB4771c88ee03EB5d837559327aAaC6f851", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000f29d66157f23c3a9981c0626742e9fb2f7da80a8" + ], + "data": "0x", + "logIndex": 19, + "blockHash": "0xbb5a619307f98145c365178da44db7075478e0d91aa678b6b69c70aeb0f3a109" + }, + { + "transactionIndex": 7, + "blockNumber": 40870213, + "transactionHash": "0xdee56fc7107c4ed4f6677581667c2a991a4af5d28ba3a1fe51d5e52b41b959d8", + "address": "0xC3538BB4771c88ee03EB5d837559327aAaC6f851", + "topics": [ + "0x8ca022029d8ff7ad974913f8970aeed6c5e0e7eaf494a0c5b262249f6b5759e5", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000069015912aa33720b842dcd6ac059ed623f28d9f7", + "0x0000000000000000000000005f890c9522dce5670d741d4277bfcc2d9ca8af02" + ], + "data": "0x", + "logIndex": 20, + "blockHash": "0xbb5a619307f98145c365178da44db7075478e0d91aa678b6b69c70aeb0f3a109" + }, + { + "transactionIndex": 7, + "blockNumber": 40870213, + "transactionHash": "0xdee56fc7107c4ed4f6677581667c2a991a4af5d28ba3a1fe51d5e52b41b959d8", + "address": "0xC3538BB4771c88ee03EB5d837559327aAaC6f851", + "topics": [ + "0xfa4067f2d0249edb7594284cabb394f2ec0e4f6168dbd1e3a63f861b67f1188f" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fa", + "logIndex": 21, + "blockHash": "0xbb5a619307f98145c365178da44db7075478e0d91aa678b6b69c70aeb0f3a109" + }, + { + "transactionIndex": 7, + "blockNumber": 40870213, + "transactionHash": "0xdee56fc7107c4ed4f6677581667c2a991a4af5d28ba3a1fe51d5e52b41b959d8", + "address": "0xC3538BB4771c88ee03EB5d837559327aAaC6f851", + "topics": [ + "0x6932f02a24181a8c1b9fa7bdc7453f15ecba05c354c9da94e97bac1abb133978" + ], + "data": "0x000000000000000000000000d38625edee3f1c3a8588cea4afe1d516a7997dcf", + "logIndex": 22, + "blockHash": "0xbb5a619307f98145c365178da44db7075478e0d91aa678b6b69c70aeb0f3a109" + }, + { + "transactionIndex": 7, + "blockNumber": 40870213, + "transactionHash": "0xdee56fc7107c4ed4f6677581667c2a991a4af5d28ba3a1fe51d5e52b41b959d8", + "address": "0xC3538BB4771c88ee03EB5d837559327aAaC6f851", + "topics": [ + "0x5d039c612419cd7b6696e7d5c8ccaef3362188cc98db01e07fb55bb85b33541d" + ], + "data": "0x000000000000000000000000c66d094ed928f7840a6b0d373c1cd825c97e3c7c", + "logIndex": 23, + "blockHash": "0xbb5a619307f98145c365178da44db7075478e0d91aa678b6b69c70aeb0f3a109" + }, + { + "transactionIndex": 7, + "blockNumber": 40870213, + "transactionHash": "0xdee56fc7107c4ed4f6677581667c2a991a4af5d28ba3a1fe51d5e52b41b959d8", + "address": "0xC3538BB4771c88ee03EB5d837559327aAaC6f851", + "topics": [ + "0xf605132f819f46ab9f362495c159c83b8a080f3b8b22f8a684018837eae0bed3", + "0x000000000000000000000000c863bf877ae4ac8c339e396dd3d1386235b3c39e" + ], + "data": "0x", + "logIndex": 24, + "blockHash": "0xbb5a619307f98145c365178da44db7075478e0d91aa678b6b69c70aeb0f3a109" + }, + { + "transactionIndex": 7, + "blockNumber": 40870213, + "transactionHash": "0xdee56fc7107c4ed4f6677581667c2a991a4af5d28ba3a1fe51d5e52b41b959d8", + "address": "0xC3538BB4771c88ee03EB5d837559327aAaC6f851", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000049c4d4c94829b9c44052c5f5cb164fc612181165", + "0x0000000000000000000000005f890c9522dce5670d741d4277bfcc2d9ca8af02" + ], + "data": "0x", + "logIndex": 25, + "blockHash": "0xbb5a619307f98145c365178da44db7075478e0d91aa678b6b69c70aeb0f3a109" + }, + { + "transactionIndex": 7, + "blockNumber": 40870213, + "transactionHash": "0xdee56fc7107c4ed4f6677581667c2a991a4af5d28ba3a1fe51d5e52b41b959d8", + "address": "0xC3538BB4771c88ee03EB5d837559327aAaC6f851", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 26, + "blockHash": "0xbb5a619307f98145c365178da44db7075478e0d91aa678b6b69c70aeb0f3a109" + }, + { + "transactionIndex": 7, + "blockNumber": 40870213, + "transactionHash": "0xdee56fc7107c4ed4f6677581667c2a991a4af5d28ba3a1fe51d5e52b41b959d8", + "address": "0xC3538BB4771c88ee03EB5d837559327aAaC6f851", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045023af7b33994a22740bc51c3ca90a7ed82e124", + "logIndex": 27, + "blockHash": "0xbb5a619307f98145c365178da44db7075478e0d91aa678b6b69c70aeb0f3a109" + }, + { + "transactionIndex": 7, + "blockNumber": 40870213, + "transactionHash": "0xdee56fc7107c4ed4f6677581667c2a991a4af5d28ba3a1fe51d5e52b41b959d8", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x0000000000000000000000005f890c9522dce5670d741d4277bfcc2d9ca8af02", + "0x0000000000000000000000005082f249cdb2f2c1ee035e4f423c46ea2dab3ab1" + ], + "data": "0x0000000000000000000000000000000000000000000000000004c8adc103ed0000000000000000000000000000000000000000000000000f89aa3c8f9dd38ff4000000000000000000000000000000000000000000000256577944567226180400000000000000000000000000000000000000000000000f89a573e1dccfa2f4000000000000000000000000000000000000000000000256577e0d04332a0504", + "logIndex": 28, + "blockHash": "0xbb5a619307f98145c365178da44db7075478e0d91aa678b6b69c70aeb0f3a109" + } + ], + "blockNumber": 40870213, + "cumulativeGasUsed": "1311587", + "status": 1, + "byzantium": true + }, + "args": [ + "0xf29d66157F23c3a9981C0626742E9FB2F7DA80A8", + "0x45023af7B33994a22740Bc51C3Ca90A7Ed82e124", + "0x2959bfed00000000000000000000000049c4d4c94829b9c44052c5f5cb164fc61218116500000000000000000000000069015912aa33720b842dcd6ac059ed623f28d9f7000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fa000000000000000000000000c66d094ed928f7840a6b0d373c1cd825c97e3c7c000000000000000000000000d38625edee3f1c3a8588cea4afe1d516a7997dcf000000000000000000000000c863bf877ae4ac8c339e396dd3d1386235b3c39e" + ], + "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": "__Exchange_init", + "args": [ + "0x49c4D4C94829B9c44052C5f5Cb164Fc612181165", + "0x69015912aa33720b842dcd6ac059ed623f28d9f7", + 0, + 250, + "0xC66D094eD928f7840A6B0d373c1cd825C97e3C7c", + "0xD38625EDEe3f1c3a8588CEa4Afe1D516a7997dCF", + "0xC863BF877aE4ac8C339E396Dd3d1386235b3C39e" + ] + }, + "implementation": "0xf29d66157F23c3a9981C0626742E9FB2F7DA80A8", + "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..e44504e096 --- /dev/null +++ b/packages/deploy/deployments/mumbai/Exchange_Implementation.json @@ -0,0 +1,1886 @@ +{ + "address": "0xf29d66157F23c3a9981C0626742E9FB2F7DA80A8", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "address", + "name": "maker", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "internalType": "enum LibAsset.AssetClassType", + "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.AssetClassType", + "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": false, + "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": false, + "internalType": "bytes32", + "name": "leftHash", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "rightHash", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "leftValue", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rightValue", + "type": "uint256" + } + ], + "indexed": false, + "internalType": "struct LibFill.FillResult", + "name": "newFill", + "type": "tuple" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalFillLeft", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalFillRight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "valueLeft", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "valueRight", + "type": "uint256" + } + ], + "name": "Match", + "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": false, + "internalType": "uint256", + "name": "newProtocolFeePrimary", + "type": "uint256" + }, + { + "indexed": false, + "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": false, + "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": [ + { + "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" + } + ], + "name": "__Exchange_init", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "maker", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "internalType": "enum LibAsset.AssetClassType", + "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.AssetClassType", + "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": "", + "type": "bytes32" + } + ], + "name": "fills", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "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": [], + "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": "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.AssetClassType", + "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.AssetClassType", + "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.AssetClassType", + "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.AssetClassType", + "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.AssetClassType", + "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.AssetClassType", + "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.AssetClassType", + "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.AssetClassType", + "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": "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": "0x5478d0c250f87e5211a3516d341bf48bf5df179fefa19da7c195745fe801e432", + "receipt": { + "to": null, + "from": "0x5F890c9522dCE5670d741D4277BFCC2d9cA8Af02", + "contractAddress": "0xf29d66157F23c3a9981C0626742E9FB2F7DA80A8", + "transactionIndex": 1, + "gasUsed": "3702040", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000020000000002000002000000000000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000000000000000000000002000000000000000000090000000000000000000000000000000000000000000000000000000000080000000000000200000200000000000000000000000000400000000000000000000000000000000004000000000000000000001000000040000000000000000000000108000000000000000000000000080000080000000000000000000000000000000000000100000", + "blockHash": "0x2cdd4e7883580a771f60ace13a7a9a3d04385e4811b1209e508a8cc95e840ff3", + "transactionHash": "0x5478d0c250f87e5211a3516d341bf48bf5df179fefa19da7c195745fe801e432", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 40870210, + "transactionHash": "0x5478d0c250f87e5211a3516d341bf48bf5df179fefa19da7c195745fe801e432", + "address": "0xf29d66157F23c3a9981C0626742E9FB2F7DA80A8", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", + "logIndex": 1, + "blockHash": "0x2cdd4e7883580a771f60ace13a7a9a3d04385e4811b1209e508a8cc95e840ff3" + }, + { + "transactionIndex": 1, + "blockNumber": 40870210, + "transactionHash": "0x5478d0c250f87e5211a3516d341bf48bf5df179fefa19da7c195745fe801e432", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x0000000000000000000000005f890c9522dce5670d741d4277bfcc2d9ca8af02", + "0x0000000000000000000000005082f249cdb2f2c1ee035e4f423c46ea2dab3ab1" + ], + "data": "0x000000000000000000000000000000000000000000000000008385db8c220b9800000000000000000000000000000000000000000000000f8a2dc26b2d44eff400000000000000000000000000000000000000000000025656ca37bcba157d7900000000000000000000000000000000000000000000000f89aa3c8fa122e45c000000000000000000000000000000000000000000000256574dbd9846378911", + "logIndex": 2, + "blockHash": "0x2cdd4e7883580a771f60ace13a7a9a3d04385e4811b1209e508a8cc95e840ff3" + } + ], + "blockNumber": 40870210, + "cumulativeGasUsed": "3999441", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "ecd1b268b7f8423b750f66ee2d2cf788", + "metadata": "{\"compiler\":{\"version\":\"0.8.21+commit.d9974bed\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"maker\",\"type\":\"address\"},{\"components\":[{\"components\":[{\"internalType\":\"enum LibAsset.AssetClassType\",\"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.AssetClassType\",\"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\":false,\"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\":false,\"internalType\":\"bytes32\",\"name\":\"leftHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"rightHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"leftValue\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rightValue\",\"type\":\"uint256\"}],\"indexed\":false,\"internalType\":\"struct LibFill.FillResult\",\"name\":\"newFill\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalFillLeft\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalFillRight\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"valueLeft\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"valueRight\",\"type\":\"uint256\"}],\"name\":\"Match\",\"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\":false,\"internalType\":\"uint256\",\"name\":\"newProtocolFeePrimary\",\"type\":\"uint256\"},{\"indexed\":false,\"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\":false,\"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\":[{\"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\"}],\"name\":\"__Exchange_init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"maker\",\"type\":\"address\"},{\"components\":[{\"components\":[{\"internalType\":\"enum LibAsset.AssetClassType\",\"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.AssetClassType\",\"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\":\"\",\"type\":\"bytes32\"}],\"name\":\"fills\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"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\":[],\"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\":\"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.AssetClassType\",\"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.AssetClassType\",\"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.AssetClassType\",\"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.AssetClassType\",\"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.AssetClassType\",\"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.AssetClassType\",\"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.AssetClassType\",\"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.AssetClassType\",\"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\":\"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\":{\"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\":{\"hash\":\"order hash\"}},\"DefaultFeeReceiverSet(address)\":{\"params\":{\"newDefaultFeeReceiver\":\"address that gets the fees\"}},\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"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\":{\"__Exchange_init(address,address,uint256,uint256,address,address,address)\":{\"params\":{\"admin\":\"the admin user that can grant/revoke roles, etc.\",\"newDefaultFeeReceiver\":\"market fee receiver\",\"newProtocolFeePrimary\":\"protocol fee applied for primary markets\",\"newProtocolFeeSecondary\":\"protocol fee applied for secondary markets\",\"newRoyaltiesProvider\":\"registry for the different types of royalties\",\"newTrustedForwarder\":\"address for trusted forwarder that will execute meta transactions\",\"orderValidatorAddress\":\"new OrderValidator contract address\"}},\"cancel((address,((uint8,bytes),uint256),address,((uint8,bytes),uint256),uint256,uint256,uint256),bytes32)\":{\"details\":\"require msg sender to be order maker and salt different from 0\",\"params\":{\"order\":\"to be canceled\",\"orderKeyHash\":\"used as a checksum to avoid mistakes in the values of order\"}},\"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}.\"},\"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`.\"},\"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)[])\":{\"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 that gets the fees\"}},\"setOrderValidatorContract(address)\":{\"params\":{\"contractAddress\":\"new OrderValidator contract address\"}},\"setProtocolFee(uint256,uint256)\":{\"params\":{\"newProtocolFeePrimary\":\"fee for primary market\",\"newProtocolFeeSecondary\":\"fee for secondary market\"}},\"setRoyaltiesRegistry(address)\":{\"params\":{\"newRoyaltiesRegistry\":\"address of new royalties registry\"}},\"setTrustedForwarder(address)\":{\"params\":{\"newTrustedForwarder\":\"The new trustedForwarder\"}},\"supportsInterface(bytes4)\":{\"params\":{\"interfaceId\":\"interface id to check\"}}},\"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 signaling that an order was canceled\"},\"DefaultFeeReceiverSet(address)\":{\"notice\":\"event for when a default fee receiver is set\"},\"ProtocolFeeSet(uint256,uint256)\":{\"notice\":\"event for when protocol fees are set\"},\"RoyaltiesRegistrySet(address)\":{\"notice\":\"event for when a royalties registry is set\"},\"TrustedForwarderSet(address,address,address)\":{\"notice\":\"Emitted when a `newTrustedForwarder` is set, replacing the `oldTrustedForwarder`\"}},\"kind\":\"user\",\"methods\":{\"ERC1776_OPERATOR_ROLE()\":{\"notice\":\"role erc1776 trusted meta transaction contracts (Sand for example).\"},\"EXCHANGE_ADMIN_ROLE()\":{\"notice\":\"role business addresses that can change for example: fees and royalties\"},\"PAUSER_ROLE()\":{\"notice\":\"role business addresses that can react on an emergency, pause\"},\"__Exchange_init(address,address,uint256,uint256,address,address,address)\":{\"notice\":\"Exchange contract initializer\"},\"cancel((address,((uint8,bytes),uint256),address,((uint8,bytes),uint256),uint256,uint256,uint256),bytes32)\":{\"notice\":\"cancel order\"},\"defaultFeeReceiver()\":{\"notice\":\"Default receiver of protocol fees\"},\"fills(bytes32)\":{\"notice\":\"stores the fills for orders\"},\"getTrustedForwarder()\":{\"notice\":\"return the address of the trusted forwarder\"},\"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\"},\"orderValidator()\":{\"notice\":\"OrderValidator contract\"},\"protocolFeePrimary()\":{\"notice\":\"fee for primary sales\"},\"protocolFeeSecondary()\":{\"notice\":\"fee for secondary sales\"},\"royaltiesRegistry()\":{\"notice\":\"Registry for the different royalties\"},\"setDefaultFeeReceiver(address)\":{\"notice\":\"setter for default fee receiver\"},\"setOrderValidatorContract(address)\":{\"notice\":\"set OrderValidator address\"},\"setProtocolFee(uint256,uint256)\":{\"notice\":\"setter for protocol fees\"},\"setRoyaltiesRegistry(address)\":{\"notice\":\"setter for royalty registry\"},\"setTrustedForwarder(address)\":{\"notice\":\"Change the address of the trusted forwarder for meta-transactions\"},\"supportsInterface(bytes4)\":{\"notice\":\"See {IERC165-supportsInterface}.\"},\"unpause()\":{\"notice\":\"Returns to normal state.\"}},\"notice\":\"Used to exchange assets, that is, tokens.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"@sandbox-smart-contracts/marketplace/contracts/exchange/Exchange.sol\":\"Exchange\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":2000},\"remappings\":[]},\"sources\":{\"@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/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/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\"},\"@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, \\\"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\":\"0xa845151230d9973663a800142e26d8d879688382a552d5e74c0dd271aeeaf68b\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/marketplace/contracts/exchange/Exchange.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.21;\\n\\nimport {PausableUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\\\";\\nimport {Initializable} from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport {AccessControlUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport {ContextUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\\\";\\nimport {ERC165Upgradeable} from \\\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\\\";\\nimport {ERC2771HandlerUpgradeable} from \\\"@sandbox-smart-contracts/dependency-metatx/contracts/ERC2771HandlerUpgradeable.sol\\\";\\nimport {IOrderValidator} from \\\"../interfaces/IOrderValidator.sol\\\";\\nimport {TransferManager, IRoyaltiesProvider} from \\\"../transfer-manager/TransferManager.sol\\\";\\nimport {LibOrder} from \\\"../lib-order/LibOrder.sol\\\";\\nimport {ExchangeCore} from \\\"./ExchangeCore.sol\\\";\\n\\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 AccessControlUpgradeable,\\n ExchangeCore,\\n TransferManager,\\n ERC2771HandlerUpgradeable,\\n PausableUpgradeable\\n{\\n /// @notice role erc1776 trusted meta transaction contracts (Sand for example).\\n /// @return hash for ERC1776_OPERATOR_ROLE\\n bytes32 public constant ERC1776_OPERATOR_ROLE = keccak256(\\\"ERC1776_OPERATOR_ROLE\\\");\\n\\n /// @notice role business addresses that can change for example: 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 business addresses that can react on an emergency, 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 trusted forwarder that will execute meta transactions\\n /// @param newProtocolFeePrimary protocol fee applied for primary markets\\n /// @param newProtocolFeeSecondary protocol fee applied for 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 // solhint-disable-next-line func-name-mixedcase\\n function __Exchange_init(\\n address admin,\\n address newTrustedForwarder,\\n uint256 newProtocolFeePrimary,\\n uint256 newProtocolFeeSecondary,\\n address newDefaultFeeReceiver,\\n IRoyaltiesProvider newRoyaltiesProvider,\\n IOrderValidator orderValidatorAddress\\n ) external initializer {\\n __ERC2771Handler_init_unchained(newTrustedForwarder);\\n __AccessControl_init_unchained();\\n __Pausable_init_unchained();\\n __TransferManager_init_unchained(\\n newProtocolFeePrimary,\\n newProtocolFeeSecondary,\\n newDefaultFeeReceiver,\\n newRoyaltiesProvider\\n );\\n __ExchangeCoreInitialize(orderValidatorAddress);\\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 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 order\\n /// @param order to be canceled\\n /// @param orderKeyHash used as a checksum to avoid mistakes in the values of order\\n /// @dev require msg sender to be order maker and salt different from 0\\n function cancel(LibOrder.Order calldata order, bytes32 orderKeyHash) external whenNotPaused {\\n require(_msgSender() == order.maker, \\\"ExchangeCore: not maker\\\");\\n _cancel(order, orderKeyHash);\\n }\\n\\n /// @notice setter for royalty registry\\n /// @param newRoyaltiesRegistry address of new royalties registry\\n function setRoyaltiesRegistry(IRoyaltiesProvider newRoyaltiesRegistry) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n _setRoyaltiesRegistry(newRoyaltiesRegistry);\\n }\\n\\n /// @notice set 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 Change the address of the trusted forwarder for meta-transactions\\n /// @param newTrustedForwarder The new trustedForwarder\\n function setTrustedForwarder(address newTrustedForwarder) external virtual onlyRole(DEFAULT_ADMIN_ROLE) {\\n _setTrustedForwarder(newTrustedForwarder);\\n }\\n\\n /// @notice setter for protocol fees\\n /// @param newProtocolFeePrimary fee for primary market\\n /// @param newProtocolFeeSecondary fee for 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 setter for default fee receiver\\n /// @param newDefaultFeeReceiver address that gets the fees\\n function setDefaultFeeReceiver(address newDefaultFeeReceiver) external onlyRole(EXCHANGE_ADMIN_ROLE) {\\n _setDefaultFeeReceiver(newDefaultFeeReceiver);\\n }\\n\\n // @notice Triggers stopped state.\\n function pause() external onlyRole(PAUSER_ROLE) {\\n _pause();\\n }\\n\\n /// @notice Returns to normal state.\\n function unpause() external onlyRole(EXCHANGE_ADMIN_ROLE) {\\n _unpause();\\n }\\n\\n /// @notice See {IERC165-supportsInterface}.\\n /// @param interfaceId interface id to check\\n function supportsInterface(\\n bytes4 interfaceId\\n ) public view virtual override(ERC165Upgradeable, AccessControlUpgradeable) returns (bool) {\\n return\\n ERC165Upgradeable.supportsInterface(interfaceId) || AccessControlUpgradeable.supportsInterface(interfaceId);\\n }\\n\\n /// @dev Apply the fees & royalties only for users NOT granted with the role EXCHANGE_ADMIN_ROLE\\n /// @param from address to check\\n function _applyFees(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 function _msgData() internal view override(ContextUpgradeable, ERC2771HandlerUpgradeable) returns (bytes calldata) {\\n return ERC2771HandlerUpgradeable._msgData();\\n }\\n}\\n\",\"keccak256\":\"0x08ff3275e05bd82e1dee16d90a0988364ab114ab266e9f460bd8142ee29c15b0\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/marketplace/contracts/exchange/ExchangeCore.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.21;\\n\\nimport {Initializable} from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport {LibFill} from \\\"./libraries/LibFill.sol\\\";\\nimport {TransferExecutor} from \\\"../transfer-manager/TransferExecutor.sol\\\";\\nimport {LibAsset} from \\\"../lib-asset/LibAsset.sol\\\";\\nimport {LibOrder} from \\\"../lib-order/LibOrder.sol\\\";\\nimport {LibPart} from \\\"../lib-part/LibPart.sol\\\";\\nimport {ITransferManager} from \\\"../transfer-manager/interfaces/ITransferManager.sol\\\";\\nimport {IOrderValidator} from \\\"../interfaces/IOrderValidator.sol\\\";\\n\\n/// @notice ExchangeCore contract\\n/// @dev contains the main functions for the marketplace\\nabstract contract ExchangeCore is Initializable, TransferExecutor, ITransferManager {\\n // a list of left/right orders that match each other\\n // left and right are symmetrical except for fees that are taken from left side first.\\n struct ExchangeMatch {\\n LibOrder.Order orderLeft; // left order\\n bytes signatureLeft; // signature for the left order\\n LibOrder.Order orderRight; // right order\\n bytes signatureRight; // signature for the right order\\n }\\n\\n /// @notice OrderValidator contract\\n /// @return OrderValidator address\\n IOrderValidator public orderValidator;\\n\\n uint256 private constant UINT256_MAX = type(uint256).max;\\n\\n /// @notice stores the fills for orders\\n /// @return order fill\\n mapping(bytes32 => uint256) public fills;\\n\\n /// @notice event signaling that an order was canceled\\n /// @param hash order hash\\n event Cancel(bytes32 indexed hash, LibOrder.Order order);\\n\\n /* /// @notice event when orders match\\n /// @param from _msgSender\\n /// @param leftHash left order hash\\n /// @param rightHash right order hash\\n /// @param newLeftFill fill for left order\\n /// @param newRightFill fill for right order\\n /// @param totalFillLeft total fill left\\n /// @param totalFillRight total fill right */\\n event Match(\\n address indexed from,\\n bytes32 leftHash,\\n bytes32 rightHash,\\n LibFill.FillResult newFill,\\n uint256 totalFillLeft,\\n uint256 totalFillRight,\\n uint256 valueLeft,\\n uint256 valueRight\\n );\\n event OrderValidatorSet(IOrderValidator indexed contractAddress);\\n\\n /// @notice initializer for ExchangeCore\\n /// @param newOrderValidatorAddress new OrderValidator contract address\\n /// @dev initialize permissions for native token exchange\\n // solhint-disable-next-line func-name-mixedcase\\n function __ExchangeCoreInitialize(IOrderValidator newOrderValidatorAddress) internal onlyInitializing {\\n _setOrderValidatorContract(newOrderValidatorAddress);\\n }\\n\\n /// @notice set OrderValidator address\\n /// @param contractAddress new OrderValidator contract address\\n function _setOrderValidatorContract(IOrderValidator contractAddress) internal {\\n require(address(contractAddress) != address(0), \\\"invalid order validator\\\");\\n orderValidator = contractAddress;\\n emit OrderValidatorSet(contractAddress);\\n }\\n\\n /// @notice cancel order\\n /// @param order to be canceled\\n /// @param orderKeyHash used as a checksum to avoid mistakes in the values of order\\n /// @dev require msg sender to be order maker and salt different from 0\\n function _cancel(LibOrder.Order calldata order, bytes32 orderKeyHash) internal {\\n require(order.salt != 0, \\\"ExchangeCore: 0 salt can't be used\\\");\\n bytes32 _orderKeyHash = LibOrder.hashKey(order);\\n require(_orderKeyHash == orderKeyHash, \\\"ExchangeCore: Invalid orderHash\\\");\\n fills[orderKeyHash] = UINT256_MAX;\\n emit Cancel(orderKeyHash, order);\\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 validate orders through validateOrders before matchAndTransfer\\n function _matchOrders(address sender, ExchangeMatch[] calldata matchedOrders) internal {\\n uint256 len = matchedOrders.length;\\n require(len > 0, \\\"invalid exchange match\\\");\\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 function, validate orders\\n /// @param sender the message sender\\n /// @param orderLeft left order\\n /// @param signatureLeft order left signature\\n /// @param orderRight right order\\n /// @param signatureRight order right signature\\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 their assets\\n /// @param sender the message sender\\n /// @param orderLeft the left order of the match\\n /// @param orderRight the right order of the match\\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 LibFill.FillResult memory newFill = _parseOrdersSetFillEmitMatch(sender, orderLeft, orderRight);\\n\\n doTransfers(\\n ITransferManager.DealSide({\\n asset: LibAsset.Asset({assetType: makeMatch, value: newFill.leftValue}),\\n payouts: _payToMaker(orderLeft),\\n from: orderLeft.maker\\n }),\\n ITransferManager.DealSide({\\n asset: LibAsset.Asset(takeMatch, newFill.rightValue),\\n payouts: _payToMaker(orderRight),\\n from: orderRight.maker\\n }),\\n LibAsset.getFeeSide(makeMatch.assetClass, takeMatch.assetClass)\\n );\\n }\\n\\n /// @notice create a payout array that pays to maker 100%\\n /// @param order the order from which the maker is taken\\n /// @return an array with just one entry that pays to order.maker\\n function _payToMaker(LibOrder.Order memory order) internal pure returns (LibPart.Part[] memory) {\\n LibPart.Part[] memory payout = new LibPart.Part[](1);\\n payout[0].account = order.maker;\\n payout[0].value = 10000;\\n return payout;\\n }\\n\\n /// @notice parse orders with LibOrderDataGeneric parse() 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 (LibFill.FillResult memory newFill) {\\n bytes32 leftOrderKeyHash = LibOrder.hashKey(orderLeft);\\n bytes32 rightOrderKeyHash = LibOrder.hashKey(orderRight);\\n\\n uint256 leftOrderFill = _getOrderFill(orderLeft.salt, leftOrderKeyHash);\\n uint256 rightOrderFill = _getOrderFill(orderRight.salt, rightOrderKeyHash);\\n newFill = LibFill.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[leftOrderKeyHash] = leftOrderFill + newFill.rightValue;\\n }\\n\\n if (orderRight.salt != 0) {\\n fills[rightOrderKeyHash] = rightOrderFill + newFill.leftValue;\\n }\\n\\n emit Match({\\n from: sender,\\n leftHash: leftOrderKeyHash,\\n rightHash: rightOrderKeyHash,\\n newFill: newFill,\\n totalFillLeft: fills[leftOrderKeyHash],\\n totalFillRight: fills[rightOrderKeyHash],\\n valueLeft: orderLeft.makeAsset.value,\\n valueRight: orderRight.makeAsset.value\\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 uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x3822ff5d3ed09f2a912bba0e6817a706371cd0d7d7a3cdc276791901133723aa\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/marketplace/contracts/exchange/libraries/LibFill.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.21;\\n\\nimport {LibOrder} from \\\"../../lib-order/LibOrder.sol\\\";\\nimport {LibMath} from \\\"./LibMath.sol\\\";\\n\\n/// @title This library provides `fillOrder` function.\\n/// @notice It calculates fill of both orders (part of the Order that can be filled).\\nlibrary LibFill {\\n struct FillResult {\\n uint256 leftValue;\\n uint256 rightValue;\\n }\\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 calculate the remaining fill from orders\\n /// @param order order that we will calculate the remaining fill\\n /// @param fill to be subtracted\\n /// @return makeValue remaining fill from make side\\n /// @return takeValue remaining fill from take side\\n function calculateRemaining(\\n LibOrder.Order calldata order,\\n uint256 fill\\n ) internal pure returns (uint256 makeValue, uint256 takeValue) {\\n takeValue = order.takeAsset.value - fill;\\n makeValue = LibMath.safeGetPartialAmountFloor(order.makeAsset.value, order.takeAsset.value, takeValue);\\n }\\n\\n function fillRight(\\n uint256 leftMakeValue,\\n uint256 leftTakeValue,\\n uint256 rightMakeValue,\\n uint256 rightTakeValue\\n ) internal pure returns (FillResult memory result) {\\n uint256 makerValue = LibMath.safeGetPartialAmountFloor(rightTakeValue, leftMakeValue, leftTakeValue);\\n require(makerValue <= rightMakeValue, \\\"fillRight: unable to fill\\\");\\n return FillResult(rightTakeValue, makerValue);\\n }\\n\\n function fillLeft(\\n uint256 leftMakeValue,\\n uint256 leftTakeValue,\\n uint256 rightMakeValue,\\n uint256 rightTakeValue\\n ) internal pure returns (FillResult memory result) {\\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\":\"0x90e836be08c3e1962c1bd0512690aafde814abfb59edc07f2f0f7bfe96a0d86f\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/marketplace/contracts/exchange/libraries/LibMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.21;\\n\\nlibrary LibMath {\\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 * 1000 >= numerator * target;\\n }\\n\\n function safeGetPartialAmountCeil(\\n uint256 numerator,\\n uint256 denominator,\\n uint256 target\\n ) internal pure returns (uint256 partialAmount) {\\n if (isRoundingErrorCeil(numerator, denominator, target)) {\\n revert(\\\"rounding error\\\");\\n }\\n partialAmount = (numerator * target) + ((denominator - 1) / denominator);\\n }\\n\\n /// @dev Checks if rounding error >= 0.1% when rounding up.\\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 isRoundingErrorCeil(\\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 // See the comments in `isRoundingError`.\\n if (target == 0 || numerator == 0) {\\n // When either is zero, the ideal value and rounded value are zero\\n // and there is no rounding error. (Although the relative error\\n // is undefined.)\\n return false;\\n }\\n // Compute remainder as before\\n uint256 remainder = mulmod(target, numerator, denominator);\\n remainder = (denominator - remainder) % denominator;\\n isError = remainder * 1000 >= numerator * target;\\n return isError;\\n }\\n}\\n\",\"keccak256\":\"0x96084fee756acfb3191a02bfbab20a8ed57024745cf95b482994f9fe0e4192c7\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/marketplace/contracts/interfaces/IOrderValidator.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.21;\\n\\nimport {LibOrder} from \\\"../lib-order/LibOrder.sol\\\";\\n\\n/// @title interface for the OrderValidator contract\\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\":\"0x34124715b819920ce2eb56b14284a1e4a682740dbf8d40497c7d953faf3c6b58\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/marketplace/contracts/interfaces/IRoyaltiesProvider.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.21;\\n\\nimport {LibPart} from \\\"../lib-part/LibPart.sol\\\";\\n\\n/// @title interface for the RoyaltiesProvider contract\\n/// @notice contains the signature for the getRoyalties function\\ninterface IRoyaltiesProvider {\\n /// @notice calculates all roaylties in token for tokenId\\n /// @param token address of token\\n /// @param tokenId of the token we want to calculate royalites\\n /// @return a LibPart.Part with allroyalties for token\\n function getRoyalties(address token, uint256 tokenId) external returns (LibPart.Part[] memory);\\n}\\n\",\"keccak256\":\"0x86bc8bca3b5cab3a6e0ce9f41a3f8e89d0fc8e19e143fcac1b5b8e3cb4e0c994\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/marketplace/contracts/lib-asset/LibAsset.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.21;\\n\\n/// @title library for Assets\\n/// @notice contains structs for Asset and AssetType\\nlibrary LibAsset {\\n enum AssetClassType {\\n INVALID_ASSET_CLASS,\\n ERC20_ASSET_CLASS,\\n ERC721_ASSET_CLASS,\\n ERC1155_ASSET_CLASS\\n }\\n\\n enum FeeSide {\\n NONE,\\n LEFT,\\n RIGHT\\n }\\n\\n /// @dev AssetType is a type of a specific asset. For example AssetType is specific ERC-721 token (key is token + tokenId) or specific ERC-20 token (DAI for example).\\n /// @dev It consists of asset class and generic data (format of data is different for different asset classes). For example, for asset class ERC20 data holds address of the token, for ERC-721 data holds smart contract address and tokenId.\\n struct AssetType {\\n AssetClassType assetClass;\\n bytes data;\\n }\\n\\n /// @dev Asset represents any asset on ethereum blockchain. Asset has type and value (amount of an asset).\\n struct Asset {\\n AssetType assetType;\\n uint256 value;\\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 decides if the fees will be taken and from which side\\n /// @param leftClass left side asset class type\\n /// @param rightClass right side asset class type\\n /// @return side from which the fees will be taken or none\\n function getFeeSide(AssetClassType leftClass, AssetClassType rightClass) internal pure returns (FeeSide) {\\n if (leftClass == AssetClassType.ERC20_ASSET_CLASS && rightClass != AssetClassType.ERC20_ASSET_CLASS) {\\n return FeeSide.LEFT;\\n }\\n if (rightClass == AssetClassType.ERC20_ASSET_CLASS && leftClass != AssetClassType.ERC20_ASSET_CLASS) {\\n return FeeSide.RIGHT;\\n }\\n return FeeSide.NONE;\\n }\\n\\n /// @notice calculate if Asset types match with each other\\n /// @param leftType to be matched with rightAssetType\\n /// @param rightType to be matched with leftAssetType\\n /// @return AssetType of the match\\n function matchAssets(\\n AssetType calldata leftType,\\n AssetType calldata rightType\\n ) internal pure returns (AssetType memory) {\\n AssetClassType classLeft = leftType.assetClass;\\n AssetClassType classRight = rightType.assetClass;\\n\\n require(classLeft != AssetClassType.INVALID_ASSET_CLASS, \\\"not found IAssetMatcher\\\");\\n require(classRight != AssetClassType.INVALID_ASSET_CLASS, \\\"not found IAssetMatcher\\\");\\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 calculate hash of asset type\\n /// @param assetType to be hashed\\n /// @return hash of assetType\\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 calculate hash of asset\\n /// @param asset to be hashed\\n /// @return hash of 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\",\"keccak256\":\"0x2c5763a98a7e6c6d0b03a515a6e43f0cec72772c10f016426585906d936d4caa\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/marketplace/contracts/lib-bp/BpLibrary.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.21;\\n\\n/// @title library for Base Point calculation\\n/// @notice contains a method for basepoint calculation\\nlibrary BpLibrary {\\n /// @notice basepoint calculation\\n /// @param value value to be multiplied by basepoint\\n /// @param bpValue basepoint value\\n /// @return value times basepoint divided by 10000\\n function bp(uint256 value, uint256 bpValue) internal pure returns (uint256) {\\n return (value * bpValue) / 10000;\\n }\\n}\\n\",\"keccak256\":\"0x6a19a7c68e7f3189e287082a3235733f7831a8a848907bbe3e600dcbaa6298cc\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/marketplace/contracts/lib-order/LibOrder.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.21;\\n\\nimport {LibAsset} from \\\"../lib-asset/LibAsset.sol\\\";\\n\\n/// @title library for Order\\n/// @notice contains structs and functions related to Order\\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 struct Order {\\n address maker;\\n LibAsset.Asset makeAsset;\\n address taker;\\n LibAsset.Asset takeAsset;\\n uint256 salt;\\n uint256 start;\\n uint256 end;\\n }\\n\\n /// @notice calculate hash key from order\\n /// @param order object to be hashed\\n /// @return hash key of 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 calculate hash from order\\n /// @param order object to be hashed\\n /// @return hash of 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 function validateOrderTime(Order memory order) internal view {\\n // solhint-disable-next-line not-rely-on-time\\n require(order.start == 0 || order.start < block.timestamp, \\\"Order start validation failed\\\");\\n // solhint-disable-next-line not-rely-on-time\\n require(order.end == 0 || order.end > block.timestamp, \\\"Order end validation failed\\\");\\n }\\n}\\n\",\"keccak256\":\"0x9481748b6eb6d584e313c42049812226200a26e2e6861e62e9d8f9a72ce1d4a1\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/marketplace/contracts/lib-part/LibPart.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.21;\\n\\n/// @title library for parts of transaction fees\\n/// @notice contains the struct for Part, containing the fee recipient and value\\nlibrary LibPart {\\n /// @notice type hash of Part struct\\n /// @return hash of Part struct\\n bytes32 public constant TYPE_HASH = keccak256(\\\"Part(address account,uint96 value)\\\");\\n\\n struct Part {\\n address account;\\n uint96 value;\\n }\\n\\n /// @notice hash part object\\n /// @param part to be hashed\\n /// @return resulting hash\\n function hash(Part memory part) internal pure returns (bytes32) {\\n return keccak256(abi.encode(TYPE_HASH, part.account, part.value));\\n }\\n}\\n\",\"keccak256\":\"0xe5688703d282c860c702f436bff69206520899860c958bd6e2b442d467e6219e\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/marketplace/contracts/transfer-manager/TransferExecutor.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.21;\\n\\nimport {SafeERC20Upgradeable} from \\\"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\\\";\\nimport {IERC20Upgradeable} from \\\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\\\";\\nimport {IERC721Upgradeable} from \\\"@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol\\\";\\nimport {IERC1155Upgradeable} from \\\"@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol\\\";\\nimport {Initializable} from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport {LibAsset} from \\\"../lib-asset/LibAsset.sol\\\";\\nimport {ITransferExecutor} from \\\"./interfaces/ITransferExecutor.sol\\\";\\n\\n/// @title abstract contract for TransferExecutor\\n/// @notice contains transfer functions for any assets as well as ERC20 tokens\\nabstract contract TransferExecutor is Initializable, ITransferExecutor {\\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 function transfer(LibAsset.Asset memory asset, address from, address to) internal override {\\n if (asset.assetType.assetClass == LibAsset.AssetClassType.ERC721_ASSET_CLASS) {\\n //not using transfer proxy when transferring from this contract\\n (address token, uint256 tokenId) = abi.decode(asset.assetType.data, (address, uint256));\\n require(asset.value == 1, \\\"erc721 value error\\\");\\n erc721safeTransferFrom(IERC721Upgradeable(token), from, to, tokenId);\\n } else if (asset.assetType.assetClass == LibAsset.AssetClassType.ERC20_ASSET_CLASS) {\\n //not using transfer proxy when transferring from this contract\\n address token = abi.decode(asset.assetType.data, (address));\\n SafeERC20Upgradeable.safeTransferFrom(IERC20Upgradeable(token), from, to, asset.value);\\n } else if (asset.assetType.assetClass == LibAsset.AssetClassType.ERC1155_ASSET_CLASS) {\\n //not using transfer proxy when transferring from this contract\\n (address token, uint256 tokenId) = abi.decode(asset.assetType.data, (address, uint256));\\n erc1155safeTransferFrom(IERC1155Upgradeable(token), from, to, tokenId, asset.value, \\\"\\\");\\n }\\n }\\n\\n /// @notice function for safe transfer of ERC721 tokens\\n /// @param token ERC721 token to be transferred\\n /// @param from address from which token will be taken\\n /// @param to address that will receive token\\n /// @param tokenId id of the token being transferred\\n function erc721safeTransferFrom(IERC721Upgradeable token, address from, address to, uint256 tokenId) internal {\\n token.safeTransferFrom(from, to, tokenId);\\n }\\n\\n /// @notice function for safe transfer of ERC1155 tokens\\n /// @param token ERC1155 token to be transferred\\n /// @param from address from which tokens will be taken\\n /// @param to address that will receive tokens\\n /// @param id id of the tokens being transferred\\n /// @param value how many tokens will be transferred\\n function erc1155safeTransferFrom(\\n IERC1155Upgradeable token,\\n address from,\\n address to,\\n uint256 id,\\n uint256 value,\\n bytes memory data\\n ) internal {\\n token.safeTransferFrom(from, to, id, value, data);\\n }\\n\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x2721a48e6da931828020d97272029d89bb98af0f187c71cf4c78b2e8d255749a\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/marketplace/contracts/transfer-manager/TransferManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.21;\\n\\nimport {ERC165Upgradeable, IERC165Upgradeable} from \\\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\\\";\\nimport {IRoyaltiesProvider} from \\\"../interfaces/IRoyaltiesProvider.sol\\\";\\nimport {BpLibrary} from \\\"../lib-bp/BpLibrary.sol\\\";\\nimport {IRoyaltyUGC} from \\\"./interfaces/IRoyaltyUGC.sol\\\";\\nimport {ITransferManager} from \\\"./interfaces/ITransferManager.sol\\\";\\nimport {LibAsset} from \\\"../lib-asset/LibAsset.sol\\\";\\nimport {LibPart} from \\\"../lib-part/LibPart.sol\\\";\\n\\n/// @title TransferManager contract\\n/// @notice responsible for transferring all Assets\\n/// @dev this manager supports different types of fees\\n/// @dev also it supports different beneficiaries\\nabstract contract TransferManager is ERC165Upgradeable, ITransferManager {\\n using BpLibrary for uint;\\n\\n bytes4 internal constant INTERFACE_ID_IROYALTYUGC = 0xa30b4db9;\\n\\n /// @notice fee for primary sales\\n /// @return uint256 of primary sale fee\\n uint256 public protocolFeePrimary;\\n\\n /// @notice fee for secondary sales\\n /// @return uint256 of secondary sale fee\\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 event for when protocol fees are set\\n /// @param newProtocolFeePrimary fee for primary market\\n /// @param newProtocolFeeSecondary fee for secondary market\\n event ProtocolFeeSet(uint256 newProtocolFeePrimary, uint256 newProtocolFeeSecondary);\\n\\n /// @notice event for when a royalties registry is set\\n /// @param newRoyaltiesRegistry address of new royalties registry\\n event RoyaltiesRegistrySet(IRoyaltiesProvider newRoyaltiesRegistry);\\n\\n /// @notice event for when a default fee receiver is set\\n /// @param newDefaultFeeReceiver address that gets the fees\\n event DefaultFeeReceiverSet(address newDefaultFeeReceiver);\\n\\n /// @notice initializer for TransferExecutor\\n /// @param newProtocolFeePrimary fee for primary market\\n /// @param newProtocolFeeSecondary fee for 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 __ERC165_init();\\n _setProtocolFee(newProtocolFeePrimary, newProtocolFeeSecondary);\\n _setRoyaltiesRegistry(newRoyaltiesProvider);\\n _setDefaultFeeReceiver(newDefaultFeeReceiver);\\n }\\n\\n /// @notice setter for royalty registry\\n /// @param newRoyaltiesRegistry address of new royalties registry\\n function _setRoyaltiesRegistry(IRoyaltiesProvider newRoyaltiesRegistry) internal {\\n require(address(newRoyaltiesRegistry) != address(0), \\\"invalid Royalties Registry\\\");\\n royaltiesRegistry = newRoyaltiesRegistry;\\n\\n emit RoyaltiesRegistrySet(newRoyaltiesRegistry);\\n }\\n\\n /// @notice setter for protocol fees\\n /// @param newProtocolFeePrimary fee for primary market\\n /// @param newProtocolFeeSecondary fee for secondary market\\n function _setProtocolFee(uint256 newProtocolFeePrimary, uint256 newProtocolFeeSecondary) internal {\\n require(newProtocolFeePrimary < 5000, \\\"invalid primary fee\\\");\\n require(newProtocolFeeSecondary < 5000, \\\"invalid secodary fee\\\");\\n protocolFeePrimary = newProtocolFeePrimary;\\n protocolFeeSecondary = newProtocolFeeSecondary;\\n\\n emit ProtocolFeeSet(newProtocolFeePrimary, newProtocolFeeSecondary);\\n }\\n\\n /// @notice setter for default fee receiver\\n /// @param newDefaultFeeReceiver address that gets the fees\\n function _setDefaultFeeReceiver(address newDefaultFeeReceiver) internal {\\n require(address(newDefaultFeeReceiver) != address(0), \\\"invalid default fee receiver\\\");\\n defaultFeeReceiver = newDefaultFeeReceiver;\\n\\n emit DefaultFeeReceiverSet(newDefaultFeeReceiver);\\n }\\n\\n /// @notice executes transfers for 2 matched orders\\n /// @param left DealSide from the left order (see LibDeal.sol)\\n /// @param right DealSide from the right order (see LibDeal.sol)\\n function doTransfers(DealSide memory left, DealSide memory right, LibAsset.FeeSide feeSide) internal override {\\n if (feeSide == LibAsset.FeeSide.LEFT) {\\n doTransfersWithFees(left, right);\\n transferPayouts(right.asset.assetType, right.asset.value, right.from, left.payouts);\\n } else if (feeSide == LibAsset.FeeSide.RIGHT) {\\n doTransfersWithFees(right, left);\\n transferPayouts(left.asset.assetType, left.asset.value, left.from, right.payouts);\\n } else {\\n transferPayouts(left.asset.assetType, left.asset.value, left.from, right.payouts);\\n transferPayouts(right.asset.assetType, right.asset.value, right.from, left.payouts);\\n }\\n }\\n\\n /// @notice executes the fee-side transfers (payment + fees)\\n /// @param paymentSide DealSide of the fee-side order\\n /// @param nftSide DealSide of the nft-side order\\n function doTransfersWithFees(DealSide memory paymentSide, DealSide memory nftSide) internal {\\n uint256 rest = paymentSide.asset.value;\\n\\n if (_applyFees(paymentSide.from)) {\\n rest = transferRoyalties(\\n paymentSide.asset.assetType,\\n nftSide.asset.assetType,\\n nftSide.payouts,\\n rest,\\n paymentSide.asset.value,\\n paymentSide.from\\n );\\n\\n LibPart.Part[] memory origin = new LibPart.Part[](1);\\n origin[0].account = payable(defaultFeeReceiver);\\n\\n bool primaryMarket = false;\\n\\n // check if primary or secondary market\\n if (\\n nftSide.asset.assetType.assetClass == LibAsset.AssetClassType.ERC1155_ASSET_CLASS ||\\n nftSide.asset.assetType.assetClass == LibAsset.AssetClassType.ERC721_ASSET_CLASS\\n ) {\\n (address token, uint256 tokenId) = abi.decode(nftSide.asset.assetType.data, (address, uint));\\n try IERC165Upgradeable(token).supportsInterface(INTERFACE_ID_IROYALTYUGC) returns (bool result) {\\n if (result) {\\n address creator = IRoyaltyUGC(token).getCreatorAddress(tokenId);\\n if (nftSide.from == creator) {\\n primaryMarket = true;\\n }\\n }\\n // solhint-disable-next-line no-empty-blocks\\n } catch {}\\n }\\n\\n if (primaryMarket) {\\n origin[0].value = uint96(protocolFeePrimary);\\n } else {\\n origin[0].value = uint96(protocolFeeSecondary);\\n }\\n\\n (rest, ) = transferFees(\\n paymentSide.asset.assetType,\\n rest,\\n paymentSide.asset.value,\\n origin,\\n paymentSide.from\\n );\\n }\\n\\n transferPayouts(paymentSide.asset.assetType, rest, paymentSide.from, nftSide.payouts);\\n }\\n\\n /// @notice transfer royalties. If there is only one royalties receiver and one address in payouts and they match,\\n /// @dev nothing is transferred in this function\\n /// @param paymentAssetType Asset Type which represents payment\\n /// @param nftAssetType Asset Type which represents NFT to pay royalties for\\n /// @param payouts Payouts to be made\\n /// @param rest How much of the amount left after previous transfers\\n /// @param amount total amount of asset that is going to be transferred\\n /// @param from owner of the Asset to transfer\\n /// @return How much left after transferring royalties\\n function transferRoyalties(\\n LibAsset.AssetType memory paymentAssetType,\\n LibAsset.AssetType memory nftAssetType,\\n LibPart.Part[] memory payouts,\\n uint256 rest,\\n uint256 amount,\\n address from\\n ) internal returns (uint256) {\\n LibPart.Part[] memory royalties = getRoyaltiesByAssetType(nftAssetType);\\n\\n if (\\n nftAssetType.assetClass == LibAsset.AssetClassType.ERC1155_ASSET_CLASS ||\\n nftAssetType.assetClass == LibAsset.AssetClassType.ERC721_ASSET_CLASS\\n ) {\\n (address token, uint256 tokenId) = abi.decode(nftAssetType.data, (address, uint));\\n try IERC165Upgradeable(token).supportsInterface(INTERFACE_ID_IROYALTYUGC) returns (bool resultInterface) {\\n if (resultInterface) {\\n address creator = IRoyaltyUGC(token).getCreatorAddress(tokenId);\\n if (payouts.length == 1 && payouts[0].account == creator) {\\n require(royalties[0].value <= 5000, \\\"Royalties are too high (>50%)\\\");\\n return rest;\\n }\\n }\\n // solhint-disable-next-line no-empty-blocks\\n } catch {}\\n }\\n if (royalties.length == 1 && payouts.length == 1 && royalties[0].account == payouts[0].account) {\\n require(royalties[0].value <= 5000, \\\"Royalties are too high (>50%)\\\");\\n return rest;\\n }\\n\\n (uint256 result, uint256 totalRoyalties) = transferFees(paymentAssetType, rest, amount, royalties, from);\\n require(totalRoyalties <= 5000, \\\"Royalties are too high (>50%)\\\");\\n return result;\\n }\\n\\n /// @notice calculates royalties by asset type.\\n /// @param nftAssetType NFT Asset Type to calculate royalties for\\n /// @return calculated royalties (Array of LibPart.Part)\\n function getRoyaltiesByAssetType(LibAsset.AssetType memory nftAssetType) internal returns (LibPart.Part[] memory) {\\n if (\\n nftAssetType.assetClass == LibAsset.AssetClassType.ERC1155_ASSET_CLASS ||\\n nftAssetType.assetClass == LibAsset.AssetClassType.ERC721_ASSET_CLASS\\n ) {\\n (address token, uint256 tokenId) = abi.decode(nftAssetType.data, (address, uint));\\n return royaltiesRegistry.getRoyalties(token, tokenId);\\n }\\n LibPart.Part[] memory empty;\\n return empty;\\n }\\n\\n /// @notice Transfer fees\\n /// @param assetType Asset Type to transfer\\n /// @param rest How much of the amount left after previous transfers\\n /// @param amount Total amount of the Asset. Used as a base to calculate part from (100%)\\n /// @param fees Array of LibPart.Part which represents fees to pay\\n /// @param from owner of the Asset to transfer\\n /// @return newRest how much left after transferring fees\\n /// @return totalFees total number of fees in bp\\n function transferFees(\\n LibAsset.AssetType memory assetType,\\n uint256 rest,\\n uint256 amount,\\n LibPart.Part[] memory fees,\\n address from\\n ) internal returns (uint256 newRest, uint256 totalFees) {\\n totalFees = 0;\\n newRest = rest;\\n for (uint256 i = 0; i < fees.length; ++i) {\\n totalFees = totalFees + fees[i].value;\\n uint256 feeValue;\\n (newRest, feeValue) = subFeeInBp(newRest, amount, fees[i].value);\\n if (feeValue > 0) {\\n transfer(LibAsset.Asset(assetType, feeValue), from, fees[i].account);\\n }\\n }\\n }\\n\\n /// @notice transfers main part of the asset (payout)\\n /// @param assetType Asset Type to transfer\\n /// @param amount Amount of the asset to transfer\\n /// @param from Current owner of the asset\\n /// @param payouts List of payouts - receivers of the Asset\\n function transferPayouts(\\n LibAsset.AssetType memory assetType,\\n uint256 amount,\\n address from,\\n LibPart.Part[] memory payouts\\n ) internal {\\n require(payouts.length > 0, \\\"transferPayouts: nothing to transfer\\\");\\n uint256 sumBps = 0;\\n uint256 rest = amount;\\n for (uint256 i = 0; i < payouts.length - 1; ++i) {\\n uint256 currentAmount = amount.bp(payouts[i].value);\\n sumBps = sumBps + payouts[i].value;\\n if (currentAmount > 0) {\\n rest = rest - currentAmount;\\n transfer(LibAsset.Asset(assetType, currentAmount), from, payouts[i].account);\\n }\\n }\\n LibPart.Part memory lastPayout = payouts[payouts.length - 1];\\n sumBps = sumBps + lastPayout.value;\\n require(sumBps == 10000, \\\"Sum payouts Bps not equal 100%\\\");\\n if (rest > 0) {\\n transfer(LibAsset.Asset(assetType, rest), from, lastPayout.account);\\n }\\n }\\n\\n /// @notice subtract fees in BP, or base point\\n /// @param value amount left from amount after fees are discounted\\n /// @param total total price for asset\\n /// @param feeInBp fee in basepoint to be deducted\\n function subFeeInBp(\\n uint256 value,\\n uint256 total,\\n uint256 feeInBp\\n ) internal pure returns (uint256 newValue, uint256 realFee) {\\n return subFee(value, total.bp(feeInBp));\\n }\\n\\n /// @notice subtract fee from value\\n /// @param value from which the fees will be deducted\\n /// @param fee to deduct from value\\n /// @return newValue result from deduction, 0 if value < fee\\n /// @return realFee fee value if value > fee, otherwise return value input\\n function subFee(uint256 value, uint256 fee) internal pure returns (uint256 newValue, uint256 realFee) {\\n if (value > fee) {\\n newValue = value - fee;\\n realFee = fee;\\n } else {\\n newValue = 0;\\n realFee = value;\\n }\\n }\\n\\n /// @dev function deciding if the fees are applied or not, to be overriden\\n /// @param from address to check\\n function _applyFees(address from) internal virtual returns (bool);\\n\\n uint256[46] private __gap;\\n}\\n\",\"keccak256\":\"0xf7770ee0fcb545b1586cb2f5b9905d97dcc048bea4d7521cec0c9b5d44362d45\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/marketplace/contracts/transfer-manager/interfaces/IRoyaltyUGC.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IRoyaltyUGC {\\n function getCreatorAddress(uint256 tokenId) external pure returns (address creator);\\n}\\n\",\"keccak256\":\"0xa43870e62369bafb23450ad5e3948906ee832adcc5b8f1812c802533ea6f32a0\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/marketplace/contracts/transfer-manager/interfaces/ITransferExecutor.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.21;\\n\\nimport {LibAsset} from \\\"../../lib-asset/LibAsset.sol\\\";\\n\\nabstract contract ITransferExecutor {\\n function transfer(LibAsset.Asset memory asset, address from, address to) internal virtual;\\n}\\n\",\"keccak256\":\"0xfc7a255b03c125feffbb31c762fa6afe067b0866c9bc822187e9f05490404cd5\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/marketplace/contracts/transfer-manager/interfaces/ITransferManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.21;\\n\\nimport {ITransferExecutor} from \\\"./ITransferExecutor.sol\\\";\\nimport {LibAsset} from \\\"../../lib-asset/LibAsset.sol\\\";\\nimport {LibPart} from \\\"../../lib-part/LibPart.sol\\\";\\n\\nabstract contract ITransferManager is ITransferExecutor {\\n struct DealSide {\\n LibAsset.Asset asset;\\n LibPart.Part[] payouts;\\n address from;\\n }\\n\\n function doTransfers(DealSide memory left, DealSide memory right, LibAsset.FeeSide feeSide) internal virtual;\\n}\\n\",\"keccak256\":\"0x1dbfe50de6f2b94997b5073a5297562dd59a65c32594ed0f2b588e33eba997a7\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b506200001c62000022565b620000e3565b600054610100900460ff16156200008f5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff90811614620000e1576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6141ad80620000f36000396000f3fe608060405234801561001057600080fd5b50600436106101da5760003560e01c80635c975abb11610104578063a217fddf116100a2578063da74222811610071578063da74222814610438578063e63ab1e91461044b578063ec03ce8214610472578063fb01d36b1461048557600080fd5b8063a217fddf14610402578063c46002881461040a578063ce1b815f14610413578063d547741f1461042557600080fd5b80638587177a116100de5780638587177a146103865780638830df0d1461039957806389de1d7a146103c057806391d14854146103c957600080fd5b80635c975abb1461035f5780636d8f06941461036b5780638456cb591461037e57600080fd5b80632f2ff15d1161017c5780633f4ba83a1161014b5780633f4ba83a1461030a5780634ac0c18314610312578063572b6c05146103395780635737e1961461034c57600080fd5b80632f2ff15d146102a657806336568abe146102b95780633abf6fd4146102cc5780633be89922146102f757600080fd5b806320158c44116101b857806320158c441461022f578063240de2771461025d578063248a9ca3146102705780632959bfed1461029357600080fd5b806301ffc9a7146101df5780630c8b6288146102075780631cdfe3d81461021c575b600080fd5b6101f26101ed36600461355a565b610498565b60405190151581526020015b60405180910390f35b61021a6102153660046135e1565b6104db565b005b61021a61022a366004613648565b6104f9565b61024f61023d366004613665565b60c96020526000908152604090205481565b6040519081526020016101fe565b61021a61026b36600461367e565b61052c565b61024f61027e366004613665565b60009081526065602052604090206001015490565b61021a6102a13660046136a0565b610565565b61021a6102b4366004613724565b6106c2565b61021a6102c7366004613724565b6106e7565b60fe546102df906001600160a01b031681565b6040516001600160a01b0390911681526020016101fe565b61021a610305366004613648565b61077f565b61021a610793565b61024f7f541943c4a49765b7940b4b1392c4b1f8ede6efd4e23572572987ae02e569a78681565b6101f2610347366004613648565b6107c8565b60c8546102df906001600160a01b031681565b61015f5460ff166101f2565b60fd546102df906001600160a01b031681565b61021a6107e3565b61021a610394366004613648565b610815565b61024f7f1d46dada6ac47de84b1e7381a753499bde9d44cc2b9eacc1ba89f2ac24be16cc81565b61024f60fb5481565b6101f26103d7366004613724565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b61024f600081565b61024f60fc5481565b61012d546001600160a01b03166102df565b61021a610433366004613724565b610829565b61021a610446366004613648565b61084e565b61024f7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b61021a610480366004613754565b610862565b61021a61049336600461379e565b6108e8565b60006301ffc9a760e01b7fffffffff00000000000000000000000000000000000000000000000000000000831614806104d557506104d582610981565b92915050565b6104e36109ff565b6104f56104ee610a55565b8383610a64565b5050565b7f541943c4a49765b7940b4b1392c4b1f8ede6efd4e23572572987ae02e569a78661052381610bd4565b6104f582610be5565b7f541943c4a49765b7940b4b1392c4b1f8ede6efd4e23572572987ae02e569a78661055681610bd4565b6105608383610c9d565b505050565b600054610100900460ff16158080156105855750600054600160ff909116105b8061059f5750303b15801561059f575060005460ff166001145b6106165760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b6000805460ff191660011790558015610639576000805461ff0019166101001790555b61064287610d86565b61064a610dfa565b610652610e65565b61065e86868686610edd565b61066782610f6c565b610672600089610fe0565b80156106b8576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050565b6000828152606560205260409020600101546106dd81610bd4565b6105608383610fe0565b6106ef610a55565b6001600160a01b0316816001600160a01b0316146107755760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c660000000000000000000000000000000000606482015260840161060d565b6104f58282611083565b600061078a81610bd4565b6104f582611124565b7f541943c4a49765b7940b4b1392c4b1f8ede6efd4e23572572987ae02e569a7866107bd81610bd4565b6107c56111d5565b50565b60006104d58261012d546001600160a01b0391821691161490565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a61080d81610bd4565b6107c561122e565b600061082081610bd4565b6104f58261126d565b60008281526065602052604090206001015461084481610bd4565b6105608383611083565b600061085981610bd4565b6104f58261131a565b61086a6109ff565b6108776020830183613648565b6001600160a01b0316610888610a55565b6001600160a01b0316146108de5760405162461bcd60e51b815260206004820152601760248201527f45786368616e6765436f72653a206e6f74206d616b6572000000000000000000604482015260640161060d565b6104f582826113f0565b7f1d46dada6ac47de84b1e7381a753499bde9d44cc2b9eacc1ba89f2ac24be16cc61091281610bd4565b61091a6109ff565b6001600160a01b0384166109705760405162461bcd60e51b815260206004820152600e60248201527f696e76616c69642073656e646572000000000000000000000000000000000000604482015260640161060d565b61097b848484610a64565b50505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b0000000000000000000000000000000000000000000000000000000014806104d557506301ffc9a760e01b7fffffffff000000000000000000000000000000000000000000000000000000008316146104d5565b61015f5460ff1615610a535760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015260640161060d565b565b6000610a5f611518565b905090565b8080610ab25760405162461bcd60e51b815260206004820152601660248201527f696e76616c69642065786368616e6765206d6174636800000000000000000000604482015260640161060d565b60005b81811015610bcd5736848483818110610ad057610ad06137f3565b9050602002810190610ae29190613809565b9050610b9a86610af28380613847565b610afb90613a1e565b610b086020850185613ace565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610b4a925050506040860186613847565b610b5390613a1e565b610b606060870187613ace565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061152292505050565b610bba86610ba88380613847565b610bb56040850185613847565b611714565b5080610bc581613b2b565b915050610ab5565b5050505050565b6107c581610be0610a55565b611844565b6001600160a01b038116610c3b5760405162461bcd60e51b815260206004820152601c60248201527f696e76616c69642064656661756c742066656520726563656976657200000000604482015260640161060d565b60fe805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040519081527f5d039c612419cd7b6696e7d5c8ccaef3362188cc98db01e07fb55bb85b33541d906020015b60405180910390a150565b6113888210610cee5760405162461bcd60e51b815260206004820152601360248201527f696e76616c6964207072696d6172792066656500000000000000000000000000604482015260640161060d565b6113888110610d3f5760405162461bcd60e51b815260206004820152601460248201527f696e76616c6964207365636f6461727920666565000000000000000000000000604482015260640161060d565b60fb82905560fc81905560408051838152602081018390527ffa4067f2d0249edb7594284cabb394f2ec0e4f6168dbd1e3a63f861b67f1188f910160405180910390a15050565b600054610100900460ff16610df15760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b606482015260840161060d565b6107c58161131a565b600054610100900460ff16610a535760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b606482015260840161060d565b600054610100900460ff16610ed05760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b606482015260840161060d565b61015f805460ff19169055565b600054610100900460ff16610f485760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b606482015260840161060d565b610f50610dfa565b610f5a8484610c9d565b610f6381611124565b61097b82610be5565b600054610100900460ff16610fd75760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b606482015260840161060d565b6107c58161126d565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff166104f55760008281526065602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561103f610a55565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16156104f55760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191690556110e0610a55565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b6001600160a01b03811661117a5760405162461bcd60e51b815260206004820152601a60248201527f696e76616c696420526f79616c74696573205265676973747279000000000000604482015260640161060d565b60fd805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040519081527f6932f02a24181a8c1b9fa7bdc7453f15ecba05c354c9da94e97bac1abb13397890602001610c92565b6111dd6118b9565b61015f805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa611211610a55565b6040516001600160a01b03909116815260200160405180910390a1565b6112366109ff565b61015f805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611211610a55565b6001600160a01b0381166112c35760405162461bcd60e51b815260206004820152601760248201527f696e76616c6964206f726465722076616c696461746f72000000000000000000604482015260640161060d565b60c8805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040517ff605132f819f46ab9f362495c159c83b8a080f3b8b22f8a684018837eae0bed390600090a250565b61012d546001600160a01b03908116908216036113795760405162461bcd60e51b815260206004820152601560248201527f666f7277617264657220616c7265616479207365740000000000000000000000604482015260640161060d565b611381610a55565b61012d546040516001600160a01b03928316928481169216907f8ca022029d8ff7ad974913f8970aeed6c5e0e7eaf494a0c5b262249f6b5759e590600090a461012d805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b816080013560000361146a5760405162461bcd60e51b815260206004820152602260248201527f45786368616e6765436f72653a20302073616c742063616e277420626520757360448201527f6564000000000000000000000000000000000000000000000000000000000000606482015260840161060d565b60006114758361190c565b90508181146114c65760405162461bcd60e51b815260206004820152601f60248201527f45786368616e6765436f72653a20496e76616c6964206f726465724861736800604482015260640161060d565b600082815260c960205260409081902060001990555182907f34e97b51b26b1b4b5889b90f9702b02688ef22aaf1679d0d697a7518de60abfa9061150b908690613c41565b60405180910390a2505050565b6000610a5f61199d565b60c8546040517fb45230ec0000000000000000000000000000000000000000000000000000000081526001600160a01b039091169063b45230ec9061156f90879087908a90600401613d84565b60006040518083038186803b15801561158757600080fd5b505afa15801561159b573d6000803e3d6000fd5b505060c8546040517fb45230ec0000000000000000000000000000000000000000000000000000000081526001600160a01b03909116925063b45230ec91506115ec90859085908a90600401613d84565b60006040518083038186803b15801561160457600080fd5b505afa158015611618573d6000803e3d6000fd5b5050505060408401516001600160a01b0316156116985783604001516001600160a01b031682600001516001600160a01b0316146116985760405162461bcd60e51b815260206004820152601660248201527f6c6566744f726465722e74616b6572206661696c656400000000000000000000604482015260640161060d565b60408201516001600160a01b031615610bcd5783600001516001600160a01b031682604001516001600160a01b031614610bcd5760405162461bcd60e51b815260206004820152601760248201527f72696768744f726465722e74616b6572206661696c6564000000000000000000604482015260640161060d565b600061174c6117266020850185613e4a565b6117309080613e4a565b61173d6060850185613e4a565b6117479080613e4a565b6119f1565b905060006117776117606060860186613e4a565b61176a9080613e4a565b61173d6020860186613e4a565b90506000611786868686611c0d565b6040805160a081019091526060810185815282516080830152815290915061183c90602081016117bd6117b889613a1e565b611dda565b81526020908101906117d190890189613648565b6001600160a01b031690526040805160a08101909152606081018581526020858101516080840152908252810161180a6117b889613a1e565b815260209081019061181e90890189613648565b6001600160a01b03169052855185516118379190611e95565b611f20565b505050505050565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff166104f55761187781611fbd565b611882836020611fcf565b604051602001611893929190613e60565b60408051601f198184030181529082905262461bcd60e51b825261060d91600401613ee1565b61015f5460ff16610a535760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015260640161060d565b600061191b6020830183613648565b61194361192b6020850185613e4a565b6119359080613e4a565b61193e90613ef4565b6121f8565b61195361192b6060860186613e4a565b604080516001600160a01b03909416602085015283019190915260608201526080808401359082015260a0015b604051602081830303815290604052805190602001209050919050565b61012d546000906001600160a01b0316331480156119bc575060143610155b156119ec57507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec36013560601c90565b503390565b6040805180820190915260008152606060208201526000611a156020850185613f00565b90506000611a266020850185613f00565b90506000826003811115611a3c57611a3c613b64565b03611a895760405162461bcd60e51b815260206004820152601760248201527f6e6f7420666f756e64204941737365744d617463686572000000000000000000604482015260640161060d565b6000816003811115611a9d57611a9d613b64565b03611aea5760405162461bcd60e51b815260206004820152601760248201527f6e6f7420666f756e64204941737365744d617463686572000000000000000000604482015260640161060d565b806003811115611afc57611afc613b64565b826003811115611b0e57611b0e613b64565b14611b5b5760405162461bcd60e51b815260206004820152601260248201527f61737365747320646f6e2774206d617463680000000000000000000000000000604482015260640161060d565b6000611b6a6020870187613ace565b604051611b78929190613f1b565b60405190819003902090506000611b926020870187613ace565b604051611ba0929190613f1b565b60405180910390209050808214611bf95760405162461bcd60e51b815260206004820152601260248201527f61737365747320646f6e2774206d617463680000000000000000000000000000604482015260640161060d565b611c0287613ef4565b979650505050505050565b60408051808201909152600080825260208201526000611c2c8461190c565b90506000611c398461190c565b90506000611c4b86608001358461223a565b90506000611c5d86608001358461223a565b9050611c6b87878484612261565b945060008560200151118015611c815750845115155b611ccd5760405162461bcd60e51b815260206004820152600f60248201527f6e6f7468696e6720746f2066696c6c0000000000000000000000000000000000604482015260640161060d565b608087013515611cf6576020850151611ce69083613f2b565b600085815260c960205260409020555b608086013515611d1c578451611d0c9082613f2b565b600084815260c960205260409020555b600084815260c960209081526040808320548684529220546001600160a01b038b16927ff1133ed5e330ee3f63885c4d2ed888f41e54352d2fdcf6db454a80518c77ab7892889288928b92909190611d76908f018f613e4a565b602001358d8060200190611d8a9190613e4a565b60408051978852602088810197909752855190880152938501516060870152608086019290925260a085015260c0840152013560e08201526101000160405180910390a2505050505b9392505050565b60408051600180825281830190925260609160009190816020015b6040805180820190915260008082526020820152815260200190600190039081611df5579050509050826000015181600081518110611e3657611e366137f3565b6020026020010151600001906001600160a01b031690816001600160a01b03168152505061271081600081518110611e7057611e706137f3565b6020908102919091018101516bffffffffffffffffffffffff90921691015292915050565b60006001836003811115611eab57611eab613b64565b148015611eca57506001826003811115611ec757611ec7613b64565b14155b15611ed7575060016104d5565b6001826003811115611eeb57611eeb613b64565b148015611f0a57506001836003811115611f0757611f07613b64565b14155b15611f17575060026104d5565b50600092915050565b6001816002811115611f3457611f34613b64565b03611f6057611f438383612311565b815180516020918201516040850151928601516105609390612619565b6002816002811115611f7457611f74613b64565b03611fa057611f838284612311565b825180516020918201516040860151928501516105609390612619565b82518051602091820151604086015192850151611f439390612619565b60606104d56001600160a01b03831660145b60606000611fde836002613f3e565b611fe9906002613f2b565b67ffffffffffffffff8111156120015761200161387b565b6040519080825280601f01601f19166020018201604052801561202b576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110612062576120626137f3565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106120c5576120c56137f3565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000612101846002613f3e565b61210c906001613f2b565b90505b60018111156121a9577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061214d5761214d6137f3565b1a60f81b828281518110612163576121636137f3565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c936121a281613f55565b905061210f565b508315611dd35760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161060d565b8051602080830151805190820120604051600093611980937f75aacb2727a36600741802d07994792d9d768ee841822bca87180d320cea991293919201613f6c565b60008260000361224c575060006104d5565b50600090815260c96020526040902054919050565b60408051808201909152600080825260208201526000806122828786612852565b915091506000806122938887612852565b91509150838111156122d6576122cb84846122b160208c018c613e4a565b602001356122c260608d018d613e4a565b602001356128a7565b945050505050612309565b6123026122e660208b018b613e4a565b602001356122f760608c018c613e4a565b602001358484612933565b9450505050505b949350505050565b815160200151604083015161235e906001600160a01b031660009081527f90916b45ad713ccdf8d945eab9f58d0d1cfed58f8e47d57192d063a0ddbfe292602052604090205460ff161590565b1561260457825180518351516020808601519301516040870151612384949186916129c0565b60408051600180825281830190925291925060009190816020015b604080518082019091526000808252602082015281526020019060019003908161239f57505060fe5481519192506001600160a01b03169082906000906123e8576123e86137f3565b60209081029190910101516001600160a01b0390911690526000600384515151600381111561241957612419613b64565b14806124395750600284515151600381111561243757612437613b64565b145b1561256b578351516020908101518051600092839261245d92810182019101613f8e565b6040516301ffc9a760e01b815263a30b4db960e01b600482015291935091506001600160a01b038316906301ffc9a790602401602060405180830381865afa9250505080156124c9575060408051601f3d908101601f191682019092526124c691810190613fbc565b60015b156125685780156125665760405163a30b4db960e01b8152600481018390526000906001600160a01b0385169063a30b4db990602401602060405180830381865afa15801561251c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125409190613fde565b9050806001600160a01b031688604001516001600160a01b03160361256457600194505b505b505b50505b80156125ab5760fb5482600081518110612587576125876137f3565b6020908102919091018101516bffffffffffffffffffffffff9092169101526125e1565b60fc54826000815181106125c1576125c16137f3565b6020908102919091018101516bffffffffffffffffffffffff9092169101525b8451805160209091015160408701516125fe929186918690612d49565b50925050505b82515160408401516020840151610560929184915b600081511161268f5760405162461bcd60e51b8152602060048201526024808201527f7472616e736665725061796f7574733a206e6f7468696e6720746f207472616e60448201527f7366657200000000000000000000000000000000000000000000000000000000606482015260840161060d565b600083815b600184516126a29190613ffb565b8110156127835760006126e98583815181106126c0576126c06137f3565b6020026020010151602001516bffffffffffffffffffffffff1688612e1a90919063ffffffff16565b90508482815181106126fd576126fd6137f3565b6020026020010151602001516bffffffffffffffffffffffff16846127229190613f2b565b93508015612772576127348184613ffb565b925061277260405180604001604052808a81526020018381525087878581518110612761576127616137f3565b602002602001015160000151612e33565b5061277c81613b2b565b9050612694565b50600083600185516127959190613ffb565b815181106127a5576127a56137f3565b6020026020010151905080602001516bffffffffffffffffffffffff16836127cd9190613f2b565b925082612710146128205760405162461bcd60e51b815260206004820152601e60248201527f53756d207061796f75747320427073206e6f7420657175616c20313030250000604482015260640161060d565b811561284957612849604051806040016040528089815260200184815250868360000151612e33565b50505050505050565b600080826128636060860186613e4a565b602001356128719190613ffb565b905061289e6128836020860186613e4a565b602001356128946060870187613e4a565b6020013583612f7b565b91509250929050565b604080518082019091526000808252602082015260006128c8858585612f7b565b90508581111561291a5760405162461bcd60e51b815260206004820152601860248201527f66696c6c4c6566743a20756e61626c6520746f2066696c6c0000000000000000604482015260640161060d565b5050604080518082019091529384525050602082015290565b60408051808201909152600080825260208201526000612954838787612f7b565b9050838111156129a65760405162461bcd60e51b815260206004820152601960248201527f66696c6c52696768743a20756e61626c6520746f2066696c6c00000000000000604482015260640161060d565b604080518082019091529283526020830152509392505050565b6000806129cc87612fea565b90506003875160038111156129e3576129e3613b64565b1480612a0157506002875160038111156129ff576129ff613b64565b145b15612bdd576000808860200151806020019051810190612a219190613f8e565b6040516301ffc9a760e01b815263a30b4db960e01b600482015291935091506001600160a01b038316906301ffc9a790602401602060405180830381865afa925050508015612a8d575060408051601f3d908101601f19168201909252612a8a91810190613fbc565b60015b15612bda578015612bd85760405163a30b4db960e01b8152600481018390526000906001600160a01b0385169063a30b4db990602401602060405180830381865afa158015612ae0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b049190613fde565b905089516001148015612b465750806001600160a01b03168a600081518110612b2f57612b2f6137f3565b6020026020010151600001516001600160a01b0316145b15612bd65761138885600081518110612b6157612b616137f3565b6020026020010151602001516bffffffffffffffffffffffff161115612bc95760405162461bcd60e51b815260206004820152601d60248201527f526f79616c746965732061726520746f6f206869676820283e35302529000000604482015260640161060d565b8895505050505050612d3f565b505b505b50505b80516001148015612bef575085516001145b8015612c48575085600081518110612c0957612c096137f3565b6020026020010151600001516001600160a01b031681600081518110612c3157612c316137f3565b6020026020010151600001516001600160a01b0316145b15612cd45761138881600081518110612c6357612c636137f3565b6020026020010151602001516bffffffffffffffffffffffff161115612ccb5760405162461bcd60e51b815260206004820152601d60248201527f526f79616c746965732061726520746f6f206869676820283e35302529000000604482015260640161060d565b84915050612d3f565b600080612ce48a88888689612d49565b91509150611388811115612d3a5760405162461bcd60e51b815260206004820152601d60248201527f526f79616c746965732061726520746f6f206869676820283e35302529000000604482015260640161060d565b509150505b9695505050505050565b836000805b8451811015612e0f57848181518110612d6957612d696137f3565b6020026020010151602001516bffffffffffffffffffffffff1682612d8e9190613f2b565b91506000612dc88488888581518110612da957612da96137f3565b6020026020010151602001516bffffffffffffffffffffffff166130e2565b90945090508015612dfe57612dfe60405180604001604052808b81526020018381525086888581518110612761576127616137f3565b50612e0881613b2b565b9050612d4e565b509550959350505050565b6000612710612e298385613f3e565b611dd39190614024565b60028351516003811115612e4957612e49613b64565b03612ed157600080846000015160200151806020019051810190612e6d9190613f8e565b915091508460200151600114612ec55760405162461bcd60e51b815260206004820152601260248201527f6572633732312076616c7565206572726f720000000000000000000000000000604482015260640161060d565b610bcd82858584613104565b60018351516003811115612ee757612ee7613b64565b03612f1c576000836000015160200151806020019051810190612f0a9190613fde565b905061097b8184848760200151613183565b60038351516003811115612f3257612f32613b64565b0361056057600080846000015160200151806020019051810190612f569190613f8e565b91509150610bcd8285858489602001516040518060200160405280600081525061320b565b6000612f88848484613292565b15612fd55760405162461bcd60e51b815260206004820152600e60248201527f726f756e64696e67206572726f72000000000000000000000000000000000000604482015260640161060d565b82612fe08386613f3e565b6123099190614024565b606060038251600381111561300157613001613b64565b148061301f575060028251600381111561301d5761301d613b64565b145b156130da57600080836020015180602001905181019061303f9190613f8e565b60fd546040517f9ca7dc7a0000000000000000000000000000000000000000000000000000000081526001600160a01b038085166004830152602482018490529395509193509190911690639ca7dc7a906044016000604051808303816000875af11580156130b2573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526123099190810190614046565b506060919050565b6000806130f8856130f38686612e1a565b613332565b91509150935093915050565b6040517f42842e0e0000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301528381166024830152604482018390528516906342842e0e90606401600060405180830381600087803b15801561316f57600080fd5b505af11580156106b8573d6000803e3d6000fd5b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd0000000000000000000000000000000000000000000000000000000017905261097b90859061335f565b6040517ff242432a0000000000000000000000000000000000000000000000000000000081526001600160a01b0387169063f242432a90613258908890889088908890889060040161412d565b600060405180830381600087803b15801561327257600080fd5b505af1158015613286573d6000803e3d6000fd5b50505050505050505050565b6000826000036132e45760405162461bcd60e51b815260206004820152601060248201527f6469766973696f6e206279207a65726f00000000000000000000000000000000604482015260640161060d565b8115806132ef575083155b156132fc57506000611dd3565b6000838061330c5761330c61400e565b858409905061331b8386613f3e565b613327826103e8613f3e565b101595945050505050565b60008082841115613351576133478385613ffb565b9150829050613358565b5060009050825b9250929050565b60006133b4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166134479092919063ffffffff16565b90508051600014806133d55750808060200190518101906133d59190613fbc565b6105605760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840161060d565b6060612309848460008585600080866001600160a01b0316858760405161346e9190614165565b60006040518083038185875af1925050503d80600081146134ab576040519150601f19603f3d011682016040523d82523d6000602084013e6134b0565b606091505b5091509150611c02878383876060831561352b578251600003613524576001600160a01b0385163b6135245760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161060d565b5081612309565b61230983838151156135405781518083602001fd5b8060405162461bcd60e51b815260040161060d9190613ee1565b60006020828403121561356c57600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114611dd357600080fd5b60008083601f8401126135ae57600080fd5b50813567ffffffffffffffff8111156135c657600080fd5b6020830191508360208260051b850101111561335857600080fd5b600080602083850312156135f457600080fd5b823567ffffffffffffffff81111561360b57600080fd5b6136178582860161359c565b90969095509350505050565b6001600160a01b03811681146107c557600080fd5b803561364381613623565b919050565b60006020828403121561365a57600080fd5b8135611dd381613623565b60006020828403121561367757600080fd5b5035919050565b6000806040838503121561369157600080fd5b50508035926020909101359150565b600080600080600080600060e0888a0312156136bb57600080fd5b87356136c681613623565b965060208801356136d681613623565b9550604088013594506060880135935060808801356136f481613623565b925060a088013561370481613623565b915060c088013561371481613623565b8091505092959891949750929550565b6000806040838503121561373757600080fd5b82359150602083013561374981613623565b809150509250929050565b6000806040838503121561376757600080fd5b823567ffffffffffffffff81111561377e57600080fd5b830160e0818603121561379057600080fd5b946020939093013593505050565b6000806000604084860312156137b357600080fd5b83356137be81613623565b9250602084013567ffffffffffffffff8111156137da57600080fd5b6137e68682870161359c565b9497909650939450505050565b634e487b7160e01b600052603260045260246000fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8183360301811261383d57600080fd5b9190910192915050565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff2183360301811261383d57600080fd5b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff811182821017156138b4576138b461387b565b60405290565b60405160e0810167ffffffffffffffff811182821017156138b4576138b461387b565b604051601f8201601f1916810167ffffffffffffffff811182821017156139065761390661387b565b604052919050565b80356004811061364357600080fd5b60006040828403121561392f57600080fd5b613937613891565b90506139428261390e565b815260208083013567ffffffffffffffff8082111561396057600080fd5b818501915085601f83011261397457600080fd5b8135818111156139865761398661387b565b61399884601f19601f840116016138dd565b915080825286848285010111156139ae57600080fd5b80848401858401376000908201840152918301919091525092915050565b6000604082840312156139de57600080fd5b6139e6613891565b9050813567ffffffffffffffff8111156139ff57600080fd5b613a0b8482850161391d565b8252506020820135602082015292915050565b600060e08236031215613a3057600080fd5b613a386138ba565b613a4183613638565b8152602083013567ffffffffffffffff80821115613a5e57600080fd5b613a6a368387016139cc565b6020840152613a7b60408601613638565b60408401526060850135915080821115613a9457600080fd5b50613aa1368286016139cc565b6060830152506080830135608082015260a083013560a082015260c083013560c082015280915050919050565b6000808335601e19843603018112613ae557600080fd5b83018035915067ffffffffffffffff821115613b0057600080fd5b60200191503681900382131561335857600080fd5b634e487b7160e01b600052601160045260246000fd5b60006000198203613b3e57613b3e613b15565b5060010190565b60008235603e19833603018112613b5b57600080fd5b90910192915050565b634e487b7160e01b600052602160045260246000fd5b60048110613b9857634e487b7160e01b600052602160045260246000fd5b9052565b6000613ba88283613b45565b60408452613bc160408501613bbc8361390e565b613b7a565b6020810135601e19823603018112613bd857600080fd5b0160208101903567ffffffffffffffff811115613bf457600080fd5b803603821315613c0357600080fd5b60406060860152806080860152808260a0870137600060a082870101526020840135602086015260a0601f19601f8301168601019250505092915050565b6020815260008235613c5281613623565b6001600160a01b038116602084015250613c6f6020840184613b45565b60e06040840152613c84610100840182613b9c565b90506040840135613c9481613623565b6001600160a01b038116606085015250613cb16060850185613b45565b601f19848303016080850152613cc78282613b9c565b915050608084013560a084015260a084013560c084015260c084013560e08401528091505092915050565b60005b83811015613d0d578181015183820152602001613cf5565b50506000910152565b60008151808452613d2e816020860160208601613cf2565b601f01601f19169290920160200192915050565b6000815160408452613d58604085018251613b7a565b6020015160406060850152613d706080850182613d16565b602093840151949093019390935250919050565b6060815260006001600160a01b03808651166060840152602086015160e06080850152613db5610140850182613d42565b604088015190921660a08501525060608601518382037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa00160c085015290613dfd8183613d42565b915050608086015160e084015260a086015161010084015260c08601516101208401528281036020840152613e328186613d16565b91505061230960408301846001600160a01b03169052565b60008235603e1983360301811261383d57600080fd5b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351613e98816017850160208801613cf2565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351613ed5816028840160208801613cf2565b01602801949350505050565b602081526000611dd36020830184613d16565b60006104d5368361391d565b600060208284031215613f1257600080fd5b611dd38261390e565b8183823760009101908152919050565b808201808211156104d5576104d5613b15565b80820281158282048414176104d5576104d5613b15565b600081613f6457613f64613b15565b506000190190565b83815260608101613f806020830185613b7a565b826040830152949350505050565b60008060408385031215613fa157600080fd5b8251613fac81613623565b6020939093015192949293505050565b600060208284031215613fce57600080fd5b81518015158114611dd357600080fd5b600060208284031215613ff057600080fd5b8151611dd381613623565b818103818111156104d5576104d5613b15565b634e487b7160e01b600052601260045260246000fd5b60008261404157634e487b7160e01b600052601260045260246000fd5b500490565b6000602080838503121561405957600080fd5b825167ffffffffffffffff8082111561407157600080fd5b818501915085601f83011261408557600080fd5b8151818111156140975761409761387b565b6140a5848260051b016138dd565b818152848101925060069190911b8301840190878211156140c557600080fd5b928401925b81841015611c0257604084890312156140e35760008081fd5b6140eb613891565b84516140f681613623565b8152848601516bffffffffffffffffffffffff811681146141175760008081fd5b81870152835260409390930192918401916140ca565b60006001600160a01b03808816835280871660208401525084604083015283606083015260a06080830152611c0260a0830184613d16565b6000825161383d818460208701613cf256fea2646970667358221220ade6588f4beea3a297dfec058606e0ac57e5483fd2ff085c6c7808d33552f83b64736f6c63430008150033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101da5760003560e01c80635c975abb11610104578063a217fddf116100a2578063da74222811610071578063da74222814610438578063e63ab1e91461044b578063ec03ce8214610472578063fb01d36b1461048557600080fd5b8063a217fddf14610402578063c46002881461040a578063ce1b815f14610413578063d547741f1461042557600080fd5b80638587177a116100de5780638587177a146103865780638830df0d1461039957806389de1d7a146103c057806391d14854146103c957600080fd5b80635c975abb1461035f5780636d8f06941461036b5780638456cb591461037e57600080fd5b80632f2ff15d1161017c5780633f4ba83a1161014b5780633f4ba83a1461030a5780634ac0c18314610312578063572b6c05146103395780635737e1961461034c57600080fd5b80632f2ff15d146102a657806336568abe146102b95780633abf6fd4146102cc5780633be89922146102f757600080fd5b806320158c44116101b857806320158c441461022f578063240de2771461025d578063248a9ca3146102705780632959bfed1461029357600080fd5b806301ffc9a7146101df5780630c8b6288146102075780631cdfe3d81461021c575b600080fd5b6101f26101ed36600461355a565b610498565b60405190151581526020015b60405180910390f35b61021a6102153660046135e1565b6104db565b005b61021a61022a366004613648565b6104f9565b61024f61023d366004613665565b60c96020526000908152604090205481565b6040519081526020016101fe565b61021a61026b36600461367e565b61052c565b61024f61027e366004613665565b60009081526065602052604090206001015490565b61021a6102a13660046136a0565b610565565b61021a6102b4366004613724565b6106c2565b61021a6102c7366004613724565b6106e7565b60fe546102df906001600160a01b031681565b6040516001600160a01b0390911681526020016101fe565b61021a610305366004613648565b61077f565b61021a610793565b61024f7f541943c4a49765b7940b4b1392c4b1f8ede6efd4e23572572987ae02e569a78681565b6101f2610347366004613648565b6107c8565b60c8546102df906001600160a01b031681565b61015f5460ff166101f2565b60fd546102df906001600160a01b031681565b61021a6107e3565b61021a610394366004613648565b610815565b61024f7f1d46dada6ac47de84b1e7381a753499bde9d44cc2b9eacc1ba89f2ac24be16cc81565b61024f60fb5481565b6101f26103d7366004613724565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b61024f600081565b61024f60fc5481565b61012d546001600160a01b03166102df565b61021a610433366004613724565b610829565b61021a610446366004613648565b61084e565b61024f7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b61021a610480366004613754565b610862565b61021a61049336600461379e565b6108e8565b60006301ffc9a760e01b7fffffffff00000000000000000000000000000000000000000000000000000000831614806104d557506104d582610981565b92915050565b6104e36109ff565b6104f56104ee610a55565b8383610a64565b5050565b7f541943c4a49765b7940b4b1392c4b1f8ede6efd4e23572572987ae02e569a78661052381610bd4565b6104f582610be5565b7f541943c4a49765b7940b4b1392c4b1f8ede6efd4e23572572987ae02e569a78661055681610bd4565b6105608383610c9d565b505050565b600054610100900460ff16158080156105855750600054600160ff909116105b8061059f5750303b15801561059f575060005460ff166001145b6106165760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b6000805460ff191660011790558015610639576000805461ff0019166101001790555b61064287610d86565b61064a610dfa565b610652610e65565b61065e86868686610edd565b61066782610f6c565b610672600089610fe0565b80156106b8576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050565b6000828152606560205260409020600101546106dd81610bd4565b6105608383610fe0565b6106ef610a55565b6001600160a01b0316816001600160a01b0316146107755760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c660000000000000000000000000000000000606482015260840161060d565b6104f58282611083565b600061078a81610bd4565b6104f582611124565b7f541943c4a49765b7940b4b1392c4b1f8ede6efd4e23572572987ae02e569a7866107bd81610bd4565b6107c56111d5565b50565b60006104d58261012d546001600160a01b0391821691161490565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a61080d81610bd4565b6107c561122e565b600061082081610bd4565b6104f58261126d565b60008281526065602052604090206001015461084481610bd4565b6105608383611083565b600061085981610bd4565b6104f58261131a565b61086a6109ff565b6108776020830183613648565b6001600160a01b0316610888610a55565b6001600160a01b0316146108de5760405162461bcd60e51b815260206004820152601760248201527f45786368616e6765436f72653a206e6f74206d616b6572000000000000000000604482015260640161060d565b6104f582826113f0565b7f1d46dada6ac47de84b1e7381a753499bde9d44cc2b9eacc1ba89f2ac24be16cc61091281610bd4565b61091a6109ff565b6001600160a01b0384166109705760405162461bcd60e51b815260206004820152600e60248201527f696e76616c69642073656e646572000000000000000000000000000000000000604482015260640161060d565b61097b848484610a64565b50505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b0000000000000000000000000000000000000000000000000000000014806104d557506301ffc9a760e01b7fffffffff000000000000000000000000000000000000000000000000000000008316146104d5565b61015f5460ff1615610a535760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015260640161060d565b565b6000610a5f611518565b905090565b8080610ab25760405162461bcd60e51b815260206004820152601660248201527f696e76616c69642065786368616e6765206d6174636800000000000000000000604482015260640161060d565b60005b81811015610bcd5736848483818110610ad057610ad06137f3565b9050602002810190610ae29190613809565b9050610b9a86610af28380613847565b610afb90613a1e565b610b086020850185613ace565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610b4a925050506040860186613847565b610b5390613a1e565b610b606060870187613ace565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061152292505050565b610bba86610ba88380613847565b610bb56040850185613847565b611714565b5080610bc581613b2b565b915050610ab5565b5050505050565b6107c581610be0610a55565b611844565b6001600160a01b038116610c3b5760405162461bcd60e51b815260206004820152601c60248201527f696e76616c69642064656661756c742066656520726563656976657200000000604482015260640161060d565b60fe805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040519081527f5d039c612419cd7b6696e7d5c8ccaef3362188cc98db01e07fb55bb85b33541d906020015b60405180910390a150565b6113888210610cee5760405162461bcd60e51b815260206004820152601360248201527f696e76616c6964207072696d6172792066656500000000000000000000000000604482015260640161060d565b6113888110610d3f5760405162461bcd60e51b815260206004820152601460248201527f696e76616c6964207365636f6461727920666565000000000000000000000000604482015260640161060d565b60fb82905560fc81905560408051838152602081018390527ffa4067f2d0249edb7594284cabb394f2ec0e4f6168dbd1e3a63f861b67f1188f910160405180910390a15050565b600054610100900460ff16610df15760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b606482015260840161060d565b6107c58161131a565b600054610100900460ff16610a535760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b606482015260840161060d565b600054610100900460ff16610ed05760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b606482015260840161060d565b61015f805460ff19169055565b600054610100900460ff16610f485760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b606482015260840161060d565b610f50610dfa565b610f5a8484610c9d565b610f6381611124565b61097b82610be5565b600054610100900460ff16610fd75760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b606482015260840161060d565b6107c58161126d565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff166104f55760008281526065602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561103f610a55565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16156104f55760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191690556110e0610a55565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b6001600160a01b03811661117a5760405162461bcd60e51b815260206004820152601a60248201527f696e76616c696420526f79616c74696573205265676973747279000000000000604482015260640161060d565b60fd805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040519081527f6932f02a24181a8c1b9fa7bdc7453f15ecba05c354c9da94e97bac1abb13397890602001610c92565b6111dd6118b9565b61015f805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa611211610a55565b6040516001600160a01b03909116815260200160405180910390a1565b6112366109ff565b61015f805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611211610a55565b6001600160a01b0381166112c35760405162461bcd60e51b815260206004820152601760248201527f696e76616c6964206f726465722076616c696461746f72000000000000000000604482015260640161060d565b60c8805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040517ff605132f819f46ab9f362495c159c83b8a080f3b8b22f8a684018837eae0bed390600090a250565b61012d546001600160a01b03908116908216036113795760405162461bcd60e51b815260206004820152601560248201527f666f7277617264657220616c7265616479207365740000000000000000000000604482015260640161060d565b611381610a55565b61012d546040516001600160a01b03928316928481169216907f8ca022029d8ff7ad974913f8970aeed6c5e0e7eaf494a0c5b262249f6b5759e590600090a461012d805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b816080013560000361146a5760405162461bcd60e51b815260206004820152602260248201527f45786368616e6765436f72653a20302073616c742063616e277420626520757360448201527f6564000000000000000000000000000000000000000000000000000000000000606482015260840161060d565b60006114758361190c565b90508181146114c65760405162461bcd60e51b815260206004820152601f60248201527f45786368616e6765436f72653a20496e76616c6964206f726465724861736800604482015260640161060d565b600082815260c960205260409081902060001990555182907f34e97b51b26b1b4b5889b90f9702b02688ef22aaf1679d0d697a7518de60abfa9061150b908690613c41565b60405180910390a2505050565b6000610a5f61199d565b60c8546040517fb45230ec0000000000000000000000000000000000000000000000000000000081526001600160a01b039091169063b45230ec9061156f90879087908a90600401613d84565b60006040518083038186803b15801561158757600080fd5b505afa15801561159b573d6000803e3d6000fd5b505060c8546040517fb45230ec0000000000000000000000000000000000000000000000000000000081526001600160a01b03909116925063b45230ec91506115ec90859085908a90600401613d84565b60006040518083038186803b15801561160457600080fd5b505afa158015611618573d6000803e3d6000fd5b5050505060408401516001600160a01b0316156116985783604001516001600160a01b031682600001516001600160a01b0316146116985760405162461bcd60e51b815260206004820152601660248201527f6c6566744f726465722e74616b6572206661696c656400000000000000000000604482015260640161060d565b60408201516001600160a01b031615610bcd5783600001516001600160a01b031682604001516001600160a01b031614610bcd5760405162461bcd60e51b815260206004820152601760248201527f72696768744f726465722e74616b6572206661696c6564000000000000000000604482015260640161060d565b600061174c6117266020850185613e4a565b6117309080613e4a565b61173d6060850185613e4a565b6117479080613e4a565b6119f1565b905060006117776117606060860186613e4a565b61176a9080613e4a565b61173d6020860186613e4a565b90506000611786868686611c0d565b6040805160a081019091526060810185815282516080830152815290915061183c90602081016117bd6117b889613a1e565b611dda565b81526020908101906117d190890189613648565b6001600160a01b031690526040805160a08101909152606081018581526020858101516080840152908252810161180a6117b889613a1e565b815260209081019061181e90890189613648565b6001600160a01b03169052855185516118379190611e95565b611f20565b505050505050565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff166104f55761187781611fbd565b611882836020611fcf565b604051602001611893929190613e60565b60408051601f198184030181529082905262461bcd60e51b825261060d91600401613ee1565b61015f5460ff16610a535760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015260640161060d565b600061191b6020830183613648565b61194361192b6020850185613e4a565b6119359080613e4a565b61193e90613ef4565b6121f8565b61195361192b6060860186613e4a565b604080516001600160a01b03909416602085015283019190915260608201526080808401359082015260a0015b604051602081830303815290604052805190602001209050919050565b61012d546000906001600160a01b0316331480156119bc575060143610155b156119ec57507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec36013560601c90565b503390565b6040805180820190915260008152606060208201526000611a156020850185613f00565b90506000611a266020850185613f00565b90506000826003811115611a3c57611a3c613b64565b03611a895760405162461bcd60e51b815260206004820152601760248201527f6e6f7420666f756e64204941737365744d617463686572000000000000000000604482015260640161060d565b6000816003811115611a9d57611a9d613b64565b03611aea5760405162461bcd60e51b815260206004820152601760248201527f6e6f7420666f756e64204941737365744d617463686572000000000000000000604482015260640161060d565b806003811115611afc57611afc613b64565b826003811115611b0e57611b0e613b64565b14611b5b5760405162461bcd60e51b815260206004820152601260248201527f61737365747320646f6e2774206d617463680000000000000000000000000000604482015260640161060d565b6000611b6a6020870187613ace565b604051611b78929190613f1b565b60405190819003902090506000611b926020870187613ace565b604051611ba0929190613f1b565b60405180910390209050808214611bf95760405162461bcd60e51b815260206004820152601260248201527f61737365747320646f6e2774206d617463680000000000000000000000000000604482015260640161060d565b611c0287613ef4565b979650505050505050565b60408051808201909152600080825260208201526000611c2c8461190c565b90506000611c398461190c565b90506000611c4b86608001358461223a565b90506000611c5d86608001358461223a565b9050611c6b87878484612261565b945060008560200151118015611c815750845115155b611ccd5760405162461bcd60e51b815260206004820152600f60248201527f6e6f7468696e6720746f2066696c6c0000000000000000000000000000000000604482015260640161060d565b608087013515611cf6576020850151611ce69083613f2b565b600085815260c960205260409020555b608086013515611d1c578451611d0c9082613f2b565b600084815260c960205260409020555b600084815260c960209081526040808320548684529220546001600160a01b038b16927ff1133ed5e330ee3f63885c4d2ed888f41e54352d2fdcf6db454a80518c77ab7892889288928b92909190611d76908f018f613e4a565b602001358d8060200190611d8a9190613e4a565b60408051978852602088810197909752855190880152938501516060870152608086019290925260a085015260c0840152013560e08201526101000160405180910390a2505050505b9392505050565b60408051600180825281830190925260609160009190816020015b6040805180820190915260008082526020820152815260200190600190039081611df5579050509050826000015181600081518110611e3657611e366137f3565b6020026020010151600001906001600160a01b031690816001600160a01b03168152505061271081600081518110611e7057611e706137f3565b6020908102919091018101516bffffffffffffffffffffffff90921691015292915050565b60006001836003811115611eab57611eab613b64565b148015611eca57506001826003811115611ec757611ec7613b64565b14155b15611ed7575060016104d5565b6001826003811115611eeb57611eeb613b64565b148015611f0a57506001836003811115611f0757611f07613b64565b14155b15611f17575060026104d5565b50600092915050565b6001816002811115611f3457611f34613b64565b03611f6057611f438383612311565b815180516020918201516040850151928601516105609390612619565b6002816002811115611f7457611f74613b64565b03611fa057611f838284612311565b825180516020918201516040860151928501516105609390612619565b82518051602091820151604086015192850151611f439390612619565b60606104d56001600160a01b03831660145b60606000611fde836002613f3e565b611fe9906002613f2b565b67ffffffffffffffff8111156120015761200161387b565b6040519080825280601f01601f19166020018201604052801561202b576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110612062576120626137f3565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106120c5576120c56137f3565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000612101846002613f3e565b61210c906001613f2b565b90505b60018111156121a9577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061214d5761214d6137f3565b1a60f81b828281518110612163576121636137f3565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c936121a281613f55565b905061210f565b508315611dd35760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161060d565b8051602080830151805190820120604051600093611980937f75aacb2727a36600741802d07994792d9d768ee841822bca87180d320cea991293919201613f6c565b60008260000361224c575060006104d5565b50600090815260c96020526040902054919050565b60408051808201909152600080825260208201526000806122828786612852565b915091506000806122938887612852565b91509150838111156122d6576122cb84846122b160208c018c613e4a565b602001356122c260608d018d613e4a565b602001356128a7565b945050505050612309565b6123026122e660208b018b613e4a565b602001356122f760608c018c613e4a565b602001358484612933565b9450505050505b949350505050565b815160200151604083015161235e906001600160a01b031660009081527f90916b45ad713ccdf8d945eab9f58d0d1cfed58f8e47d57192d063a0ddbfe292602052604090205460ff161590565b1561260457825180518351516020808601519301516040870151612384949186916129c0565b60408051600180825281830190925291925060009190816020015b604080518082019091526000808252602082015281526020019060019003908161239f57505060fe5481519192506001600160a01b03169082906000906123e8576123e86137f3565b60209081029190910101516001600160a01b0390911690526000600384515151600381111561241957612419613b64565b14806124395750600284515151600381111561243757612437613b64565b145b1561256b578351516020908101518051600092839261245d92810182019101613f8e565b6040516301ffc9a760e01b815263a30b4db960e01b600482015291935091506001600160a01b038316906301ffc9a790602401602060405180830381865afa9250505080156124c9575060408051601f3d908101601f191682019092526124c691810190613fbc565b60015b156125685780156125665760405163a30b4db960e01b8152600481018390526000906001600160a01b0385169063a30b4db990602401602060405180830381865afa15801561251c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125409190613fde565b9050806001600160a01b031688604001516001600160a01b03160361256457600194505b505b505b50505b80156125ab5760fb5482600081518110612587576125876137f3565b6020908102919091018101516bffffffffffffffffffffffff9092169101526125e1565b60fc54826000815181106125c1576125c16137f3565b6020908102919091018101516bffffffffffffffffffffffff9092169101525b8451805160209091015160408701516125fe929186918690612d49565b50925050505b82515160408401516020840151610560929184915b600081511161268f5760405162461bcd60e51b8152602060048201526024808201527f7472616e736665725061796f7574733a206e6f7468696e6720746f207472616e60448201527f7366657200000000000000000000000000000000000000000000000000000000606482015260840161060d565b600083815b600184516126a29190613ffb565b8110156127835760006126e98583815181106126c0576126c06137f3565b6020026020010151602001516bffffffffffffffffffffffff1688612e1a90919063ffffffff16565b90508482815181106126fd576126fd6137f3565b6020026020010151602001516bffffffffffffffffffffffff16846127229190613f2b565b93508015612772576127348184613ffb565b925061277260405180604001604052808a81526020018381525087878581518110612761576127616137f3565b602002602001015160000151612e33565b5061277c81613b2b565b9050612694565b50600083600185516127959190613ffb565b815181106127a5576127a56137f3565b6020026020010151905080602001516bffffffffffffffffffffffff16836127cd9190613f2b565b925082612710146128205760405162461bcd60e51b815260206004820152601e60248201527f53756d207061796f75747320427073206e6f7420657175616c20313030250000604482015260640161060d565b811561284957612849604051806040016040528089815260200184815250868360000151612e33565b50505050505050565b600080826128636060860186613e4a565b602001356128719190613ffb565b905061289e6128836020860186613e4a565b602001356128946060870187613e4a565b6020013583612f7b565b91509250929050565b604080518082019091526000808252602082015260006128c8858585612f7b565b90508581111561291a5760405162461bcd60e51b815260206004820152601860248201527f66696c6c4c6566743a20756e61626c6520746f2066696c6c0000000000000000604482015260640161060d565b5050604080518082019091529384525050602082015290565b60408051808201909152600080825260208201526000612954838787612f7b565b9050838111156129a65760405162461bcd60e51b815260206004820152601960248201527f66696c6c52696768743a20756e61626c6520746f2066696c6c00000000000000604482015260640161060d565b604080518082019091529283526020830152509392505050565b6000806129cc87612fea565b90506003875160038111156129e3576129e3613b64565b1480612a0157506002875160038111156129ff576129ff613b64565b145b15612bdd576000808860200151806020019051810190612a219190613f8e565b6040516301ffc9a760e01b815263a30b4db960e01b600482015291935091506001600160a01b038316906301ffc9a790602401602060405180830381865afa925050508015612a8d575060408051601f3d908101601f19168201909252612a8a91810190613fbc565b60015b15612bda578015612bd85760405163a30b4db960e01b8152600481018390526000906001600160a01b0385169063a30b4db990602401602060405180830381865afa158015612ae0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b049190613fde565b905089516001148015612b465750806001600160a01b03168a600081518110612b2f57612b2f6137f3565b6020026020010151600001516001600160a01b0316145b15612bd65761138885600081518110612b6157612b616137f3565b6020026020010151602001516bffffffffffffffffffffffff161115612bc95760405162461bcd60e51b815260206004820152601d60248201527f526f79616c746965732061726520746f6f206869676820283e35302529000000604482015260640161060d565b8895505050505050612d3f565b505b505b50505b80516001148015612bef575085516001145b8015612c48575085600081518110612c0957612c096137f3565b6020026020010151600001516001600160a01b031681600081518110612c3157612c316137f3565b6020026020010151600001516001600160a01b0316145b15612cd45761138881600081518110612c6357612c636137f3565b6020026020010151602001516bffffffffffffffffffffffff161115612ccb5760405162461bcd60e51b815260206004820152601d60248201527f526f79616c746965732061726520746f6f206869676820283e35302529000000604482015260640161060d565b84915050612d3f565b600080612ce48a88888689612d49565b91509150611388811115612d3a5760405162461bcd60e51b815260206004820152601d60248201527f526f79616c746965732061726520746f6f206869676820283e35302529000000604482015260640161060d565b509150505b9695505050505050565b836000805b8451811015612e0f57848181518110612d6957612d696137f3565b6020026020010151602001516bffffffffffffffffffffffff1682612d8e9190613f2b565b91506000612dc88488888581518110612da957612da96137f3565b6020026020010151602001516bffffffffffffffffffffffff166130e2565b90945090508015612dfe57612dfe60405180604001604052808b81526020018381525086888581518110612761576127616137f3565b50612e0881613b2b565b9050612d4e565b509550959350505050565b6000612710612e298385613f3e565b611dd39190614024565b60028351516003811115612e4957612e49613b64565b03612ed157600080846000015160200151806020019051810190612e6d9190613f8e565b915091508460200151600114612ec55760405162461bcd60e51b815260206004820152601260248201527f6572633732312076616c7565206572726f720000000000000000000000000000604482015260640161060d565b610bcd82858584613104565b60018351516003811115612ee757612ee7613b64565b03612f1c576000836000015160200151806020019051810190612f0a9190613fde565b905061097b8184848760200151613183565b60038351516003811115612f3257612f32613b64565b0361056057600080846000015160200151806020019051810190612f569190613f8e565b91509150610bcd8285858489602001516040518060200160405280600081525061320b565b6000612f88848484613292565b15612fd55760405162461bcd60e51b815260206004820152600e60248201527f726f756e64696e67206572726f72000000000000000000000000000000000000604482015260640161060d565b82612fe08386613f3e565b6123099190614024565b606060038251600381111561300157613001613b64565b148061301f575060028251600381111561301d5761301d613b64565b145b156130da57600080836020015180602001905181019061303f9190613f8e565b60fd546040517f9ca7dc7a0000000000000000000000000000000000000000000000000000000081526001600160a01b038085166004830152602482018490529395509193509190911690639ca7dc7a906044016000604051808303816000875af11580156130b2573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526123099190810190614046565b506060919050565b6000806130f8856130f38686612e1a565b613332565b91509150935093915050565b6040517f42842e0e0000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301528381166024830152604482018390528516906342842e0e90606401600060405180830381600087803b15801561316f57600080fd5b505af11580156106b8573d6000803e3d6000fd5b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd0000000000000000000000000000000000000000000000000000000017905261097b90859061335f565b6040517ff242432a0000000000000000000000000000000000000000000000000000000081526001600160a01b0387169063f242432a90613258908890889088908890889060040161412d565b600060405180830381600087803b15801561327257600080fd5b505af1158015613286573d6000803e3d6000fd5b50505050505050505050565b6000826000036132e45760405162461bcd60e51b815260206004820152601060248201527f6469766973696f6e206279207a65726f00000000000000000000000000000000604482015260640161060d565b8115806132ef575083155b156132fc57506000611dd3565b6000838061330c5761330c61400e565b858409905061331b8386613f3e565b613327826103e8613f3e565b101595945050505050565b60008082841115613351576133478385613ffb565b9150829050613358565b5060009050825b9250929050565b60006133b4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166134479092919063ffffffff16565b90508051600014806133d55750808060200190518101906133d59190613fbc565b6105605760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840161060d565b6060612309848460008585600080866001600160a01b0316858760405161346e9190614165565b60006040518083038185875af1925050503d80600081146134ab576040519150601f19603f3d011682016040523d82523d6000602084013e6134b0565b606091505b5091509150611c02878383876060831561352b578251600003613524576001600160a01b0385163b6135245760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161060d565b5081612309565b61230983838151156135405781518083602001fd5b8060405162461bcd60e51b815260040161060d9190613ee1565b60006020828403121561356c57600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114611dd357600080fd5b60008083601f8401126135ae57600080fd5b50813567ffffffffffffffff8111156135c657600080fd5b6020830191508360208260051b850101111561335857600080fd5b600080602083850312156135f457600080fd5b823567ffffffffffffffff81111561360b57600080fd5b6136178582860161359c565b90969095509350505050565b6001600160a01b03811681146107c557600080fd5b803561364381613623565b919050565b60006020828403121561365a57600080fd5b8135611dd381613623565b60006020828403121561367757600080fd5b5035919050565b6000806040838503121561369157600080fd5b50508035926020909101359150565b600080600080600080600060e0888a0312156136bb57600080fd5b87356136c681613623565b965060208801356136d681613623565b9550604088013594506060880135935060808801356136f481613623565b925060a088013561370481613623565b915060c088013561371481613623565b8091505092959891949750929550565b6000806040838503121561373757600080fd5b82359150602083013561374981613623565b809150509250929050565b6000806040838503121561376757600080fd5b823567ffffffffffffffff81111561377e57600080fd5b830160e0818603121561379057600080fd5b946020939093013593505050565b6000806000604084860312156137b357600080fd5b83356137be81613623565b9250602084013567ffffffffffffffff8111156137da57600080fd5b6137e68682870161359c565b9497909650939450505050565b634e487b7160e01b600052603260045260246000fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8183360301811261383d57600080fd5b9190910192915050565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff2183360301811261383d57600080fd5b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff811182821017156138b4576138b461387b565b60405290565b60405160e0810167ffffffffffffffff811182821017156138b4576138b461387b565b604051601f8201601f1916810167ffffffffffffffff811182821017156139065761390661387b565b604052919050565b80356004811061364357600080fd5b60006040828403121561392f57600080fd5b613937613891565b90506139428261390e565b815260208083013567ffffffffffffffff8082111561396057600080fd5b818501915085601f83011261397457600080fd5b8135818111156139865761398661387b565b61399884601f19601f840116016138dd565b915080825286848285010111156139ae57600080fd5b80848401858401376000908201840152918301919091525092915050565b6000604082840312156139de57600080fd5b6139e6613891565b9050813567ffffffffffffffff8111156139ff57600080fd5b613a0b8482850161391d565b8252506020820135602082015292915050565b600060e08236031215613a3057600080fd5b613a386138ba565b613a4183613638565b8152602083013567ffffffffffffffff80821115613a5e57600080fd5b613a6a368387016139cc565b6020840152613a7b60408601613638565b60408401526060850135915080821115613a9457600080fd5b50613aa1368286016139cc565b6060830152506080830135608082015260a083013560a082015260c083013560c082015280915050919050565b6000808335601e19843603018112613ae557600080fd5b83018035915067ffffffffffffffff821115613b0057600080fd5b60200191503681900382131561335857600080fd5b634e487b7160e01b600052601160045260246000fd5b60006000198203613b3e57613b3e613b15565b5060010190565b60008235603e19833603018112613b5b57600080fd5b90910192915050565b634e487b7160e01b600052602160045260246000fd5b60048110613b9857634e487b7160e01b600052602160045260246000fd5b9052565b6000613ba88283613b45565b60408452613bc160408501613bbc8361390e565b613b7a565b6020810135601e19823603018112613bd857600080fd5b0160208101903567ffffffffffffffff811115613bf457600080fd5b803603821315613c0357600080fd5b60406060860152806080860152808260a0870137600060a082870101526020840135602086015260a0601f19601f8301168601019250505092915050565b6020815260008235613c5281613623565b6001600160a01b038116602084015250613c6f6020840184613b45565b60e06040840152613c84610100840182613b9c565b90506040840135613c9481613623565b6001600160a01b038116606085015250613cb16060850185613b45565b601f19848303016080850152613cc78282613b9c565b915050608084013560a084015260a084013560c084015260c084013560e08401528091505092915050565b60005b83811015613d0d578181015183820152602001613cf5565b50506000910152565b60008151808452613d2e816020860160208601613cf2565b601f01601f19169290920160200192915050565b6000815160408452613d58604085018251613b7a565b6020015160406060850152613d706080850182613d16565b602093840151949093019390935250919050565b6060815260006001600160a01b03808651166060840152602086015160e06080850152613db5610140850182613d42565b604088015190921660a08501525060608601518382037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa00160c085015290613dfd8183613d42565b915050608086015160e084015260a086015161010084015260c08601516101208401528281036020840152613e328186613d16565b91505061230960408301846001600160a01b03169052565b60008235603e1983360301811261383d57600080fd5b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351613e98816017850160208801613cf2565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351613ed5816028840160208801613cf2565b01602801949350505050565b602081526000611dd36020830184613d16565b60006104d5368361391d565b600060208284031215613f1257600080fd5b611dd38261390e565b8183823760009101908152919050565b808201808211156104d5576104d5613b15565b80820281158282048414176104d5576104d5613b15565b600081613f6457613f64613b15565b506000190190565b83815260608101613f806020830185613b7a565b826040830152949350505050565b60008060408385031215613fa157600080fd5b8251613fac81613623565b6020939093015192949293505050565b600060208284031215613fce57600080fd5b81518015158114611dd357600080fd5b600060208284031215613ff057600080fd5b8151611dd381613623565b818103818111156104d5576104d5613b15565b634e487b7160e01b600052601260045260246000fd5b60008261404157634e487b7160e01b600052601260045260246000fd5b500490565b6000602080838503121561405957600080fd5b825167ffffffffffffffff8082111561407157600080fd5b818501915085601f83011261408557600080fd5b8151818111156140975761409761387b565b6140a5848260051b016138dd565b818152848101925060069190911b8301840190878211156140c557600080fd5b928401925b81841015611c0257604084890312156140e35760008081fd5b6140eb613891565b84516140f681613623565b8152848601516bffffffffffffffffffffffff811681146141175760008081fd5b81870152835260409390930192918401916140ca565b60006001600160a01b03808816835280871660208401525084604083015283606083015260a06080830152611c0260a0830184613d16565b6000825161383d818460208701613cf256fea2646970667358221220ade6588f4beea3a297dfec058606e0ac57e5483fd2ff085c6c7808d33552f83b64736f6c63430008150033", + "devdoc": { + "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": { + "hash": "order hash" + } + }, + "DefaultFeeReceiverSet(address)": { + "params": { + "newDefaultFeeReceiver": "address that gets the fees" + } + }, + "Initialized(uint8)": { + "details": "Triggered when the contract has been initialized or reinitialized." + }, + "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": { + "__Exchange_init(address,address,uint256,uint256,address,address,address)": { + "params": { + "admin": "the admin user that can grant/revoke roles, etc.", + "newDefaultFeeReceiver": "market fee receiver", + "newProtocolFeePrimary": "protocol fee applied for primary markets", + "newProtocolFeeSecondary": "protocol fee applied for secondary markets", + "newRoyaltiesProvider": "registry for the different types of royalties", + "newTrustedForwarder": "address for trusted forwarder that will execute meta transactions", + "orderValidatorAddress": "new OrderValidator contract address" + } + }, + "cancel((address,((uint8,bytes),uint256),address,((uint8,bytes),uint256),uint256,uint256,uint256),bytes32)": { + "details": "require msg sender to be order maker and salt different from 0", + "params": { + "order": "to be canceled", + "orderKeyHash": "used as a checksum to avoid mistakes in the values of order" + } + }, + "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}." + }, + "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`." + }, + "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)[])": { + "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 that gets the fees" + } + }, + "setOrderValidatorContract(address)": { + "params": { + "contractAddress": "new OrderValidator contract address" + } + }, + "setProtocolFee(uint256,uint256)": { + "params": { + "newProtocolFeePrimary": "fee for primary market", + "newProtocolFeeSecondary": "fee for secondary market" + } + }, + "setRoyaltiesRegistry(address)": { + "params": { + "newRoyaltiesRegistry": "address of new royalties registry" + } + }, + "setTrustedForwarder(address)": { + "params": { + "newTrustedForwarder": "The new trustedForwarder" + } + }, + "supportsInterface(bytes4)": { + "params": { + "interfaceId": "interface id to check" + } + } + }, + "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 signaling that an order was canceled" + }, + "DefaultFeeReceiverSet(address)": { + "notice": "event for when a default fee receiver is set" + }, + "ProtocolFeeSet(uint256,uint256)": { + "notice": "event for when protocol fees are set" + }, + "RoyaltiesRegistrySet(address)": { + "notice": "event for when a royalties registry is set" + }, + "TrustedForwarderSet(address,address,address)": { + "notice": "Emitted when a `newTrustedForwarder` is set, replacing the `oldTrustedForwarder`" + } + }, + "kind": "user", + "methods": { + "ERC1776_OPERATOR_ROLE()": { + "notice": "role erc1776 trusted meta transaction contracts (Sand for example)." + }, + "EXCHANGE_ADMIN_ROLE()": { + "notice": "role business addresses that can change for example: fees and royalties" + }, + "PAUSER_ROLE()": { + "notice": "role business addresses that can react on an emergency, pause" + }, + "__Exchange_init(address,address,uint256,uint256,address,address,address)": { + "notice": "Exchange contract initializer" + }, + "cancel((address,((uint8,bytes),uint256),address,((uint8,bytes),uint256),uint256,uint256,uint256),bytes32)": { + "notice": "cancel order" + }, + "defaultFeeReceiver()": { + "notice": "Default receiver of protocol fees" + }, + "fills(bytes32)": { + "notice": "stores the fills for orders" + }, + "getTrustedForwarder()": { + "notice": "return the address of the trusted forwarder" + }, + "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" + }, + "orderValidator()": { + "notice": "OrderValidator contract" + }, + "protocolFeePrimary()": { + "notice": "fee for primary sales" + }, + "protocolFeeSecondary()": { + "notice": "fee for secondary sales" + }, + "royaltiesRegistry()": { + "notice": "Registry for the different royalties" + }, + "setDefaultFeeReceiver(address)": { + "notice": "setter for default fee receiver" + }, + "setOrderValidatorContract(address)": { + "notice": "set OrderValidator address" + }, + "setProtocolFee(uint256,uint256)": { + "notice": "setter for protocol fees" + }, + "setRoyaltiesRegistry(address)": { + "notice": "setter for royalty registry" + }, + "setTrustedForwarder(address)": { + "notice": "Change the address of the trusted forwarder for meta-transactions" + }, + "supportsInterface(bytes4)": { + "notice": "See {IERC165-supportsInterface}." + }, + "unpause()": { + "notice": "Returns to normal state." + } + }, + "notice": "Used to exchange assets, that is, tokens.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 586, + "contract": "@sandbox-smart-contracts/marketplace/contracts/exchange/Exchange.sol:Exchange", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 589, + "contract": "@sandbox-smart-contracts/marketplace/contracts/exchange/Exchange.sol:Exchange", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 1974, + "contract": "@sandbox-smart-contracts/marketplace/contracts/exchange/Exchange.sol:Exchange", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 2900, + "contract": "@sandbox-smart-contracts/marketplace/contracts/exchange/Exchange.sol:Exchange", + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 39, + "contract": "@sandbox-smart-contracts/marketplace/contracts/exchange/Exchange.sol:Exchange", + "label": "_roles", + "offset": 0, + "slot": "101", + "type": "t_mapping(t_bytes32,t_struct(RoleData)34_storage)" + }, + { + "astId": 334, + "contract": "@sandbox-smart-contracts/marketplace/contracts/exchange/Exchange.sol:Exchange", + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 7469, + "contract": "@sandbox-smart-contracts/marketplace/contracts/exchange/Exchange.sol:Exchange", + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 4490, + "contract": "@sandbox-smart-contracts/marketplace/contracts/exchange/Exchange.sol:Exchange", + "label": "orderValidator", + "offset": 0, + "slot": "200", + "type": "t_contract(IOrderValidator)5918" + }, + { + "astId": 4502, + "contract": "@sandbox-smart-contracts/marketplace/contracts/exchange/Exchange.sol:Exchange", + "label": "fills", + "offset": 0, + "slot": "201", + "type": "t_mapping(t_bytes32,t_uint256)" + }, + { + "astId": 5035, + "contract": "@sandbox-smart-contracts/marketplace/contracts/exchange/Exchange.sol:Exchange", + "label": "__gap", + "offset": 0, + "slot": "202", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 7501, + "contract": "@sandbox-smart-contracts/marketplace/contracts/exchange/Exchange.sol:Exchange", + "label": "protocolFeePrimary", + "offset": 0, + "slot": "251", + "type": "t_uint256" + }, + { + "astId": 7504, + "contract": "@sandbox-smart-contracts/marketplace/contracts/exchange/Exchange.sol:Exchange", + "label": "protocolFeeSecondary", + "offset": 0, + "slot": "252", + "type": "t_uint256" + }, + { + "astId": 7508, + "contract": "@sandbox-smart-contracts/marketplace/contracts/exchange/Exchange.sol:Exchange", + "label": "royaltiesRegistry", + "offset": 0, + "slot": "253", + "type": "t_contract(IRoyaltiesProvider)5936" + }, + { + "astId": 7511, + "contract": "@sandbox-smart-contracts/marketplace/contracts/exchange/Exchange.sol:Exchange", + "label": "defaultFeeReceiver", + "offset": 0, + "slot": "254", + "type": "t_address" + }, + { + "astId": 8453, + "contract": "@sandbox-smart-contracts/marketplace/contracts/exchange/Exchange.sol:Exchange", + "label": "__gap", + "offset": 0, + "slot": "255", + "type": "t_array(t_uint256)46_storage" + }, + { + "astId": 3992, + "contract": "@sandbox-smart-contracts/marketplace/contracts/exchange/Exchange.sol:Exchange", + "label": "_trustedForwarder", + "offset": 0, + "slot": "301", + "type": "t_address" + }, + { + "astId": 4103, + "contract": "@sandbox-smart-contracts/marketplace/contracts/exchange/Exchange.sol:Exchange", + "label": "__gap", + "offset": 0, + "slot": "302", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 769, + "contract": "@sandbox-smart-contracts/marketplace/contracts/exchange/Exchange.sol:Exchange", + "label": "_paused", + "offset": 0, + "slot": "351", + "type": "t_bool" + }, + { + "astId": 874, + "contract": "@sandbox-smart-contracts/marketplace/contracts/exchange/Exchange.sol:Exchange", + "label": "__gap", + "offset": 0, + "slot": "352", + "type": "t_array(t_uint256)49_storage" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)46_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[46]", + "numberOfBytes": "1472" + }, + "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)5918": { + "encoding": "inplace", + "label": "contract IOrderValidator", + "numberOfBytes": "20" + }, + "t_contract(IRoyaltiesProvider)5936": { + "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(RoleData)34_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32", + "value": "t_struct(RoleData)34_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_struct(RoleData)34_storage": { + "encoding": "inplace", + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "astId": 31, + "contract": "@sandbox-smart-contracts/marketplace/contracts/exchange/Exchange.sol:Exchange", + "label": "members", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 33, + "contract": "@sandbox-smart-contracts/marketplace/contracts/exchange/Exchange.sol:Exchange", + "label": "adminRole", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ], + "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..edecd6bbb2 --- /dev/null +++ b/packages/deploy/deployments/mumbai/Exchange_Proxy.json @@ -0,0 +1,341 @@ +{ + "address": "0xC3538BB4771c88ee03EB5d837559327aAaC6f851", + "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": "0xdee56fc7107c4ed4f6677581667c2a991a4af5d28ba3a1fe51d5e52b41b959d8", + "receipt": { + "to": null, + "from": "0x5F890c9522dCE5670d741D4277BFCC2d9cA8Af02", + "contractAddress": "0xC3538BB4771c88ee03EB5d837559327aAaC6f851", + "transactionIndex": 7, + "gasUsed": "897699", + "logsBloom": "0x00000004000000000000000000000000400000000000000000000080020000000102000002008400000000000001000000008000000000000400000000000000000000000000080000000000000102808000000000000000000100000000000000000000020000000000020000000800000002800800008080000000000000000400010040000000000000000000000000000000200080000400000000a00000200000000000000000000000000400000000000000000000001000000000004000000020000002000401000000040000000000000430000108108004000020002008000200000080000000000000100004000000000000000000020000100000", + "blockHash": "0xbb5a619307f98145c365178da44db7075478e0d91aa678b6b69c70aeb0f3a109", + "transactionHash": "0xdee56fc7107c4ed4f6677581667c2a991a4af5d28ba3a1fe51d5e52b41b959d8", + "logs": [ + { + "transactionIndex": 7, + "blockNumber": 40870213, + "transactionHash": "0xdee56fc7107c4ed4f6677581667c2a991a4af5d28ba3a1fe51d5e52b41b959d8", + "address": "0xC3538BB4771c88ee03EB5d837559327aAaC6f851", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000f29d66157f23c3a9981c0626742e9fb2f7da80a8" + ], + "data": "0x", + "logIndex": 19, + "blockHash": "0xbb5a619307f98145c365178da44db7075478e0d91aa678b6b69c70aeb0f3a109" + }, + { + "transactionIndex": 7, + "blockNumber": 40870213, + "transactionHash": "0xdee56fc7107c4ed4f6677581667c2a991a4af5d28ba3a1fe51d5e52b41b959d8", + "address": "0xC3538BB4771c88ee03EB5d837559327aAaC6f851", + "topics": [ + "0x8ca022029d8ff7ad974913f8970aeed6c5e0e7eaf494a0c5b262249f6b5759e5", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000069015912aa33720b842dcd6ac059ed623f28d9f7", + "0x0000000000000000000000005f890c9522dce5670d741d4277bfcc2d9ca8af02" + ], + "data": "0x", + "logIndex": 20, + "blockHash": "0xbb5a619307f98145c365178da44db7075478e0d91aa678b6b69c70aeb0f3a109" + }, + { + "transactionIndex": 7, + "blockNumber": 40870213, + "transactionHash": "0xdee56fc7107c4ed4f6677581667c2a991a4af5d28ba3a1fe51d5e52b41b959d8", + "address": "0xC3538BB4771c88ee03EB5d837559327aAaC6f851", + "topics": [ + "0xfa4067f2d0249edb7594284cabb394f2ec0e4f6168dbd1e3a63f861b67f1188f" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fa", + "logIndex": 21, + "blockHash": "0xbb5a619307f98145c365178da44db7075478e0d91aa678b6b69c70aeb0f3a109" + }, + { + "transactionIndex": 7, + "blockNumber": 40870213, + "transactionHash": "0xdee56fc7107c4ed4f6677581667c2a991a4af5d28ba3a1fe51d5e52b41b959d8", + "address": "0xC3538BB4771c88ee03EB5d837559327aAaC6f851", + "topics": [ + "0x6932f02a24181a8c1b9fa7bdc7453f15ecba05c354c9da94e97bac1abb133978" + ], + "data": "0x000000000000000000000000d38625edee3f1c3a8588cea4afe1d516a7997dcf", + "logIndex": 22, + "blockHash": "0xbb5a619307f98145c365178da44db7075478e0d91aa678b6b69c70aeb0f3a109" + }, + { + "transactionIndex": 7, + "blockNumber": 40870213, + "transactionHash": "0xdee56fc7107c4ed4f6677581667c2a991a4af5d28ba3a1fe51d5e52b41b959d8", + "address": "0xC3538BB4771c88ee03EB5d837559327aAaC6f851", + "topics": [ + "0x5d039c612419cd7b6696e7d5c8ccaef3362188cc98db01e07fb55bb85b33541d" + ], + "data": "0x000000000000000000000000c66d094ed928f7840a6b0d373c1cd825c97e3c7c", + "logIndex": 23, + "blockHash": "0xbb5a619307f98145c365178da44db7075478e0d91aa678b6b69c70aeb0f3a109" + }, + { + "transactionIndex": 7, + "blockNumber": 40870213, + "transactionHash": "0xdee56fc7107c4ed4f6677581667c2a991a4af5d28ba3a1fe51d5e52b41b959d8", + "address": "0xC3538BB4771c88ee03EB5d837559327aAaC6f851", + "topics": [ + "0xf605132f819f46ab9f362495c159c83b8a080f3b8b22f8a684018837eae0bed3", + "0x000000000000000000000000c863bf877ae4ac8c339e396dd3d1386235b3c39e" + ], + "data": "0x", + "logIndex": 24, + "blockHash": "0xbb5a619307f98145c365178da44db7075478e0d91aa678b6b69c70aeb0f3a109" + }, + { + "transactionIndex": 7, + "blockNumber": 40870213, + "transactionHash": "0xdee56fc7107c4ed4f6677581667c2a991a4af5d28ba3a1fe51d5e52b41b959d8", + "address": "0xC3538BB4771c88ee03EB5d837559327aAaC6f851", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000049c4d4c94829b9c44052c5f5cb164fc612181165", + "0x0000000000000000000000005f890c9522dce5670d741d4277bfcc2d9ca8af02" + ], + "data": "0x", + "logIndex": 25, + "blockHash": "0xbb5a619307f98145c365178da44db7075478e0d91aa678b6b69c70aeb0f3a109" + }, + { + "transactionIndex": 7, + "blockNumber": 40870213, + "transactionHash": "0xdee56fc7107c4ed4f6677581667c2a991a4af5d28ba3a1fe51d5e52b41b959d8", + "address": "0xC3538BB4771c88ee03EB5d837559327aAaC6f851", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 26, + "blockHash": "0xbb5a619307f98145c365178da44db7075478e0d91aa678b6b69c70aeb0f3a109" + }, + { + "transactionIndex": 7, + "blockNumber": 40870213, + "transactionHash": "0xdee56fc7107c4ed4f6677581667c2a991a4af5d28ba3a1fe51d5e52b41b959d8", + "address": "0xC3538BB4771c88ee03EB5d837559327aAaC6f851", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045023af7b33994a22740bc51c3ca90a7ed82e124", + "logIndex": 27, + "blockHash": "0xbb5a619307f98145c365178da44db7075478e0d91aa678b6b69c70aeb0f3a109" + }, + { + "transactionIndex": 7, + "blockNumber": 40870213, + "transactionHash": "0xdee56fc7107c4ed4f6677581667c2a991a4af5d28ba3a1fe51d5e52b41b959d8", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x0000000000000000000000005f890c9522dce5670d741d4277bfcc2d9ca8af02", + "0x0000000000000000000000005082f249cdb2f2c1ee035e4f423c46ea2dab3ab1" + ], + "data": "0x0000000000000000000000000000000000000000000000000004c8adc103ed0000000000000000000000000000000000000000000000000f89aa3c8f9dd38ff4000000000000000000000000000000000000000000000256577944567226180400000000000000000000000000000000000000000000000f89a573e1dccfa2f4000000000000000000000000000000000000000000000256577e0d04332a0504", + "logIndex": 28, + "blockHash": "0xbb5a619307f98145c365178da44db7075478e0d91aa678b6b69c70aeb0f3a109" + } + ], + "blockNumber": 40870213, + "cumulativeGasUsed": "1311587", + "status": 1, + "byzantium": true + }, + "args": [ + "0xf29d66157F23c3a9981C0626742E9FB2F7DA80A8", + "0x45023af7B33994a22740Bc51C3Ca90A7Ed82e124", + "0x2959bfed00000000000000000000000049c4d4c94829b9c44052c5f5cb164fc61218116500000000000000000000000069015912aa33720b842dcd6ac059ed623f28d9f7000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fa000000000000000000000000c66d094ed928f7840a6b0d373c1cd825c97e3c7c000000000000000000000000d38625edee3f1c3a8588cea4afe1d516a7997dcf000000000000000000000000c863bf877ae4ac8c339e396dd3d1386235b3c39e" + ], + "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..f330259b96 --- /dev/null +++ b/packages/deploy/deployments/mumbai/OrderValidator.json @@ -0,0 +1,923 @@ +{ + "address": "0xC863BF877aE4ac8C339E396Dd3d1386235b3C39e", + "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": false, + "internalType": "bool", + "name": "tsbOnly", + "type": "bool" + }, + { + "indexed": false, + "internalType": "bool", + "name": "partners", + "type": "bool" + }, + { + "indexed": false, + "internalType": "bool", + "name": "open", + "type": "bool" + }, + { + "indexed": false, + "internalType": "bool", + "name": "erc20List", + "type": "bool" + } + ], + "name": "PermissionSetted", + "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" + }, + { + "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": "address", + "name": "admin", + "type": "address" + }, + { + "internalType": "bool", + "name": "newTsbOnly", + "type": "bool" + }, + { + "internalType": "bool", + "name": "newPartners", + "type": "bool" + }, + { + "internalType": "bool", + "name": "newOpen", + "type": "bool" + }, + { + "internalType": "bool", + "name": "newErc20", + "type": "bool" + } + ], + "name": "__OrderValidator_init_unchained", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenAddress", + "type": "address" + } + ], + "name": "addERC20", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenAddress", + "type": "address" + } + ], + "name": "addPartner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenAddress", + "type": "address" + } + ], + "name": "addTSB", + "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": [], + "name": "erc20List", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "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": "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": [], + "name": "open", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "partners", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenAddress", + "type": "address" + } + ], + "name": "removeERC20", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenAddress", + "type": "address" + } + ], + "name": "removePartner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenAddress", + "type": "address" + } + ], + "name": "removeTSB", + "outputs": [], + "stateMutability": "nonpayable", + "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": "bool", + "name": "newTsbOnly", + "type": "bool" + }, + { + "internalType": "bool", + "name": "newPartners", + "type": "bool" + }, + { + "internalType": "bool", + "name": "newOpen", + "type": "bool" + }, + { + "internalType": "bool", + "name": "newErc20List", + "type": "bool" + } + ], + "name": "setPermissions", + "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": "tsbOnly", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "maker", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "internalType": "enum LibAsset.AssetClassType", + "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.AssetClassType", + "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": "0xef818300340b40fbfcae23bbaa3c23eb226f4b422855bdb2109ee2892672f13c", + "receipt": { + "to": null, + "from": "0x5F890c9522dCE5670d741D4277BFCC2d9cA8Af02", + "contractAddress": "0xC863BF877aE4ac8C339E396Dd3d1386235b3C39e", + "transactionIndex": 5, + "gasUsed": "845162", + "logsBloom": "0x000000040000000000000000000000004000000000000000000000000200002000020000020084000000000000000040000080000000000000000000000000000000000000000000000000000000028000000000000000000001000000000000000000000a0000000000020000000800000000800000000080000000000000000000000000000000000000000000000000000000000080000000000000a00000200000000000000000000002004400000080000000000000001000000000004000000020000000000001000000040000000000000400000100108000000020000000000000000080000000000000000000000000000000000000000000100000", + "blockHash": "0xe0492429b791aa626aa04036cdc389a31e5e738dc630a6647d6f8e23cabad196", + "transactionHash": "0xef818300340b40fbfcae23bbaa3c23eb226f4b422855bdb2109ee2892672f13c", + "logs": [ + { + "transactionIndex": 5, + "blockNumber": 40870179, + "transactionHash": "0xef818300340b40fbfcae23bbaa3c23eb226f4b422855bdb2109ee2892672f13c", + "address": "0xC863BF877aE4ac8C339E396Dd3d1386235b3C39e", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000e3c7d3bed4e0f2e281957e0a66f878e40bb046c5" + ], + "data": "0x", + "logIndex": 11, + "blockHash": "0xe0492429b791aa626aa04036cdc389a31e5e738dc630a6647d6f8e23cabad196" + }, + { + "transactionIndex": 5, + "blockNumber": 40870179, + "transactionHash": "0xef818300340b40fbfcae23bbaa3c23eb226f4b422855bdb2109ee2892672f13c", + "address": "0xC863BF877aE4ac8C339E396Dd3d1386235b3C39e", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000049c4d4c94829b9c44052c5f5cb164fc612181165", + "0x0000000000000000000000005f890c9522dce5670d741d4277bfcc2d9ca8af02" + ], + "data": "0x", + "logIndex": 12, + "blockHash": "0xe0492429b791aa626aa04036cdc389a31e5e738dc630a6647d6f8e23cabad196" + }, + { + "transactionIndex": 5, + "blockNumber": 40870179, + "transactionHash": "0xef818300340b40fbfcae23bbaa3c23eb226f4b422855bdb2109ee2892672f13c", + "address": "0xC863BF877aE4ac8C339E396Dd3d1386235b3C39e", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 13, + "blockHash": "0xe0492429b791aa626aa04036cdc389a31e5e738dc630a6647d6f8e23cabad196" + }, + { + "transactionIndex": 5, + "blockNumber": 40870179, + "transactionHash": "0xef818300340b40fbfcae23bbaa3c23eb226f4b422855bdb2109ee2892672f13c", + "address": "0xC863BF877aE4ac8C339E396Dd3d1386235b3C39e", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045023af7b33994a22740bc51c3ca90a7ed82e124", + "logIndex": 14, + "blockHash": "0xe0492429b791aa626aa04036cdc389a31e5e738dc630a6647d6f8e23cabad196" + }, + { + "transactionIndex": 5, + "blockNumber": 40870179, + "transactionHash": "0xef818300340b40fbfcae23bbaa3c23eb226f4b422855bdb2109ee2892672f13c", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x0000000000000000000000005f890c9522dce5670d741d4277bfcc2d9ca8af02", + "0x0000000000000000000000005082f249cdb2f2c1ee035e4f423c46ea2dab3ab1" + ], + "data": "0x000000000000000000000000000000000000000000000000000481016b2e760000000000000000000000000000000000000000000000000f8a33ab3a0825da9000000000000000000000000000000000000000000000025654e717f708cf029300000000000000000000000000000000000000000000000f8a2f2a389cf7649000000000000000000000000000000000000000000000025654eb98f873fd7893", + "logIndex": 15, + "blockHash": "0xe0492429b791aa626aa04036cdc389a31e5e738dc630a6647d6f8e23cabad196" + } + ], + "blockNumber": 40870179, + "cumulativeGasUsed": "1160728", + "status": 1, + "byzantium": true + }, + "args": [ + "0xe3C7D3BED4E0f2E281957E0a66f878E40BB046c5", + "0x45023af7B33994a22740Bc51C3Ca90A7Ed82e124", + "0x7020d27300000000000000000000000049c4d4c94829b9c44052c5f5cb164fc6121811650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000" + ], + "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": "__OrderValidator_init_unchained", + "args": [ + "0x49c4D4C94829B9c44052C5f5Cb164Fc612181165", + false, + false, + true, + false + ] + }, + "implementation": "0xe3C7D3BED4E0f2E281957E0a66f878E40BB046c5", + "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..4e219892f5 --- /dev/null +++ b/packages/deploy/deployments/mumbai/OrderValidator_Implementation.json @@ -0,0 +1,1085 @@ +{ + "address": "0xe3C7D3BED4E0f2E281957E0a66f878E40BB046c5", + "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": false, + "internalType": "bool", + "name": "tsbOnly", + "type": "bool" + }, + { + "indexed": false, + "internalType": "bool", + "name": "partners", + "type": "bool" + }, + { + "indexed": false, + "internalType": "bool", + "name": "open", + "type": "bool" + }, + { + "indexed": false, + "internalType": "bool", + "name": "erc20List", + "type": "bool" + } + ], + "name": "PermissionSetted", + "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" + }, + { + "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": "address", + "name": "admin", + "type": "address" + }, + { + "internalType": "bool", + "name": "newTsbOnly", + "type": "bool" + }, + { + "internalType": "bool", + "name": "newPartners", + "type": "bool" + }, + { + "internalType": "bool", + "name": "newOpen", + "type": "bool" + }, + { + "internalType": "bool", + "name": "newErc20", + "type": "bool" + } + ], + "name": "__OrderValidator_init_unchained", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenAddress", + "type": "address" + } + ], + "name": "addERC20", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenAddress", + "type": "address" + } + ], + "name": "addPartner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenAddress", + "type": "address" + } + ], + "name": "addTSB", + "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": [], + "name": "erc20List", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "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": "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": [], + "name": "open", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "partners", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenAddress", + "type": "address" + } + ], + "name": "removeERC20", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenAddress", + "type": "address" + } + ], + "name": "removePartner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenAddress", + "type": "address" + } + ], + "name": "removeTSB", + "outputs": [], + "stateMutability": "nonpayable", + "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": "bool", + "name": "newTsbOnly", + "type": "bool" + }, + { + "internalType": "bool", + "name": "newPartners", + "type": "bool" + }, + { + "internalType": "bool", + "name": "newOpen", + "type": "bool" + }, + { + "internalType": "bool", + "name": "newErc20List", + "type": "bool" + } + ], + "name": "setPermissions", + "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": "tsbOnly", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "maker", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "internalType": "enum LibAsset.AssetClassType", + "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.AssetClassType", + "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": "0x02a0c7dfa0903df1677912e20839a81454ada4f5017fad88e85352af10870b20", + "receipt": { + "to": null, + "from": "0x5F890c9522dCE5670d741D4277BFCC2d9cA8Af02", + "contractAddress": "0xe3C7D3BED4E0f2E281957E0a66f878E40BB046c5", + "transactionIndex": 6, + "gasUsed": "2146803", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000800020000000002000002000000000000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000400000000080000000000000200080200000000000000000000000000400000000000000000000000000000000004000000000000000000001000000040000000000000000000000108000000000000000000000000080000000000000000000000000000000000000000000100000", + "blockHash": "0x0f54b330ac9252c06bcdc2a2c6115ae9cc5f2cd74f122a2c75c8ef0bf5a5afe3", + "transactionHash": "0x02a0c7dfa0903df1677912e20839a81454ada4f5017fad88e85352af10870b20", + "logs": [ + { + "transactionIndex": 6, + "blockNumber": 40870177, + "transactionHash": "0x02a0c7dfa0903df1677912e20839a81454ada4f5017fad88e85352af10870b20", + "address": "0xe3C7D3BED4E0f2E281957E0a66f878E40BB046c5", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", + "logIndex": 20, + "blockHash": "0x0f54b330ac9252c06bcdc2a2c6115ae9cc5f2cd74f122a2c75c8ef0bf5a5afe3" + }, + { + "transactionIndex": 6, + "blockNumber": 40870177, + "transactionHash": "0x02a0c7dfa0903df1677912e20839a81454ada4f5017fad88e85352af10870b20", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x0000000000000000000000005f890c9522dce5670d741d4277bfcc2d9ca8af02", + "0x0000000000000000000000005082f249cdb2f2c1ee035e4f423c46ea2dab3ab1" + ], + "data": "0x000000000000000000000000000000000000000000000000000b70c249539d0000000000000000000000000000000000000000000000000f8a3f1bfc5364d4cd00000000000000000000000000000000000000000000025654cdc616b54fb1d300000000000000000000000000000000000000000000000f8a33ab3a0a1137cd00000000000000000000000000000000000000000000025654d936d8fea34ed3", + "logIndex": 21, + "blockHash": "0x0f54b330ac9252c06bcdc2a2c6115ae9cc5f2cd74f122a2c75c8ef0bf5a5afe3" + } + ], + "blockNumber": 40870177, + "cumulativeGasUsed": "2966495", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "ecd1b268b7f8423b750f66ee2d2cf788", + "metadata": "{\"compiler\":{\"version\":\"0.8.21+commit.d9974bed\"},\"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\":false,\"internalType\":\"bool\",\"name\":\"tsbOnly\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"partners\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"open\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"erc20List\",\"type\":\"bool\"}],\"name\":\"PermissionSetted\",\"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\"},{\"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\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"newTsbOnly\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"newPartners\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"newOpen\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"newErc20\",\"type\":\"bool\"}],\"name\":\"__OrderValidator_init_unchained\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"addERC20\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"addPartner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"addTSB\",\"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\":[],\"name\":\"erc20List\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"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\":\"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\":[],\"name\":\"open\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"partners\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"removeERC20\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"removePartner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"removeTSB\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":\"bool\",\"name\":\"newTsbOnly\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"newPartners\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"newOpen\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"newErc20List\",\"type\":\"bool\"}],\"name\":\"setPermissions\",\"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\":\"tsbOnly\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"maker\",\"type\":\"address\"},{\"components\":[{\"components\":[{\"internalType\":\"enum LibAsset.AssetClassType\",\"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.AssetClassType\",\"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\":{\"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.\"},\"PermissionSetted(bool,bool,bool,bool)\":{\"params\":{\"erc20List\":\"boolean indicating that there is a restriction for ERC20 tokens\",\"open\":\"boolean indicating that all tokens are accepted\",\"partners\":\"boolean indicating that partner tokens are accepted\",\"tsbOnly\":\"boolean indicating that TSB tokens are accepted\"}},\"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`)\"}},\"kind\":\"dev\",\"methods\":{\"__OrderValidator_init_unchained(address,bool,bool,bool,bool)\":{\"params\":{\"admin\":\"OrderValidator and Whiteist admin\",\"newErc20\":\"boolean to activate the white list of ERC20 tokens\",\"newOpen\":\"boolean to indicate that all assets are accepted by the exchange contract\",\"newPartners\":\"boolena to indicate that partner tokens are accepted by the exchange contract\",\"newTsbOnly\":\"boolean to indicate that only The Sandbox tokens are accepted by the exchange contract\"}},\"addERC20(address)\":{\"params\":{\"tokenAddress\":\"token address\"}},\"addPartner(address)\":{\"params\":{\"tokenAddress\":\"token address\"}},\"addTSB(address)\":{\"params\":{\"tokenAddress\":\"token address\"}},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\",\"details\":\"this protects the implementation contract from being initialized.\"},\"eip712Domain()\":{\"details\":\"See {EIP-5267}. _Available since v4.9._\"},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"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`.\"},\"removeERC20(address)\":{\"params\":{\"tokenAddress\":\"token address\"}},\"removePartner(address)\":{\"params\":{\"tokenAddress\":\"token address\"}},\"removeTSB(address)\":{\"params\":{\"tokenAddress\":\"token address\"}},\"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.\"},\"setPermissions(bool,bool,bool,bool)\":{\"params\":{\"newErc20List\":\"allows to pay orders with only whitelisted token\",\"newOpen\":\"allows orders with any token\",\"newPartners\":\"allows orders with partner token\",\"newTsbOnly\":\"allows orders with The Sandbox token\"}},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"validate((address,((uint8,bytes),uint256),address,((uint8,bytes),uint256),uint256,uint256,uint256),bytes,address)\":{\"params\":{\"order\":\"order to be validated\",\"sender\":\"order sender\",\"signature\":\"signature of order\"}}},\"title\":\"contract for order validation\",\"version\":1},\"userdoc\":{\"events\":{\"PermissionSetted(bool,bool,bool,bool)\":{\"notice\":\"event emitted when new permissions for tokens are added\"}},\"kind\":\"user\",\"methods\":{\"ERC20_ROLE()\":{\"notice\":\"role for ERC20 tokens\"},\"PARTNER_ROLE()\":{\"notice\":\"role for partner tokens\"},\"TSB_ROLE()\":{\"notice\":\"role for The Sandbox tokens\"},\"__OrderValidator_init_unchained(address,bool,bool,bool,bool)\":{\"notice\":\"initializer for OrderValidator\"},\"addERC20(address)\":{\"notice\":\"add token to the ERC20 list\"},\"addPartner(address)\":{\"notice\":\"add token to partners list\"},\"addTSB(address)\":{\"notice\":\"add token to tsb list\"},\"erc20List()\":{\"notice\":\"if status == erc20List, users can only pay white whitelisted ERC20 tokens\"},\"open()\":{\"notice\":\"if status == open, then no whitelist [no mapping needed]. But then we need a removeListing function for contracts we subsequently\"},\"partners()\":{\"notice\":\"if status == partners, then tsbListedContracts and partnerContracts [manageable mapping]\"},\"removeERC20(address)\":{\"notice\":\"remove token from ERC20 list\"},\"removePartner(address)\":{\"notice\":\"remove token from partner list\"},\"removeTSB(address)\":{\"notice\":\"remove token from tsb list\"},\"setPermissions(bool,bool,bool,bool)\":{\"notice\":\"setting permissions for tokens\"},\"tsbOnly()\":{\"notice\":\"if status == tsbOnly, then only tsbListedContracts [small mapping]\"},\"validate((address,((uint8,bytes),uint256),address,((uint8,bytes),uint256),uint256,uint256,uint256),bytes,address)\":{\"notice\":\"verifies order\"}},\"notice\":\"validate orders and contains a white list of tokens\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"@sandbox-smart-contracts/marketplace/contracts/exchange/OrderValidator.sol\":\"OrderValidator\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":2000},\"remappings\":[]},\"sources\":{\"@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/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/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\"},\"@sandbox-smart-contracts/marketplace/contracts/exchange/OrderValidator.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.21;\\n\\nimport {LibOrder} from \\\"../lib-order/LibOrder.sol\\\";\\nimport {LibAsset} from \\\"../lib-asset/LibAsset.sol\\\";\\nimport {IERC1271Upgradeable} from \\\"@openzeppelin/contracts-upgradeable/interfaces/IERC1271Upgradeable.sol\\\";\\nimport {ECDSAUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol\\\";\\nimport {AddressUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.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/// @title contract for order validation\\n/// @notice validate orders and contains a white list of tokens\\ncontract OrderValidator is IOrderValidator, Initializable, EIP712Upgradeable, WhiteList {\\n using ECDSAUpgradeable for bytes32;\\n using AddressUpgradeable for address;\\n\\n bytes4 internal constant MAGICVALUE = 0x1626ba7e;\\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 OrderValidator\\n /// @param admin OrderValidator and Whiteist admin\\n /// @param newTsbOnly boolean to indicate that only The Sandbox tokens are accepted by the exchange contract\\n /// @param newPartners boolena to indicate that partner tokens are accepted by the exchange contract\\n /// @param newOpen boolean to indicate that all assets are accepted by the exchange contract\\n /// @param newErc20 boolean to activate the white list of ERC20 tokens\\n // solhint-disable-next-line func-name-mixedcase\\n function __OrderValidator_init_unchained(\\n address admin,\\n bool newTsbOnly,\\n bool newPartners,\\n bool newOpen,\\n bool newErc20\\n ) public initializer {\\n __EIP712_init_unchained(\\\"Exchange\\\", \\\"1\\\");\\n __Whitelist_init(admin, newTsbOnly, newPartners, newOpen, newErc20);\\n }\\n\\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 calldata order, bytes memory signature, address sender) public view {\\n require(order.maker != address(0), \\\"no maker\\\");\\n\\n LibOrder.validateOrderTime(order);\\n address makeToken = abi.decode(order.makeAsset.assetType.data, (address));\\n if (order.makeAsset.assetType.assetClass == LibAsset.AssetClassType.ERC20_ASSET_CLASS) {\\n verifyERC20Whitelist(makeToken);\\n } else verifyWhiteList(makeToken);\\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 // if maker is contract checking ERC1271 signature\\n if (order.maker.isContract()) {\\n require(\\n IERC1271Upgradeable(order.maker).isValidSignature(_hashTypedDataV4(hash), signature) == MAGICVALUE,\\n \\\"contract order signature verification error\\\"\\n );\\n return;\\n }\\n\\n // if maker is not contract then checking ECDSA signature\\n address recovered = _hashTypedDataV4(hash).recover(signature);\\n require(recovered == order.maker, \\\"order signature verification error\\\");\\n }\\n\\n /// @notice if ERC20 token is accepted\\n /// @param tokenAddress ERC20 token address\\n function verifyERC20Whitelist(address tokenAddress) internal view {\\n if (erc20List && !hasRole(ERC20_ROLE, tokenAddress)) {\\n revert(\\\"payment token not allowed\\\");\\n }\\n }\\n\\n /// @notice if token is whitelisted\\n /// @param tokenAddress ERC20 token address\\n function verifyWhiteList(address tokenAddress) internal view {\\n if (open) {\\n return;\\n } else if ((tsbOnly && hasRole(TSB_ROLE, tokenAddress)) || (partners && hasRole(PARTNER_ROLE, tokenAddress))) {\\n return;\\n } else {\\n revert(\\\"not allowed\\\");\\n }\\n }\\n\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x4840ac72ef6a9411cb7cb76be34c63edbb293668c9f04746dafc5b9642234730\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/marketplace/contracts/exchange/WhiteList.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.21;\\n\\nimport {AccessControlUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport {IWhiteList} from \\\"../interfaces/IWhiteList.sol\\\";\\n\\n/// @title WhiteList contract\\n/// @dev controls which tokens are accepted in the marketplace\\ncontract WhiteList is IWhiteList, AccessControlUpgradeable {\\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\\n /// @return hash for ERC20_ROLE\\n bytes32 public constant ERC20_ROLE = keccak256(\\\"ERC20_ROLE\\\");\\n\\n /// @notice if status == tsbOnly, then only tsbListedContracts [small mapping]\\n /// @return tsbOnly\\n bool public tsbOnly;\\n\\n /// @notice if status == partners, then tsbListedContracts and partnerContracts [manageable mapping]\\n /// @return partners\\n bool public partners;\\n\\n /// @notice if status == open, then no whitelist [no mapping needed]. But then we need a removeListing function for contracts we subsequently\\n /// @return open\\n bool public open;\\n\\n /// @notice if status == erc20List, users can only pay white whitelisted ERC20 tokens\\n /// @return erc20List\\n bool public erc20List;\\n\\n /// @notice event emitted when new permissions for tokens are added\\n /// @param tsbOnly boolean indicating that TSB tokens are accepted\\n /// @param partners boolean indicating that partner tokens are accepted\\n /// @param open boolean indicating that all tokens are accepted\\n /// @param erc20List boolean indicating that there is a restriction for ERC20 tokens\\n event PermissionSetted(bool tsbOnly, bool partners, bool open, bool erc20List);\\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 WhiteList\\n /// @param admin whitelist admin\\n /// @param newTsbOnly allows orders with The Sandbox token\\n /// @param newPartners allows orders with partner token\\n /// @param newOpen allows orders with any token\\n /// @param newErc20List allows to pay orders with only whitelisted token\\n // solhint-disable-next-line func-name-mixedcase\\n function __Whitelist_init(\\n address admin,\\n bool newTsbOnly,\\n bool newPartners,\\n bool newOpen,\\n bool newErc20List\\n ) internal initializer {\\n __AccessControl_init_unchained();\\n _grantRole(DEFAULT_ADMIN_ROLE, admin);\\n tsbOnly = newTsbOnly;\\n partners = newPartners;\\n open = newOpen;\\n erc20List = newErc20List;\\n }\\n\\n /// @notice setting permissions for tokens\\n /// @param newTsbOnly allows orders with The Sandbox token\\n /// @param newPartners allows orders with partner token\\n /// @param newOpen allows orders with any token\\n /// @param newErc20List allows to pay orders with only whitelisted token\\n function setPermissions(\\n bool newTsbOnly,\\n bool newPartners,\\n bool newOpen,\\n bool newErc20List\\n ) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n tsbOnly = newTsbOnly;\\n partners = newPartners;\\n open = newOpen;\\n erc20List = newErc20List;\\n\\n emit PermissionSetted(tsbOnly, partners, open, erc20List);\\n }\\n\\n /// @notice add token to tsb list\\n /// @param tokenAddress token address\\n function addTSB(address tokenAddress) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n grantRole(TSB_ROLE, tokenAddress);\\n }\\n\\n /// @notice remove token from tsb list\\n /// @param tokenAddress token address\\n function removeTSB(address tokenAddress) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n revokeRole(TSB_ROLE, tokenAddress);\\n }\\n\\n /// @notice add token to partners list\\n /// @param tokenAddress token address\\n function addPartner(address tokenAddress) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n grantRole(PARTNER_ROLE, tokenAddress);\\n }\\n\\n /// @notice remove token from partner list\\n /// @param tokenAddress token address\\n function removePartner(address tokenAddress) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n revokeRole(PARTNER_ROLE, tokenAddress);\\n }\\n\\n /// @notice add token to the ERC20 list\\n /// @param tokenAddress token address\\n function addERC20(address tokenAddress) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n grantRole(ERC20_ROLE, tokenAddress);\\n }\\n\\n /// @notice remove token from ERC20 list\\n /// @param tokenAddress token address\\n function removeERC20(address tokenAddress) external onlyRole(DEFAULT_ADMIN_ROLE) {\\n revokeRole(ERC20_ROLE, tokenAddress);\\n }\\n}\\n\",\"keccak256\":\"0x9effd07d57e4881904dd46191f16691577987a31e0d8ac6adf5762ca86f226ba\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/marketplace/contracts/interfaces/IOrderValidator.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.21;\\n\\nimport {LibOrder} from \\\"../lib-order/LibOrder.sol\\\";\\n\\n/// @title interface for the OrderValidator contract\\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\":\"0x34124715b819920ce2eb56b14284a1e4a682740dbf8d40497c7d953faf3c6b58\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/marketplace/contracts/interfaces/IWhiteList.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.21;\\n\\n/// @title interface for the WhiteList contract\\n/// @notice contains the signature for the contract function\\ninterface IWhiteList {\\n /// @notice if status == tsbOnly, then only tsbListedContracts [small mapping]\\n /// @return tsbOnly\\n function tsbOnly() external view returns (bool);\\n\\n /// @notice if status == partners, then tsbListedContracts and partnerContracts [manageable mapping]\\n /// @return partners\\n function partners() external view returns (bool);\\n\\n // @notice if status == open, then no whitelist [no mapping needed]. But then we need a removeListing function for contracts we subsequently\\n /// @return open\\n function open() external view returns (bool);\\n\\n /// @notice if status == erc20List, users can only pay white whitelisted ERC20 tokens\\n /// @return erc20List\\n function erc20List() external view returns (bool);\\n}\\n\",\"keccak256\":\"0xf67fe4e6626c6e2f46bea9578f2942ad7c7bb3558bcbec4ead5134f248da4754\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/marketplace/contracts/lib-asset/LibAsset.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.21;\\n\\n/// @title library for Assets\\n/// @notice contains structs for Asset and AssetType\\nlibrary LibAsset {\\n enum AssetClassType {\\n INVALID_ASSET_CLASS,\\n ERC20_ASSET_CLASS,\\n ERC721_ASSET_CLASS,\\n ERC1155_ASSET_CLASS\\n }\\n\\n enum FeeSide {\\n NONE,\\n LEFT,\\n RIGHT\\n }\\n\\n /// @dev AssetType is a type of a specific asset. For example AssetType is specific ERC-721 token (key is token + tokenId) or specific ERC-20 token (DAI for example).\\n /// @dev It consists of asset class and generic data (format of data is different for different asset classes). For example, for asset class ERC20 data holds address of the token, for ERC-721 data holds smart contract address and tokenId.\\n struct AssetType {\\n AssetClassType assetClass;\\n bytes data;\\n }\\n\\n /// @dev Asset represents any asset on ethereum blockchain. Asset has type and value (amount of an asset).\\n struct Asset {\\n AssetType assetType;\\n uint256 value;\\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 decides if the fees will be taken and from which side\\n /// @param leftClass left side asset class type\\n /// @param rightClass right side asset class type\\n /// @return side from which the fees will be taken or none\\n function getFeeSide(AssetClassType leftClass, AssetClassType rightClass) internal pure returns (FeeSide) {\\n if (leftClass == AssetClassType.ERC20_ASSET_CLASS && rightClass != AssetClassType.ERC20_ASSET_CLASS) {\\n return FeeSide.LEFT;\\n }\\n if (rightClass == AssetClassType.ERC20_ASSET_CLASS && leftClass != AssetClassType.ERC20_ASSET_CLASS) {\\n return FeeSide.RIGHT;\\n }\\n return FeeSide.NONE;\\n }\\n\\n /// @notice calculate if Asset types match with each other\\n /// @param leftType to be matched with rightAssetType\\n /// @param rightType to be matched with leftAssetType\\n /// @return AssetType of the match\\n function matchAssets(\\n AssetType calldata leftType,\\n AssetType calldata rightType\\n ) internal pure returns (AssetType memory) {\\n AssetClassType classLeft = leftType.assetClass;\\n AssetClassType classRight = rightType.assetClass;\\n\\n require(classLeft != AssetClassType.INVALID_ASSET_CLASS, \\\"not found IAssetMatcher\\\");\\n require(classRight != AssetClassType.INVALID_ASSET_CLASS, \\\"not found IAssetMatcher\\\");\\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 calculate hash of asset type\\n /// @param assetType to be hashed\\n /// @return hash of assetType\\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 calculate hash of asset\\n /// @param asset to be hashed\\n /// @return hash of 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\",\"keccak256\":\"0x2c5763a98a7e6c6d0b03a515a6e43f0cec72772c10f016426585906d936d4caa\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/marketplace/contracts/lib-order/LibOrder.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.21;\\n\\nimport {LibAsset} from \\\"../lib-asset/LibAsset.sol\\\";\\n\\n/// @title library for Order\\n/// @notice contains structs and functions related to Order\\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 struct Order {\\n address maker;\\n LibAsset.Asset makeAsset;\\n address taker;\\n LibAsset.Asset takeAsset;\\n uint256 salt;\\n uint256 start;\\n uint256 end;\\n }\\n\\n /// @notice calculate hash key from order\\n /// @param order object to be hashed\\n /// @return hash key of 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 calculate hash from order\\n /// @param order object to be hashed\\n /// @return hash of 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 function validateOrderTime(Order memory order) internal view {\\n // solhint-disable-next-line not-rely-on-time\\n require(order.start == 0 || order.start < block.timestamp, \\\"Order start validation failed\\\");\\n // solhint-disable-next-line not-rely-on-time\\n require(order.end == 0 || order.end > block.timestamp, \\\"Order end validation failed\\\");\\n }\\n}\\n\",\"keccak256\":\"0x9481748b6eb6d584e313c42049812226200a26e2e6861e62e9d8f9a72ce1d4a1\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b506200001c6200002c565b620000266200002c565b620000ed565b600054610100900460ff1615620000995760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff90811614620000eb576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b61258980620000fd6000396000f3fe608060405234801561001057600080fd5b50600436106101985760003560e01c80638bf34237116100e3578063c0d7b8701161008c578063e3c83e6511610066578063e3c83e65146103a6578063ea3c281a146103cd578063fcfff16f146103e057600080fd5b8063c0d7b8701461036d578063c812fc9314610380578063d547741f1461039357600080fd5b8063a295fa79116100bd578063a295fa7914610333578063a67755c214610347578063b45230ec1461035a57600080fd5b80638bf34237146102df57806391d14854146102f2578063a217fddf1461032b57600080fd5b806343658a7011610145578063750135141161011f578063750135141461029f57806381add559146102b257806384b0196e146102c457600080fd5b806343658a701461025257806362972e23146102655780637020d2731461028c57600080fd5b80632513e2b9116101765780632513e2b9146102035780632f2ff15d1461022a57806336568abe1461023f57600080fd5b806301ffc9a71461019d5780630e69f2cd146101c5578063248a9ca3146101d2575b600080fd5b6101b06101ab366004611c86565b6103f3565b60405190151581526020015b60405180910390f35b60cb546101b09060ff1681565b6101f56101e0366004611ca3565b60009081526099602052604090206001015490565b6040519081526020016101bc565b6101f57f2f049b28665abd79bc83d9aa564dba6b787ac439dba27b48e163a83befa9b26081565b61023d610238366004611ce1565b61048c565b005b61023d61024d366004611ce1565b6104b6565b61023d610260366004611d11565b610547565b6101f57f839f6f26c78a3e8185d8004defa846bd7b66fef8def9b9f16459a6ebf250216281565b61023d61029a366004611d3e565b61057c565b61023d6102ad366004611da5565b61071b565b60cb546101b090610100900460ff1681565b6102cc6107d4565b6040516101bc9796959493929190611e49565b61023d6102ed366004611d11565b610896565b6101b0610300366004611ce1565b60009182526099602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6101f5600081565b60cb546101b0906301000000900460ff1681565b61023d610355366004611d11565b6108cb565b61023d610368366004611fea565b610900565b61023d61037b366004611d11565b610cc5565b61023d61038e366004611d11565b610cfa565b61023d6103a1366004611ce1565b610d2b565b6101f57f6278160ef7ca8a5eb8e5b274bcc0427c2cc7e12eee2a53c5989a1afb360f640481565b61023d6103db366004611d11565b610d50565b60cb546101b09062010000900460ff1681565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061048657507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6000828152609960205260409020600101546104a781610d85565b6104b18383610d92565b505050565b6001600160a01b03811633146105395760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b6105438282610e34565b5050565b600061055281610d85565b6105437f839f6f26c78a3e8185d8004defa846bd7b66fef8def9b9f16459a6ebf25021628361048c565b600054610100900460ff161580801561059c5750600054600160ff909116105b806105b65750303b1580156105b6575060005460ff166001145b6106285760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610530565b6000805460ff19166001179055801561064b576000805461ff0019166101001790555b6106bf6040518060400160405280600881526020017f45786368616e67650000000000000000000000000000000000000000000000008152506040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250610eb7565b6106cc8686868686610f5c565b8015610713576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15b505050505050565b600061072681610d85565b60cb805461ffff191686151561ff0019161761010086151581029190911763ffff0000191662010000861515810263ff0000001916919091176301000000861515810291909117938490556040805160ff80871615158252948604851615156020820152928504841615159083015290920416151560608201527fb10f885f9fcb454b3fc51859cfda8bf63797ce24ac7c946cc30d49a9412f83f49060800160405180910390a15050505050565b6000606080600080600060606001546000801b1480156107f45750600254155b6108405760405162461bcd60e51b815260206004820152601560248201527f4549503731323a20556e696e697469616c697a656400000000000000000000006044820152606401610530565b6108486110bd565b61085061114f565b604080516000808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009b939a50919850469750309650945092509050565b60006108a181610d85565b6105437f2f049b28665abd79bc83d9aa564dba6b787ac439dba27b48e163a83befa9b2608361048c565b60006108d681610d85565b6105437f839f6f26c78a3e8185d8004defa846bd7b66fef8def9b9f16459a6ebf250216283610d2b565b600061090f6020850185611d11565b6001600160a01b0316036109655760405162461bcd60e51b815260206004820152600860248201527f6e6f206d616b65720000000000000000000000000000000000000000000000006044820152606401610530565b6109766109718461210e565b61115e565b600061098560208501856121be565b61098f90806121be565b61099d9060208101906121fc565b8101906109aa9190611d11565b905060016109bb60208601866121be565b6109c590806121be565b6109d3906020810190612277565b60038111156109e4576109e4612261565b036109f7576109f28161121e565b610a00565b610a00816112bc565b8360800135600003610a7f57610a196020850185611d11565b6001600160a01b0316826001600160a01b031614610a795760405162461bcd60e51b815260206004820152601660248201527f6d616b6572206973206e6f742074782073656e646572000000000000000000006044820152606401610530565b50505050565b610a8c6020850185611d11565b6001600160a01b0316826001600160a01b031603610aaa5750505050565b6000610ab5856113bd565b9050610ad6610ac76020870187611d11565b6001600160a01b03163b151590565b15610c1b577f1626ba7e00000000000000000000000000000000000000000000000000000000610b096020870187611d11565b6001600160a01b0316631626ba7e610b20846114a3565b876040518363ffffffff1660e01b8152600401610b3e929190612292565b602060405180830381865afa158015610b5b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b7f91906122b3565b7fffffffff000000000000000000000000000000000000000000000000000000001614610c145760405162461bcd60e51b815260206004820152602b60248201527f636f6e7472616374206f72646572207369676e6174757265207665726966696360448201527f6174696f6e206572726f720000000000000000000000000000000000000000006064820152608401610530565b5050505050565b6000610c3085610c2a846114a3565b906114eb565b9050610c3f6020870187611d11565b6001600160a01b0316816001600160a01b0316146107135760405162461bcd60e51b815260206004820152602260248201527f6f72646572207369676e617475726520766572696669636174696f6e2065727260448201527f6f720000000000000000000000000000000000000000000000000000000000006064820152608401610530565b6000610cd081610d85565b6105437f6278160ef7ca8a5eb8e5b274bcc0427c2cc7e12eee2a53c5989a1afb360f64048361048c565b6000610d0581610d85565b6105437f6278160ef7ca8a5eb8e5b274bcc0427c2cc7e12eee2a53c5989a1afb360f6404835b600082815260996020526040902060010154610d4681610d85565b6104b18383610e34565b6000610d5b81610d85565b6105437f2f049b28665abd79bc83d9aa564dba6b787ac439dba27b48e163a83befa9b26083610d2b565b610d8f813361150f565b50565b60008281526099602090815260408083206001600160a01b038516845290915290205460ff166105435760008281526099602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610df03390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526099602090815260408083206001600160a01b038516845290915290205460ff16156105435760008281526099602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600054610100900460ff16610f345760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610530565b6003610f408382612350565b506004610f4d8282612350565b50506000600181905560025550565b600054610100900460ff1615808015610f7c5750600054600160ff909116105b80610f965750303b158015610f96575060005460ff166001145b6110085760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610530565b6000805460ff19166001179055801561102b576000805461ff0019166101001790555b611033611584565b61103e600087610d92565b60cb805461ffff191686151561ff00191617610100861515021763ffff00001916620100008515150263ff0000001916176301000000841515021790558015610713576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200161070a565b6060600380546110cc906122d0565b80601f01602080910402602001604051908101604052809291908181526020018280546110f8906122d0565b80156111455780601f1061111a57610100808354040283529160200191611145565b820191906000526020600020905b81548152906001019060200180831161112857829003601f168201915b5050505050905090565b6060600480546110cc906122d0565b60a081015115806111725750428160a00151105b6111be5760405162461bcd60e51b815260206004820152601d60248201527f4f726465722073746172742076616c69646174696f6e206661696c65640000006044820152606401610530565b60c081015115806111d25750428160c00151115b610d8f5760405162461bcd60e51b815260206004820152601b60248201527f4f7264657220656e642076616c69646174696f6e206661696c656400000000006044820152606401610530565b60cb546301000000900460ff16801561126f57506001600160a01b03811660009081527f5e9f46c6f3a37aed912e47cb012973583ff2f5b7e4db3839efae4d86e269a9ef602052604090205460ff16155b15610d8f5760405162461bcd60e51b815260206004820152601960248201527f7061796d656e7420746f6b656e206e6f7420616c6c6f776564000000000000006044820152606401610530565b60cb5462010000900460ff16156112d05750565b60cb5460ff16801561131957506001600160a01b03811660009081527f27a059ae9669021ef10a697fd7d5e365594d7c130d5e544605b6f0726c800eec602052604090205460ff165b8061136d575060cb54610100900460ff16801561136d57506001600160a01b03811660009081527f51385dcb82e028c1f1d2026bfd3c761e37e44b58a46fec9151abc8352b81cac3602052604090205460ff165b156113755750565b60405162461bcd60e51b815260206004820152600b60248201527f6e6f7420616c6c6f7765640000000000000000000000000000000000000000006044820152606401610530565b60007fb45f699a9d66ae9f6815d4c26a3eec190eb66c90f1300a6acc292fcc127c3a6c6113ed6020840184611d11565b61140b6113fd60208601866121be565b61140690612410565b611603565b61141b6060860160408701611d11565b61142b6113fd60608801886121be565b6040805160208101969096526001600160a01b0394851690860152606085019290925290911660808084019190915260a08084019290925284013560c0808401919091529084013560e0830152830135610100820152610120015b604051602081830303815290604052805190602001209050919050565b60006104866114b0611659565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b60008060006114fa8585611668565b91509150611507816116ad565b509392505050565b60008281526099602090815260408083206001600160a01b038516845290915290205460ff166105435761154281611812565b61154d836020611824565b60405160200161155e92919061241c565b60408051601f198184030181529082905262461bcd60e51b82526105309160040161249d565b600054610100900460ff166116015760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610530565b565b60007fb3dadb929e65125a0302b36e16e3b077edea8c07de20fe04795776ed6bd3bb596116338360000151611a54565b602080850151604051611486949392019283526020830191909152604082015260600190565b6000611663611a96565b905090565b600080825160410361169e5760208301516040840151606085015160001a61169287828585611b0a565b945094505050506116a6565b506000905060025b9250929050565b60008160048111156116c1576116c1612261565b036116c95750565b60018160048111156116dd576116dd612261565b0361172a5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610530565b600281600481111561173e5761173e612261565b0361178b5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610530565b600381600481111561179f5761179f612261565b03610d8f5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610530565b60606104866001600160a01b03831660145b606060006118338360026124c6565b61183e9060026124dd565b67ffffffffffffffff81111561185657611856611efb565b6040519080825280601f01601f191660200182016040528015611880576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106118b7576118b76124f0565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061191a5761191a6124f0565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060006119568460026124c6565b6119619060016124dd565b90505b60018111156119fe577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106119a2576119a26124f0565b1a60f81b8282815181106119b8576119b86124f0565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c936119f781612506565b9050611964565b508315611a4d5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610530565b9392505050565b8051602080830151805190820120604051600093611486937f75aacb2727a36600741802d07994792d9d768ee841822bca87180d320cea99129391920161251d565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f611ac1611bce565b611ac9611c27565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611b415750600090506003611bc5565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611b95573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611bbe57600060019250925050611bc5565b9150600090505b94509492505050565b600080611bd96110bd565b805190915015611bf0578051602090910120919050565b6001548015611bff5792915050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4709250505090565b600080611c3261114f565b805190915015611c49578051602090910120919050565b6002548015611bff5792915050565b7fffffffff0000000000000000000000000000000000000000000000000000000081168114610d8f57600080fd5b600060208284031215611c9857600080fd5b8135611a4d81611c58565b600060208284031215611cb557600080fd5b5035919050565b6001600160a01b0381168114610d8f57600080fd5b8035611cdc81611cbc565b919050565b60008060408385031215611cf457600080fd5b823591506020830135611d0681611cbc565b809150509250929050565b600060208284031215611d2357600080fd5b8135611a4d81611cbc565b80358015158114611cdc57600080fd5b600080600080600060a08688031215611d5657600080fd5b8535611d6181611cbc565b9450611d6f60208701611d2e565b9350611d7d60408701611d2e565b9250611d8b60608701611d2e565b9150611d9960808701611d2e565b90509295509295909350565b60008060008060808587031215611dbb57600080fd5b611dc485611d2e565b9350611dd260208601611d2e565b9250611de060408601611d2e565b9150611dee60608601611d2e565b905092959194509250565b60005b83811015611e14578181015183820152602001611dfc565b50506000910152565b60008151808452611e35816020860160208601611df9565b601f01601f19169290920160200192915050565b7fff00000000000000000000000000000000000000000000000000000000000000881681526000602060e081840152611e8560e084018a611e1d565b8381036040850152611e97818a611e1d565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825283870192509083019060005b81811015611ee957835183529284019291840191600101611ecd565b50909c9b505050505050505050505050565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff81118282101715611f3457611f34611efb565b60405290565b60405160e0810167ffffffffffffffff81118282101715611f3457611f34611efb565b600082601f830112611f6e57600080fd5b813567ffffffffffffffff80821115611f8957611f89611efb565b604051601f8301601f19908116603f01168101908282118183101715611fb157611fb1611efb565b81604052838152866020858801011115611fca57600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600060608486031215611fff57600080fd5b833567ffffffffffffffff8082111561201757600080fd5b9085019060e0828803121561202b57600080fd5b9093506020850135908082111561204157600080fd5b5061204e86828701611f5d565b925050604084013561205f81611cbc565b809150509250925092565b803560048110611cdc57600080fd5b60006040828403121561208b57600080fd5b612093611f11565b9050813567ffffffffffffffff808211156120ad57600080fd5b90830190604082860312156120c157600080fd5b6120c9611f11565b6120d28361206a565b81526020830135828111156120e657600080fd5b6120f287828601611f5d565b6020830152508084525050506020820135602082015292915050565b600060e0823603121561212057600080fd5b612128611f3a565b61213183611cd1565b8152602083013567ffffffffffffffff8082111561214e57600080fd5b61215a36838701612079565b602084015261216b60408601611cd1565b6040840152606085013591508082111561218457600080fd5b5061219136828601612079565b6060830152506080830135608082015260a083013560a082015260c083013560c082015280915050919050565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc18336030181126121f257600080fd5b9190910192915050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261223157600080fd5b83018035915067ffffffffffffffff82111561224c57600080fd5b6020019150368190038213156116a657600080fd5b634e487b7160e01b600052602160045260246000fd5b60006020828403121561228957600080fd5b611a4d8261206a565b8281526040602082015260006122ab6040830184611e1d565b949350505050565b6000602082840312156122c557600080fd5b8151611a4d81611c58565b600181811c908216806122e457607f821691505b60208210810361230457634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156104b157600081815260208120601f850160051c810160208610156123315750805b601f850160051c820191505b818110156107135782815560010161233d565b815167ffffffffffffffff81111561236a5761236a611efb565b61237e8161237884546122d0565b8461230a565b602080601f8311600181146123b3576000841561239b5750858301515b600019600386901b1c1916600185901b178555610713565b600085815260208120601f198616915b828110156123e2578886015182559484019460019091019084016123c3565b50858210156124005787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60006104863683612079565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612454816017850160208801611df9565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351612491816028840160208801611df9565b01602801949350505050565b602081526000611a4d6020830184611e1d565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610486576104866124b0565b80820180821115610486576104866124b0565b634e487b7160e01b600052603260045260246000fd5b600081612515576125156124b0565b506000190190565b838152606081016004841061254257634e487b7160e01b600052602160045260246000fd5b60208201939093526040015291905056fea26469706673582212207a69b5e4d7f6e40546f276e570a9e05a27a61a8caaf1640e552c1cea0bc60d4c64736f6c63430008150033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101985760003560e01c80638bf34237116100e3578063c0d7b8701161008c578063e3c83e6511610066578063e3c83e65146103a6578063ea3c281a146103cd578063fcfff16f146103e057600080fd5b8063c0d7b8701461036d578063c812fc9314610380578063d547741f1461039357600080fd5b8063a295fa79116100bd578063a295fa7914610333578063a67755c214610347578063b45230ec1461035a57600080fd5b80638bf34237146102df57806391d14854146102f2578063a217fddf1461032b57600080fd5b806343658a7011610145578063750135141161011f578063750135141461029f57806381add559146102b257806384b0196e146102c457600080fd5b806343658a701461025257806362972e23146102655780637020d2731461028c57600080fd5b80632513e2b9116101765780632513e2b9146102035780632f2ff15d1461022a57806336568abe1461023f57600080fd5b806301ffc9a71461019d5780630e69f2cd146101c5578063248a9ca3146101d2575b600080fd5b6101b06101ab366004611c86565b6103f3565b60405190151581526020015b60405180910390f35b60cb546101b09060ff1681565b6101f56101e0366004611ca3565b60009081526099602052604090206001015490565b6040519081526020016101bc565b6101f57f2f049b28665abd79bc83d9aa564dba6b787ac439dba27b48e163a83befa9b26081565b61023d610238366004611ce1565b61048c565b005b61023d61024d366004611ce1565b6104b6565b61023d610260366004611d11565b610547565b6101f57f839f6f26c78a3e8185d8004defa846bd7b66fef8def9b9f16459a6ebf250216281565b61023d61029a366004611d3e565b61057c565b61023d6102ad366004611da5565b61071b565b60cb546101b090610100900460ff1681565b6102cc6107d4565b6040516101bc9796959493929190611e49565b61023d6102ed366004611d11565b610896565b6101b0610300366004611ce1565b60009182526099602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6101f5600081565b60cb546101b0906301000000900460ff1681565b61023d610355366004611d11565b6108cb565b61023d610368366004611fea565b610900565b61023d61037b366004611d11565b610cc5565b61023d61038e366004611d11565b610cfa565b61023d6103a1366004611ce1565b610d2b565b6101f57f6278160ef7ca8a5eb8e5b274bcc0427c2cc7e12eee2a53c5989a1afb360f640481565b61023d6103db366004611d11565b610d50565b60cb546101b09062010000900460ff1681565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061048657507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6000828152609960205260409020600101546104a781610d85565b6104b18383610d92565b505050565b6001600160a01b03811633146105395760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b6105438282610e34565b5050565b600061055281610d85565b6105437f839f6f26c78a3e8185d8004defa846bd7b66fef8def9b9f16459a6ebf25021628361048c565b600054610100900460ff161580801561059c5750600054600160ff909116105b806105b65750303b1580156105b6575060005460ff166001145b6106285760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610530565b6000805460ff19166001179055801561064b576000805461ff0019166101001790555b6106bf6040518060400160405280600881526020017f45786368616e67650000000000000000000000000000000000000000000000008152506040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250610eb7565b6106cc8686868686610f5c565b8015610713576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15b505050505050565b600061072681610d85565b60cb805461ffff191686151561ff0019161761010086151581029190911763ffff0000191662010000861515810263ff0000001916919091176301000000861515810291909117938490556040805160ff80871615158252948604851615156020820152928504841615159083015290920416151560608201527fb10f885f9fcb454b3fc51859cfda8bf63797ce24ac7c946cc30d49a9412f83f49060800160405180910390a15050505050565b6000606080600080600060606001546000801b1480156107f45750600254155b6108405760405162461bcd60e51b815260206004820152601560248201527f4549503731323a20556e696e697469616c697a656400000000000000000000006044820152606401610530565b6108486110bd565b61085061114f565b604080516000808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009b939a50919850469750309650945092509050565b60006108a181610d85565b6105437f2f049b28665abd79bc83d9aa564dba6b787ac439dba27b48e163a83befa9b2608361048c565b60006108d681610d85565b6105437f839f6f26c78a3e8185d8004defa846bd7b66fef8def9b9f16459a6ebf250216283610d2b565b600061090f6020850185611d11565b6001600160a01b0316036109655760405162461bcd60e51b815260206004820152600860248201527f6e6f206d616b65720000000000000000000000000000000000000000000000006044820152606401610530565b6109766109718461210e565b61115e565b600061098560208501856121be565b61098f90806121be565b61099d9060208101906121fc565b8101906109aa9190611d11565b905060016109bb60208601866121be565b6109c590806121be565b6109d3906020810190612277565b60038111156109e4576109e4612261565b036109f7576109f28161121e565b610a00565b610a00816112bc565b8360800135600003610a7f57610a196020850185611d11565b6001600160a01b0316826001600160a01b031614610a795760405162461bcd60e51b815260206004820152601660248201527f6d616b6572206973206e6f742074782073656e646572000000000000000000006044820152606401610530565b50505050565b610a8c6020850185611d11565b6001600160a01b0316826001600160a01b031603610aaa5750505050565b6000610ab5856113bd565b9050610ad6610ac76020870187611d11565b6001600160a01b03163b151590565b15610c1b577f1626ba7e00000000000000000000000000000000000000000000000000000000610b096020870187611d11565b6001600160a01b0316631626ba7e610b20846114a3565b876040518363ffffffff1660e01b8152600401610b3e929190612292565b602060405180830381865afa158015610b5b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b7f91906122b3565b7fffffffff000000000000000000000000000000000000000000000000000000001614610c145760405162461bcd60e51b815260206004820152602b60248201527f636f6e7472616374206f72646572207369676e6174757265207665726966696360448201527f6174696f6e206572726f720000000000000000000000000000000000000000006064820152608401610530565b5050505050565b6000610c3085610c2a846114a3565b906114eb565b9050610c3f6020870187611d11565b6001600160a01b0316816001600160a01b0316146107135760405162461bcd60e51b815260206004820152602260248201527f6f72646572207369676e617475726520766572696669636174696f6e2065727260448201527f6f720000000000000000000000000000000000000000000000000000000000006064820152608401610530565b6000610cd081610d85565b6105437f6278160ef7ca8a5eb8e5b274bcc0427c2cc7e12eee2a53c5989a1afb360f64048361048c565b6000610d0581610d85565b6105437f6278160ef7ca8a5eb8e5b274bcc0427c2cc7e12eee2a53c5989a1afb360f6404835b600082815260996020526040902060010154610d4681610d85565b6104b18383610e34565b6000610d5b81610d85565b6105437f2f049b28665abd79bc83d9aa564dba6b787ac439dba27b48e163a83befa9b26083610d2b565b610d8f813361150f565b50565b60008281526099602090815260408083206001600160a01b038516845290915290205460ff166105435760008281526099602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610df03390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526099602090815260408083206001600160a01b038516845290915290205460ff16156105435760008281526099602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600054610100900460ff16610f345760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610530565b6003610f408382612350565b506004610f4d8282612350565b50506000600181905560025550565b600054610100900460ff1615808015610f7c5750600054600160ff909116105b80610f965750303b158015610f96575060005460ff166001145b6110085760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610530565b6000805460ff19166001179055801561102b576000805461ff0019166101001790555b611033611584565b61103e600087610d92565b60cb805461ffff191686151561ff00191617610100861515021763ffff00001916620100008515150263ff0000001916176301000000841515021790558015610713576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200161070a565b6060600380546110cc906122d0565b80601f01602080910402602001604051908101604052809291908181526020018280546110f8906122d0565b80156111455780601f1061111a57610100808354040283529160200191611145565b820191906000526020600020905b81548152906001019060200180831161112857829003601f168201915b5050505050905090565b6060600480546110cc906122d0565b60a081015115806111725750428160a00151105b6111be5760405162461bcd60e51b815260206004820152601d60248201527f4f726465722073746172742076616c69646174696f6e206661696c65640000006044820152606401610530565b60c081015115806111d25750428160c00151115b610d8f5760405162461bcd60e51b815260206004820152601b60248201527f4f7264657220656e642076616c69646174696f6e206661696c656400000000006044820152606401610530565b60cb546301000000900460ff16801561126f57506001600160a01b03811660009081527f5e9f46c6f3a37aed912e47cb012973583ff2f5b7e4db3839efae4d86e269a9ef602052604090205460ff16155b15610d8f5760405162461bcd60e51b815260206004820152601960248201527f7061796d656e7420746f6b656e206e6f7420616c6c6f776564000000000000006044820152606401610530565b60cb5462010000900460ff16156112d05750565b60cb5460ff16801561131957506001600160a01b03811660009081527f27a059ae9669021ef10a697fd7d5e365594d7c130d5e544605b6f0726c800eec602052604090205460ff165b8061136d575060cb54610100900460ff16801561136d57506001600160a01b03811660009081527f51385dcb82e028c1f1d2026bfd3c761e37e44b58a46fec9151abc8352b81cac3602052604090205460ff165b156113755750565b60405162461bcd60e51b815260206004820152600b60248201527f6e6f7420616c6c6f7765640000000000000000000000000000000000000000006044820152606401610530565b60007fb45f699a9d66ae9f6815d4c26a3eec190eb66c90f1300a6acc292fcc127c3a6c6113ed6020840184611d11565b61140b6113fd60208601866121be565b61140690612410565b611603565b61141b6060860160408701611d11565b61142b6113fd60608801886121be565b6040805160208101969096526001600160a01b0394851690860152606085019290925290911660808084019190915260a08084019290925284013560c0808401919091529084013560e0830152830135610100820152610120015b604051602081830303815290604052805190602001209050919050565b60006104866114b0611659565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b60008060006114fa8585611668565b91509150611507816116ad565b509392505050565b60008281526099602090815260408083206001600160a01b038516845290915290205460ff166105435761154281611812565b61154d836020611824565b60405160200161155e92919061241c565b60408051601f198184030181529082905262461bcd60e51b82526105309160040161249d565b600054610100900460ff166116015760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610530565b565b60007fb3dadb929e65125a0302b36e16e3b077edea8c07de20fe04795776ed6bd3bb596116338360000151611a54565b602080850151604051611486949392019283526020830191909152604082015260600190565b6000611663611a96565b905090565b600080825160410361169e5760208301516040840151606085015160001a61169287828585611b0a565b945094505050506116a6565b506000905060025b9250929050565b60008160048111156116c1576116c1612261565b036116c95750565b60018160048111156116dd576116dd612261565b0361172a5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610530565b600281600481111561173e5761173e612261565b0361178b5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610530565b600381600481111561179f5761179f612261565b03610d8f5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610530565b60606104866001600160a01b03831660145b606060006118338360026124c6565b61183e9060026124dd565b67ffffffffffffffff81111561185657611856611efb565b6040519080825280601f01601f191660200182016040528015611880576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106118b7576118b76124f0565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061191a5761191a6124f0565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060006119568460026124c6565b6119619060016124dd565b90505b60018111156119fe577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106119a2576119a26124f0565b1a60f81b8282815181106119b8576119b86124f0565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c936119f781612506565b9050611964565b508315611a4d5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610530565b9392505050565b8051602080830151805190820120604051600093611486937f75aacb2727a36600741802d07994792d9d768ee841822bca87180d320cea99129391920161251d565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f611ac1611bce565b611ac9611c27565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611b415750600090506003611bc5565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611b95573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611bbe57600060019250925050611bc5565b9150600090505b94509492505050565b600080611bd96110bd565b805190915015611bf0578051602090910120919050565b6001548015611bff5792915050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4709250505090565b600080611c3261114f565b805190915015611c49578051602090910120919050565b6002548015611bff5792915050565b7fffffffff0000000000000000000000000000000000000000000000000000000081168114610d8f57600080fd5b600060208284031215611c9857600080fd5b8135611a4d81611c58565b600060208284031215611cb557600080fd5b5035919050565b6001600160a01b0381168114610d8f57600080fd5b8035611cdc81611cbc565b919050565b60008060408385031215611cf457600080fd5b823591506020830135611d0681611cbc565b809150509250929050565b600060208284031215611d2357600080fd5b8135611a4d81611cbc565b80358015158114611cdc57600080fd5b600080600080600060a08688031215611d5657600080fd5b8535611d6181611cbc565b9450611d6f60208701611d2e565b9350611d7d60408701611d2e565b9250611d8b60608701611d2e565b9150611d9960808701611d2e565b90509295509295909350565b60008060008060808587031215611dbb57600080fd5b611dc485611d2e565b9350611dd260208601611d2e565b9250611de060408601611d2e565b9150611dee60608601611d2e565b905092959194509250565b60005b83811015611e14578181015183820152602001611dfc565b50506000910152565b60008151808452611e35816020860160208601611df9565b601f01601f19169290920160200192915050565b7fff00000000000000000000000000000000000000000000000000000000000000881681526000602060e081840152611e8560e084018a611e1d565b8381036040850152611e97818a611e1d565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825283870192509083019060005b81811015611ee957835183529284019291840191600101611ecd565b50909c9b505050505050505050505050565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff81118282101715611f3457611f34611efb565b60405290565b60405160e0810167ffffffffffffffff81118282101715611f3457611f34611efb565b600082601f830112611f6e57600080fd5b813567ffffffffffffffff80821115611f8957611f89611efb565b604051601f8301601f19908116603f01168101908282118183101715611fb157611fb1611efb565b81604052838152866020858801011115611fca57600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600060608486031215611fff57600080fd5b833567ffffffffffffffff8082111561201757600080fd5b9085019060e0828803121561202b57600080fd5b9093506020850135908082111561204157600080fd5b5061204e86828701611f5d565b925050604084013561205f81611cbc565b809150509250925092565b803560048110611cdc57600080fd5b60006040828403121561208b57600080fd5b612093611f11565b9050813567ffffffffffffffff808211156120ad57600080fd5b90830190604082860312156120c157600080fd5b6120c9611f11565b6120d28361206a565b81526020830135828111156120e657600080fd5b6120f287828601611f5d565b6020830152508084525050506020820135602082015292915050565b600060e0823603121561212057600080fd5b612128611f3a565b61213183611cd1565b8152602083013567ffffffffffffffff8082111561214e57600080fd5b61215a36838701612079565b602084015261216b60408601611cd1565b6040840152606085013591508082111561218457600080fd5b5061219136828601612079565b6060830152506080830135608082015260a083013560a082015260c083013560c082015280915050919050565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc18336030181126121f257600080fd5b9190910192915050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261223157600080fd5b83018035915067ffffffffffffffff82111561224c57600080fd5b6020019150368190038213156116a657600080fd5b634e487b7160e01b600052602160045260246000fd5b60006020828403121561228957600080fd5b611a4d8261206a565b8281526040602082015260006122ab6040830184611e1d565b949350505050565b6000602082840312156122c557600080fd5b8151611a4d81611c58565b600181811c908216806122e457607f821691505b60208210810361230457634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156104b157600081815260208120601f850160051c810160208610156123315750805b601f850160051c820191505b818110156107135782815560010161233d565b815167ffffffffffffffff81111561236a5761236a611efb565b61237e8161237884546122d0565b8461230a565b602080601f8311600181146123b3576000841561239b5750858301515b600019600386901b1c1916600185901b178555610713565b600085815260208120601f198616915b828110156123e2578886015182559484019460019091019084016123c3565b50858210156124005787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60006104863683612079565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612454816017850160208801611df9565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351612491816028840160208801611df9565b01602801949350505050565b602081526000611a4d6020830184611e1d565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610486576104866124b0565b80820180821115610486576104866124b0565b634e487b7160e01b600052603260045260246000fd5b600081612515576125156124b0565b506000190190565b838152606081016004841061254257634e487b7160e01b600052602160045260246000fd5b60208201939093526040015291905056fea26469706673582212207a69b5e4d7f6e40546f276e570a9e05a27a61a8caaf1640e552c1cea0bc60d4c64736f6c63430008150033", + "devdoc": { + "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." + }, + "PermissionSetted(bool,bool,bool,bool)": { + "params": { + "erc20List": "boolean indicating that there is a restriction for ERC20 tokens", + "open": "boolean indicating that all tokens are accepted", + "partners": "boolean indicating that partner tokens are accepted", + "tsbOnly": "boolean indicating that TSB tokens are accepted" + } + }, + "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`)" + } + }, + "kind": "dev", + "methods": { + "__OrderValidator_init_unchained(address,bool,bool,bool,bool)": { + "params": { + "admin": "OrderValidator and Whiteist admin", + "newErc20": "boolean to activate the white list of ERC20 tokens", + "newOpen": "boolean to indicate that all assets are accepted by the exchange contract", + "newPartners": "boolena to indicate that partner tokens are accepted by the exchange contract", + "newTsbOnly": "boolean to indicate that only The Sandbox tokens are accepted by the exchange contract" + } + }, + "addERC20(address)": { + "params": { + "tokenAddress": "token address" + } + }, + "addPartner(address)": { + "params": { + "tokenAddress": "token address" + } + }, + "addTSB(address)": { + "params": { + "tokenAddress": "token address" + } + }, + "constructor": { + "custom:oz-upgrades-unsafe-allow": "constructor", + "details": "this protects the implementation contract from being initialized." + }, + "eip712Domain()": { + "details": "See {EIP-5267}. _Available since v4.9._" + }, + "getRoleAdmin(bytes32)": { + "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." + }, + "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`." + }, + "removeERC20(address)": { + "params": { + "tokenAddress": "token address" + } + }, + "removePartner(address)": { + "params": { + "tokenAddress": "token address" + } + }, + "removeTSB(address)": { + "params": { + "tokenAddress": "token address" + } + }, + "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." + }, + "setPermissions(bool,bool,bool,bool)": { + "params": { + "newErc20List": "allows to pay orders with only whitelisted token", + "newOpen": "allows orders with any token", + "newPartners": "allows orders with partner token", + "newTsbOnly": "allows orders with The Sandbox token" + } + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}." + }, + "validate((address,((uint8,bytes),uint256),address,((uint8,bytes),uint256),uint256,uint256,uint256),bytes,address)": { + "params": { + "order": "order to be validated", + "sender": "order sender", + "signature": "signature of order" + } + } + }, + "title": "contract for order validation", + "version": 1 + }, + "userdoc": { + "events": { + "PermissionSetted(bool,bool,bool,bool)": { + "notice": "event emitted when new permissions for tokens are added" + } + }, + "kind": "user", + "methods": { + "ERC20_ROLE()": { + "notice": "role for ERC20 tokens" + }, + "PARTNER_ROLE()": { + "notice": "role for partner tokens" + }, + "TSB_ROLE()": { + "notice": "role for The Sandbox tokens" + }, + "__OrderValidator_init_unchained(address,bool,bool,bool,bool)": { + "notice": "initializer for OrderValidator" + }, + "addERC20(address)": { + "notice": "add token to the ERC20 list" + }, + "addPartner(address)": { + "notice": "add token to partners list" + }, + "addTSB(address)": { + "notice": "add token to tsb list" + }, + "erc20List()": { + "notice": "if status == erc20List, users can only pay white whitelisted ERC20 tokens" + }, + "open()": { + "notice": "if status == open, then no whitelist [no mapping needed]. But then we need a removeListing function for contracts we subsequently" + }, + "partners()": { + "notice": "if status == partners, then tsbListedContracts and partnerContracts [manageable mapping]" + }, + "removeERC20(address)": { + "notice": "remove token from ERC20 list" + }, + "removePartner(address)": { + "notice": "remove token from partner list" + }, + "removeTSB(address)": { + "notice": "remove token from tsb list" + }, + "setPermissions(bool,bool,bool,bool)": { + "notice": "setting permissions for tokens" + }, + "tsbOnly()": { + "notice": "if status == tsbOnly, then only tsbListedContracts [small mapping]" + }, + "validate((address,((uint8,bytes),uint256),address,((uint8,bytes),uint256),uint256,uint256,uint256),bytes,address)": { + "notice": "verifies order" + } + }, + "notice": "validate orders and contains a white list of tokens", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 586, + "contract": "@sandbox-smart-contracts/marketplace/contracts/exchange/OrderValidator.sol:OrderValidator", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 589, + "contract": "@sandbox-smart-contracts/marketplace/contracts/exchange/OrderValidator.sol:OrderValidator", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 2588, + "contract": "@sandbox-smart-contracts/marketplace/contracts/exchange/OrderValidator.sol:OrderValidator", + "label": "_hashedName", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + }, + { + "astId": 2591, + "contract": "@sandbox-smart-contracts/marketplace/contracts/exchange/OrderValidator.sol:OrderValidator", + "label": "_hashedVersion", + "offset": 0, + "slot": "2", + "type": "t_bytes32" + }, + { + "astId": 2593, + "contract": "@sandbox-smart-contracts/marketplace/contracts/exchange/OrderValidator.sol:OrderValidator", + "label": "_name", + "offset": 0, + "slot": "3", + "type": "t_string_storage" + }, + { + "astId": 2595, + "contract": "@sandbox-smart-contracts/marketplace/contracts/exchange/OrderValidator.sol:OrderValidator", + "label": "_version", + "offset": 0, + "slot": "4", + "type": "t_string_storage" + }, + { + "astId": 2853, + "contract": "@sandbox-smart-contracts/marketplace/contracts/exchange/OrderValidator.sol:OrderValidator", + "label": "__gap", + "offset": 0, + "slot": "5", + "type": "t_array(t_uint256)48_storage" + }, + { + "astId": 1974, + "contract": "@sandbox-smart-contracts/marketplace/contracts/exchange/OrderValidator.sol:OrderValidator", + "label": "__gap", + "offset": 0, + "slot": "53", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 2900, + "contract": "@sandbox-smart-contracts/marketplace/contracts/exchange/OrderValidator.sol:OrderValidator", + "label": "__gap", + "offset": 0, + "slot": "103", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 39, + "contract": "@sandbox-smart-contracts/marketplace/contracts/exchange/OrderValidator.sol:OrderValidator", + "label": "_roles", + "offset": 0, + "slot": "153", + "type": "t_mapping(t_bytes32,t_struct(RoleData)34_storage)" + }, + { + "astId": 334, + "contract": "@sandbox-smart-contracts/marketplace/contracts/exchange/OrderValidator.sol:OrderValidator", + "label": "__gap", + "offset": 0, + "slot": "154", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 5331, + "contract": "@sandbox-smart-contracts/marketplace/contracts/exchange/OrderValidator.sol:OrderValidator", + "label": "tsbOnly", + "offset": 0, + "slot": "203", + "type": "t_bool" + }, + { + "astId": 5334, + "contract": "@sandbox-smart-contracts/marketplace/contracts/exchange/OrderValidator.sol:OrderValidator", + "label": "partners", + "offset": 1, + "slot": "203", + "type": "t_bool" + }, + { + "astId": 5337, + "contract": "@sandbox-smart-contracts/marketplace/contracts/exchange/OrderValidator.sol:OrderValidator", + "label": "open", + "offset": 2, + "slot": "203", + "type": "t_bool" + }, + { + "astId": 5340, + "contract": "@sandbox-smart-contracts/marketplace/contracts/exchange/OrderValidator.sol:OrderValidator", + "label": "erc20List", + "offset": 3, + "slot": "203", + "type": "t_bool" + }, + { + "astId": 5298, + "contract": "@sandbox-smart-contracts/marketplace/contracts/exchange/OrderValidator.sol:OrderValidator", + "label": "__gap", + "offset": 0, + "slot": "204", + "type": "t_array(t_uint256)50_storage" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "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_struct(RoleData)34_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32", + "value": "t_struct(RoleData)34_storage" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(RoleData)34_storage": { + "encoding": "inplace", + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "astId": 31, + "contract": "@sandbox-smart-contracts/marketplace/contracts/exchange/OrderValidator.sol:OrderValidator", + "label": "members", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 33, + "contract": "@sandbox-smart-contracts/marketplace/contracts/exchange/OrderValidator.sol:OrderValidator", + "label": "adminRole", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ], + "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..187e4b85ff --- /dev/null +++ b/packages/deploy/deployments/mumbai/OrderValidator_Proxy.json @@ -0,0 +1,277 @@ +{ + "address": "0xC863BF877aE4ac8C339E396Dd3d1386235b3C39e", + "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": "0xef818300340b40fbfcae23bbaa3c23eb226f4b422855bdb2109ee2892672f13c", + "receipt": { + "to": null, + "from": "0x5F890c9522dCE5670d741D4277BFCC2d9cA8Af02", + "contractAddress": "0xC863BF877aE4ac8C339E396Dd3d1386235b3C39e", + "transactionIndex": 5, + "gasUsed": "845162", + "logsBloom": "0x000000040000000000000000000000004000000000000000000000000200002000020000020084000000000000000040000080000000000000000000000000000000000000000000000000000000028000000000000000000001000000000000000000000a0000000000020000000800000000800000000080000000000000000000000000000000000000000000000000000000000080000000000000a00000200000000000000000000002004400000080000000000000001000000000004000000020000000000001000000040000000000000400000100108000000020000000000000000080000000000000000000000000000000000000000000100000", + "blockHash": "0xe0492429b791aa626aa04036cdc389a31e5e738dc630a6647d6f8e23cabad196", + "transactionHash": "0xef818300340b40fbfcae23bbaa3c23eb226f4b422855bdb2109ee2892672f13c", + "logs": [ + { + "transactionIndex": 5, + "blockNumber": 40870179, + "transactionHash": "0xef818300340b40fbfcae23bbaa3c23eb226f4b422855bdb2109ee2892672f13c", + "address": "0xC863BF877aE4ac8C339E396Dd3d1386235b3C39e", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000e3c7d3bed4e0f2e281957e0a66f878e40bb046c5" + ], + "data": "0x", + "logIndex": 11, + "blockHash": "0xe0492429b791aa626aa04036cdc389a31e5e738dc630a6647d6f8e23cabad196" + }, + { + "transactionIndex": 5, + "blockNumber": 40870179, + "transactionHash": "0xef818300340b40fbfcae23bbaa3c23eb226f4b422855bdb2109ee2892672f13c", + "address": "0xC863BF877aE4ac8C339E396Dd3d1386235b3C39e", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000049c4d4c94829b9c44052c5f5cb164fc612181165", + "0x0000000000000000000000005f890c9522dce5670d741d4277bfcc2d9ca8af02" + ], + "data": "0x", + "logIndex": 12, + "blockHash": "0xe0492429b791aa626aa04036cdc389a31e5e738dc630a6647d6f8e23cabad196" + }, + { + "transactionIndex": 5, + "blockNumber": 40870179, + "transactionHash": "0xef818300340b40fbfcae23bbaa3c23eb226f4b422855bdb2109ee2892672f13c", + "address": "0xC863BF877aE4ac8C339E396Dd3d1386235b3C39e", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 13, + "blockHash": "0xe0492429b791aa626aa04036cdc389a31e5e738dc630a6647d6f8e23cabad196" + }, + { + "transactionIndex": 5, + "blockNumber": 40870179, + "transactionHash": "0xef818300340b40fbfcae23bbaa3c23eb226f4b422855bdb2109ee2892672f13c", + "address": "0xC863BF877aE4ac8C339E396Dd3d1386235b3C39e", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045023af7b33994a22740bc51c3ca90a7ed82e124", + "logIndex": 14, + "blockHash": "0xe0492429b791aa626aa04036cdc389a31e5e738dc630a6647d6f8e23cabad196" + }, + { + "transactionIndex": 5, + "blockNumber": 40870179, + "transactionHash": "0xef818300340b40fbfcae23bbaa3c23eb226f4b422855bdb2109ee2892672f13c", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x0000000000000000000000005f890c9522dce5670d741d4277bfcc2d9ca8af02", + "0x0000000000000000000000005082f249cdb2f2c1ee035e4f423c46ea2dab3ab1" + ], + "data": "0x000000000000000000000000000000000000000000000000000481016b2e760000000000000000000000000000000000000000000000000f8a33ab3a0825da9000000000000000000000000000000000000000000000025654e717f708cf029300000000000000000000000000000000000000000000000f8a2f2a389cf7649000000000000000000000000000000000000000000000025654eb98f873fd7893", + "logIndex": 15, + "blockHash": "0xe0492429b791aa626aa04036cdc389a31e5e738dc630a6647d6f8e23cabad196" + } + ], + "blockNumber": 40870179, + "cumulativeGasUsed": "1160728", + "status": 1, + "byzantium": true + }, + "args": [ + "0xe3C7D3BED4E0f2E281957E0a66f878E40BB046c5", + "0x45023af7B33994a22740Bc51C3Ca90A7Ed82e124", + "0x7020d27300000000000000000000000049c4d4c94829b9c44052c5f5cb164fc6121811650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000" + ], + "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..27c52e7cbf --- /dev/null +++ b/packages/deploy/deployments/mumbai/RoyaltiesRegistry.json @@ -0,0 +1,631 @@ +{ + "address": "0xD38625EDEe3f1c3a8588CEa4Afe1D516a7997dCF", + "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": "uint96", + "name": "value", + "type": "uint96" + } + ], + "indexed": false, + "internalType": "struct LibPart.Part[]", + "name": "royalties", + "type": "tuple[]" + } + ], + "name": "RoyaltiesSetForContract", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint96", + "name": "value", + "type": "uint96" + } + ], + "indexed": false, + "internalType": "struct LibPart.Part[]", + "name": "royalties", + "type": "tuple[]" + } + ], + "name": "RoyaltiesSetForToken", + "type": "event" + }, + { + "inputs": [], + "name": "__RoyaltiesRegistry_init", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "clearRoyaltiesType", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "royaltiesType", + "type": "uint256" + } + ], + "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": "uint96", + "name": "value", + "type": "uint96" + } + ], + "internalType": "struct LibPart.Part[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "getRoyaltiesType", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "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": "", + "type": "address" + } + ], + "name": "royaltiesByToken", + "outputs": [ + { + "internalType": "bool", + "name": "initialized", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "royaltiesByTokenAndTokenId", + "outputs": [ + { + "internalType": "bool", + "name": "initialized", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "royaltiesProviders", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "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": "uint96", + "name": "value", + "type": "uint96" + } + ], + "internalType": "struct LibPart.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": "0x39de8ee23fb830bab0b77f0dff888510d80f33406705111398cb82bdede7bc15", + "receipt": { + "to": null, + "from": "0x5F890c9522dCE5670d741D4277BFCC2d9cA8Af02", + "contractAddress": "0xD38625EDEe3f1c3a8588CEa4Afe1D516a7997dCF", + "transactionIndex": 1, + "gasUsed": "769728", + "logsBloom": "0x000000000000000000000000000000004000000000000000008000000000000000020000000000000000000000000000000080000000000000000000000000000000000000000000000000000000028000010000000000001001000000000040000000000200000000000001000008000000008000000000a1000000000000400000000000000000000000000000000000000000000080000000000000a00000200000000000000000000000000400000000000000000000000000000000004000000020000000000001000000040000000000000404000000108040000020000000000000000000000020000000000000000000000000000000000000100000", + "blockHash": "0x0c390325901004858bb248600b8610600209ccdf833c0a903fe47774b78fdbe1", + "transactionHash": "0x39de8ee23fb830bab0b77f0dff888510d80f33406705111398cb82bdede7bc15", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 40870174, + "transactionHash": "0x39de8ee23fb830bab0b77f0dff888510d80f33406705111398cb82bdede7bc15", + "address": "0xD38625EDEe3f1c3a8588CEa4Afe1D516a7997dCF", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x00000000000000000000000074504e0e5c7da578da2d6630ba66fa20a54e1bfc" + ], + "data": "0x", + "logIndex": 2, + "blockHash": "0x0c390325901004858bb248600b8610600209ccdf833c0a903fe47774b78fdbe1" + }, + { + "transactionIndex": 1, + "blockNumber": 40870174, + "transactionHash": "0x39de8ee23fb830bab0b77f0dff888510d80f33406705111398cb82bdede7bc15", + "address": "0xD38625EDEe3f1c3a8588CEa4Afe1D516a7997dCF", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000005f890c9522dce5670d741d4277bfcc2d9ca8af02" + ], + "data": "0x", + "logIndex": 3, + "blockHash": "0x0c390325901004858bb248600b8610600209ccdf833c0a903fe47774b78fdbe1" + }, + { + "transactionIndex": 1, + "blockNumber": 40870174, + "transactionHash": "0x39de8ee23fb830bab0b77f0dff888510d80f33406705111398cb82bdede7bc15", + "address": "0xD38625EDEe3f1c3a8588CEa4Afe1D516a7997dCF", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 4, + "blockHash": "0x0c390325901004858bb248600b8610600209ccdf833c0a903fe47774b78fdbe1" + }, + { + "transactionIndex": 1, + "blockNumber": 40870174, + "transactionHash": "0x39de8ee23fb830bab0b77f0dff888510d80f33406705111398cb82bdede7bc15", + "address": "0xD38625EDEe3f1c3a8588CEa4Afe1D516a7997dCF", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045023af7b33994a22740bc51c3ca90a7ed82e124", + "logIndex": 5, + "blockHash": "0x0c390325901004858bb248600b8610600209ccdf833c0a903fe47774b78fdbe1" + }, + { + "transactionIndex": 1, + "blockNumber": 40870174, + "transactionHash": "0x39de8ee23fb830bab0b77f0dff888510d80f33406705111398cb82bdede7bc15", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x0000000000000000000000005f890c9522dce5670d741d4277bfcc2d9ca8af02", + "0x000000000000000000000000be188d6641e8b680743a4815dfa0f6208038960f" + ], + "data": "0x000000000000000000000000000000000000000000000000005209e7f869000000000000000000000000000000000000000000000000000f8a9125e44c7e020d0000000000000000000000000000000000000000000034aaa50799165c316d0900000000000000000000000000000000000000000000000f8a3f1bfc5415020d0000000000000000000000000000000000000000000034aaa559a2fe549a6d09", + "logIndex": 6, + "blockHash": "0x0c390325901004858bb248600b8610600209ccdf833c0a903fe47774b78fdbe1" + } + ], + "blockNumber": 40870174, + "cumulativeGasUsed": "817928", + "status": 1, + "byzantium": true + }, + "args": [ + "0x74504e0e5c7da578da2d6630ba66fa20a54e1bfc", + "0x45023af7B33994a22740Bc51C3Ca90A7Ed82e124", + "0x27fff8ab" + ], + "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": "__RoyaltiesRegistry_init", + "args": [] + }, + "implementation": "0x74504e0e5c7da578da2d6630ba66fa20a54e1bfc", + "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..d12ebfad5b --- /dev/null +++ b/packages/deploy/deployments/mumbai/RoyaltiesRegistry_Implementation.json @@ -0,0 +1,752 @@ +{ + "address": "0x74504e0e5c7da578da2d6630ba66fa20a54e1bfc", + "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": "uint96", + "name": "value", + "type": "uint96" + } + ], + "indexed": false, + "internalType": "struct LibPart.Part[]", + "name": "royalties", + "type": "tuple[]" + } + ], + "name": "RoyaltiesSetForContract", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint96", + "name": "value", + "type": "uint96" + } + ], + "indexed": false, + "internalType": "struct LibPart.Part[]", + "name": "royalties", + "type": "tuple[]" + } + ], + "name": "RoyaltiesSetForToken", + "type": "event" + }, + { + "inputs": [], + "name": "__RoyaltiesRegistry_init", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "clearRoyaltiesType", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "royaltiesType", + "type": "uint256" + } + ], + "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": "uint96", + "name": "value", + "type": "uint96" + } + ], + "internalType": "struct LibPart.Part[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "getRoyaltiesType", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "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": "", + "type": "address" + } + ], + "name": "royaltiesByToken", + "outputs": [ + { + "internalType": "bool", + "name": "initialized", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "royaltiesByTokenAndTokenId", + "outputs": [ + { + "internalType": "bool", + "name": "initialized", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "royaltiesProviders", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "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": "uint96", + "name": "value", + "type": "uint96" + } + ], + "internalType": "struct LibPart.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": "0xc0338e74a01bab4dd4b875f3534fc7c2309c2331b1417e61a2db8252283cd4a5", + "receipt": { + "to": null, + "from": "0x5f890c9522dce5670d741d4277bfcc2d9ca8af02", + "contractAddress": "0x74504e0e5c7da578da2d6630ba66fa20a54e1bfc", + "transactionIndex": "0x2", + "gasUsed": "0x17e5bb", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000008000001000000000000000000000000000000000000000000000000000800000000000000000000100000000005000000000000000000000000000000000000000000000000080000000000000000000000004000000000000000000000000000000000080000000000000200000200000000000000000000000000400000000000000000000000000000000004000000000000000000001000000040000000000000000000000108040000000000000000000000000000000000000000000000000000000000000000000100000", + "blockHash": "0x1652f0ea8e0f6011a8d9b4209a1f58e16ff0d0e4769b5ee3ce84727718699cb3", + "transactionHash": "0x8c002a62d4e99e1f44a7652bffe47597892b3c06ba5007c55b8e2926b797d01b", + "logs": [ + { + "address": "0x74504e0e5c7da578da2d6630ba66fa20a54e1bfc", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", + "blockNumber": "0x26fa11a", + "transactionHash": "0x8c002a62d4e99e1f44a7652bffe47597892b3c06ba5007c55b8e2926b797d01b", + "transactionIndex": "0x2", + "blockHash": "0x1652f0ea8e0f6011a8d9b4209a1f58e16ff0d0e4769b5ee3ce84727718699cb3", + "logIndex": "0xa", + "removed": false + }, + { + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x0000000000000000000000005f890c9522dce5670d741d4277bfcc2d9ca8af02", + "0x000000000000000000000000be188d6641e8b680743a4815dfa0f6208038960f" + ], + "data": "0x000000000000000000000000000000000000000000000000000a03e9460e173100000000000000000000000000000000000000000000000f8a9b29cd93f28f330000000000000000000000000000000000000000000034aaa4c15902cb8dab1100000000000000000000000000000000000000000000000f8a9125e44de478020000000000000000000000000000000000000000000034aaa4cb5cec119bc242", + "blockNumber": "0x26fa11a", + "transactionHash": "0x8c002a62d4e99e1f44a7652bffe47597892b3c06ba5007c55b8e2926b797d01b", + "transactionIndex": "0x2", + "blockHash": "0x1652f0ea8e0f6011a8d9b4209a1f58e16ff0d0e4769b5ee3ce84727718699cb3", + "logIndex": "0xb", + "removed": false + } + ], + "blockNumber": "0x26fa11a", + "cumulativeGasUsed": "0x1d1057", + "status": "0x1" + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "ecd1b268b7f8423b750f66ee2d2cf788", + "metadata": "{\"compiler\":{\"version\":\"0.8.21+commit.d9974bed\"},\"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\":\"uint96\",\"name\":\"value\",\"type\":\"uint96\"}],\"indexed\":false,\"internalType\":\"struct LibPart.Part[]\",\"name\":\"royalties\",\"type\":\"tuple[]\"}],\"name\":\"RoyaltiesSetForContract\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"value\",\"type\":\"uint96\"}],\"indexed\":false,\"internalType\":\"struct LibPart.Part[]\",\"name\":\"royalties\",\"type\":\"tuple[]\"}],\"name\":\"RoyaltiesSetForToken\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"__RoyaltiesRegistry_init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"clearRoyaltiesType\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"royaltiesType\",\"type\":\"uint256\"}],\"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\":\"uint96\",\"name\":\"value\",\"type\":\"uint96\"}],\"internalType\":\"struct LibPart.Part[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getRoyaltiesType\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"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\":\"\",\"type\":\"address\"}],\"name\":\"royaltiesByToken\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"initialized\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"royaltiesByTokenAndTokenId\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"initialized\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"royaltiesProviders\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"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\":\"uint96\",\"name\":\"value\",\"type\":\"uint96\"}],\"internalType\":\"struct LibPart.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\":{\"events\":{\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"RoyaltiesSetForContract(address,(address,uint96)[])\":{\"params\":{\"royalties\":\"array of royalties\",\"token\":\"token address\"}},\"RoyaltiesSetForToken(address,uint256,(address,uint96)[])\":{\"params\":{\"royalties\":\"deprecated\",\"token\":\"deprecated\",\"tokenId\":\"deprecated\"}}},\"kind\":\"dev\",\"methods\":{\"clearRoyaltiesType(address)\":{\"params\":{\"token\":\"address of token\"}},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\",\"details\":\"this protects the implementation contract from being initialized.\"},\"forceSetRoyaltiesType(address,uint256)\":{\"params\":{\"royaltiesType\":\"roayalty type\",\"token\":\"address of token\"}},\"getProvider(address)\":{\"params\":{\"token\":\"token address\"},\"returns\":{\"_0\":\"address of provider\"}},\"getRoyalties(address,uint256)\":{\"params\":{\"token\":\"address of token\",\"tokenId\":\"id of token\"},\"returns\":{\"_0\":\"royalties in form of an array of Parts\"}},\"getRoyaltiesType(address)\":{\"params\":{\"token\":\"token address\"},\"returns\":{\"_0\":\"royalty type\"}},\"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 provider\",\"token\":\"token address\"}},\"setRoyaltiesByToken(address,(address,uint96)[])\":{\"params\":{\"royalties\":\"array of royalties\",\"token\":\"address of token\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"stateVariables\":{\"royaltiesProviders\":{\"return\":\"royaltiesProviders external providers\",\"returns\":{\"_0\":\"royaltiesProviders external providers\"}}},\"title\":\"royalties registry contract\",\"version\":1},\"userdoc\":{\"events\":{\"RoyaltiesSetForContract(address,(address,uint96)[])\":{\"notice\":\"emitted when royalties is set for token\"},\"RoyaltiesSetForToken(address,uint256,(address,uint96)[])\":{\"notice\":\"deprecated\"}},\"kind\":\"user\",\"methods\":{\"__RoyaltiesRegistry_init()\":{\"notice\":\"Royalties registry initializer\"},\"clearRoyaltiesType(address)\":{\"notice\":\"clears royalties type for token contract\"},\"forceSetRoyaltiesType(address,uint256)\":{\"notice\":\"clears and sets new royalties type for token contract\"},\"getProvider(address)\":{\"notice\":\"returns provider address for token contract from royaltiesProviders mapping\"},\"getRoyalties(address,uint256)\":{\"notice\":\"returns royalties for token contract and token id\"},\"getRoyaltiesType(address)\":{\"notice\":\"returns royalties type for token contract\"},\"royaltiesByToken(address)\":{\"notice\":\"stores royalties for token contract, set in setRoyaltiesByToken() method\"},\"royaltiesByTokenAndTokenId(bytes32)\":{\"notice\":\"deprecated\"},\"royaltiesProviders(address)\":{\"notice\":\"stores external provider and royalties type for token contract\"},\"setProviderByToken(address,address)\":{\"notice\":\"sets external provider for token contract, and royalties type = 4\"},\"setRoyaltiesByToken(address,(address,uint96)[])\":{\"notice\":\"sets royalties for token contract in royaltiesByToken mapping and royalties type = 1\"}},\"notice\":\"contract allows to processing different types of royalties\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"@sandbox-smart-contracts/marketplace/contracts/royalties-registry/RoyaltiesRegistry.sol\":\"RoyaltiesRegistry\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":2000},\"remappings\":[]},\"sources\":{\"@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/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/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/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/marketplace/contracts/interfaces/IRoyaltiesProvider.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.21;\\n\\nimport {LibPart} from \\\"../lib-part/LibPart.sol\\\";\\n\\n/// @title interface for the RoyaltiesProvider contract\\n/// @notice contains the signature for the getRoyalties function\\ninterface IRoyaltiesProvider {\\n /// @notice calculates all roaylties in token for tokenId\\n /// @param token address of token\\n /// @param tokenId of the token we want to calculate royalites\\n /// @return a LibPart.Part with allroyalties for token\\n function getRoyalties(address token, uint256 tokenId) external returns (LibPart.Part[] memory);\\n}\\n\",\"keccak256\":\"0x86bc8bca3b5cab3a6e0ce9f41a3f8e89d0fc8e19e143fcac1b5b8e3cb4e0c994\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/marketplace/contracts/lib-part/LibPart.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.21;\\n\\n/// @title library for parts of transaction fees\\n/// @notice contains the struct for Part, containing the fee recipient and value\\nlibrary LibPart {\\n /// @notice type hash of Part struct\\n /// @return hash of Part struct\\n bytes32 public constant TYPE_HASH = keccak256(\\\"Part(address account,uint96 value)\\\");\\n\\n struct Part {\\n address account;\\n uint96 value;\\n }\\n\\n /// @notice hash part object\\n /// @param part to be hashed\\n /// @return resulting hash\\n function hash(Part memory part) internal pure returns (bytes32) {\\n return keccak256(abi.encode(TYPE_HASH, part.account, part.value));\\n }\\n}\\n\",\"keccak256\":\"0xe5688703d282c860c702f436bff69206520899860c958bd6e2b442d467e6219e\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/marketplace/contracts/royalties-registry/IMultiRoyaltyRecipients.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport {IERC165} from \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\n\\n/// @title interface for MultiRoyaltyRecipients\\n/// @notice Multi-receiver EIP2981 reference override implementation\\ninterface IMultiRoyaltyRecipients is IERC165 {\\n struct Recipient {\\n address payable recipient;\\n uint16 bps;\\n }\\n\\n /// @notice get recipients of token royalties\\n /// @param tokenId token identifier\\n /// @return array of royalties recipients\\n function getRecipients(uint256 tokenId) external view returns (Recipient[] memory);\\n}\\n\",\"keccak256\":\"0x60e13f29182760523eea47c15b9450c22078b07c57e7c2a260e899c4b65a8274\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/marketplace/contracts/royalties-registry/RoyaltiesRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.21;\\n\\nimport {IMultiRoyaltyRecipients} from \\\"./IMultiRoyaltyRecipients.sol\\\";\\nimport {IRoyaltiesProvider} from \\\"../interfaces/IRoyaltiesProvider.sol\\\";\\nimport {LibRoyalties2981} from \\\"../royalties/LibRoyalties2981.sol\\\";\\nimport {LibPart} from \\\"../lib-part/LibPart.sol\\\";\\nimport {IERC2981} from \\\"../royalties/IERC2981.sol\\\";\\nimport {IERC165Upgradeable} from \\\"@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol\\\";\\nimport {OwnableUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\n\\n/// @title royalties registry contract\\n/// @notice contract allows to processing different types of royalties\\ncontract RoyaltiesRegistry is IRoyaltiesProvider, OwnableUpgradeable {\\n /// @notice deprecated\\n /// @param token deprecated\\n /// @param tokenId deprecated\\n /// @param royalties deprecated\\n event RoyaltiesSetForToken(address indexed token, uint256 indexed tokenId, LibPart.Part[] royalties);\\n\\n /// @notice emitted when royalties is set for token\\n /// @param token token address\\n /// @param royalties array of royalties\\n event RoyaltiesSetForContract(address indexed token, LibPart.Part[] royalties);\\n\\n /// @dev struct to store royalties in royaltiesByToken\\n struct RoyaltiesSet {\\n bool initialized;\\n LibPart.Part[] royalties;\\n }\\n\\n bytes4 internal constant INTERFACE_ID_GET_RECIPIENTS = 0xfd90e897;\\n\\n /// @notice deprecated\\n mapping(bytes32 => RoyaltiesSet) public royaltiesByTokenAndTokenId;\\n\\n /// @notice stores royalties for token contract, set in setRoyaltiesByToken() method\\n mapping(address => RoyaltiesSet) public royaltiesByToken;\\n\\n /// @notice stores external provider and royalties type for token contract\\n /// @return royaltiesProviders external providers\\n mapping(address => uint256) public royaltiesProviders;\\n\\n uint256 internal constant ROYALTIES_TYPE_UNSET = 0;\\n uint256 internal constant ROYALTIES_TYPE_BY_TOKEN = 1;\\n uint256 internal constant ROYALTIES_TYPE_EXTERNAL_PROVIDER = 2;\\n uint256 internal constant ROYALTIES_TYPE_EIP2981 = 3;\\n uint256 internal constant ROYALTIES_TYPE_UNSUPPORTED_NONEXISTENT = 4;\\n uint256 internal constant ROYALTIES_TYPES_AMOUNT = 4;\\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 // solhint-disable-next-line func-name-mixedcase\\n function __RoyaltiesRegistry_init() external initializer {\\n __Ownable_init();\\n }\\n\\n /// @notice sets external provider for token contract, and royalties type = 4\\n /// @param token token address\\n /// @param provider address of provider\\n function setProviderByToken(address token, address provider) external {\\n checkOwner(token);\\n setRoyaltiesType(token, ROYALTIES_TYPE_EXTERNAL_PROVIDER, provider);\\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 royalties type for token contract\\n /// @param token token address\\n /// @return royalty type\\n function getRoyaltiesType(address token) external view returns (uint256) {\\n return _getRoyaltiesType(royaltiesProviders[token]);\\n }\\n\\n /// @notice returns royalties type from uint\\n /// @param data in uint256\\n /// @return royalty type\\n function _getRoyaltiesType(uint256 data) internal pure returns (uint256) {\\n for (uint256 i = 1; i <= ROYALTIES_TYPES_AMOUNT; ++i) {\\n if (data / 2 ** (256 - i) == 1) {\\n return i;\\n }\\n }\\n return ROYALTIES_TYPE_UNSET;\\n }\\n\\n /// @notice sets royalties type for token contract\\n /// @param token address of token\\n /// @param royaltiesType uint256 of royalty type\\n /// @param royaltiesProvider address of royalty provider\\n function setRoyaltiesType(address token, uint256 royaltiesType, address royaltiesProvider) internal {\\n require(royaltiesType > 0 && royaltiesType <= ROYALTIES_TYPES_AMOUNT, \\\"wrong royaltiesType\\\");\\n royaltiesProviders[token] = uint(uint160(royaltiesProvider)) + 2 ** (256 - royaltiesType);\\n }\\n\\n /// @notice clears and sets new royalties type for token contract\\n /// @param token address of token\\n /// @param royaltiesType roayalty type\\n function forceSetRoyaltiesType(address token, uint256 royaltiesType) external {\\n checkOwner(token);\\n setRoyaltiesType(token, royaltiesType, getProvider(token));\\n }\\n\\n /// @notice clears royalties type for token contract\\n /// @param token address of token\\n function clearRoyaltiesType(address token) external {\\n checkOwner(token);\\n royaltiesProviders[token] = uint(uint160(getProvider(token)));\\n }\\n\\n /// @notice sets royalties for token contract in royaltiesByToken mapping and royalties type = 1\\n /// @param token address of token\\n /// @param royalties array of royalties\\n function setRoyaltiesByToken(address token, LibPart.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, 1, 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), \\\"RoyaltiesByToken recipient should be present\\\");\\n require(royalties[i].value != 0, \\\"Royalty value for RoyaltiesByToken should be > 0\\\");\\n royaltiesByToken[token].royalties.push(royalties[i]);\\n sumRoyalties += royalties[i].value;\\n }\\n require(sumRoyalties < 10000, \\\"Set by token royalties sum more, than 100%\\\");\\n royaltiesByToken[token].initialized = true;\\n emit RoyaltiesSetForContract(token, royalties);\\n }\\n\\n /// @notice checks if msg.sender is owner of this contract or owner of the token contract\\n /// @param token address of token\\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 calculates royalties type for token contract\\n /// @param token address of token\\n /// @param royaltiesProvider address of royalty provider\\n /// @return royalty type\\n function calculateRoyaltiesType(address token, address royaltiesProvider) internal view returns (uint256) {\\n try IERC165Upgradeable(token).supportsInterface(LibRoyalties2981._INTERFACE_ID_ROYALTIES) returns (\\n bool result2981\\n ) {\\n if (result2981) {\\n return ROYALTIES_TYPE_EIP2981;\\n }\\n // solhint-disable-next-line no-empty-blocks\\n } catch {}\\n\\n if (royaltiesProvider != address(0)) {\\n return ROYALTIES_TYPE_EXTERNAL_PROVIDER;\\n }\\n\\n if (royaltiesByToken[token].initialized) {\\n return ROYALTIES_TYPE_BY_TOKEN;\\n }\\n\\n return ROYALTIES_TYPE_UNSUPPORTED_NONEXISTENT;\\n }\\n\\n /// @notice returns royalties for token contract and token id\\n /// @param token address of token\\n /// @param tokenId id of token\\n /// @return royalties in form of an array of Parts\\n function getRoyalties(address token, uint256 tokenId) external override returns (LibPart.Part[] memory) {\\n uint256 royaltiesProviderData = royaltiesProviders[token];\\n\\n address royaltiesProvider = address(uint160(royaltiesProviderData));\\n uint256 royaltiesType = _getRoyaltiesType(royaltiesProviderData);\\n\\n // case when royaltiesType is not set\\n if (royaltiesType == ROYALTIES_TYPE_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 == ROYALTIES_TYPE_BY_TOKEN) {\\n return royaltiesByToken[token].royalties;\\n }\\n\\n //case royaltiesType = 2, royalties from external provider\\n if (royaltiesType == ROYALTIES_TYPE_EXTERNAL_PROVIDER) {\\n return providerExtractor(token, tokenId, royaltiesProvider);\\n }\\n\\n //case royaltiesType = 3, royalties EIP-2981\\n if (royaltiesType == ROYALTIES_TYPE_EIP2981) {\\n return getRoyaltiesEIP2981(token, tokenId);\\n }\\n\\n // case royaltiesType = 4, unknown/empty royalties\\n if (royaltiesType == ROYALTIES_TYPE_UNSUPPORTED_NONEXISTENT) {\\n return new LibPart.Part[](0);\\n }\\n\\n revert(\\\"something wrong in getRoyalties\\\");\\n }\\n\\n /// @notice tries to get royalties EIP-2981 for token and tokenId\\n /// @param token address of token\\n /// @param tokenId id of token\\n /// @return royalties 2981 royalty array\\n function getRoyaltiesEIP2981(\\n address token,\\n uint256 tokenId\\n ) internal view returns (LibPart.Part[] memory royalties) {\\n try IERC2981(token).royaltyInfo(tokenId, LibRoyalties2981._WEIGHT_VALUE) returns (\\n address receiver,\\n uint256 royaltyAmount\\n ) {\\n try IERC165Upgradeable(token).supportsInterface(INTERFACE_ID_GET_RECIPIENTS) returns (bool result) {\\n if (result) {\\n try IMultiRoyaltyRecipients(token).getRecipients(tokenId) returns (\\n IMultiRoyaltyRecipients.Recipient[] memory multiRecipients\\n ) {\\n uint256 multiRecipientsLength = multiRecipients.length;\\n royalties = new LibPart.Part[](multiRecipientsLength);\\n uint256 sum = 0;\\n for (uint256 i; i < multiRecipientsLength; i++) {\\n IMultiRoyaltyRecipients.Recipient memory splitRecipient = multiRecipients[i];\\n royalties[i].account = splitRecipient.recipient;\\n uint256 splitAmount = (splitRecipient.bps * royaltyAmount) / LibRoyalties2981._WEIGHT_VALUE;\\n royalties[i].value = uint96(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 } catch {\\n return LibRoyalties2981.calculateRoyalties(receiver, royaltyAmount);\\n }\\n } else {\\n return LibRoyalties2981.calculateRoyalties(receiver, royaltyAmount);\\n }\\n } catch {\\n return LibRoyalties2981.calculateRoyalties(receiver, royaltyAmount);\\n }\\n } catch {\\n return new LibPart.Part[](0);\\n }\\n }\\n\\n /// @notice tries to get royalties for token and tokenId from external provider set in royaltiesProviders\\n /// @param token address of token\\n /// @param tokenId id of token\\n /// @param providerAddress address of external provider\\n /// @return external royalties\\n function providerExtractor(\\n address token,\\n uint256 tokenId,\\n address providerAddress\\n ) internal returns (LibPart.Part[] memory) {\\n try IRoyaltiesProvider(providerAddress).getRoyalties(token, tokenId) returns (LibPart.Part[] memory result) {\\n return result;\\n } catch {\\n return new LibPart.Part[](0);\\n }\\n }\\n\\n uint256[46] private __gap;\\n}\\n\",\"keccak256\":\"0xe2af977474cf00abe69325887cf5417db3a44b64a7f77b286be82983da850c76\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/marketplace/contracts/royalties/IERC2981.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.21;\\n\\n/// @title Interface for ERC2981\\n/// @notice NFT Royalty Standard\\ninterface IERC2981 {\\n /// @notice Called with the sale price to determine how much royalty is owed and to whom.\\n /// @param _tokenId - the NFT asset queried for royalty information\\n /// @param _salePrice - the sale price of the NFT asset specified by _tokenId\\n /// @return receiver - address of who should be sent the royalty payment\\n /// @return royaltyAmount - the royalty payment amount for _salePrice\\n function royaltyInfo(\\n uint256 _tokenId,\\n uint256 _salePrice\\n ) external view returns (address receiver, uint256 royaltyAmount);\\n}\\n\",\"keccak256\":\"0xdfb1672f4a508abb7d0d8177a503be476f077ea5f27e5cd586a4723ef7674d64\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/marketplace/contracts/royalties/LibRoyalties2981.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.21;\\n\\nimport {LibPart} from \\\"../lib-part/LibPart.sol\\\";\\n\\n/// @title library for constants and functions related to ERC2891\\n/// @notice standard for signature validation\\nlibrary LibRoyalties2981 {\\n bytes4 public constant _INTERFACE_ID_ROYALTIES = 0x2a55205a;\\n uint96 internal constant _WEIGHT_VALUE = 1e6;\\n\\n /// @notice method for converting amount to percent and forming LibPart\\n /// @param to recipient of royalties\\n /// @param amount of royalties\\n /// @return LibPart with account and value\\n function calculateRoyalties(address to, uint256 amount) internal pure returns (LibPart.Part[] memory) {\\n LibPart.Part[] memory result;\\n if (amount == 0) {\\n return result;\\n }\\n uint256 percent = (amount * 10000) / _WEIGHT_VALUE;\\n require(percent < 10000, \\\"Royalties 2981 exceeds 100%\\\");\\n result = new LibPart.Part[](1);\\n result[0].account = payable(to);\\n result[0].value = uint96(percent);\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x63a5259396aa8676000fad30712363929dac92f43b889c90c90fa191efda9e6d\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5061001961001e565b6100dd565b600054610100900460ff161561008a5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff908116146100db576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b611af9806100ec6000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80639ca7dc7a1161008c578063d836f01311610066578063d836f01314610215578063f2fde38b14610228578063f39cc7061461023b578063fc73be001461025b57600080fd5b80639ca7dc7a146101bf578063acf14efb146101df578063d1da3cce146101f257600080fd5b806355f21eb7116100c857806355f21eb714610144578063715018a61461018557806382b19f121461018d5780638da5cb5b146101ae57600080fd5b806305df952f146100ef57806327fff8ab1461012757806336eff6c214610131575b600080fd5b6101126100fd3660046114a2565b60666020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b61012f61026e565b005b61012f61013f3660046114bf565b610393565b61016d6101523660046114a2565b6001600160a01b031660009081526067602052604090205490565b6040516001600160a01b03909116815260200161011e565b61012f6103c9565b6101a061019b3660046114a2565b6103dd565b60405190815260200161011e565b6033546001600160a01b031661016d565b6101d26101cd3660046114bf565b610405565b60405161011e91906114eb565b61012f6101ed3660046115ff565b6105c2565b6101126102003660046116e0565b60656020526000908152604090205460ff1681565b61012f6102233660046116f9565b61092b565b61012f6102363660046114a2565b610940565b6101a06102493660046114a2565b60676020526000908152604090205481565b61012f6102693660046114a2565b6109cd565b600054610100900460ff161580801561028e5750600054600160ff909116105b806102a85750303b1580156102a8575060005460ff166001145b61031f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b6000805460ff191660011790558015610342576000805461ff0019166101001790555b61034a6109f8565b8015610390576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b61039c82610a7d565b6103c582826103c0856001600160a01b031660009081526067602052604090205490565b610b58565b5050565b6103d1610c00565b6103db6000610c5a565b565b6001600160a01b0381166000908152606760205260408120546103ff90610cc4565b92915050565b6001600160a01b038216600090815260676020526040812054606091819061042c82610cc4565b90508061044a5761043d8683610d18565b905061044a868284610b58565b600181036104fb576001600160a01b038616600090815260666020908152604080832060010180548251818502810185019093528083529193909284015b828210156104ed57600084815260209081902060408051808201909152908401546001600160a01b03811682527401000000000000000000000000000000000000000090046bffffffffffffffffffffffff1681830152825260019092019101610488565b5050505093505050506103ff565b600281036105185761050e868684610e14565b93505050506103ff565b6003810361052a5761050e8686610ef4565b6004810361057a57604080516000808252602082019092529061056f565b60408051808201909152600080825260208201528152602001906001900390816105485790505b5093505050506103ff565b60405162461bcd60e51b815260206004820152601f60248201527f736f6d657468696e672077726f6e6720696e20676574526f79616c74696573006044820152606401610316565b6105cb82610a7d565b6001600160a01b03821660009081526067602052604081208190556105f4908390600190610b58565b6001600160a01b0382166000908152606660205260408120805460ff1916815581610622600183018261145b565b505060005b82518110156108535760006001600160a01b031683828151811061064d5761064d611732565b6020026020010151600001516001600160a01b0316036106d55760405162461bcd60e51b815260206004820152602c60248201527f526f79616c746965734279546f6b656e20726563697069656e742073686f756c60448201527f642062652070726573656e7400000000000000000000000000000000000000006064820152608401610316565b8281815181106106e7576106e7611732565b6020026020010151602001516bffffffffffffffffffffffff166000036107765760405162461bcd60e51b815260206004820152603060248201527f526f79616c74792076616c756520666f7220526f79616c746965734279546f6b60448201527f656e2073686f756c64206265203e2030000000000000000000000000000000006064820152608401610316565b60666000856001600160a01b03166001600160a01b031681526020019081526020016000206001018382815181106107b0576107b0611732565b6020908102919091018101518254600181018455600093845292829020815191909201516bffffffffffffffffffffffff1674010000000000000000000000000000000000000000026001600160a01b0390911617910155825183908290811061081c5761081c611732565b6020026020010151602001516bffffffffffffffffffffffff1682610841919061175e565b915061084c81611771565b9050610627565b5061271081106108cb5760405162461bcd60e51b815260206004820152602a60248201527f53657420627920746f6b656e20726f79616c746965732073756d206d6f72652c60448201527f207468616e2031303025000000000000000000000000000000000000000000006064820152608401610316565b6001600160a01b03831660008181526066602052604090819020805460ff19166001179055517fc026171b9a7c9009d6a748a19a0a3cb877978a585e1647a87a786d724bbde1279061091e9085906114eb565b60405180910390a2505050565b61093482610a7d565b6103c582600283610b58565b610948610c00565b6001600160a01b0381166109c45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610316565b61039081610c5a565b6109d681610a7d565b6001600160a01b03908116600090815260676020526040902080549091169055565b600054610100900460ff16610a755760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610316565b6103db6112a2565b6033546001600160a01b03163314801590610b0b5750336001600160a01b0316816001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610adb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aff919061178b565b6001600160a01b031614155b156103905760405162461bcd60e51b815260206004820152601860248201527f546f6b656e206f776e6572206e6f7420646574656374656400000000000000006044820152606401610316565b600082118015610b69575060048211155b610bb55760405162461bcd60e51b815260206004820152601360248201527f77726f6e6720726f79616c7469657354797065000000000000000000000000006044820152606401610316565b610bc1826101006117a8565b610bcc90600261189f565b610bdf906001600160a01b03831661175e565b6001600160a01b039093166000908152606760205260409020929092555050565b6033546001600160a01b031633146103db5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610316565b603380546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600060015b60048111610d0f57610cdd816101006117a8565b610ce890600261189f565b610cf290846118ab565b600103610cff5792915050565b610d0881611771565b9050610cc9565b50600092915050565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527f2a55205a0000000000000000000000000000000000000000000000000000000060048201526000906001600160a01b038416906301ffc9a790602401602060405180830381865afa925050508015610db4575060408051601f3d908101601f19168201909252610db1918101906118cd565b60015b15610dcb578015610dc95760039150506103ff565b505b6001600160a01b03821615610de2575060026103ff565b6001600160a01b03831660009081526066602052604090205460ff1615610e0b575060016103ff565b50600492915050565b6040517f9ca7dc7a0000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301526024820184905260609190831690639ca7dc7a906044016000604051808303816000875af1925050508015610ea157506040513d6000823e601f3d908101601f19168201604052610e9e91908101906118ef565b60015b610eea576040805160008082526020820190925290610ee2565b6040805180820190915260008082526020820152815260200190600190039081610ebb5790505b509050610eed565b90505b9392505050565b6040517f2a55205a00000000000000000000000000000000000000000000000000000000815260048101829052620f424060248201526060906001600160a01b03841690632a55205a906044016040805180830381865afa925050508015610f79575060408051601f3d908101601f19168201909252610f76918101906119b8565b60015b610fc2576040805160008082526020820190925290610fba565b6040805180820190915260008082526020820152815260200190600190039081610f935790505b5090506103ff565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527ffd90e8970000000000000000000000000000000000000000000000000000000060048201526001600160a01b038616906301ffc9a790602401602060405180830381865afa92505050801561105b575060408051601f3d908101601f19168201909252611058918101906118cd565b60015b611072576110698282611328565b925050506103ff565b8015611298576040517ffd90e897000000000000000000000000000000000000000000000000000000008152600481018690526001600160a01b0387169063fd90e89790602401600060405180830381865afa9250505080156110f757506040513d6000823e601f3d908101601f191682016040526110f491908101906119e6565b60015b6111055761050e8383611328565b80518067ffffffffffffffff81111561112057611120611551565b60405190808252806020026020018201604052801561116557816020015b604080518082019091526000808252602082015281526020019060019003908161113e5790505b5095506000805b8281101561123c57600084828151811061118857611188611732565b6020026020010151905080600001518983815181106111a9576111a9611732565b6020908102919091018101516001600160a01b03909216909152810151600090620f4240906111dd908a9061ffff16611aac565b6111e791906118ab565b9050808a84815181106111fc576111fc611732565b6020908102919091018101516bffffffffffffffffffffffff909216910152611225818561175e565b93505050808061123490611771565b91505061116c565b508481111561128d5760405162461bcd60e51b815260206004820181905260248201527f526f79616c7469657352656769737472793a20496e76616c69642073706c69746044820152606401610316565b5050505050506103ff565b61050e8383611328565b600054610100900460ff1661131f5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610316565b6103db33610c5a565b6060808260000361133a5790506103ff565b6000620f424061134c85612710611aac565b61135691906118ab565b905061271081106113a95760405162461bcd60e51b815260206004820152601b60248201527f526f79616c7469657320323938312065786365656473203130302500000000006044820152606401610316565b60408051600180825281830190925290816020015b60408051808201909152600080825260208201528152602001906001900390816113be57905050915084826000815181106113fb576113fb611732565b6020026020010151600001906001600160a01b031690816001600160a01b031681525050808260008151811061143357611433611732565b6020908102919091018101516bffffffffffffffffffffffff90921691015250905092915050565b508054600082559060005260206000209081019061039091905b808211156114895760008155600101611475565b5090565b6001600160a01b038116811461039057600080fd5b6000602082840312156114b457600080fd5b8135610eed8161148d565b600080604083850312156114d257600080fd5b82356114dd8161148d565b946020939093013593505050565b602080825282518282018190526000919060409081850190868401855b8281101561154457815180516001600160a01b031685528601516bffffffffffffffffffffffff16868501529284019290850190600101611508565b5091979650505050505050565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff8111828210171561158a5761158a611551565b60405290565b604051601f8201601f1916810167ffffffffffffffff811182821017156115b9576115b9611551565b604052919050565b600067ffffffffffffffff8211156115db576115db611551565b5060051b60200190565b6bffffffffffffffffffffffff8116811461039057600080fd5b600080604080848603121561161357600080fd5b833561161e8161148d565b925060208481013567ffffffffffffffff81111561163b57600080fd5b8501601f8101871361164c57600080fd5b803561165f61165a826115c1565b611590565b81815260069190911b8201830190838101908983111561167e57600080fd5b928401925b828410156116d05785848b03121561169b5760008081fd5b6116a3611567565b84356116ae8161148d565b8152848601356116bd816115e5565b8187015282529285019290840190611683565b8096505050505050509250929050565b6000602082840312156116f257600080fd5b5035919050565b6000806040838503121561170c57600080fd5b82356117178161148d565b915060208301356117278161148d565b809150509250929050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808201808211156103ff576103ff611748565b6000600019820361178457611784611748565b5060010190565b60006020828403121561179d57600080fd5b8151610eed8161148d565b818103818111156103ff576103ff611748565b600181815b808511156117f65781600019048211156117dc576117dc611748565b808516156117e957918102915b93841c93908002906117c0565b509250929050565b60008261180d575060016103ff565b8161181a575060006103ff565b8160018114611830576002811461183a57611856565b60019150506103ff565b60ff84111561184b5761184b611748565b50506001821b6103ff565b5060208310610133831016604e8410600b8410161715611879575081810a6103ff565b61188383836117bb565b806000190482111561189757611897611748565b029392505050565b6000610eed83836117fe565b6000826118c857634e487b7160e01b600052601260045260246000fd5b500490565b6000602082840312156118df57600080fd5b81518015158114610eed57600080fd5b6000602080838503121561190257600080fd5b825167ffffffffffffffff81111561191957600080fd5b8301601f8101851361192a57600080fd5b805161193861165a826115c1565b81815260069190911b8201830190838101908783111561195757600080fd5b928401925b828410156119ad57604084890312156119755760008081fd5b61197d611567565b84516119888161148d565b815284860151611997816115e5565b818701528252604093909301929084019061195c565b979650505050505050565b600080604083850312156119cb57600080fd5b82516119d68161148d565b6020939093015192949293505050565b600060208083850312156119f957600080fd5b825167ffffffffffffffff811115611a1057600080fd5b8301601f81018513611a2157600080fd5b8051611a2f61165a826115c1565b81815260069190911b82018301908381019087831115611a4e57600080fd5b928401925b828410156119ad5760408489031215611a6c5760008081fd5b611a74611567565b8451611a7f8161148d565b81528486015161ffff81168114611a965760008081fd5b8187015282526040939093019290840190611a53565b80820281158282048414176103ff576103ff61174856fea2646970667358221220250d401ba179c2783ab09b3f3c91945cb03ff28b13e0754440bfec1c0306754464736f6c63430008150033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c80639ca7dc7a1161008c578063d836f01311610066578063d836f01314610215578063f2fde38b14610228578063f39cc7061461023b578063fc73be001461025b57600080fd5b80639ca7dc7a146101bf578063acf14efb146101df578063d1da3cce146101f257600080fd5b806355f21eb7116100c857806355f21eb714610144578063715018a61461018557806382b19f121461018d5780638da5cb5b146101ae57600080fd5b806305df952f146100ef57806327fff8ab1461012757806336eff6c214610131575b600080fd5b6101126100fd3660046114a2565b60666020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b61012f61026e565b005b61012f61013f3660046114bf565b610393565b61016d6101523660046114a2565b6001600160a01b031660009081526067602052604090205490565b6040516001600160a01b03909116815260200161011e565b61012f6103c9565b6101a061019b3660046114a2565b6103dd565b60405190815260200161011e565b6033546001600160a01b031661016d565b6101d26101cd3660046114bf565b610405565b60405161011e91906114eb565b61012f6101ed3660046115ff565b6105c2565b6101126102003660046116e0565b60656020526000908152604090205460ff1681565b61012f6102233660046116f9565b61092b565b61012f6102363660046114a2565b610940565b6101a06102493660046114a2565b60676020526000908152604090205481565b61012f6102693660046114a2565b6109cd565b600054610100900460ff161580801561028e5750600054600160ff909116105b806102a85750303b1580156102a8575060005460ff166001145b61031f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b6000805460ff191660011790558015610342576000805461ff0019166101001790555b61034a6109f8565b8015610390576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b61039c82610a7d565b6103c582826103c0856001600160a01b031660009081526067602052604090205490565b610b58565b5050565b6103d1610c00565b6103db6000610c5a565b565b6001600160a01b0381166000908152606760205260408120546103ff90610cc4565b92915050565b6001600160a01b038216600090815260676020526040812054606091819061042c82610cc4565b90508061044a5761043d8683610d18565b905061044a868284610b58565b600181036104fb576001600160a01b038616600090815260666020908152604080832060010180548251818502810185019093528083529193909284015b828210156104ed57600084815260209081902060408051808201909152908401546001600160a01b03811682527401000000000000000000000000000000000000000090046bffffffffffffffffffffffff1681830152825260019092019101610488565b5050505093505050506103ff565b600281036105185761050e868684610e14565b93505050506103ff565b6003810361052a5761050e8686610ef4565b6004810361057a57604080516000808252602082019092529061056f565b60408051808201909152600080825260208201528152602001906001900390816105485790505b5093505050506103ff565b60405162461bcd60e51b815260206004820152601f60248201527f736f6d657468696e672077726f6e6720696e20676574526f79616c74696573006044820152606401610316565b6105cb82610a7d565b6001600160a01b03821660009081526067602052604081208190556105f4908390600190610b58565b6001600160a01b0382166000908152606660205260408120805460ff1916815581610622600183018261145b565b505060005b82518110156108535760006001600160a01b031683828151811061064d5761064d611732565b6020026020010151600001516001600160a01b0316036106d55760405162461bcd60e51b815260206004820152602c60248201527f526f79616c746965734279546f6b656e20726563697069656e742073686f756c60448201527f642062652070726573656e7400000000000000000000000000000000000000006064820152608401610316565b8281815181106106e7576106e7611732565b6020026020010151602001516bffffffffffffffffffffffff166000036107765760405162461bcd60e51b815260206004820152603060248201527f526f79616c74792076616c756520666f7220526f79616c746965734279546f6b60448201527f656e2073686f756c64206265203e2030000000000000000000000000000000006064820152608401610316565b60666000856001600160a01b03166001600160a01b031681526020019081526020016000206001018382815181106107b0576107b0611732565b6020908102919091018101518254600181018455600093845292829020815191909201516bffffffffffffffffffffffff1674010000000000000000000000000000000000000000026001600160a01b0390911617910155825183908290811061081c5761081c611732565b6020026020010151602001516bffffffffffffffffffffffff1682610841919061175e565b915061084c81611771565b9050610627565b5061271081106108cb5760405162461bcd60e51b815260206004820152602a60248201527f53657420627920746f6b656e20726f79616c746965732073756d206d6f72652c60448201527f207468616e2031303025000000000000000000000000000000000000000000006064820152608401610316565b6001600160a01b03831660008181526066602052604090819020805460ff19166001179055517fc026171b9a7c9009d6a748a19a0a3cb877978a585e1647a87a786d724bbde1279061091e9085906114eb565b60405180910390a2505050565b61093482610a7d565b6103c582600283610b58565b610948610c00565b6001600160a01b0381166109c45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610316565b61039081610c5a565b6109d681610a7d565b6001600160a01b03908116600090815260676020526040902080549091169055565b600054610100900460ff16610a755760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610316565b6103db6112a2565b6033546001600160a01b03163314801590610b0b5750336001600160a01b0316816001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610adb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aff919061178b565b6001600160a01b031614155b156103905760405162461bcd60e51b815260206004820152601860248201527f546f6b656e206f776e6572206e6f7420646574656374656400000000000000006044820152606401610316565b600082118015610b69575060048211155b610bb55760405162461bcd60e51b815260206004820152601360248201527f77726f6e6720726f79616c7469657354797065000000000000000000000000006044820152606401610316565b610bc1826101006117a8565b610bcc90600261189f565b610bdf906001600160a01b03831661175e565b6001600160a01b039093166000908152606760205260409020929092555050565b6033546001600160a01b031633146103db5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610316565b603380546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600060015b60048111610d0f57610cdd816101006117a8565b610ce890600261189f565b610cf290846118ab565b600103610cff5792915050565b610d0881611771565b9050610cc9565b50600092915050565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527f2a55205a0000000000000000000000000000000000000000000000000000000060048201526000906001600160a01b038416906301ffc9a790602401602060405180830381865afa925050508015610db4575060408051601f3d908101601f19168201909252610db1918101906118cd565b60015b15610dcb578015610dc95760039150506103ff565b505b6001600160a01b03821615610de2575060026103ff565b6001600160a01b03831660009081526066602052604090205460ff1615610e0b575060016103ff565b50600492915050565b6040517f9ca7dc7a0000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301526024820184905260609190831690639ca7dc7a906044016000604051808303816000875af1925050508015610ea157506040513d6000823e601f3d908101601f19168201604052610e9e91908101906118ef565b60015b610eea576040805160008082526020820190925290610ee2565b6040805180820190915260008082526020820152815260200190600190039081610ebb5790505b509050610eed565b90505b9392505050565b6040517f2a55205a00000000000000000000000000000000000000000000000000000000815260048101829052620f424060248201526060906001600160a01b03841690632a55205a906044016040805180830381865afa925050508015610f79575060408051601f3d908101601f19168201909252610f76918101906119b8565b60015b610fc2576040805160008082526020820190925290610fba565b6040805180820190915260008082526020820152815260200190600190039081610f935790505b5090506103ff565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527ffd90e8970000000000000000000000000000000000000000000000000000000060048201526001600160a01b038616906301ffc9a790602401602060405180830381865afa92505050801561105b575060408051601f3d908101601f19168201909252611058918101906118cd565b60015b611072576110698282611328565b925050506103ff565b8015611298576040517ffd90e897000000000000000000000000000000000000000000000000000000008152600481018690526001600160a01b0387169063fd90e89790602401600060405180830381865afa9250505080156110f757506040513d6000823e601f3d908101601f191682016040526110f491908101906119e6565b60015b6111055761050e8383611328565b80518067ffffffffffffffff81111561112057611120611551565b60405190808252806020026020018201604052801561116557816020015b604080518082019091526000808252602082015281526020019060019003908161113e5790505b5095506000805b8281101561123c57600084828151811061118857611188611732565b6020026020010151905080600001518983815181106111a9576111a9611732565b6020908102919091018101516001600160a01b03909216909152810151600090620f4240906111dd908a9061ffff16611aac565b6111e791906118ab565b9050808a84815181106111fc576111fc611732565b6020908102919091018101516bffffffffffffffffffffffff909216910152611225818561175e565b93505050808061123490611771565b91505061116c565b508481111561128d5760405162461bcd60e51b815260206004820181905260248201527f526f79616c7469657352656769737472793a20496e76616c69642073706c69746044820152606401610316565b5050505050506103ff565b61050e8383611328565b600054610100900460ff1661131f5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610316565b6103db33610c5a565b6060808260000361133a5790506103ff565b6000620f424061134c85612710611aac565b61135691906118ab565b905061271081106113a95760405162461bcd60e51b815260206004820152601b60248201527f526f79616c7469657320323938312065786365656473203130302500000000006044820152606401610316565b60408051600180825281830190925290816020015b60408051808201909152600080825260208201528152602001906001900390816113be57905050915084826000815181106113fb576113fb611732565b6020026020010151600001906001600160a01b031690816001600160a01b031681525050808260008151811061143357611433611732565b6020908102919091018101516bffffffffffffffffffffffff90921691015250905092915050565b508054600082559060005260206000209081019061039091905b808211156114895760008155600101611475565b5090565b6001600160a01b038116811461039057600080fd5b6000602082840312156114b457600080fd5b8135610eed8161148d565b600080604083850312156114d257600080fd5b82356114dd8161148d565b946020939093013593505050565b602080825282518282018190526000919060409081850190868401855b8281101561154457815180516001600160a01b031685528601516bffffffffffffffffffffffff16868501529284019290850190600101611508565b5091979650505050505050565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff8111828210171561158a5761158a611551565b60405290565b604051601f8201601f1916810167ffffffffffffffff811182821017156115b9576115b9611551565b604052919050565b600067ffffffffffffffff8211156115db576115db611551565b5060051b60200190565b6bffffffffffffffffffffffff8116811461039057600080fd5b600080604080848603121561161357600080fd5b833561161e8161148d565b925060208481013567ffffffffffffffff81111561163b57600080fd5b8501601f8101871361164c57600080fd5b803561165f61165a826115c1565b611590565b81815260069190911b8201830190838101908983111561167e57600080fd5b928401925b828410156116d05785848b03121561169b5760008081fd5b6116a3611567565b84356116ae8161148d565b8152848601356116bd816115e5565b8187015282529285019290840190611683565b8096505050505050509250929050565b6000602082840312156116f257600080fd5b5035919050565b6000806040838503121561170c57600080fd5b82356117178161148d565b915060208301356117278161148d565b809150509250929050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808201808211156103ff576103ff611748565b6000600019820361178457611784611748565b5060010190565b60006020828403121561179d57600080fd5b8151610eed8161148d565b818103818111156103ff576103ff611748565b600181815b808511156117f65781600019048211156117dc576117dc611748565b808516156117e957918102915b93841c93908002906117c0565b509250929050565b60008261180d575060016103ff565b8161181a575060006103ff565b8160018114611830576002811461183a57611856565b60019150506103ff565b60ff84111561184b5761184b611748565b50506001821b6103ff565b5060208310610133831016604e8410600b8410161715611879575081810a6103ff565b61188383836117bb565b806000190482111561189757611897611748565b029392505050565b6000610eed83836117fe565b6000826118c857634e487b7160e01b600052601260045260246000fd5b500490565b6000602082840312156118df57600080fd5b81518015158114610eed57600080fd5b6000602080838503121561190257600080fd5b825167ffffffffffffffff81111561191957600080fd5b8301601f8101851361192a57600080fd5b805161193861165a826115c1565b81815260069190911b8201830190838101908783111561195757600080fd5b928401925b828410156119ad57604084890312156119755760008081fd5b61197d611567565b84516119888161148d565b815284860151611997816115e5565b818701528252604093909301929084019061195c565b979650505050505050565b600080604083850312156119cb57600080fd5b82516119d68161148d565b6020939093015192949293505050565b600060208083850312156119f957600080fd5b825167ffffffffffffffff811115611a1057600080fd5b8301601f81018513611a2157600080fd5b8051611a2f61165a826115c1565b81815260069190911b82018301908381019087831115611a4e57600080fd5b928401925b828410156119ad5760408489031215611a6c5760008081fd5b611a74611567565b8451611a7f8161148d565b81528486015161ffff81168114611a965760008081fd5b8187015282526040939093019290840190611a53565b80820281158282048414176103ff576103ff61174856fea2646970667358221220250d401ba179c2783ab09b3f3c91945cb03ff28b13e0754440bfec1c0306754464736f6c63430008150033", + "devdoc": { + "events": { + "Initialized(uint8)": { + "details": "Triggered when the contract has been initialized or reinitialized." + }, + "RoyaltiesSetForContract(address,(address,uint96)[])": { + "params": { + "royalties": "array of royalties", + "token": "token address" + } + }, + "RoyaltiesSetForToken(address,uint256,(address,uint96)[])": { + "params": { + "royalties": "deprecated", + "token": "deprecated", + "tokenId": "deprecated" + } + } + }, + "kind": "dev", + "methods": { + "clearRoyaltiesType(address)": { + "params": { + "token": "address of token" + } + }, + "constructor": { + "custom:oz-upgrades-unsafe-allow": "constructor", + "details": "this protects the implementation contract from being initialized." + }, + "forceSetRoyaltiesType(address,uint256)": { + "params": { + "royaltiesType": "roayalty type", + "token": "address of token" + } + }, + "getProvider(address)": { + "params": { + "token": "token address" + }, + "returns": { + "_0": "address of provider" + } + }, + "getRoyalties(address,uint256)": { + "params": { + "token": "address of token", + "tokenId": "id of token" + }, + "returns": { + "_0": "royalties in form of an array of Parts" + } + }, + "getRoyaltiesType(address)": { + "params": { + "token": "token address" + }, + "returns": { + "_0": "royalty type" + } + }, + "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 provider", + "token": "token address" + } + }, + "setRoyaltiesByToken(address,(address,uint96)[])": { + "params": { + "royalties": "array of royalties", + "token": "address of token" + } + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + } + }, + "stateVariables": { + "royaltiesProviders": { + "return": "royaltiesProviders external providers", + "returns": { + "_0": "royaltiesProviders external providers" + } + } + }, + "title": "royalties registry contract", + "version": 1 + }, + "userdoc": { + "events": { + "RoyaltiesSetForContract(address,(address,uint96)[])": { + "notice": "emitted when royalties is set for token" + }, + "RoyaltiesSetForToken(address,uint256,(address,uint96)[])": { + "notice": "deprecated" + } + }, + "kind": "user", + "methods": { + "__RoyaltiesRegistry_init()": { + "notice": "Royalties registry initializer" + }, + "clearRoyaltiesType(address)": { + "notice": "clears royalties type for token contract" + }, + "forceSetRoyaltiesType(address,uint256)": { + "notice": "clears and sets new royalties type for token contract" + }, + "getProvider(address)": { + "notice": "returns provider address for token contract from royaltiesProviders mapping" + }, + "getRoyalties(address,uint256)": { + "notice": "returns royalties for token contract and token id" + }, + "getRoyaltiesType(address)": { + "notice": "returns royalties type for token contract" + }, + "royaltiesByToken(address)": { + "notice": "stores royalties for token contract, set in setRoyaltiesByToken() method" + }, + "royaltiesByTokenAndTokenId(bytes32)": { + "notice": "deprecated" + }, + "royaltiesProviders(address)": { + "notice": "stores external provider and royalties type for token contract" + }, + "setProviderByToken(address,address)": { + "notice": "sets external provider for token contract, and royalties type = 4" + }, + "setRoyaltiesByToken(address,(address,uint96)[])": { + "notice": "sets royalties for token contract in royaltiesByToken mapping and royalties type = 1" + } + }, + "notice": "contract allows to processing different types of royalties", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 586, + "contract": "@sandbox-smart-contracts/marketplace/contracts/royalties-registry/RoyaltiesRegistry.sol:RoyaltiesRegistry", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 589, + "contract": "@sandbox-smart-contracts/marketplace/contracts/royalties-registry/RoyaltiesRegistry.sol:RoyaltiesRegistry", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 1974, + "contract": "@sandbox-smart-contracts/marketplace/contracts/royalties-registry/RoyaltiesRegistry.sol:RoyaltiesRegistry", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 419, + "contract": "@sandbox-smart-contracts/marketplace/contracts/royalties-registry/RoyaltiesRegistry.sol:RoyaltiesRegistry", + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address" + }, + { + "astId": 539, + "contract": "@sandbox-smart-contracts/marketplace/contracts/royalties-registry/RoyaltiesRegistry.sol:RoyaltiesRegistry", + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 6436, + "contract": "@sandbox-smart-contracts/marketplace/contracts/royalties-registry/RoyaltiesRegistry.sol:RoyaltiesRegistry", + "label": "royaltiesByTokenAndTokenId", + "offset": 0, + "slot": "101", + "type": "t_mapping(t_bytes32,t_struct(RoyaltiesSet)6427_storage)" + }, + { + "astId": 6442, + "contract": "@sandbox-smart-contracts/marketplace/contracts/royalties-registry/RoyaltiesRegistry.sol:RoyaltiesRegistry", + "label": "royaltiesByToken", + "offset": 0, + "slot": "102", + "type": "t_mapping(t_address,t_struct(RoyaltiesSet)6427_storage)" + }, + { + "astId": 6447, + "contract": "@sandbox-smart-contracts/marketplace/contracts/royalties-registry/RoyaltiesRegistry.sol:RoyaltiesRegistry", + "label": "royaltiesProviders", + "offset": 0, + "slot": "103", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 7166, + "contract": "@sandbox-smart-contracts/marketplace/contracts/royalties-registry/RoyaltiesRegistry.sol:RoyaltiesRegistry", + "label": "__gap", + "offset": 0, + "slot": "104", + "type": "t_array(t_uint256)46_storage" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_struct(Part)6333_storage)dyn_storage": { + "base": "t_struct(Part)6333_storage", + "encoding": "dynamic_array", + "label": "struct LibPart.Part[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)46_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[46]", + "numberOfBytes": "1472" + }, + "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_struct(RoyaltiesSet)6427_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct RoyaltiesRegistry.RoyaltiesSet)", + "numberOfBytes": "32", + "value": "t_struct(RoyaltiesSet)6427_storage" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_bytes32,t_struct(RoyaltiesSet)6427_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct RoyaltiesRegistry.RoyaltiesSet)", + "numberOfBytes": "32", + "value": "t_struct(RoyaltiesSet)6427_storage" + }, + "t_struct(Part)6333_storage": { + "encoding": "inplace", + "label": "struct LibPart.Part", + "members": [ + { + "astId": 6330, + "contract": "@sandbox-smart-contracts/marketplace/contracts/royalties-registry/RoyaltiesRegistry.sol:RoyaltiesRegistry", + "label": "account", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 6332, + "contract": "@sandbox-smart-contracts/marketplace/contracts/royalties-registry/RoyaltiesRegistry.sol:RoyaltiesRegistry", + "label": "value", + "offset": 20, + "slot": "0", + "type": "t_uint96" + } + ], + "numberOfBytes": "32" + }, + "t_struct(RoyaltiesSet)6427_storage": { + "encoding": "inplace", + "label": "struct RoyaltiesRegistry.RoyaltiesSet", + "members": [ + { + "astId": 6422, + "contract": "@sandbox-smart-contracts/marketplace/contracts/royalties-registry/RoyaltiesRegistry.sol:RoyaltiesRegistry", + "label": "initialized", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 6426, + "contract": "@sandbox-smart-contracts/marketplace/contracts/royalties-registry/RoyaltiesRegistry.sol:RoyaltiesRegistry", + "label": "royalties", + "offset": 0, + "slot": "1", + "type": "t_array(t_struct(Part)6333_storage)dyn_storage" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + }, + "t_uint96": { + "encoding": "inplace", + "label": "uint96", + "numberOfBytes": "12" + } + } + } +} \ 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..cf8dc14a7c --- /dev/null +++ b/packages/deploy/deployments/mumbai/RoyaltiesRegistry_Proxy.json @@ -0,0 +1,276 @@ +{ + "address": "0xD38625EDEe3f1c3a8588CEa4Afe1D516a7997dCF", + "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": "0x39de8ee23fb830bab0b77f0dff888510d80f33406705111398cb82bdede7bc15", + "receipt": { + "to": null, + "from": "0x5F890c9522dCE5670d741D4277BFCC2d9cA8Af02", + "contractAddress": "0xD38625EDEe3f1c3a8588CEa4Afe1D516a7997dCF", + "transactionIndex": 1, + "gasUsed": "769728", + "logsBloom": "0x000000000000000000000000000000004000000000000000008000000000000000020000000000000000000000000000000080000000000000000000000000000000000000000000000000000000028000010000000000001001000000000040000000000200000000000001000008000000008000000000a1000000000000400000000000000000000000000000000000000000000080000000000000a00000200000000000000000000000000400000000000000000000000000000000004000000020000000000001000000040000000000000404000000108040000020000000000000000000000020000000000000000000000000000000000000100000", + "blockHash": "0x0c390325901004858bb248600b8610600209ccdf833c0a903fe47774b78fdbe1", + "transactionHash": "0x39de8ee23fb830bab0b77f0dff888510d80f33406705111398cb82bdede7bc15", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 40870174, + "transactionHash": "0x39de8ee23fb830bab0b77f0dff888510d80f33406705111398cb82bdede7bc15", + "address": "0xD38625EDEe3f1c3a8588CEa4Afe1D516a7997dCF", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x00000000000000000000000074504e0e5c7da578da2d6630ba66fa20a54e1bfc" + ], + "data": "0x", + "logIndex": 2, + "blockHash": "0x0c390325901004858bb248600b8610600209ccdf833c0a903fe47774b78fdbe1" + }, + { + "transactionIndex": 1, + "blockNumber": 40870174, + "transactionHash": "0x39de8ee23fb830bab0b77f0dff888510d80f33406705111398cb82bdede7bc15", + "address": "0xD38625EDEe3f1c3a8588CEa4Afe1D516a7997dCF", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000005f890c9522dce5670d741d4277bfcc2d9ca8af02" + ], + "data": "0x", + "logIndex": 3, + "blockHash": "0x0c390325901004858bb248600b8610600209ccdf833c0a903fe47774b78fdbe1" + }, + { + "transactionIndex": 1, + "blockNumber": 40870174, + "transactionHash": "0x39de8ee23fb830bab0b77f0dff888510d80f33406705111398cb82bdede7bc15", + "address": "0xD38625EDEe3f1c3a8588CEa4Afe1D516a7997dCF", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 4, + "blockHash": "0x0c390325901004858bb248600b8610600209ccdf833c0a903fe47774b78fdbe1" + }, + { + "transactionIndex": 1, + "blockNumber": 40870174, + "transactionHash": "0x39de8ee23fb830bab0b77f0dff888510d80f33406705111398cb82bdede7bc15", + "address": "0xD38625EDEe3f1c3a8588CEa4Afe1D516a7997dCF", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045023af7b33994a22740bc51c3ca90a7ed82e124", + "logIndex": 5, + "blockHash": "0x0c390325901004858bb248600b8610600209ccdf833c0a903fe47774b78fdbe1" + }, + { + "transactionIndex": 1, + "blockNumber": 40870174, + "transactionHash": "0x39de8ee23fb830bab0b77f0dff888510d80f33406705111398cb82bdede7bc15", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x0000000000000000000000005f890c9522dce5670d741d4277bfcc2d9ca8af02", + "0x000000000000000000000000be188d6641e8b680743a4815dfa0f6208038960f" + ], + "data": "0x000000000000000000000000000000000000000000000000005209e7f869000000000000000000000000000000000000000000000000000f8a9125e44c7e020d0000000000000000000000000000000000000000000034aaa50799165c316d0900000000000000000000000000000000000000000000000f8a3f1bfc5415020d0000000000000000000000000000000000000000000034aaa559a2fe549a6d09", + "logIndex": 6, + "blockHash": "0x0c390325901004858bb248600b8610600209ccdf833c0a903fe47774b78fdbe1" + } + ], + "blockNumber": 40870174, + "cumulativeGasUsed": "817928", + "status": 1, + "byzantium": true + }, + "args": [ + "0x74504e0e5c7da578da2d6630ba66fa20a54e1bfc", + "0x45023af7B33994a22740Bc51C3Ca90A7Ed82e124", + "0x27fff8ab" + ], + "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/e3e5cb3be3e50acf298170047cd7c5c0.json b/packages/deploy/deployments/mumbai/solcInputs/e3e5cb3be3e50acf298170047cd7c5c0.json new file mode 100644 index 0000000000..e615a6e37f --- /dev/null +++ b/packages/deploy/deployments/mumbai/solcInputs/e3e5cb3be3e50acf298170047cd7c5c0.json @@ -0,0 +1,36 @@ +{ + "language": "Solidity", + "sources": { + "contracts/mocks/TrustedForwarderMock.sol": { + "content": "//SPDX-License-Identifier: MIT\n// solhint-disable-next-line compiler-version\npragma solidity 0.8.2;\n\ncontract TrustedForwarderMock {\n\n struct ForwardRequest {\n address from;\n address to;\n uint256 value;\n uint256 gas;\n uint256 nonce;\n bytes data;\n }\n\n function execute(ForwardRequest calldata req, bytes calldata)\n public\n payable\n returns (bool, bytes memory)\n {\n (bool success, bytes memory returndata) =\n req.to.call{gas : req.gas, value : req.value}(abi.encodePacked(req.data, req.from));\n assert(gasleft() > req.gas / 63);\n return (success, returndata);\n }\n}\n" + } + }, + "settings": { + "evmVersion": "istanbul", + "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 diff --git a/packages/deploy/deployments/mumbai/solcInputs/ecd1b268b7f8423b750f66ee2d2cf788.json b/packages/deploy/deployments/mumbai/solcInputs/ecd1b268b7f8423b750f66ee2d2cf788.json new file mode 100644 index 0000000000..22c42b8e3e --- /dev/null +++ b/packages/deploy/deployments/mumbai/solcInputs/ecd1b268b7f8423b750f66ee2d2cf788.json @@ -0,0 +1,174 @@ +{ + "language": "Solidity", + "sources": { + "@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/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/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/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, \"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/marketplace/contracts/exchange/Exchange.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.21;\n\nimport {PausableUpgradeable} from \"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\";\nimport {Initializable} from \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport {AccessControlUpgradeable} from \"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\";\nimport {ContextUpgradeable} from \"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\";\nimport {ERC165Upgradeable} from \"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\";\nimport {ERC2771HandlerUpgradeable} from \"@sandbox-smart-contracts/dependency-metatx/contracts/ERC2771HandlerUpgradeable.sol\";\nimport {IOrderValidator} from \"../interfaces/IOrderValidator.sol\";\nimport {TransferManager, IRoyaltiesProvider} from \"../transfer-manager/TransferManager.sol\";\nimport {LibOrder} from \"../lib-order/LibOrder.sol\";\nimport {ExchangeCore} from \"./ExchangeCore.sol\";\n\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 AccessControlUpgradeable,\n ExchangeCore,\n TransferManager,\n ERC2771HandlerUpgradeable,\n PausableUpgradeable\n{\n /// @notice role erc1776 trusted meta transaction contracts (Sand for example).\n /// @return hash for ERC1776_OPERATOR_ROLE\n bytes32 public constant ERC1776_OPERATOR_ROLE = keccak256(\"ERC1776_OPERATOR_ROLE\");\n\n /// @notice role business addresses that can change for example: 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 business addresses that can react on an emergency, 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 trusted forwarder that will execute meta transactions\n /// @param newProtocolFeePrimary protocol fee applied for primary markets\n /// @param newProtocolFeeSecondary protocol fee applied for 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 // solhint-disable-next-line func-name-mixedcase\n function __Exchange_init(\n address admin,\n address newTrustedForwarder,\n uint256 newProtocolFeePrimary,\n uint256 newProtocolFeeSecondary,\n address newDefaultFeeReceiver,\n IRoyaltiesProvider newRoyaltiesProvider,\n IOrderValidator orderValidatorAddress\n ) external initializer {\n __ERC2771Handler_init_unchained(newTrustedForwarder);\n __AccessControl_init_unchained();\n __Pausable_init_unchained();\n __TransferManager_init_unchained(\n newProtocolFeePrimary,\n newProtocolFeeSecondary,\n newDefaultFeeReceiver,\n newRoyaltiesProvider\n );\n __ExchangeCoreInitialize(orderValidatorAddress);\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 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 order\n /// @param order to be canceled\n /// @param orderKeyHash used as a checksum to avoid mistakes in the values of order\n /// @dev require msg sender to be order maker and salt different from 0\n function cancel(LibOrder.Order calldata order, bytes32 orderKeyHash) external whenNotPaused {\n require(_msgSender() == order.maker, \"ExchangeCore: not maker\");\n _cancel(order, orderKeyHash);\n }\n\n /// @notice setter for royalty registry\n /// @param newRoyaltiesRegistry address of new royalties registry\n function setRoyaltiesRegistry(IRoyaltiesProvider newRoyaltiesRegistry) external onlyRole(DEFAULT_ADMIN_ROLE) {\n _setRoyaltiesRegistry(newRoyaltiesRegistry);\n }\n\n /// @notice set 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 Change the address of the trusted forwarder for meta-transactions\n /// @param newTrustedForwarder The new trustedForwarder\n function setTrustedForwarder(address newTrustedForwarder) external virtual onlyRole(DEFAULT_ADMIN_ROLE) {\n _setTrustedForwarder(newTrustedForwarder);\n }\n\n /// @notice setter for protocol fees\n /// @param newProtocolFeePrimary fee for primary market\n /// @param newProtocolFeeSecondary fee for 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 setter for default fee receiver\n /// @param newDefaultFeeReceiver address that gets the fees\n function setDefaultFeeReceiver(address newDefaultFeeReceiver) external onlyRole(EXCHANGE_ADMIN_ROLE) {\n _setDefaultFeeReceiver(newDefaultFeeReceiver);\n }\n\n // @notice Triggers stopped state.\n function pause() external onlyRole(PAUSER_ROLE) {\n _pause();\n }\n\n /// @notice Returns to normal state.\n function unpause() external onlyRole(EXCHANGE_ADMIN_ROLE) {\n _unpause();\n }\n\n /// @notice See {IERC165-supportsInterface}.\n /// @param interfaceId interface id to check\n function supportsInterface(\n bytes4 interfaceId\n ) public view virtual override(ERC165Upgradeable, AccessControlUpgradeable) returns (bool) {\n return\n ERC165Upgradeable.supportsInterface(interfaceId) || AccessControlUpgradeable.supportsInterface(interfaceId);\n }\n\n /// @dev Apply the fees & royalties only for users NOT granted with the role EXCHANGE_ADMIN_ROLE\n /// @param from address to check\n function _applyFees(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 function _msgData() internal view override(ContextUpgradeable, ERC2771HandlerUpgradeable) returns (bytes calldata) {\n return ERC2771HandlerUpgradeable._msgData();\n }\n}\n" + }, + "@sandbox-smart-contracts/marketplace/contracts/exchange/ExchangeCore.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.21;\n\nimport {Initializable} from \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport {LibFill} from \"./libraries/LibFill.sol\";\nimport {TransferExecutor} from \"../transfer-manager/TransferExecutor.sol\";\nimport {LibAsset} from \"../lib-asset/LibAsset.sol\";\nimport {LibOrder} from \"../lib-order/LibOrder.sol\";\nimport {LibPart} from \"../lib-part/LibPart.sol\";\nimport {ITransferManager} from \"../transfer-manager/interfaces/ITransferManager.sol\";\nimport {IOrderValidator} from \"../interfaces/IOrderValidator.sol\";\n\n/// @notice ExchangeCore contract\n/// @dev contains the main functions for the marketplace\nabstract contract ExchangeCore is Initializable, TransferExecutor, ITransferManager {\n // a list of left/right orders that match each other\n // left and right are symmetrical except for fees that are taken from left side first.\n struct ExchangeMatch {\n LibOrder.Order orderLeft; // left order\n bytes signatureLeft; // signature for the left order\n LibOrder.Order orderRight; // right order\n bytes signatureRight; // signature for the right order\n }\n\n /// @notice OrderValidator contract\n /// @return OrderValidator address\n IOrderValidator public orderValidator;\n\n uint256 private constant UINT256_MAX = type(uint256).max;\n\n /// @notice stores the fills for orders\n /// @return order fill\n mapping(bytes32 => uint256) public fills;\n\n /// @notice event signaling that an order was canceled\n /// @param hash order hash\n event Cancel(bytes32 indexed hash, LibOrder.Order order);\n\n /* /// @notice event when orders match\n /// @param from _msgSender\n /// @param leftHash left order hash\n /// @param rightHash right order hash\n /// @param newLeftFill fill for left order\n /// @param newRightFill fill for right order\n /// @param totalFillLeft total fill left\n /// @param totalFillRight total fill right */\n event Match(\n address indexed from,\n bytes32 leftHash,\n bytes32 rightHash,\n LibFill.FillResult newFill,\n uint256 totalFillLeft,\n uint256 totalFillRight,\n uint256 valueLeft,\n uint256 valueRight\n );\n event OrderValidatorSet(IOrderValidator indexed contractAddress);\n\n /// @notice initializer for ExchangeCore\n /// @param newOrderValidatorAddress new OrderValidator contract address\n /// @dev initialize permissions for native token exchange\n // solhint-disable-next-line func-name-mixedcase\n function __ExchangeCoreInitialize(IOrderValidator newOrderValidatorAddress) internal onlyInitializing {\n _setOrderValidatorContract(newOrderValidatorAddress);\n }\n\n /// @notice set OrderValidator address\n /// @param contractAddress new OrderValidator contract address\n function _setOrderValidatorContract(IOrderValidator contractAddress) internal {\n require(address(contractAddress) != address(0), \"invalid order validator\");\n orderValidator = contractAddress;\n emit OrderValidatorSet(contractAddress);\n }\n\n /// @notice cancel order\n /// @param order to be canceled\n /// @param orderKeyHash used as a checksum to avoid mistakes in the values of order\n /// @dev require msg sender to be order maker and salt different from 0\n function _cancel(LibOrder.Order calldata order, bytes32 orderKeyHash) internal {\n require(order.salt != 0, \"ExchangeCore: 0 salt can't be used\");\n bytes32 _orderKeyHash = LibOrder.hashKey(order);\n require(_orderKeyHash == orderKeyHash, \"ExchangeCore: Invalid orderHash\");\n fills[orderKeyHash] = UINT256_MAX;\n emit Cancel(orderKeyHash, order);\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 validate orders through validateOrders before matchAndTransfer\n function _matchOrders(address sender, ExchangeMatch[] calldata matchedOrders) internal {\n uint256 len = matchedOrders.length;\n require(len > 0, \"invalid exchange match\");\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 function, validate orders\n /// @param sender the message sender\n /// @param orderLeft left order\n /// @param signatureLeft order left signature\n /// @param orderRight right order\n /// @param signatureRight order right signature\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 their assets\n /// @param sender the message sender\n /// @param orderLeft the left order of the match\n /// @param orderRight the right order of the match\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 LibFill.FillResult memory newFill = _parseOrdersSetFillEmitMatch(sender, orderLeft, orderRight);\n\n doTransfers(\n ITransferManager.DealSide({\n asset: LibAsset.Asset({assetType: makeMatch, value: newFill.leftValue}),\n payouts: _payToMaker(orderLeft),\n from: orderLeft.maker\n }),\n ITransferManager.DealSide({\n asset: LibAsset.Asset(takeMatch, newFill.rightValue),\n payouts: _payToMaker(orderRight),\n from: orderRight.maker\n }),\n LibAsset.getFeeSide(makeMatch.assetClass, takeMatch.assetClass)\n );\n }\n\n /// @notice create a payout array that pays to maker 100%\n /// @param order the order from which the maker is taken\n /// @return an array with just one entry that pays to order.maker\n function _payToMaker(LibOrder.Order memory order) internal pure returns (LibPart.Part[] memory) {\n LibPart.Part[] memory payout = new LibPart.Part[](1);\n payout[0].account = order.maker;\n payout[0].value = 10000;\n return payout;\n }\n\n /// @notice parse orders with LibOrderDataGeneric parse() 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 (LibFill.FillResult memory newFill) {\n bytes32 leftOrderKeyHash = LibOrder.hashKey(orderLeft);\n bytes32 rightOrderKeyHash = LibOrder.hashKey(orderRight);\n\n uint256 leftOrderFill = _getOrderFill(orderLeft.salt, leftOrderKeyHash);\n uint256 rightOrderFill = _getOrderFill(orderRight.salt, rightOrderKeyHash);\n newFill = LibFill.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[leftOrderKeyHash] = leftOrderFill + newFill.rightValue;\n }\n\n if (orderRight.salt != 0) {\n fills[rightOrderKeyHash] = rightOrderFill + newFill.leftValue;\n }\n\n emit Match({\n from: sender,\n leftHash: leftOrderKeyHash,\n rightHash: rightOrderKeyHash,\n newFill: newFill,\n totalFillLeft: fills[leftOrderKeyHash],\n totalFillRight: fills[rightOrderKeyHash],\n valueLeft: orderLeft.makeAsset.value,\n valueRight: orderRight.makeAsset.value\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 uint256[49] private __gap;\n}\n" + }, + "@sandbox-smart-contracts/marketplace/contracts/exchange/libraries/LibFill.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.21;\n\nimport {LibOrder} from \"../../lib-order/LibOrder.sol\";\nimport {LibMath} from \"./LibMath.sol\";\n\n/// @title This library provides `fillOrder` function.\n/// @notice It calculates fill of both orders (part of the Order that can be filled).\nlibrary LibFill {\n struct FillResult {\n uint256 leftValue;\n uint256 rightValue;\n }\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 calculate the remaining fill from orders\n /// @param order order that we will calculate the remaining fill\n /// @param fill to be subtracted\n /// @return makeValue remaining fill from make side\n /// @return takeValue remaining fill from take side\n function calculateRemaining(\n LibOrder.Order calldata order,\n uint256 fill\n ) internal pure returns (uint256 makeValue, uint256 takeValue) {\n takeValue = order.takeAsset.value - fill;\n makeValue = LibMath.safeGetPartialAmountFloor(order.makeAsset.value, order.takeAsset.value, takeValue);\n }\n\n function fillRight(\n uint256 leftMakeValue,\n uint256 leftTakeValue,\n uint256 rightMakeValue,\n uint256 rightTakeValue\n ) internal pure returns (FillResult memory result) {\n uint256 makerValue = LibMath.safeGetPartialAmountFloor(rightTakeValue, leftMakeValue, leftTakeValue);\n require(makerValue <= rightMakeValue, \"fillRight: unable to fill\");\n return FillResult(rightTakeValue, makerValue);\n }\n\n function fillLeft(\n uint256 leftMakeValue,\n uint256 leftTakeValue,\n uint256 rightMakeValue,\n uint256 rightTakeValue\n ) internal pure returns (FillResult memory result) {\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/exchange/libraries/LibMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.21;\n\nlibrary LibMath {\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 * 1000 >= numerator * target;\n }\n\n function safeGetPartialAmountCeil(\n uint256 numerator,\n uint256 denominator,\n uint256 target\n ) internal pure returns (uint256 partialAmount) {\n if (isRoundingErrorCeil(numerator, denominator, target)) {\n revert(\"rounding error\");\n }\n partialAmount = (numerator * target) + ((denominator - 1) / denominator);\n }\n\n /// @dev Checks if rounding error >= 0.1% when rounding up.\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 isRoundingErrorCeil(\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 // See the comments in `isRoundingError`.\n if (target == 0 || numerator == 0) {\n // When either is zero, the ideal value and rounded value are zero\n // and there is no rounding error. (Although the relative error\n // is undefined.)\n return false;\n }\n // Compute remainder as before\n uint256 remainder = mulmod(target, numerator, denominator);\n remainder = (denominator - remainder) % denominator;\n isError = remainder * 1000 >= numerator * target;\n return isError;\n }\n}\n" + }, + "@sandbox-smart-contracts/marketplace/contracts/exchange/OrderValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.21;\n\nimport {LibOrder} from \"../lib-order/LibOrder.sol\";\nimport {LibAsset} from \"../lib-asset/LibAsset.sol\";\nimport {IERC1271Upgradeable} from \"@openzeppelin/contracts-upgradeable/interfaces/IERC1271Upgradeable.sol\";\nimport {ECDSAUpgradeable} from \"@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol\";\nimport {AddressUpgradeable} from \"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.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/// @title contract for order validation\n/// @notice validate orders and contains a white list of tokens\ncontract OrderValidator is IOrderValidator, Initializable, EIP712Upgradeable, WhiteList {\n using ECDSAUpgradeable for bytes32;\n using AddressUpgradeable for address;\n\n bytes4 internal constant MAGICVALUE = 0x1626ba7e;\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 OrderValidator\n /// @param admin OrderValidator and Whiteist admin\n /// @param newTsbOnly boolean to indicate that only The Sandbox tokens are accepted by the exchange contract\n /// @param newPartners boolena to indicate that partner tokens are accepted by the exchange contract\n /// @param newOpen boolean to indicate that all assets are accepted by the exchange contract\n /// @param newErc20 boolean to activate the white list of ERC20 tokens\n // solhint-disable-next-line func-name-mixedcase\n function __OrderValidator_init_unchained(\n address admin,\n bool newTsbOnly,\n bool newPartners,\n bool newOpen,\n bool newErc20\n ) public initializer {\n __EIP712_init_unchained(\"Exchange\", \"1\");\n __Whitelist_init(admin, newTsbOnly, newPartners, newOpen, newErc20);\n }\n\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 calldata order, bytes memory signature, address sender) public view {\n require(order.maker != address(0), \"no maker\");\n\n LibOrder.validateOrderTime(order);\n address makeToken = abi.decode(order.makeAsset.assetType.data, (address));\n if (order.makeAsset.assetType.assetClass == LibAsset.AssetClassType.ERC20_ASSET_CLASS) {\n verifyERC20Whitelist(makeToken);\n } else verifyWhiteList(makeToken);\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 // if maker is contract checking ERC1271 signature\n if (order.maker.isContract()) {\n require(\n IERC1271Upgradeable(order.maker).isValidSignature(_hashTypedDataV4(hash), signature) == MAGICVALUE,\n \"contract order signature verification error\"\n );\n return;\n }\n\n // if maker is not contract then checking ECDSA signature\n address recovered = _hashTypedDataV4(hash).recover(signature);\n require(recovered == order.maker, \"order signature verification error\");\n }\n\n /// @notice if ERC20 token is accepted\n /// @param tokenAddress ERC20 token address\n function verifyERC20Whitelist(address tokenAddress) internal view {\n if (erc20List && !hasRole(ERC20_ROLE, tokenAddress)) {\n revert(\"payment token not allowed\");\n }\n }\n\n /// @notice if token is whitelisted\n /// @param tokenAddress ERC20 token address\n function verifyWhiteList(address tokenAddress) internal view {\n if (open) {\n return;\n } else if ((tsbOnly && hasRole(TSB_ROLE, tokenAddress)) || (partners && hasRole(PARTNER_ROLE, tokenAddress))) {\n return;\n } else {\n revert(\"not allowed\");\n }\n }\n\n uint256[50] private __gap;\n}\n" + }, + "@sandbox-smart-contracts/marketplace/contracts/exchange/WhiteList.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.21;\n\nimport {AccessControlUpgradeable} from \"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\";\nimport {IWhiteList} from \"../interfaces/IWhiteList.sol\";\n\n/// @title WhiteList contract\n/// @dev controls which tokens are accepted in the marketplace\ncontract WhiteList is IWhiteList, AccessControlUpgradeable {\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\n /// @return hash for ERC20_ROLE\n bytes32 public constant ERC20_ROLE = keccak256(\"ERC20_ROLE\");\n\n /// @notice if status == tsbOnly, then only tsbListedContracts [small mapping]\n /// @return tsbOnly\n bool public tsbOnly;\n\n /// @notice if status == partners, then tsbListedContracts and partnerContracts [manageable mapping]\n /// @return partners\n bool public partners;\n\n /// @notice if status == open, then no whitelist [no mapping needed]. But then we need a removeListing function for contracts we subsequently\n /// @return open\n bool public open;\n\n /// @notice if status == erc20List, users can only pay white whitelisted ERC20 tokens\n /// @return erc20List\n bool public erc20List;\n\n /// @notice event emitted when new permissions for tokens are added\n /// @param tsbOnly boolean indicating that TSB tokens are accepted\n /// @param partners boolean indicating that partner tokens are accepted\n /// @param open boolean indicating that all tokens are accepted\n /// @param erc20List boolean indicating that there is a restriction for ERC20 tokens\n event PermissionSetted(bool tsbOnly, bool partners, bool open, bool erc20List);\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 WhiteList\n /// @param admin whitelist admin\n /// @param newTsbOnly allows orders with The Sandbox token\n /// @param newPartners allows orders with partner token\n /// @param newOpen allows orders with any token\n /// @param newErc20List allows to pay orders with only whitelisted token\n // solhint-disable-next-line func-name-mixedcase\n function __Whitelist_init(\n address admin,\n bool newTsbOnly,\n bool newPartners,\n bool newOpen,\n bool newErc20List\n ) internal initializer {\n __AccessControl_init_unchained();\n _grantRole(DEFAULT_ADMIN_ROLE, admin);\n tsbOnly = newTsbOnly;\n partners = newPartners;\n open = newOpen;\n erc20List = newErc20List;\n }\n\n /// @notice setting permissions for tokens\n /// @param newTsbOnly allows orders with The Sandbox token\n /// @param newPartners allows orders with partner token\n /// @param newOpen allows orders with any token\n /// @param newErc20List allows to pay orders with only whitelisted token\n function setPermissions(\n bool newTsbOnly,\n bool newPartners,\n bool newOpen,\n bool newErc20List\n ) external onlyRole(DEFAULT_ADMIN_ROLE) {\n tsbOnly = newTsbOnly;\n partners = newPartners;\n open = newOpen;\n erc20List = newErc20List;\n\n emit PermissionSetted(tsbOnly, partners, open, erc20List);\n }\n\n /// @notice add token to tsb list\n /// @param tokenAddress token address\n function addTSB(address tokenAddress) external onlyRole(DEFAULT_ADMIN_ROLE) {\n grantRole(TSB_ROLE, tokenAddress);\n }\n\n /// @notice remove token from tsb list\n /// @param tokenAddress token address\n function removeTSB(address tokenAddress) external onlyRole(DEFAULT_ADMIN_ROLE) {\n revokeRole(TSB_ROLE, tokenAddress);\n }\n\n /// @notice add token to partners list\n /// @param tokenAddress token address\n function addPartner(address tokenAddress) external onlyRole(DEFAULT_ADMIN_ROLE) {\n grantRole(PARTNER_ROLE, tokenAddress);\n }\n\n /// @notice remove token from partner list\n /// @param tokenAddress token address\n function removePartner(address tokenAddress) external onlyRole(DEFAULT_ADMIN_ROLE) {\n revokeRole(PARTNER_ROLE, tokenAddress);\n }\n\n /// @notice add token to the ERC20 list\n /// @param tokenAddress token address\n function addERC20(address tokenAddress) external onlyRole(DEFAULT_ADMIN_ROLE) {\n grantRole(ERC20_ROLE, tokenAddress);\n }\n\n /// @notice remove token from ERC20 list\n /// @param tokenAddress token address\n function removeERC20(address tokenAddress) external onlyRole(DEFAULT_ADMIN_ROLE) {\n revokeRole(ERC20_ROLE, tokenAddress);\n }\n}\n" + }, + "@sandbox-smart-contracts/marketplace/contracts/interfaces/IOrderValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.21;\n\nimport {LibOrder} from \"../lib-order/LibOrder.sol\";\n\n/// @title interface for the OrderValidator contract\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.21;\n\nimport {LibPart} from \"../lib-part/LibPart.sol\";\n\n/// @title interface for the RoyaltiesProvider contract\n/// @notice contains the signature for the getRoyalties function\ninterface IRoyaltiesProvider {\n /// @notice calculates all roaylties in token for tokenId\n /// @param token address of token\n /// @param tokenId of the token we want to calculate royalites\n /// @return a LibPart.Part with allroyalties for token\n function getRoyalties(address token, uint256 tokenId) external returns (LibPart.Part[] memory);\n}\n" + }, + "@sandbox-smart-contracts/marketplace/contracts/interfaces/IWhiteList.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.21;\n\n/// @title interface for the WhiteList contract\n/// @notice contains the signature for the contract function\ninterface IWhiteList {\n /// @notice if status == tsbOnly, then only tsbListedContracts [small mapping]\n /// @return tsbOnly\n function tsbOnly() external view returns (bool);\n\n /// @notice if status == partners, then tsbListedContracts and partnerContracts [manageable mapping]\n /// @return partners\n function partners() external view returns (bool);\n\n // @notice if status == open, then no whitelist [no mapping needed]. But then we need a removeListing function for contracts we subsequently\n /// @return open\n function open() external view returns (bool);\n\n /// @notice if status == erc20List, users can only pay white whitelisted ERC20 tokens\n /// @return erc20List\n function erc20List() external view returns (bool);\n}\n" + }, + "@sandbox-smart-contracts/marketplace/contracts/lib-asset/LibAsset.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.21;\n\n/// @title library for Assets\n/// @notice contains structs for Asset and AssetType\nlibrary LibAsset {\n enum AssetClassType {\n INVALID_ASSET_CLASS,\n ERC20_ASSET_CLASS,\n ERC721_ASSET_CLASS,\n ERC1155_ASSET_CLASS\n }\n\n enum FeeSide {\n NONE,\n LEFT,\n RIGHT\n }\n\n /// @dev AssetType is a type of a specific asset. For example AssetType is specific ERC-721 token (key is token + tokenId) or specific ERC-20 token (DAI for example).\n /// @dev It consists of asset class and generic data (format of data is different for different asset classes). For example, for asset class ERC20 data holds address of the token, for ERC-721 data holds smart contract address and tokenId.\n struct AssetType {\n AssetClassType assetClass;\n bytes data;\n }\n\n /// @dev Asset represents any asset on ethereum blockchain. Asset has type and value (amount of an asset).\n struct Asset {\n AssetType assetType;\n uint256 value;\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 decides if the fees will be taken and from which side\n /// @param leftClass left side asset class type\n /// @param rightClass right side asset class type\n /// @return side from which the fees will be taken or none\n function getFeeSide(AssetClassType leftClass, AssetClassType rightClass) internal pure returns (FeeSide) {\n if (leftClass == AssetClassType.ERC20_ASSET_CLASS && rightClass != AssetClassType.ERC20_ASSET_CLASS) {\n return FeeSide.LEFT;\n }\n if (rightClass == AssetClassType.ERC20_ASSET_CLASS && leftClass != AssetClassType.ERC20_ASSET_CLASS) {\n return FeeSide.RIGHT;\n }\n return FeeSide.NONE;\n }\n\n /// @notice calculate if Asset types match with each other\n /// @param leftType to be matched with rightAssetType\n /// @param rightType to be matched with leftAssetType\n /// @return AssetType of the match\n function matchAssets(\n AssetType calldata leftType,\n AssetType calldata rightType\n ) internal pure returns (AssetType memory) {\n AssetClassType classLeft = leftType.assetClass;\n AssetClassType classRight = rightType.assetClass;\n\n require(classLeft != AssetClassType.INVALID_ASSET_CLASS, \"not found IAssetMatcher\");\n require(classRight != AssetClassType.INVALID_ASSET_CLASS, \"not found IAssetMatcher\");\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 calculate hash of asset type\n /// @param assetType to be hashed\n /// @return hash of assetType\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 calculate hash of asset\n /// @param asset to be hashed\n /// @return hash of 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" + }, + "@sandbox-smart-contracts/marketplace/contracts/lib-bp/BpLibrary.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.21;\n\n/// @title library for Base Point calculation\n/// @notice contains a method for basepoint calculation\nlibrary BpLibrary {\n /// @notice basepoint calculation\n /// @param value value to be multiplied by basepoint\n /// @param bpValue basepoint value\n /// @return value times basepoint divided by 10000\n function bp(uint256 value, uint256 bpValue) internal pure returns (uint256) {\n return (value * bpValue) / 10000;\n }\n}\n" + }, + "@sandbox-smart-contracts/marketplace/contracts/lib-order/LibOrder.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.21;\n\nimport {LibAsset} from \"../lib-asset/LibAsset.sol\";\n\n/// @title library for Order\n/// @notice contains structs and functions related to Order\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 struct Order {\n address maker;\n LibAsset.Asset makeAsset;\n address taker;\n LibAsset.Asset takeAsset;\n uint256 salt;\n uint256 start;\n uint256 end;\n }\n\n /// @notice calculate hash key from order\n /// @param order object to be hashed\n /// @return hash key of 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 calculate hash from order\n /// @param order object to be hashed\n /// @return hash of 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 function validateOrderTime(Order memory order) internal view {\n // solhint-disable-next-line not-rely-on-time\n require(order.start == 0 || order.start < block.timestamp, \"Order start validation failed\");\n // solhint-disable-next-line not-rely-on-time\n require(order.end == 0 || order.end > block.timestamp, \"Order end validation failed\");\n }\n}\n" + }, + "@sandbox-smart-contracts/marketplace/contracts/lib-part/LibPart.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.21;\n\n/// @title library for parts of transaction fees\n/// @notice contains the struct for Part, containing the fee recipient and value\nlibrary LibPart {\n /// @notice type hash of Part struct\n /// @return hash of Part struct\n bytes32 public constant TYPE_HASH = keccak256(\"Part(address account,uint96 value)\");\n\n struct Part {\n address account;\n uint96 value;\n }\n\n /// @notice hash part object\n /// @param part to be hashed\n /// @return resulting hash\n function hash(Part memory part) internal pure returns (bytes32) {\n return keccak256(abi.encode(TYPE_HASH, part.account, part.value));\n }\n}\n" + }, + "@sandbox-smart-contracts/marketplace/contracts/royalties-registry/IMultiRoyaltyRecipients.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport {IERC165} from \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\n\n/// @title interface for MultiRoyaltyRecipients\n/// @notice Multi-receiver EIP2981 reference override implementation\ninterface IMultiRoyaltyRecipients is IERC165 {\n struct Recipient {\n address payable recipient;\n uint16 bps;\n }\n\n /// @notice get recipients of token royalties\n /// @param tokenId token identifier\n /// @return array of royalties recipients\n function getRecipients(uint256 tokenId) external view returns (Recipient[] memory);\n}\n" + }, + "@sandbox-smart-contracts/marketplace/contracts/royalties-registry/RoyaltiesRegistry.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.21;\n\nimport {IMultiRoyaltyRecipients} from \"./IMultiRoyaltyRecipients.sol\";\nimport {IRoyaltiesProvider} from \"../interfaces/IRoyaltiesProvider.sol\";\nimport {LibRoyalties2981} from \"../royalties/LibRoyalties2981.sol\";\nimport {LibPart} from \"../lib-part/LibPart.sol\";\nimport {IERC2981} from \"../royalties/IERC2981.sol\";\nimport {IERC165Upgradeable} from \"@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol\";\nimport {OwnableUpgradeable} from \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\n\n/// @title royalties registry contract\n/// @notice contract allows to processing different types of royalties\ncontract RoyaltiesRegistry is IRoyaltiesProvider, OwnableUpgradeable {\n /// @notice deprecated\n /// @param token deprecated\n /// @param tokenId deprecated\n /// @param royalties deprecated\n event RoyaltiesSetForToken(address indexed token, uint256 indexed tokenId, LibPart.Part[] royalties);\n\n /// @notice emitted when royalties is set for token\n /// @param token token address\n /// @param royalties array of royalties\n event RoyaltiesSetForContract(address indexed token, LibPart.Part[] royalties);\n\n /// @dev struct to store royalties in royaltiesByToken\n struct RoyaltiesSet {\n bool initialized;\n LibPart.Part[] royalties;\n }\n\n bytes4 internal constant INTERFACE_ID_GET_RECIPIENTS = 0xfd90e897;\n\n /// @notice deprecated\n mapping(bytes32 => RoyaltiesSet) public royaltiesByTokenAndTokenId;\n\n /// @notice stores royalties for token contract, set in setRoyaltiesByToken() method\n mapping(address => RoyaltiesSet) public royaltiesByToken;\n\n /// @notice stores external provider and royalties type for token contract\n /// @return royaltiesProviders external providers\n mapping(address => uint256) public royaltiesProviders;\n\n uint256 internal constant ROYALTIES_TYPE_UNSET = 0;\n uint256 internal constant ROYALTIES_TYPE_BY_TOKEN = 1;\n uint256 internal constant ROYALTIES_TYPE_EXTERNAL_PROVIDER = 2;\n uint256 internal constant ROYALTIES_TYPE_EIP2981 = 3;\n uint256 internal constant ROYALTIES_TYPE_UNSUPPORTED_NONEXISTENT = 4;\n uint256 internal constant ROYALTIES_TYPES_AMOUNT = 4;\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 // solhint-disable-next-line func-name-mixedcase\n function __RoyaltiesRegistry_init() external initializer {\n __Ownable_init();\n }\n\n /// @notice sets external provider for token contract, and royalties type = 4\n /// @param token token address\n /// @param provider address of provider\n function setProviderByToken(address token, address provider) external {\n checkOwner(token);\n setRoyaltiesType(token, ROYALTIES_TYPE_EXTERNAL_PROVIDER, provider);\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 royalties type for token contract\n /// @param token token address\n /// @return royalty type\n function getRoyaltiesType(address token) external view returns (uint256) {\n return _getRoyaltiesType(royaltiesProviders[token]);\n }\n\n /// @notice returns royalties type from uint\n /// @param data in uint256\n /// @return royalty type\n function _getRoyaltiesType(uint256 data) internal pure returns (uint256) {\n for (uint256 i = 1; i <= ROYALTIES_TYPES_AMOUNT; ++i) {\n if (data / 2 ** (256 - i) == 1) {\n return i;\n }\n }\n return ROYALTIES_TYPE_UNSET;\n }\n\n /// @notice sets royalties type for token contract\n /// @param token address of token\n /// @param royaltiesType uint256 of royalty type\n /// @param royaltiesProvider address of royalty provider\n function setRoyaltiesType(address token, uint256 royaltiesType, address royaltiesProvider) internal {\n require(royaltiesType > 0 && royaltiesType <= ROYALTIES_TYPES_AMOUNT, \"wrong royaltiesType\");\n royaltiesProviders[token] = uint(uint160(royaltiesProvider)) + 2 ** (256 - royaltiesType);\n }\n\n /// @notice clears and sets new royalties type for token contract\n /// @param token address of token\n /// @param royaltiesType roayalty type\n function forceSetRoyaltiesType(address token, uint256 royaltiesType) external {\n checkOwner(token);\n setRoyaltiesType(token, royaltiesType, getProvider(token));\n }\n\n /// @notice clears royalties type for token contract\n /// @param token address of token\n function clearRoyaltiesType(address token) external {\n checkOwner(token);\n royaltiesProviders[token] = uint(uint160(getProvider(token)));\n }\n\n /// @notice sets royalties for token contract in royaltiesByToken mapping and royalties type = 1\n /// @param token address of token\n /// @param royalties array of royalties\n function setRoyaltiesByToken(address token, LibPart.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, 1, 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), \"RoyaltiesByToken recipient should be present\");\n require(royalties[i].value != 0, \"Royalty value for RoyaltiesByToken should be > 0\");\n royaltiesByToken[token].royalties.push(royalties[i]);\n sumRoyalties += royalties[i].value;\n }\n require(sumRoyalties < 10000, \"Set by token royalties sum more, than 100%\");\n royaltiesByToken[token].initialized = true;\n emit RoyaltiesSetForContract(token, royalties);\n }\n\n /// @notice checks if msg.sender is owner of this contract or owner of the token contract\n /// @param token address of token\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 calculates royalties type for token contract\n /// @param token address of token\n /// @param royaltiesProvider address of royalty provider\n /// @return royalty type\n function calculateRoyaltiesType(address token, address royaltiesProvider) internal view returns (uint256) {\n try IERC165Upgradeable(token).supportsInterface(LibRoyalties2981._INTERFACE_ID_ROYALTIES) returns (\n bool result2981\n ) {\n if (result2981) {\n return ROYALTIES_TYPE_EIP2981;\n }\n // solhint-disable-next-line no-empty-blocks\n } catch {}\n\n if (royaltiesProvider != address(0)) {\n return ROYALTIES_TYPE_EXTERNAL_PROVIDER;\n }\n\n if (royaltiesByToken[token].initialized) {\n return ROYALTIES_TYPE_BY_TOKEN;\n }\n\n return ROYALTIES_TYPE_UNSUPPORTED_NONEXISTENT;\n }\n\n /// @notice returns royalties for token contract and token id\n /// @param token address of token\n /// @param tokenId id of token\n /// @return royalties in form of an array of Parts\n function getRoyalties(address token, uint256 tokenId) external override returns (LibPart.Part[] memory) {\n uint256 royaltiesProviderData = royaltiesProviders[token];\n\n address royaltiesProvider = address(uint160(royaltiesProviderData));\n uint256 royaltiesType = _getRoyaltiesType(royaltiesProviderData);\n\n // case when royaltiesType is not set\n if (royaltiesType == ROYALTIES_TYPE_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 == ROYALTIES_TYPE_BY_TOKEN) {\n return royaltiesByToken[token].royalties;\n }\n\n //case royaltiesType = 2, royalties from external provider\n if (royaltiesType == ROYALTIES_TYPE_EXTERNAL_PROVIDER) {\n return providerExtractor(token, tokenId, royaltiesProvider);\n }\n\n //case royaltiesType = 3, royalties EIP-2981\n if (royaltiesType == ROYALTIES_TYPE_EIP2981) {\n return getRoyaltiesEIP2981(token, tokenId);\n }\n\n // case royaltiesType = 4, unknown/empty royalties\n if (royaltiesType == ROYALTIES_TYPE_UNSUPPORTED_NONEXISTENT) {\n return new LibPart.Part[](0);\n }\n\n revert(\"something wrong in getRoyalties\");\n }\n\n /// @notice tries to get royalties EIP-2981 for token and tokenId\n /// @param token address of token\n /// @param tokenId id of token\n /// @return royalties 2981 royalty array\n function getRoyaltiesEIP2981(\n address token,\n uint256 tokenId\n ) internal view returns (LibPart.Part[] memory royalties) {\n try IERC2981(token).royaltyInfo(tokenId, LibRoyalties2981._WEIGHT_VALUE) returns (\n address receiver,\n uint256 royaltyAmount\n ) {\n try IERC165Upgradeable(token).supportsInterface(INTERFACE_ID_GET_RECIPIENTS) returns (bool result) {\n if (result) {\n try IMultiRoyaltyRecipients(token).getRecipients(tokenId) returns (\n IMultiRoyaltyRecipients.Recipient[] memory multiRecipients\n ) {\n uint256 multiRecipientsLength = multiRecipients.length;\n royalties = new LibPart.Part[](multiRecipientsLength);\n uint256 sum = 0;\n for (uint256 i; i < multiRecipientsLength; i++) {\n IMultiRoyaltyRecipients.Recipient memory splitRecipient = multiRecipients[i];\n royalties[i].account = splitRecipient.recipient;\n uint256 splitAmount = (splitRecipient.bps * royaltyAmount) / LibRoyalties2981._WEIGHT_VALUE;\n royalties[i].value = uint96(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 } catch {\n return LibRoyalties2981.calculateRoyalties(receiver, royaltyAmount);\n }\n } else {\n return LibRoyalties2981.calculateRoyalties(receiver, royaltyAmount);\n }\n } catch {\n return LibRoyalties2981.calculateRoyalties(receiver, royaltyAmount);\n }\n } catch {\n return new LibPart.Part[](0);\n }\n }\n\n /// @notice tries to get royalties for token and tokenId from external provider set in royaltiesProviders\n /// @param token address of token\n /// @param tokenId id of token\n /// @param providerAddress address of external provider\n /// @return external royalties\n function providerExtractor(\n address token,\n uint256 tokenId,\n address providerAddress\n ) internal returns (LibPart.Part[] memory) {\n try IRoyaltiesProvider(providerAddress).getRoyalties(token, tokenId) returns (LibPart.Part[] memory result) {\n return result;\n } catch {\n return new LibPart.Part[](0);\n }\n }\n\n uint256[46] private __gap;\n}\n" + }, + "@sandbox-smart-contracts/marketplace/contracts/royalties/IERC2981.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.21;\n\n/// @title Interface for ERC2981\n/// @notice NFT Royalty Standard\ninterface IERC2981 {\n /// @notice Called with the sale price to determine how much royalty is owed and to whom.\n /// @param _tokenId - the NFT asset queried for royalty information\n /// @param _salePrice - the sale price of the NFT asset specified by _tokenId\n /// @return receiver - address of who should be sent the royalty payment\n /// @return royaltyAmount - the royalty payment amount for _salePrice\n function royaltyInfo(\n uint256 _tokenId,\n uint256 _salePrice\n ) external view returns (address receiver, uint256 royaltyAmount);\n}\n" + }, + "@sandbox-smart-contracts/marketplace/contracts/royalties/LibRoyalties2981.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.21;\n\nimport {LibPart} from \"../lib-part/LibPart.sol\";\n\n/// @title library for constants and functions related to ERC2891\n/// @notice standard for signature validation\nlibrary LibRoyalties2981 {\n bytes4 public constant _INTERFACE_ID_ROYALTIES = 0x2a55205a;\n uint96 internal constant _WEIGHT_VALUE = 1e6;\n\n /// @notice method for converting amount to percent and forming LibPart\n /// @param to recipient of royalties\n /// @param amount of royalties\n /// @return LibPart with account and value\n function calculateRoyalties(address to, uint256 amount) internal pure returns (LibPart.Part[] memory) {\n LibPart.Part[] memory result;\n if (amount == 0) {\n return result;\n }\n uint256 percent = (amount * 10000) / _WEIGHT_VALUE;\n require(percent < 10000, \"Royalties 2981 exceeds 100%\");\n result = new LibPart.Part[](1);\n result[0].account = payable(to);\n result[0].value = uint96(percent);\n return result;\n }\n}\n" + }, + "@sandbox-smart-contracts/marketplace/contracts/transfer-manager/interfaces/IRoyaltyUGC.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IRoyaltyUGC {\n function getCreatorAddress(uint256 tokenId) external pure returns (address creator);\n}\n" + }, + "@sandbox-smart-contracts/marketplace/contracts/transfer-manager/interfaces/ITransferExecutor.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.21;\n\nimport {LibAsset} from \"../../lib-asset/LibAsset.sol\";\n\nabstract contract ITransferExecutor {\n function transfer(LibAsset.Asset memory asset, address from, address to) internal virtual;\n}\n" + }, + "@sandbox-smart-contracts/marketplace/contracts/transfer-manager/interfaces/ITransferManager.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.21;\n\nimport {ITransferExecutor} from \"./ITransferExecutor.sol\";\nimport {LibAsset} from \"../../lib-asset/LibAsset.sol\";\nimport {LibPart} from \"../../lib-part/LibPart.sol\";\n\nabstract contract ITransferManager is ITransferExecutor {\n struct DealSide {\n LibAsset.Asset asset;\n LibPart.Part[] payouts;\n address from;\n }\n\n function doTransfers(DealSide memory left, DealSide memory right, LibAsset.FeeSide feeSide) internal virtual;\n}\n" + }, + "@sandbox-smart-contracts/marketplace/contracts/transfer-manager/TransferExecutor.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.21;\n\nimport {SafeERC20Upgradeable} from \"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\";\nimport {IERC20Upgradeable} from \"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\";\nimport {IERC721Upgradeable} from \"@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol\";\nimport {IERC1155Upgradeable} from \"@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol\";\nimport {Initializable} from \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport {LibAsset} from \"../lib-asset/LibAsset.sol\";\nimport {ITransferExecutor} from \"./interfaces/ITransferExecutor.sol\";\n\n/// @title abstract contract for TransferExecutor\n/// @notice contains transfer functions for any assets as well as ERC20 tokens\nabstract contract TransferExecutor is Initializable, ITransferExecutor {\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 function transfer(LibAsset.Asset memory asset, address from, address to) internal override {\n if (asset.assetType.assetClass == LibAsset.AssetClassType.ERC721_ASSET_CLASS) {\n //not using transfer proxy when transferring from this contract\n (address token, uint256 tokenId) = abi.decode(asset.assetType.data, (address, uint256));\n require(asset.value == 1, \"erc721 value error\");\n erc721safeTransferFrom(IERC721Upgradeable(token), from, to, tokenId);\n } else if (asset.assetType.assetClass == LibAsset.AssetClassType.ERC20_ASSET_CLASS) {\n //not using transfer proxy when transferring from this contract\n address token = abi.decode(asset.assetType.data, (address));\n SafeERC20Upgradeable.safeTransferFrom(IERC20Upgradeable(token), from, to, asset.value);\n } else if (asset.assetType.assetClass == LibAsset.AssetClassType.ERC1155_ASSET_CLASS) {\n //not using transfer proxy when transferring from this contract\n (address token, uint256 tokenId) = abi.decode(asset.assetType.data, (address, uint256));\n erc1155safeTransferFrom(IERC1155Upgradeable(token), from, to, tokenId, asset.value, \"\");\n }\n }\n\n /// @notice function for safe transfer of ERC721 tokens\n /// @param token ERC721 token to be transferred\n /// @param from address from which token will be taken\n /// @param to address that will receive token\n /// @param tokenId id of the token being transferred\n function erc721safeTransferFrom(IERC721Upgradeable token, address from, address to, uint256 tokenId) internal {\n token.safeTransferFrom(from, to, tokenId);\n }\n\n /// @notice function for safe transfer of ERC1155 tokens\n /// @param token ERC1155 token to be transferred\n /// @param from address from which tokens will be taken\n /// @param to address that will receive tokens\n /// @param id id of the tokens being transferred\n /// @param value how many tokens will be transferred\n function erc1155safeTransferFrom(\n IERC1155Upgradeable token,\n address from,\n address to,\n uint256 id,\n uint256 value,\n bytes memory data\n ) internal {\n token.safeTransferFrom(from, to, id, value, data);\n }\n\n uint256[49] private __gap;\n}\n" + }, + "@sandbox-smart-contracts/marketplace/contracts/transfer-manager/TransferManager.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.21;\n\nimport {ERC165Upgradeable, IERC165Upgradeable} from \"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\";\nimport {IRoyaltiesProvider} from \"../interfaces/IRoyaltiesProvider.sol\";\nimport {BpLibrary} from \"../lib-bp/BpLibrary.sol\";\nimport {IRoyaltyUGC} from \"./interfaces/IRoyaltyUGC.sol\";\nimport {ITransferManager} from \"./interfaces/ITransferManager.sol\";\nimport {LibAsset} from \"../lib-asset/LibAsset.sol\";\nimport {LibPart} from \"../lib-part/LibPart.sol\";\n\n/// @title TransferManager contract\n/// @notice responsible for transferring all Assets\n/// @dev this manager supports different types of fees\n/// @dev also it supports different beneficiaries\nabstract contract TransferManager is ERC165Upgradeable, ITransferManager {\n using BpLibrary for uint;\n\n bytes4 internal constant INTERFACE_ID_IROYALTYUGC = 0xa30b4db9;\n\n /// @notice fee for primary sales\n /// @return uint256 of primary sale fee\n uint256 public protocolFeePrimary;\n\n /// @notice fee for secondary sales\n /// @return uint256 of secondary sale fee\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 event for when protocol fees are set\n /// @param newProtocolFeePrimary fee for primary market\n /// @param newProtocolFeeSecondary fee for secondary market\n event ProtocolFeeSet(uint256 newProtocolFeePrimary, uint256 newProtocolFeeSecondary);\n\n /// @notice event for when a royalties registry is set\n /// @param newRoyaltiesRegistry address of new royalties registry\n event RoyaltiesRegistrySet(IRoyaltiesProvider newRoyaltiesRegistry);\n\n /// @notice event for when a default fee receiver is set\n /// @param newDefaultFeeReceiver address that gets the fees\n event DefaultFeeReceiverSet(address newDefaultFeeReceiver);\n\n /// @notice initializer for TransferExecutor\n /// @param newProtocolFeePrimary fee for primary market\n /// @param newProtocolFeeSecondary fee for 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 __ERC165_init();\n _setProtocolFee(newProtocolFeePrimary, newProtocolFeeSecondary);\n _setRoyaltiesRegistry(newRoyaltiesProvider);\n _setDefaultFeeReceiver(newDefaultFeeReceiver);\n }\n\n /// @notice setter for royalty registry\n /// @param newRoyaltiesRegistry address of new royalties registry\n function _setRoyaltiesRegistry(IRoyaltiesProvider newRoyaltiesRegistry) internal {\n require(address(newRoyaltiesRegistry) != address(0), \"invalid Royalties Registry\");\n royaltiesRegistry = newRoyaltiesRegistry;\n\n emit RoyaltiesRegistrySet(newRoyaltiesRegistry);\n }\n\n /// @notice setter for protocol fees\n /// @param newProtocolFeePrimary fee for primary market\n /// @param newProtocolFeeSecondary fee for secondary market\n function _setProtocolFee(uint256 newProtocolFeePrimary, uint256 newProtocolFeeSecondary) internal {\n require(newProtocolFeePrimary < 5000, \"invalid primary fee\");\n require(newProtocolFeeSecondary < 5000, \"invalid secodary fee\");\n protocolFeePrimary = newProtocolFeePrimary;\n protocolFeeSecondary = newProtocolFeeSecondary;\n\n emit ProtocolFeeSet(newProtocolFeePrimary, newProtocolFeeSecondary);\n }\n\n /// @notice setter for default fee receiver\n /// @param newDefaultFeeReceiver address that gets the fees\n function _setDefaultFeeReceiver(address newDefaultFeeReceiver) internal {\n require(address(newDefaultFeeReceiver) != address(0), \"invalid default fee receiver\");\n defaultFeeReceiver = newDefaultFeeReceiver;\n\n emit DefaultFeeReceiverSet(newDefaultFeeReceiver);\n }\n\n /// @notice executes transfers for 2 matched orders\n /// @param left DealSide from the left order (see LibDeal.sol)\n /// @param right DealSide from the right order (see LibDeal.sol)\n function doTransfers(DealSide memory left, DealSide memory right, LibAsset.FeeSide feeSide) internal override {\n if (feeSide == LibAsset.FeeSide.LEFT) {\n doTransfersWithFees(left, right);\n transferPayouts(right.asset.assetType, right.asset.value, right.from, left.payouts);\n } else if (feeSide == LibAsset.FeeSide.RIGHT) {\n doTransfersWithFees(right, left);\n transferPayouts(left.asset.assetType, left.asset.value, left.from, right.payouts);\n } else {\n transferPayouts(left.asset.assetType, left.asset.value, left.from, right.payouts);\n transferPayouts(right.asset.assetType, right.asset.value, right.from, left.payouts);\n }\n }\n\n /// @notice executes the fee-side transfers (payment + fees)\n /// @param paymentSide DealSide of the fee-side order\n /// @param nftSide DealSide of the nft-side order\n function doTransfersWithFees(DealSide memory paymentSide, DealSide memory nftSide) internal {\n uint256 rest = paymentSide.asset.value;\n\n if (_applyFees(paymentSide.from)) {\n rest = transferRoyalties(\n paymentSide.asset.assetType,\n nftSide.asset.assetType,\n nftSide.payouts,\n rest,\n paymentSide.asset.value,\n paymentSide.from\n );\n\n LibPart.Part[] memory origin = new LibPart.Part[](1);\n origin[0].account = payable(defaultFeeReceiver);\n\n bool primaryMarket = false;\n\n // check if primary or secondary market\n if (\n nftSide.asset.assetType.assetClass == LibAsset.AssetClassType.ERC1155_ASSET_CLASS ||\n nftSide.asset.assetType.assetClass == LibAsset.AssetClassType.ERC721_ASSET_CLASS\n ) {\n (address token, uint256 tokenId) = abi.decode(nftSide.asset.assetType.data, (address, uint));\n try IERC165Upgradeable(token).supportsInterface(INTERFACE_ID_IROYALTYUGC) returns (bool result) {\n if (result) {\n address creator = IRoyaltyUGC(token).getCreatorAddress(tokenId);\n if (nftSide.from == creator) {\n primaryMarket = true;\n }\n }\n // solhint-disable-next-line no-empty-blocks\n } catch {}\n }\n\n if (primaryMarket) {\n origin[0].value = uint96(protocolFeePrimary);\n } else {\n origin[0].value = uint96(protocolFeeSecondary);\n }\n\n (rest, ) = transferFees(\n paymentSide.asset.assetType,\n rest,\n paymentSide.asset.value,\n origin,\n paymentSide.from\n );\n }\n\n transferPayouts(paymentSide.asset.assetType, rest, paymentSide.from, nftSide.payouts);\n }\n\n /// @notice transfer royalties. If there is only one royalties receiver and one address in payouts and they match,\n /// @dev nothing is transferred in this function\n /// @param paymentAssetType Asset Type which represents payment\n /// @param nftAssetType Asset Type which represents NFT to pay royalties for\n /// @param payouts Payouts to be made\n /// @param rest How much of the amount left after previous transfers\n /// @param amount total amount of asset that is going to be transferred\n /// @param from owner of the Asset to transfer\n /// @return How much left after transferring royalties\n function transferRoyalties(\n LibAsset.AssetType memory paymentAssetType,\n LibAsset.AssetType memory nftAssetType,\n LibPart.Part[] memory payouts,\n uint256 rest,\n uint256 amount,\n address from\n ) internal returns (uint256) {\n LibPart.Part[] memory royalties = getRoyaltiesByAssetType(nftAssetType);\n\n if (\n nftAssetType.assetClass == LibAsset.AssetClassType.ERC1155_ASSET_CLASS ||\n nftAssetType.assetClass == LibAsset.AssetClassType.ERC721_ASSET_CLASS\n ) {\n (address token, uint256 tokenId) = abi.decode(nftAssetType.data, (address, uint));\n try IERC165Upgradeable(token).supportsInterface(INTERFACE_ID_IROYALTYUGC) returns (bool resultInterface) {\n if (resultInterface) {\n address creator = IRoyaltyUGC(token).getCreatorAddress(tokenId);\n if (payouts.length == 1 && payouts[0].account == creator) {\n require(royalties[0].value <= 5000, \"Royalties are too high (>50%)\");\n return rest;\n }\n }\n // solhint-disable-next-line no-empty-blocks\n } catch {}\n }\n if (royalties.length == 1 && payouts.length == 1 && royalties[0].account == payouts[0].account) {\n require(royalties[0].value <= 5000, \"Royalties are too high (>50%)\");\n return rest;\n }\n\n (uint256 result, uint256 totalRoyalties) = transferFees(paymentAssetType, rest, amount, royalties, from);\n require(totalRoyalties <= 5000, \"Royalties are too high (>50%)\");\n return result;\n }\n\n /// @notice calculates royalties by asset type.\n /// @param nftAssetType NFT Asset Type to calculate royalties for\n /// @return calculated royalties (Array of LibPart.Part)\n function getRoyaltiesByAssetType(LibAsset.AssetType memory nftAssetType) internal returns (LibPart.Part[] memory) {\n if (\n nftAssetType.assetClass == LibAsset.AssetClassType.ERC1155_ASSET_CLASS ||\n nftAssetType.assetClass == LibAsset.AssetClassType.ERC721_ASSET_CLASS\n ) {\n (address token, uint256 tokenId) = abi.decode(nftAssetType.data, (address, uint));\n return royaltiesRegistry.getRoyalties(token, tokenId);\n }\n LibPart.Part[] memory empty;\n return empty;\n }\n\n /// @notice Transfer fees\n /// @param assetType Asset Type to transfer\n /// @param rest How much of the amount left after previous transfers\n /// @param amount Total amount of the Asset. Used as a base to calculate part from (100%)\n /// @param fees Array of LibPart.Part which represents fees to pay\n /// @param from owner of the Asset to transfer\n /// @return newRest how much left after transferring fees\n /// @return totalFees total number of fees in bp\n function transferFees(\n LibAsset.AssetType memory assetType,\n uint256 rest,\n uint256 amount,\n LibPart.Part[] memory fees,\n address from\n ) internal returns (uint256 newRest, uint256 totalFees) {\n totalFees = 0;\n newRest = rest;\n for (uint256 i = 0; i < fees.length; ++i) {\n totalFees = totalFees + fees[i].value;\n uint256 feeValue;\n (newRest, feeValue) = subFeeInBp(newRest, amount, fees[i].value);\n if (feeValue > 0) {\n transfer(LibAsset.Asset(assetType, feeValue), from, fees[i].account);\n }\n }\n }\n\n /// @notice transfers main part of the asset (payout)\n /// @param assetType Asset Type to transfer\n /// @param amount Amount of the asset to transfer\n /// @param from Current owner of the asset\n /// @param payouts List of payouts - receivers of the Asset\n function transferPayouts(\n LibAsset.AssetType memory assetType,\n uint256 amount,\n address from,\n LibPart.Part[] memory payouts\n ) internal {\n require(payouts.length > 0, \"transferPayouts: nothing to transfer\");\n uint256 sumBps = 0;\n uint256 rest = amount;\n for (uint256 i = 0; i < payouts.length - 1; ++i) {\n uint256 currentAmount = amount.bp(payouts[i].value);\n sumBps = sumBps + payouts[i].value;\n if (currentAmount > 0) {\n rest = rest - currentAmount;\n transfer(LibAsset.Asset(assetType, currentAmount), from, payouts[i].account);\n }\n }\n LibPart.Part memory lastPayout = payouts[payouts.length - 1];\n sumBps = sumBps + lastPayout.value;\n require(sumBps == 10000, \"Sum payouts Bps not equal 100%\");\n if (rest > 0) {\n transfer(LibAsset.Asset(assetType, rest), from, lastPayout.account);\n }\n }\n\n /// @notice subtract fees in BP, or base point\n /// @param value amount left from amount after fees are discounted\n /// @param total total price for asset\n /// @param feeInBp fee in basepoint to be deducted\n function subFeeInBp(\n uint256 value,\n uint256 total,\n uint256 feeInBp\n ) internal pure returns (uint256 newValue, uint256 realFee) {\n return subFee(value, total.bp(feeInBp));\n }\n\n /// @notice subtract fee from value\n /// @param value from which the fees will be deducted\n /// @param fee to deduct from value\n /// @return newValue result from deduction, 0 if value < fee\n /// @return realFee fee value if value > fee, otherwise return value input\n function subFee(uint256 value, uint256 fee) internal pure returns (uint256 newValue, uint256 realFee) {\n if (value > fee) {\n newValue = value - fee;\n realFee = fee;\n } else {\n newValue = 0;\n realFee = value;\n }\n }\n\n /// @dev function deciding if the fees are applied or not, to be overriden\n /// @param from address to check\n function _applyFees(address from) internal virtual returns (bool);\n\n uint256[46] private __gap;\n}\n" + } + }, + "settings": { + "evmVersion": "istanbul", + "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 diff --git a/packages/deploy/hardhat.config.ts b/packages/deploy/hardhat.config.ts index 0326b636d0..b327bd9e75 100644 --- a/packages/deploy/hardhat.config.ts +++ b/packages/deploy/hardhat.config.ts @@ -287,6 +287,7 @@ const compilers = [ ].map((version) => ({ version, settings: { + evmVersion: 'istanbul', optimizer: { enabled: true, runs: 2000,